agentix-cli 0.198.0 → 0.199.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/apps/mac-voice/Sources/AgentXVoice/AgentClient.swift +7 -2
- package/apps/mac-voice/Sources/AgentXVoice/AnswerView.swift +19 -8
- package/apps/mac-voice/Sources/AgentXVoice/Artifacts.swift +54 -0
- package/apps/mac-voice/Sources/AgentXVoice/Markdown.swift +3 -0
- package/apps/mac-voice/Sources/AgentXVoice/PanelAnswer.swift +3 -2
- package/apps/mac-voice/Sources/AgentXVoice/main.swift +7 -7
- package/dist/{App-ODMLQITV.js → App-HGCD735J.js} +2 -2
- package/dist/{ChatApp-MJBOQWUM.js → ChatApp-VVBGBDKU.js} +2 -2
- package/dist/{absorb-eval-QSUGLOOO.js → absorb-eval-2XT7XBH7.js} +2 -2
- package/dist/{adapter-BJLSEQ6M.js → adapter-ZGEMORWD.js} +2 -2
- package/dist/{agent-QJPWZDTL.js → agent-4IF72I6E.js} +2 -2
- package/dist/{board-dashboard-LZRJJ3DZ.js → board-dashboard-2P77CUM3.js} +345 -324
- package/dist/board-dashboard-2P77CUM3.js.map +1 -0
- package/dist/{chunk-GB7NAOZ4.js → chunk-3DAHVUJH.js} +2 -2
- package/dist/{chunk-GGFL7HVN.js → chunk-3DX7CKKW.js} +2 -2
- package/dist/{chunk-GL26HRDW.js → chunk-3SWDVBGA.js} +2 -2
- package/dist/{chunk-C5QQW2L7.js → chunk-5NE26NUO.js} +2 -2
- package/dist/{chunk-PM4Y6ZBW.js → chunk-5QK3U7R6.js} +2 -2
- package/dist/{chunk-HYJWN6L5.js → chunk-5VRN6JP7.js} +2 -2
- package/dist/{chunk-MA5ZF4YY.js → chunk-6QU5YWOE.js} +2 -2
- package/dist/{chunk-D64VFKUU.js → chunk-7SKUXUIX.js} +5 -5
- package/dist/{chunk-IJYCPFLZ.js → chunk-BBXB7X25.js} +2 -2
- package/dist/chunk-DECMCWGN.js +3 -0
- package/dist/{chunk-BIJ3JIWG.js.map → chunk-DECMCWGN.js.map} +1 -1
- package/dist/{chunk-KQ5UJTQR.js → chunk-DUVPXHDO.js} +2 -2
- package/dist/{chunk-SUVJA67A.js → chunk-F6UAAQSU.js} +2 -2
- package/dist/{chunk-CAYGWXWJ.js → chunk-I4U2ELEX.js} +2 -2
- package/dist/{chunk-4FY2NOCD.js → chunk-JAS75QDT.js} +2 -2
- package/dist/{chunk-2AP2F6S5.js → chunk-K2JE5XR4.js} +3 -3
- package/dist/{chunk-VX3IZAF6.js → chunk-K3QWXVLV.js} +2 -2
- package/dist/{chunk-PIY23C2Z.js → chunk-KWU4EOWC.js} +2 -2
- package/dist/{chunk-QHICHZFK.js → chunk-L3FCDIJT.js} +2 -2
- package/dist/{chunk-C3LKB4N7.js → chunk-OCZVJANH.js} +2 -2
- package/dist/{chunk-3KHXOLF5.js → chunk-OWL6JA6W.js} +2 -2
- package/dist/{chunk-XRCWM7JA.js → chunk-RE6N3TRQ.js} +2 -2
- package/dist/{chunk-QF5B5O7K.js → chunk-SPZXOCN5.js} +304 -304
- package/dist/chunk-SPZXOCN5.js.map +1 -0
- package/dist/{chunk-SHNGAN3L.js → chunk-T7HWU7O4.js} +2 -2
- package/dist/chunk-UPRACUXY.js +118 -0
- package/dist/chunk-UPRACUXY.js.map +1 -0
- package/dist/{chunk-I5KOLVB6.js → chunk-UU7A5DNY.js} +2 -2
- package/dist/{chunk-H3NGVXOL.js → chunk-UY25GSQ3.js} +2 -2
- package/dist/{chunk-BZ3AXEZW.js → chunk-XTBFWRM3.js} +2 -2
- package/dist/{chunk-LOFMZHJN.js → chunk-XZFBOXFK.js} +2 -2
- package/dist/{chunk-V2DCI2JL.js → chunk-YU2JJIQH.js} +3 -3
- package/dist/cli.js +1 -1
- package/dist/{client-WAPDTJ5B.js → client-PNZ3LL72.js} +2 -2
- package/dist/config-HOKADOXX.js +2 -0
- package/dist/{config-mutate-ZADHR76X.js → config-mutate-ZR7EM4IB.js} +2 -2
- package/dist/{config-mutator-GJFZWC43.js → config-mutator-NWTMXBEY.js} +2 -2
- package/dist/{contributions-RROXRQEV.js → contributions-NBKZD7QW.js} +2 -2
- package/dist/{doctor-DKUDMNK3.js → doctor-K6SPV3GU.js} +2 -2
- package/dist/{follow-up-tool-OKKSNVCJ.js → follow-up-tool-NPC3JLOA.js} +2 -2
- package/dist/{hub-5X33WEIO.js → hub-NKGZO574.js} +2 -2
- package/dist/index.d.ts +81 -0
- package/dist/index.js +1 -1
- package/dist/{program-4QVJE2JD.js → program-DYFXKKJE.js} +243 -242
- package/dist/program-DYFXKKJE.js.map +1 -0
- package/dist/{promote-YETAZYXW.js → promote-HIFKFRC4.js} +2 -2
- package/dist/{query-IE5EVVY4.js → query-VXE4AREX.js} +2 -2
- package/dist/{query-settings-TF4H7EZS.js → query-settings-NC7FOIRC.js} +2 -2
- package/dist/{registry-OBQMRAYY.js → registry-NGRLHM7L.js} +2 -2
- package/dist/{request-planner-V6J5EISV.js → request-planner-I65SRAJI.js} +2 -2
- package/dist/{review-candidates-MTZEBOP5.js → review-candidates-7KV34XZR.js} +2 -2
- package/dist/{routing-KWZ3X6ZV.js → routing-MLOSXPVH.js} +2 -2
- package/dist/schedule-tool-7DCB7KJP.js +2 -0
- package/dist/{scheduler-ST37UR5V.js → scheduler-WEOQLNIF.js} +2 -2
- package/dist/{seat-RFFUE7RT.js → seat-66LQTUIR.js} +2 -2
- package/dist/{select-DCG457CP.js → select-JV425OUL.js} +2 -2
- package/dist/{set-enabled-TD3MPUDH.js → set-enabled-DWL2MKVS.js} +2 -2
- package/dist/{sprint-tool-OQ55FHX3.js → sprint-tool-CDO3HLLT.js} +2 -2
- package/dist/{tool-JIRXLLQN.js → tool-7EFJJM2A.js} +2 -2
- package/dist/{tool-FQE7ZGBT.js → tool-U3WQCSUN.js} +2 -2
- package/dist/{tool-RJJKMW5D.js → tool-W763BDXL.js} +2 -2
- package/dist/{wiki-OAWT7LND.js → wiki-MIEXBQ5H.js} +2 -2
- package/dist/wiki-enrich-K4HHTRZN.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-LZRJJ3DZ.js.map +0 -1
- package/dist/chunk-BIJ3JIWG.js +0 -3
- package/dist/chunk-H7SPRPDG.js +0 -116
- package/dist/chunk-H7SPRPDG.js.map +0 -1
- package/dist/chunk-QF5B5O7K.js.map +0 -1
- package/dist/config-NYFW5P4W.js +0 -2
- package/dist/program-4QVJE2JD.js.map +0 -1
- package/dist/schedule-tool-ZSQTA3IW.js +0 -2
- package/dist/wiki-enrich-QVZMYHVY.js +0 -2
- /package/dist/{App-ODMLQITV.js.map → App-HGCD735J.js.map} +0 -0
- /package/dist/{ChatApp-MJBOQWUM.js.map → ChatApp-VVBGBDKU.js.map} +0 -0
- /package/dist/{absorb-eval-QSUGLOOO.js.map → absorb-eval-2XT7XBH7.js.map} +0 -0
- /package/dist/{adapter-BJLSEQ6M.js.map → adapter-ZGEMORWD.js.map} +0 -0
- /package/dist/{agent-QJPWZDTL.js.map → agent-4IF72I6E.js.map} +0 -0
- /package/dist/{chunk-GB7NAOZ4.js.map → chunk-3DAHVUJH.js.map} +0 -0
- /package/dist/{chunk-GGFL7HVN.js.map → chunk-3DX7CKKW.js.map} +0 -0
- /package/dist/{chunk-GL26HRDW.js.map → chunk-3SWDVBGA.js.map} +0 -0
- /package/dist/{chunk-C5QQW2L7.js.map → chunk-5NE26NUO.js.map} +0 -0
- /package/dist/{chunk-PM4Y6ZBW.js.map → chunk-5QK3U7R6.js.map} +0 -0
- /package/dist/{chunk-HYJWN6L5.js.map → chunk-5VRN6JP7.js.map} +0 -0
- /package/dist/{chunk-MA5ZF4YY.js.map → chunk-6QU5YWOE.js.map} +0 -0
- /package/dist/{chunk-D64VFKUU.js.map → chunk-7SKUXUIX.js.map} +0 -0
- /package/dist/{chunk-IJYCPFLZ.js.map → chunk-BBXB7X25.js.map} +0 -0
- /package/dist/{chunk-KQ5UJTQR.js.map → chunk-DUVPXHDO.js.map} +0 -0
- /package/dist/{chunk-SUVJA67A.js.map → chunk-F6UAAQSU.js.map} +0 -0
- /package/dist/{chunk-CAYGWXWJ.js.map → chunk-I4U2ELEX.js.map} +0 -0
- /package/dist/{chunk-4FY2NOCD.js.map → chunk-JAS75QDT.js.map} +0 -0
- /package/dist/{chunk-2AP2F6S5.js.map → chunk-K2JE5XR4.js.map} +0 -0
- /package/dist/{chunk-VX3IZAF6.js.map → chunk-K3QWXVLV.js.map} +0 -0
- /package/dist/{chunk-PIY23C2Z.js.map → chunk-KWU4EOWC.js.map} +0 -0
- /package/dist/{chunk-QHICHZFK.js.map → chunk-L3FCDIJT.js.map} +0 -0
- /package/dist/{chunk-C3LKB4N7.js.map → chunk-OCZVJANH.js.map} +0 -0
- /package/dist/{chunk-3KHXOLF5.js.map → chunk-OWL6JA6W.js.map} +0 -0
- /package/dist/{chunk-XRCWM7JA.js.map → chunk-RE6N3TRQ.js.map} +0 -0
- /package/dist/{chunk-SHNGAN3L.js.map → chunk-T7HWU7O4.js.map} +0 -0
- /package/dist/{chunk-I5KOLVB6.js.map → chunk-UU7A5DNY.js.map} +0 -0
- /package/dist/{chunk-H3NGVXOL.js.map → chunk-UY25GSQ3.js.map} +0 -0
- /package/dist/{chunk-BZ3AXEZW.js.map → chunk-XTBFWRM3.js.map} +0 -0
- /package/dist/{chunk-LOFMZHJN.js.map → chunk-XZFBOXFK.js.map} +0 -0
- /package/dist/{chunk-V2DCI2JL.js.map → chunk-YU2JJIQH.js.map} +0 -0
- /package/dist/{client-WAPDTJ5B.js.map → client-PNZ3LL72.js.map} +0 -0
- /package/dist/{config-NYFW5P4W.js.map → config-HOKADOXX.js.map} +0 -0
- /package/dist/{config-mutate-ZADHR76X.js.map → config-mutate-ZR7EM4IB.js.map} +0 -0
- /package/dist/{config-mutator-GJFZWC43.js.map → config-mutator-NWTMXBEY.js.map} +0 -0
- /package/dist/{contributions-RROXRQEV.js.map → contributions-NBKZD7QW.js.map} +0 -0
- /package/dist/{doctor-DKUDMNK3.js.map → doctor-K6SPV3GU.js.map} +0 -0
- /package/dist/{follow-up-tool-OKKSNVCJ.js.map → follow-up-tool-NPC3JLOA.js.map} +0 -0
- /package/dist/{hub-5X33WEIO.js.map → hub-NKGZO574.js.map} +0 -0
- /package/dist/{promote-YETAZYXW.js.map → promote-HIFKFRC4.js.map} +0 -0
- /package/dist/{query-IE5EVVY4.js.map → query-VXE4AREX.js.map} +0 -0
- /package/dist/{query-settings-TF4H7EZS.js.map → query-settings-NC7FOIRC.js.map} +0 -0
- /package/dist/{registry-OBQMRAYY.js.map → registry-NGRLHM7L.js.map} +0 -0
- /package/dist/{request-planner-V6J5EISV.js.map → request-planner-I65SRAJI.js.map} +0 -0
- /package/dist/{review-candidates-MTZEBOP5.js.map → review-candidates-7KV34XZR.js.map} +0 -0
- /package/dist/{routing-KWZ3X6ZV.js.map → routing-MLOSXPVH.js.map} +0 -0
- /package/dist/{schedule-tool-ZSQTA3IW.js.map → schedule-tool-7DCB7KJP.js.map} +0 -0
- /package/dist/{scheduler-ST37UR5V.js.map → scheduler-WEOQLNIF.js.map} +0 -0
- /package/dist/{seat-RFFUE7RT.js.map → seat-66LQTUIR.js.map} +0 -0
- /package/dist/{select-DCG457CP.js.map → select-JV425OUL.js.map} +0 -0
- /package/dist/{set-enabled-TD3MPUDH.js.map → set-enabled-DWL2MKVS.js.map} +0 -0
- /package/dist/{sprint-tool-OQ55FHX3.js.map → sprint-tool-CDO3HLLT.js.map} +0 -0
- /package/dist/{tool-JIRXLLQN.js.map → tool-7EFJJM2A.js.map} +0 -0
- /package/dist/{tool-FQE7ZGBT.js.map → tool-U3WQCSUN.js.map} +0 -0
- /package/dist/{tool-RJJKMW5D.js.map → tool-W763BDXL.js.map} +0 -0
- /package/dist/{wiki-OAWT7LND.js.map → wiki-MIEXBQ5H.js.map} +0 -0
- /package/dist/{wiki-enrich-QVZMYHVY.js.map → wiki-enrich-K4HHTRZN.js.map} +0 -0
|
@@ -30,6 +30,8 @@ enum AgentClient {
|
|
|
30
30
|
/// The daemon took the words for the floor holder's own sound
|
|
31
31
|
/// (#924): no agent was asked and nothing is said back.
|
|
32
32
|
var dropped = false
|
|
33
|
+
/// Files the agent declared (#1670), shown under the text.
|
|
34
|
+
var artifacts: [Artifact] = []
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/// What, if anything, to say about the step now running.
|
|
@@ -305,6 +307,7 @@ enum AgentClient {
|
|
|
305
307
|
let error: String?
|
|
306
308
|
let duration: Int?
|
|
307
309
|
let dropped: String?
|
|
310
|
+
let artifacts: [Artifact]?
|
|
308
311
|
}
|
|
309
312
|
let reply = try? JSONDecoder().decode(Reply.self, from: data)
|
|
310
313
|
let voice = reply?.voice
|
|
@@ -328,7 +331,9 @@ enum AgentClient {
|
|
|
328
331
|
throw VoiceError.api("daemon HTTP \(status): \(detail)")
|
|
329
332
|
}
|
|
330
333
|
if let err = reply?.error, !err.isEmpty { throw VoiceError.api(err) }
|
|
331
|
-
|
|
334
|
+
// An answer that is only a file has no words to say, and is not empty.
|
|
335
|
+
let files = reply?.artifacts ?? []
|
|
336
|
+
guard let text = reply?.text ?? reply?.full, !text.isEmpty || !files.isEmpty else {
|
|
332
337
|
throw VoiceError.api("agent returned an empty answer")
|
|
333
338
|
}
|
|
334
339
|
let buttons = (reply?.ui?.buttons ?? []).map { ($0.label, $0.url) }
|
|
@@ -343,7 +348,7 @@ enum AgentClient {
|
|
|
343
348
|
return Answer(text: text, written: reply?.full,
|
|
344
349
|
buttons: buttons + extra, imageURL: image,
|
|
345
350
|
durationMs: reply?.duration, agentID: reply?.agentId, voice: voice,
|
|
346
|
-
presenceMode: reply?.presence?.mode)
|
|
351
|
+
presenceMode: reply?.presence?.mode, artifacts: files)
|
|
347
352
|
}
|
|
348
353
|
|
|
349
354
|
// MARK: Open requests
|
|
@@ -25,6 +25,10 @@ final class AnswerView: NSView {
|
|
|
25
25
|
private let thumb = NSImageView()
|
|
26
26
|
private let actions = NSStackView()
|
|
27
27
|
private var source = ""
|
|
28
|
+
/// The answer has files under its text, so it is not empty even
|
|
29
|
+
/// without words.
|
|
30
|
+
private var hasFiles = false
|
|
31
|
+
private var isEmpty: Bool { source.isEmpty && !hasFiles }
|
|
28
32
|
|
|
29
33
|
/// The answer's natural height, measured after it renders. The pill
|
|
30
34
|
/// grows to it, up to its maximum.
|
|
@@ -116,8 +120,9 @@ final class AnswerView: NSView {
|
|
|
116
120
|
/// Worth showing when there is rich content, a URL you could click, or
|
|
117
121
|
/// materially more written than was spoken. Otherwise the speech was
|
|
118
122
|
/// the whole answer.
|
|
119
|
-
static func isWorthShowing(spoken: String, written: String?, buttons: [(String, String)], imageURL: String
|
|
120
|
-
|
|
123
|
+
static func isWorthShowing(spoken: String, written: String?, buttons: [(String, String)], imageURL: String?,
|
|
124
|
+
artifacts: [Artifact] = []) -> Bool {
|
|
125
|
+
if !buttons.isEmpty || imageURL != nil || !artifacts.isEmpty { return true }
|
|
121
126
|
let text = (written?.isEmpty == false ? written! : spoken)
|
|
122
127
|
if text.range(of: #"https?://"#, options: .regularExpression) != nil { return true }
|
|
123
128
|
// Speech drops formatting, so written is often a little longer for
|
|
@@ -133,9 +138,14 @@ final class AnswerView: NSView {
|
|
|
133
138
|
/// URLs and formatting the spoken form had to drop. `onHeight` follows
|
|
134
139
|
/// once it has rendered.
|
|
135
140
|
@MainActor
|
|
136
|
-
func show(spoken: String, written: String?, buttons: [(String, String)], imageURL: String
|
|
141
|
+
func show(spoken: String, written: String?, buttons: [(String, String)], imageURL: String?,
|
|
142
|
+
artifacts: [Artifact] = []) {
|
|
137
143
|
source = (written?.isEmpty == false ? written! : spoken)
|
|
138
|
-
|
|
144
|
+
// The files the agent declared, under the text (#1670), served by
|
|
145
|
+
// the daemon over loopback.
|
|
146
|
+
hasFiles = !artifacts.isEmpty
|
|
147
|
+
let files = Artifacts.html(artifacts, base: Config.daemonURL)
|
|
148
|
+
web.loadHTMLString(Markdown.page(Markdown.toHTML(source) + files, css: Brand.cardCSS + Artifacts.css), baseURL: nil)
|
|
139
149
|
|
|
140
150
|
links.arrangedSubviews.forEach { links.removeArrangedSubview($0); $0.removeFromSuperview() }
|
|
141
151
|
for (label, url) in buttons.prefix(4) {
|
|
@@ -155,7 +165,7 @@ final class AnswerView: NSView {
|
|
|
155
165
|
URLSession.shared.dataTask(with: u) { [weak self] data, _, _ in
|
|
156
166
|
guard let data, let img = NSImage(data: data) else { return }
|
|
157
167
|
Task { @MainActor in
|
|
158
|
-
guard let self, self.
|
|
168
|
+
guard let self, !self.isEmpty else { return }
|
|
159
169
|
self.thumb.image = img
|
|
160
170
|
self.thumb.isHidden = false
|
|
161
171
|
self.measure()
|
|
@@ -169,6 +179,7 @@ final class AnswerView: NSView {
|
|
|
169
179
|
@MainActor
|
|
170
180
|
func clear() {
|
|
171
181
|
source = ""
|
|
182
|
+
hasFiles = false
|
|
172
183
|
web.loadHTMLString("", baseURL: nil)
|
|
173
184
|
thumb.isHidden = true
|
|
174
185
|
links.arrangedSubviews.forEach { links.removeArrangedSubview($0); $0.removeFromSuperview() }
|
|
@@ -181,7 +192,7 @@ final class AnswerView: NSView {
|
|
|
181
192
|
+ " return b.scrollHeight + parseFloat(s.marginTop) + parseFloat(s.marginBottom) })()"
|
|
182
193
|
web.evaluateJavaScript(js) { [weak self] value, _ in
|
|
183
194
|
MainActor.assumeIsolated {
|
|
184
|
-
guard let self, !self.
|
|
195
|
+
guard let self, !self.isEmpty else { return }
|
|
185
196
|
let text = CGFloat((value as? NSNumber)?.doubleValue ?? 120)
|
|
186
197
|
let extra = (self.links.arrangedSubviews.isEmpty ? 0 : Self.linkRow)
|
|
187
198
|
+ (self.thumb.isHidden ? 0 : Self.imageHeight + 16)
|
|
@@ -197,7 +208,7 @@ final class AnswerView: NSView {
|
|
|
197
208
|
actions.layer?.borderColor = NSColor.separatorColor.cgColor
|
|
198
209
|
actions.layer?.borderWidth = 1 / (window?.backingScaleFactor ?? 2)
|
|
199
210
|
}
|
|
200
|
-
actions.isHidden =
|
|
211
|
+
actions.isHidden = isEmpty
|
|
201
212
|
}
|
|
202
213
|
override func mouseExited(with event: NSEvent) { actions.isHidden = true }
|
|
203
214
|
|
|
@@ -231,7 +242,7 @@ final class AnswerView: NSView {
|
|
|
231
242
|
|
|
232
243
|
extension AnswerView: WKNavigationDelegate {
|
|
233
244
|
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
|
234
|
-
MainActor.assumeIsolated { if !
|
|
245
|
+
MainActor.assumeIsolated { if !isEmpty { measure() } }
|
|
235
246
|
}
|
|
236
247
|
|
|
237
248
|
/// Links open in the real browser. A pill is not a place to read a web
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/// A file an agent declared in its answer (#1670): the same
|
|
4
|
+
/// `<agentx-artifact>` line the phone app shows. /ask takes the line out of
|
|
5
|
+
/// the text and lists the file with the daemon path that serves it, or no
|
|
6
|
+
/// path when this computer can't serve it.
|
|
7
|
+
struct Artifact: Decodable, Equatable {
|
|
8
|
+
let name: String
|
|
9
|
+
let mime: String
|
|
10
|
+
/// image, audio, video or file.
|
|
11
|
+
let kind: String
|
|
12
|
+
/// Relative to the daemon; nil when the file is not available here.
|
|
13
|
+
let url: String?
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
enum Artifacts {
|
|
17
|
+
/// The files as HTML, under the answer's text: pictures inline, sound
|
|
18
|
+
/// and video with a player, anything else as an Open link. Each box has
|
|
19
|
+
/// a fixed height, so the answer measures right before media has loaded.
|
|
20
|
+
static func html(_ list: [Artifact], base: String) -> String {
|
|
21
|
+
guard !list.isEmpty else { return "" }
|
|
22
|
+
let items = list.map { a -> String in
|
|
23
|
+
let name = escape(a.name)
|
|
24
|
+
guard let path = a.url else {
|
|
25
|
+
return "<p class=\"ax-missing\">File not available: \(name)</p>"
|
|
26
|
+
}
|
|
27
|
+
let src = escape(base + path)
|
|
28
|
+
switch a.kind {
|
|
29
|
+
case "image": return "<img class=\"ax-media\" src=\"\(src)\" alt=\"\(name)\">"
|
|
30
|
+
case "video": return "<video class=\"ax-media\" src=\"\(src)\" controls preload=\"metadata\"></video>"
|
|
31
|
+
case "audio": return "<audio src=\"\(src)\" controls preload=\"metadata\"></audio><p class=\"ax-name\">\(name)</p>"
|
|
32
|
+
default: return "<p><a href=\"\(src)\">Open \(name)</a></p>"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return "<div class=\"ax-files\">" + items.joined() + "</div>"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/// Added to the card's styles.
|
|
39
|
+
static let css = """
|
|
40
|
+
.ax-files { margin-top: 8px; }
|
|
41
|
+
.ax-media { display: block; width: 100%; height: 180px; object-fit: contain;
|
|
42
|
+
margin: 6px 0; border-radius: 6px; background: color-mix(in srgb, canvastext 6%, transparent); }
|
|
43
|
+
audio { display: block; width: 100%; height: 32px; margin: 6px 0 0; }
|
|
44
|
+
.ax-name, .ax-missing { margin: 2px 0 6px; font-size: 12px; opacity: 0.7; }
|
|
45
|
+
img.md-img { display: block; max-width: 100%; height: 180px; object-fit: contain; margin: 6px 0; }
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
private static func escape(_ s: String) -> String {
|
|
49
|
+
s.replacingOccurrences(of: "&", with: "&")
|
|
50
|
+
.replacingOccurrences(of: "<", with: "<")
|
|
51
|
+
.replacingOccurrences(of: ">", with: ">")
|
|
52
|
+
.replacingOccurrences(of: "\"", with: """)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -109,6 +109,9 @@ enum Markdown {
|
|
|
109
109
|
s = replace(s, #"`([^`]+)`"#, "<code>$1</code>")
|
|
110
110
|
s = replace(s, #"\*\*([^*]+)\*\*"#, "<strong>$1</strong>")
|
|
111
111
|
s = replace(s, #"(?<![\*\w])\*([^*]+)\*(?![\*\w])"#, "<em>$1</em>")
|
|
112
|
+
// A picture on the web, before links: `` is a
|
|
113
|
+
// link with a `!` in front.
|
|
114
|
+
s = replace(s, #"!\[([^\]"]*)\]\((https?://[^)\s"]+)\)"#, "<img class=\"md-img\" alt=\"$1\" src=\"$2\">")
|
|
112
115
|
s = replace(s, #"\[([^\]]+)\]\(([^)\s]+)\)"#, "<a href=\"$2\">$1</a>")
|
|
113
116
|
// Bare URLs, but not ones already inside an href.
|
|
114
117
|
s = replace(s, #"(?<!["=])\b(https?://[^\s<)]+)"#, "<a href=\"$1\">$1</a>")
|
|
@@ -14,9 +14,10 @@ extension Panel {
|
|
|
14
14
|
/// Show an answer. The pill grows once it has been measured. A pill
|
|
15
15
|
/// the person dismissed stays dismissed.
|
|
16
16
|
@MainActor
|
|
17
|
-
func showAnswer(spoken: String, written: String?, buttons: [(String, String)], imageURL: String
|
|
17
|
+
func showAnswer(spoken: String, written: String?, buttons: [(String, String)], imageURL: String?,
|
|
18
|
+
artifacts: [Artifact] = []) {
|
|
18
19
|
guard !dismissed else { return }
|
|
19
|
-
answer.show(spoken: spoken, written: written, buttons: buttons, imageURL: imageURL)
|
|
20
|
+
answer.show(spoken: spoken, written: written, buttons: buttons, imageURL: imageURL, artifacts: artifacts)
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
/// Grow, or resize while grown, to fit an answer `answerHeight` tall.
|
|
@@ -1317,9 +1317,9 @@ final class App: NSObject, NSApplicationDelegate {
|
|
|
1317
1317
|
_ = recorder.stop()
|
|
1318
1318
|
}
|
|
1319
1319
|
if AnswerView.isWorthShowing(spoken: answer.text, written: answer.written,
|
|
1320
|
-
buttons: answer.buttons, imageURL: answer.imageURL) {
|
|
1320
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts) {
|
|
1321
1321
|
panel.showAnswer(spoken: answer.text, written: answer.written,
|
|
1322
|
-
buttons: answer.buttons, imageURL: answer.imageURL)
|
|
1322
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts)
|
|
1323
1323
|
}
|
|
1324
1324
|
shownAnswer = (answer.text, agent, answer.voice)
|
|
1325
1325
|
noteReset?.cancel()
|
|
@@ -1343,7 +1343,7 @@ final class App: NSObject, NSApplicationDelegate {
|
|
|
1343
1343
|
private func showAgain(_ id: Int) {
|
|
1344
1344
|
guard let r = requests.request(id), let answer = answers[id] else { return }
|
|
1345
1345
|
panel.showAnswer(spoken: answer.text, written: answer.written,
|
|
1346
|
-
buttons: answer.buttons, imageURL: answer.imageURL)
|
|
1346
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts)
|
|
1347
1347
|
shownAnswer = (answer.text, answer.agentID ?? r.agentID, answer.voice)
|
|
1348
1348
|
note(OpenRequests.continueNote(name: statusMenu.name(of: r.agentID)))
|
|
1349
1349
|
}
|
|
@@ -1517,9 +1517,9 @@ final class App: NSObject, NSApplicationDelegate {
|
|
|
1517
1517
|
case .success(let answer):
|
|
1518
1518
|
Log.info("aside answer (\(answer.agentID ?? agent)): \(answer.text)")
|
|
1519
1519
|
if AnswerView.isWorthShowing(spoken: answer.text, written: answer.written,
|
|
1520
|
-
buttons: answer.buttons, imageURL: answer.imageURL) {
|
|
1520
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts) {
|
|
1521
1521
|
panel.showAnswer(spoken: answer.text, written: answer.written,
|
|
1522
|
-
buttons: answer.buttons, imageURL: answer.imageURL)
|
|
1522
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts)
|
|
1523
1523
|
shownAnswer = (answer.text, answer.agentID ?? agent, answer.voice)
|
|
1524
1524
|
}
|
|
1525
1525
|
// Nothing else on screen: the pill shows this answer, its
|
|
@@ -1589,9 +1589,9 @@ final class App: NSObject, NSApplicationDelegate {
|
|
|
1589
1589
|
// text than was read aloud. A card that opens on every
|
|
1590
1590
|
// "Ok." teaches you to ignore it.
|
|
1591
1591
|
if AnswerView.isWorthShowing(spoken: answer.text, written: answer.written,
|
|
1592
|
-
buttons: answer.buttons, imageURL: answer.imageURL) {
|
|
1592
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts) {
|
|
1593
1593
|
panel.showAnswer(spoken: answer.text, written: answer.written,
|
|
1594
|
-
buttons: answer.buttons, imageURL: answer.imageURL)
|
|
1594
|
+
buttons: answer.buttons, imageURL: answer.imageURL, artifacts: answer.artifacts)
|
|
1595
1595
|
shownAnswer = (answer.text, answer.agentID, voice)
|
|
1596
1596
|
} else {
|
|
1597
1597
|
panel.collapse()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as F,b as L,c as U,d as N,e as O,f as H,g as j}from"./chunk-U2CKL755.js";import{b as B,c as D,d as A,e as P,g as M}from"./chunk-
|
|
1
|
+
import{a as F,b as L,c as U,d as N,e as O,f as H,g as j}from"./chunk-U2CKL755.js";import{b as B,c as D,d as A,e as P,g as M}from"./chunk-KWU4EOWC.js";import"./chunk-UPRACUXY.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";import{useEffect as R,useReducer as V,useRef as G}from"react";import{Box as i,Text as o,useApp as W,useInput as J}from"ink";import{randomUUID as z}from"crypto";async function*q(e){let r=[];e.type&&r.push(`type=${encodeURIComponent(e.type)}`);let t=`${e.baseUrl.replace(/\/+$/,"")}/events${r.length?`?${r.join("&")}`:""}`,n={Accept:"text/event-stream"};e.token&&(n.Authorization=`Bearer ${e.token}`);let s=await fetch(t,{headers:n,signal:e.signal});if(!s.ok||!s.body)throw new Error(`SSE connect failed: HTTP ${s.status}`);let u=s.body.getReader(),p=new TextDecoder,y="";try{for(;;){let{done:f,value:l}=await u.read();if(f)return;y+=p.decode(l,{stream:!0});let d;for(;(d=y.indexOf(`
|
|
2
2
|
|
|
3
3
|
`))>=0;){let h=y.slice(0,d);y=y.slice(d+2);let m=X(h);m&&(yield m)}}}finally{try{u.releaseLock()}catch{}}}function X(e){let r="message",t="";for(let s of e.split(`
|
|
4
4
|
`))s.startsWith("event: ")?r=s.slice(7):s.startsWith("data: ")&&(t=s.slice(6));if(!t)return null;let n;try{n=JSON.parse(t)}catch{n=t}return{event:r,data:n}}import{jsx as a,jsxs as c}from"react/jsx-runtime";function $(e,r){return r<=0||e<0?0:e>=r?r-1:e}function E(){return`tui:${z().slice(0,12)}`}function k(e,r){let t=[...e,r];return t.length>50&&t.splice(0,t.length-50),t}function Y(e,r){switch(r.type){case"agents":return{...e,agents:r.data,cursor:{...e.cursor,agents:$(e.cursor.agents,r.data.length)}};case"processes":return{...e,processes:r.data,cursor:{...e.cursor,processes:$(e.cursor.processes,r.data.length)}};case"crons":return{...e,crons:r.data};case"event":{let t=[r.row,...e.events];t.length>200&&(t.length=200);let n=e.channels;return r.channelTally&&(n=new Map(e.channels),n.set(r.channelTally.channel,r.channelTally)),{...e,events:t,channels:n}}case"connError":return{...e,connError:r.error};case"tick":return{...e,lastTick:Date.now()};case"focus":return{...e,focus:r.pane};case"cursor":{let t=r.pane==="agents"?e.agents.length:r.pane==="processes"?e.processes.length:e.events.length;return{...e,cursor:{...e.cursor,[r.pane]:$(e.cursor[r.pane]+r.delta,t)}}}case"bottomRight":return{...e,bottomRight:r.pane};case"chatStart":return{...e,chat:{active:!0,agentId:r.agentId,chatId:E(),history:[],text:"",status:"idle",error:null}};case"chatExit":return{...e,chat:{...e.chat,active:!1}};case"chatClear":return{...e,chat:{...e.chat,chatId:E(),history:[],text:"",status:"idle",error:null}};case"chatText":return{...e,chat:{...e.chat,text:r.text}};case"chatSubmitStart":return{...e,chat:{...e.chat,history:k(e.chat.history,r.you),text:"",status:"sending",error:null}};case"chatSubmitDone":return{...e,chat:{...e.chat,history:k(e.chat.history,r.reply),status:"idle",error:null}};case"chatSubmitError":return{...e,chat:{...e.chat,history:k(e.chat.history,{role:"error",text:r.error,at:Date.now()}),status:"idle",error:r.error}};case"chatStreamStart":{let t=k(e.chat.history,r.you),n=k(t,{role:"agent",text:"",at:Date.now(),streaming:!0,tools:[]});return{...e,chat:{...e.chat,history:n,text:"",status:"sending",error:null}}}case"chatStreamDelta":{let t=e.chat.history.slice(),n=t[t.length-1];return n?.role==="agent"&&n.streaming&&(t[t.length-1]={...n,text:n.text+r.text}),{...e,chat:{...e.chat,history:t}}}case"chatStreamThinking":{let t=e.chat.history.slice(),n=t[t.length-1];return n?.role==="agent"&&n.streaming&&(t[t.length-1]={...n,thinking:(n.thinking??"")+r.text}),{...e,chat:{...e.chat,history:t}}}case"chatStreamTool":{let t=e.chat.history.slice(),n=t[t.length-1];return n?.role==="agent"&&n.streaming&&(t[t.length-1]={...n,tools:[...n.tools??[],{name:r.name,arg:r.arg,error:r.error}]}),{...e,chat:{...e.chat,history:t}}}case"chatStreamEnd":{let t=e.chat.history.slice(),n=t[t.length-1];return n?.role==="agent"&&n.streaming&&(t[t.length-1]=r.error?{...n,streaming:!1,role:"error",text:r.error}:{...n,streaming:!1,elapsedMs:r.elapsedMs,outTokens:r.outTokens}),{...e,chat:{...e.chat,history:t,status:"idle",error:r.error??null}}}case"toast":return{...e,toast:{text:r.text,color:r.color,at:Date.now()}};case"clearToast":return{...e,toast:null}}}var _={agents:[],processes:[],crons:[],events:[],channels:new Map,connError:null,lastTick:0,focus:"agents",cursor:{agents:0,processes:0,events:0},bottomRight:"crons",chat:{active:!1,agentId:null,chatId:E(),history:[],text:"",status:"idle",error:null},toast:null};function be({conn:e,pollMs:r=3e3}){let[t,n]=V(Y,_),{exit:s}=W(),u=G(null),p=G(null),y=t.agents.map(l=>l.id),f=t.chat.active?L(t.chat.text,y,process.cwd()):null;return R(()=>{if(!t.toast)return;let l=setTimeout(()=>n({type:"clearToast"}),3500);return()=>clearTimeout(l)},[t.toast]),J((l,d)=>{if(t.chat.active){if(d.escape){n({type:"chatExit"});return}if(d.ctrl&&l==="l"){n({type:"chatClear"});return}if(d.tab){let m=U(t.chat.text,p,y,process.cwd());m!==null&&n({type:"chatText",text:m});return}if(d.backspace||d.delete){p.current=null,n({type:"chatText",text:t.chat.text.slice(0,-1)});return}if(d.ctrl||d.meta)return;let h=N(l??"",d.return,t.chat.text);if(h.kind==="paste"||h.kind==="type"){p.current=null,n({type:"chatText",text:t.chat.text+h.text});return}if(h.kind==="continue"){n({type:"chatText",text:h.buffer});return}if(h.kind==="submit"){let m=h.text.trim(),g=t.chat.agentId;if(!m||!g||t.chat.status==="sending"){n({type:"chatText",text:""});return}p.current=null;let b=Date.now(),w=t.chat.chatId;n({type:"chatStreamStart",you:{role:"you",text:m,at:b}}),(async()=>{try{let C=await M(e,g,m,{channel:"tui",chatId:w,onText:x=>n({type:"chatStreamDelta",text:x}),onThinking:x=>n({type:"chatStreamThinking",text:x}),onTool:x=>{x.status==="start"&&x.name?n({type:"chatStreamTool",name:x.name,arg:x.arg}):x.status==="result"&&x.error&&n({type:"chatStreamTool",name:x.name??"tool",error:!0})}});n({type:"chatStreamEnd",elapsedMs:Date.now()-b,outTokens:C.usage?.outputTokens,error:C.error})}catch(C){n({type:"chatStreamEnd",elapsedMs:Date.now()-b,error:C?.message||String(C)})}})();return}return}if(l==="q"||d.ctrl&&l==="c"){u.current?.abort(),s();return}if(d.tab){let h=["agents","processes","events"],m=h.indexOf(t.focus);n({type:"focus",pane:h[(m+1)%h.length]});return}if(l==="a"){n({type:"focus",pane:"agents"});return}if(l==="p"){n({type:"focus",pane:"processes"});return}if(l==="e"){n({type:"focus",pane:"events"});return}if(l==="c"){n({type:"bottomRight",pane:t.bottomRight==="crons"?"channels":"crons"});return}if(d.upArrow){n({type:"cursor",pane:t.focus,delta:-1});return}if(d.downArrow){n({type:"cursor",pane:t.focus,delta:1});return}if(d.return&&t.focus==="agents"){let h=t.agents[t.cursor.agents];if(!h){n({type:"toast",text:"no agent selected",color:"yellow"});return}n({type:"chatStart",agentId:h.id});return}if(l==="k"&&t.focus==="processes"){let h=t.processes[t.cursor.processes];if(!h){n({type:"toast",text:"no process selected",color:"yellow"});return}(async()=>{try{await P(e,h.key,"tui"),n({type:"toast",text:`killed ${h.key.agentId}/${h.key.channel}/${h.key.chatId}`,color:"green"})}catch(m){n({type:"toast",text:`kill failed: ${m?.message||m}`,color:"red"})}})();return}}),R(()=>{let l=new AbortController;u.current=l;let d=!1,h=async()=>{try{let[g,b,w]=await Promise.all([B(e,l.signal).catch(()=>[]),D(e,l.signal).catch(()=>[]),A(e,l.signal).catch(()=>[])]);if(d)return;n({type:"agents",data:g}),n({type:"processes",data:b}),n({type:"crons",data:w}),n({type:"tick"}),n({type:"connError",error:null})}catch(g){d||n({type:"connError",error:g?.message||String(g)})}};h();let m=setInterval(h,r);return()=>{d=!0,clearInterval(m),l.abort()}},[e.baseUrl,e.token,r]),R(()=>{let l=!1,d=new AbortController,h=new Map;return(async()=>{let m=500;for(;!l;){try{for await(let g of q({baseUrl:e.baseUrl,token:e.token,signal:d.signal})){let b=ae(g),w;if(g.event==="channel"&&typeof g.data?.channel=="string"){let S=h.get(g.data.channel)??{channel:g.data.channel,inbound:0,outbound:0,lastAt:0,lastPreview:""},C=S.inbound+(g.data.direction==="in"?1:0),x=S.outbound+(g.data.direction==="out"?1:0);w={channel:g.data.channel,inbound:C,outbound:x,lastAt:b.at,lastPreview:(g.data.textPreview||"").slice(0,60)},h.set(g.data.channel,w)}n({type:"event",row:b,channelTally:w}),m=500}}catch(g){if(l)return;n({type:"connError",error:`events: ${g?.message||g}`})}await new Promise(g=>setTimeout(g,m)),m=Math.min(m*2,1e4)}})(),()=>{l=!0,d.abort()}},[e.baseUrl,e.token]),c(i,{flexDirection:"column",width:"100%",children:[a(K,{conn:e,lastTick:t.lastTick,connError:t.connError,chat:t.chat}),c(i,{flexDirection:"row",flexGrow:1,children:[c(i,{flexDirection:"column",width:"50%",children:[a(v,{title:"AGENTS",focused:!t.chat.active&&t.focus==="agents",children:a(Z,{rows:t.agents,cursor:t.cursor.agents,focused:!t.chat.active&&t.focus==="agents",talkingTo:t.chat.active?t.chat.agentId:null})}),a(v,{title:"PROCESSES",focused:!t.chat.active&&t.focus==="processes",children:a(ee,{rows:t.processes,cursor:t.cursor.processes,focused:!t.chat.active&&t.focus==="processes"})})]}),t.chat.active?a(oe,{chat:t.chat,suggest:f,agents:t.agents}):c(i,{flexDirection:"column",width:"50%",children:[a(v,{title:"LIVE EVENTS",focused:t.focus==="events",children:a(ne,{rows:t.events,cursor:t.cursor.events,focused:t.focus==="events"})}),a(v,{title:t.bottomRight==="crons"?"CRONS / SCHEDULES":"CHANNELS",focused:!1,children:t.bottomRight==="crons"?a(te,{rows:t.crons}):a(re,{rows:Array.from(t.channels.values())})})]})]}),a(Q,{focus:t.focus,bottomRight:t.bottomRight,chat:t.chat,toast:t.toast})]})}function K({conn:e,lastTick:r,connError:t,chat:n}){let s=t?c(o,{color:"red",children:["\u25CF ",t]}):r===0?a(o,{color:"yellow",children:"\u25CF connecting\u2026"}):a(o,{color:"green",children:"\u25CF live"}),u=n.active?c(o,{color:"green",bold:!0,children:["CHAT @",n.agentId]}):a(o,{bold:!0,children:"agentx tui"});return c(i,{paddingX:1,justifyContent:"space-between",children:[a(i,{children:u}),a(o,{dimColor:!0,children:e.baseUrl}),a(i,{children:s})]})}function Q({focus:e,bottomRight:r,chat:t,toast:n}){let s=t.active?["[Enter] send","[Esc] exit chat","[Ctrl-L] new session"]:[`[Tab/a/p/e] focus (now: ${e})`,e==="agents"?"[Enter] chat":null,e==="processes"?"[k] kill":null,`[c] ${r==="crons"?"\u2192channels":"\u2192crons"}`,"[\u2191/\u2193] move","[q] quit"].filter(Boolean);return c(i,{paddingX:1,borderStyle:"single",borderTop:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,justifyContent:"space-between",children:[a(o,{dimColor:!0,children:s.join(" \xB7 ")}),n?a(o,{color:n.color,children:n.text}):a(o,{children:" "})]})}function v({title:e,focused:r,children:t}){return c(i,{flexDirection:"column",width:"100%",borderStyle:r?"double":"single",borderColor:r?"cyan":void 0,paddingX:1,children:[c(o,{bold:!0,color:r?"cyan":"white",children:[e,r?" \u25CF":""]}),a(i,{flexDirection:"column",marginTop:1,children:t})]})}function I(e,r){return e&&r?{inverse:!0}:{}}function Z({rows:e,cursor:r,focused:t,talkingTo:n}){return e.length===0?a(o,{dimColor:!0,children:"no agents"}):a(i,{flexDirection:"column",children:e.slice(0,12).map((s,u)=>{let p=I(t,u===r),y=s.errors>0?"red":s.active>0?"yellow":"green",f=s.id===n;return c(i,{children:[a(o,{...p,color:y,children:"\u25CF"}),c(o,{...p,children:[" ",T(s.name,14)]}),c(o,{...p,children:[T(s.tier,6)," "]}),c(o,{...p,children:[s.active,"/",s.total]}),s.errors>0?c(o,{...p,color:"red",children:[" err=",s.errors]}):null,f?a(o,{color:"green",children:" \u2194 chatting"}):null]},s.id)})})}function ee({rows:e,cursor:r,focused:t}){if(e.length===0)return a(o,{dimColor:!0,children:"no live processes"});let n=Date.now();return a(i,{flexDirection:"column",children:e.slice(0,12).map((s,u)=>{let p=I(t,u===r),y=Math.max(0,Math.round((n-(s.lastTurnAt||s.spawnedAt))/1e3)),f=s.state==="dead"?"red":s.state==="warm-hot"?"green":"yellow";return c(i,{children:[a(o,{...p,color:f,children:T(s.state,10)}),a(o,{...p,children:T(s.key.agentId,12)}),a(o,{...p,children:T(s.key.channel,10)}),c(o,{...p,children:[s.turnCount,"t ",y,"s"]})]},`${s.key.agentId}-${s.key.channel}-${s.key.chatId}-${u}`)})})}function te({rows:e}){return e.length===0?a(o,{dimColor:!0,children:"no crons"}):a(i,{flexDirection:"column",children:e.slice(0,12).map(r=>{let t=r.enabled?r.consecutiveErrors>0?a(o,{color:"red",children:"err"}):a(o,{color:"green",children:"ok"}):a(o,{dimColor:!0,children:"off"}),n=r.nextRun?new Date(r.nextRun).toLocaleTimeString():"\u2014";return c(i,{children:[a(o,{children:T(r.id,16)}),a(o,{dimColor:!0,children:T(r.schedule,12)}),a(o,{children:T(n,10)}),a(i,{children:t})]},r.id)})})}function re({rows:e}){if(e.length===0)return a(o,{dimColor:!0,children:"(waiting for channel events\u2026)"});let r=[...e].sort((t,n)=>n.lastAt-t.lastAt);return a(i,{flexDirection:"column",children:r.slice(0,12).map(t=>c(i,{children:[a(o,{children:T(t.channel,12)}),c(o,{color:"cyan",children:["\u2190",T(String(t.inbound),4)]}),c(o,{color:"magenta",children:["\u2192",T(String(t.outbound),4)]}),a(o,{dimColor:!0,children:t.lastPreview})]},t.channel))})}function ne({rows:e,cursor:r,focused:t}){return e.length===0?a(o,{dimColor:!0,children:"(waiting for events\u2026)"}):a(i,{flexDirection:"column",children:e.slice(0,18).map((n,s)=>{let u=I(t,s===r);return c(i,{children:[a(o,{...u,dimColor:!0,children:new Date(n.at).toLocaleTimeString().padEnd(10)}),a(o,{...u,color:ce(n.kind),children:T(n.kind,8)}),a(o,{...u,children:n.line})]},`${n.at}-${s}`)})})}function oe({chat:e,suggest:r,agents:t}){let n=e.history.slice(-14),s=t.find(f=>f.id===e.agentId),u=H(s?.tier??"",s?.model),p=e.status==="sending"?[...e.history].reverse().find(f=>f.role==="agent"&&f.streaming):void 0,y=e.status==="sending"?a(O,{startedAt:p?.at??Date.now(),phase:p?.text?"responding":"thinking",indent:""}):e.error?c(o,{color:"red",children:["\u25CF ",e.error]}):a(o,{dimColor:!0,children:"\u25CF ready"});return c(i,{flexDirection:"column",width:"50%",borderStyle:"double",borderColor:"green",paddingX:1,children:[c(i,{justifyContent:"space-between",children:[c(o,{bold:!0,color:"green",children:["CHAT \xB7 @",e.agentId]}),a(i,{children:y})]}),c(o,{children:[c(o,{color:u.color,bold:!0,children:[u.glyph," ",u.label]}),s?.model?c(o,{dimColor:!0,children:[" ",j(s.model)]}):null,c(o,{dimColor:!0,children:[" \xB7 ",e.chatId]})]}),a(i,{flexDirection:"column",flexGrow:1,marginTop:1,children:n.length===0?a(o,{dimColor:!0,children:"(type a message and press Enter \u2014 Esc exits, Ctrl-L starts fresh)"}):n.map((f,l)=>a(se,{turn:f,agentId:e.agentId},`${f.at}-${l}`))}),r?c(o,{dimColor:!0,children:[a(o,{color:"cyan",children:"\u21B9"})," ",r.items.slice(0,5).map((f,l)=>l===0?a(o,{color:"cyan",children:f},l):c(o,{children:[" ",f]},l))]}):null,c(i,{children:[a(o,{color:"cyan",children:"you \u203A "}),a(o,{children:e.text}),a(o,{inverse:!0,children:" "})]})]})}function se({turn:e,agentId:r}){if(e.role==="you")return c(i,{flexDirection:"column",marginBottom:1,children:[a(o,{color:"cyan",children:"you"}),e.text.split(`
|
|
5
5
|
`).map((s,u)=>c(o,{children:[" ",s]},u))]});if(e.role==="error")return c(i,{flexDirection:"column",marginBottom:1,children:[a(o,{color:"red",children:"error"}),c(o,{color:"red",children:[" ",e.text]})]});let t=e.elapsedMs!=null?` \xB7 ${(e.elapsedMs/1e3).toFixed(1)}s${e.outTokens!=null?`, ${e.outTokens} tok`:""}`:e.streaming?" \xB7 \u2026":"",n=F(e.text,58,{balance:e.streaming});return c(i,{flexDirection:"column",marginBottom:1,children:[c(o,{color:"green",children:["@",r??"agent",a(o,{dimColor:!0,children:t})]}),e.thinking?e.thinking.split(`
|
|
6
6
|
`).filter(s=>s.trim()).slice(-2).map((s,u)=>c(o,{dimColor:!0,italic:!0,children:[" ",s]},`th${u}`)):null,(e.tools??[]).map((s,u)=>c(o,{color:s.error?"red":"green",children:[" \u25CF ",c(o,{bold:!s.error,dimColor:s.error,children:[s.name,s.arg?c(o,{dimColor:!0,children:["(",s.arg,")"]}):null,s.error?" failed":""]})]},`tool${u}`)),n.split(`
|
|
7
7
|
`).slice(0,14).map((s,u)=>c(o,{children:[" ",s]},u))]})}function ae(e){let r=e.data??{},t=typeof r.at=="string"||typeof r.at=="number"?new Date(r.at).getTime():Date.now(),n="";switch(e.event){case"run":n=`${r.phase??""} ${r.workflowId??""} ${(r.runId??"").slice(0,8)} ${r.nodeId??""}`.trim();break;case"task":n=`${r.phase??""} ${r.workflowId??""} ${Array.isArray(r.assignedTo)?r.assignedTo.join(","):""} ${r.title?`"${r.title}"`:""}`.trim();break;case"signal":n=`${r.name??""} (${r.scope??""}) ${r.workflowId??""}`.trim();break;case"mesh":n=`${r.peer??""} ${r.healthy?"healthy":"lost"} ${r.delta??""}`.trim();break;case"channel":{n=`${r.direction==="in"?"\u2190":"\u2192"} ${r.channel??""}:${r.chatId??""} ${r.textPreview??""}`.trim();break}case"status":n=`node=${r.node??""} agents=${r.agents??0} active=${(r.active??[]).length}`;break;default:n=typeof r=="string"?r:JSON.stringify(r).slice(0,80)}return{at:Number.isFinite(t)?t:Date.now(),kind:e.event,line:n}}function ce(e){switch(e){case"run":return"cyan";case"task":return"magenta";case"signal":return"green";case"mesh":return"blue";case"channel":return"yellow";default:return"white"}}function T(e,r){let t=(e??"").toString();return t.length>=r?t.slice(0,r-1)+" ":t+" ".repeat(r-t.length)}export{be as App};
|
|
8
|
-
//# sourceMappingURL=App-
|
|
8
|
+
//# sourceMappingURL=App-HGCD735J.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as Y,b as Z,c as _,d as ee,e as te,f as ne,g as re}from"./chunk-U2CKL755.js";import{b as Q,g as X}from"./chunk-
|
|
1
|
+
import{a as Y,b as Z,c as _,d as ee,e as te,f as ne,g as re}from"./chunk-U2CKL755.js";import{b as Q,g as X}from"./chunk-KWU4EOWC.js";import"./chunk-UPRACUXY.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";import{useCallback as oe,useMemo as H,useRef as P,useState as k}from"react";import{Box as g,Text as t,useApp as he,useInput as xe,useStdout as Te}from"ink";import{randomUUID as se}from"crypto";var m={accent:"cyan",agent:"green",working:"magenta",error:"red",muted:"gray"},q="\u25C7 agentx",F="\u258C";import{jsx as c,jsxs as o}from"react/jsx-runtime";var ie="/help /agent <id> /agents /clear /who /exit",be=[{cmd:"/agent",desc:"switch the target agent (/agent <id>)"},{cmd:"/agents",desc:"list registered agents"},{cmd:"/clear",desc:"start a fresh session"},{cmd:"/who",desc:"show agent + chat id"},{cmd:"/help",desc:"list commands"},{cmd:"/exit",desc:"quit the chat"}];function Pe({conn:n,agentId:p,channel:f,chatId:a,agents:h}){let{exit:w}=he(),{stdout:O}=Te(),V=Math.max(40,Math.min((O?.columns||80)-4,100)),[z,U]=k([]),[$,S]=k(null),[T,le]=k(p),[A,ae]=k(h),[E,ue]=k(a),[y,x]=k(""),[J,de]=k(""),W=P([]),u=P(-1),M=P(null),R=P(null),v=$?.live??!1,j=H(()=>Z(y,A.map(s=>s.id),process.cwd()),[y,A]),N=H(()=>{let s=/^\/(\w*)$/.exec(y);if(!s)return null;let e=be.filter(r=>r.cmd.slice(1).startsWith(s[1].toLowerCase()));return e.length?e:null},[y]),b=s=>de(s),K=oe(s=>{let e=se().slice(0,8),r=Date.now(),i=new AbortController;R.current=i;let d={id:e,you:s,agentId:T,segs:[],live:!0,startedAt:r};S({...d});let L=()=>S({...d,segs:d.segs.map(C=>({...C}))});(async()=>{try{let C=await X(n,T,s,{channel:f,chatId:E,signal:i.signal,onText:l=>{let I=d.segs[d.segs.length-1];I&&I.type==="text"?I.content=(I.content??"")+l:d.segs.push({type:"text",content:l}),L()},onThinking:l=>{d.thinking=(d.thinking??"")+l,L()},onTool:l=>{l.status==="start"&&l.name?(d.segs.push({type:"tool",name:l.name,arg:l.arg}),L()):l.status==="result"&&l.error&&(d.segs.push({type:"tool",name:l.name??"tool",error:!0}),L())}});U(l=>[...l,{...d,live:!1,elapsedMs:Date.now()-r,outTokens:C.usage?.outputTokens,error:C.error}]),S(null)}catch(C){let l=i.signal.aborted||C?.name==="AbortError";U(I=>[...I,{...d,live:!1,elapsedMs:Date.now()-r,interrupted:l,error:l?void 0:C?.message||String(C)}]),S(null)}finally{R.current===i&&(R.current=null)}})()},[n,T,f,E]),me=oe(s=>{let e=s.trim();if(e){if(W.current.push(e),u.current=-1,e==="/exit"||e==="/quit"){w();return}if(e==="/help"){b(ie);return}if(e==="/who"){b(`@${T} \xB7 chatId=${E} \xB7 channel=${f}`);return}if(e==="/clear"){let r=`chat-cli:${se().slice(0,12)}`;ue(r),U([]),b(`fresh chatId=${r} (warm process dropped)`);return}if(e==="/agents"){Q(n).then(r=>{ae(r),b(r.map(i=>i.id===T?`[${i.id}]`:i.id).join(" "))}).catch(r=>b(`failed to list agents: ${r?.message||r}`));return}if(e.startsWith("/agent ")){let r=e.slice(7).replace(/^@/,"").trim();if(!r){b("usage: /agent <id>");return}if(!A.find(i=>i.id===r)){b(`unknown agent: @${r}`);return}le(r),b(`now talking to @${r}`);return}if(e.startsWith("/")){b(`unknown command \xB7 ${ie}`);return}K(e)}},[n,T,A,f,E,w,K]);xe((s,e)=>{if(e.ctrl&&s==="c"){w();return}if(e.escape){if(v&&R.current){R.current.abort();return}w();return}if(e.tab){if(N){x(N[0].cmd+" ");return}let i=_(y,M,A.map(d=>d.id),process.cwd());i!==null&&(x(i),u.current=-1);return}if(e.upArrow){let i=W.current;if(!i.length)return;u.current=u.current<0?i.length-1:Math.max(0,u.current-1),x(i[u.current]??"");return}if(e.downArrow){let i=W.current;if(u.current<0)return;if(u.current=u.current+1,u.current>=i.length){u.current=-1,x("");return}x(i[u.current]??"");return}if(e.backspace||e.delete){M.current=null,x(i=>i.slice(0,-1));return}if(e.ctrl||e.meta)return;let r=ee(s??"",e.return,y);switch(r.kind){case"paste":M.current=null,x(i=>i+r.text),u.current=-1;return;case"type":M.current=null,x(i=>i+r.text),u.current=-1;return;case"continue":x(r.buffer);return;case"submit":if(v)return;M.current=null,x(""),me(r.text);return;case"none":return}});let G=v?m.working:m.accent,ge=y.length?y.split(`
|
|
2
2
|
`):[""],B=A.find(s=>s.id===T),D=ne(B?.tier??"",B?.model),pe=O?.rows||24,fe=z.slice(-40);return o(g,{flexDirection:"column",height:pe,children:[o(g,{flexDirection:"column",flexGrow:1,justifyContent:"flex-end",overflow:"hidden",children:[z.length===0&&!$?o(g,{flexDirection:"column",children:[o(t,{children:[c(t,{color:m.accent,bold:!0,children:q}),c(t,{dimColor:!0,children:" \u2014 chat with "}),o(t,{color:m.accent,children:["@",T]}),c(t,{dimColor:!0,children:" via "}),o(t,{color:D.color,bold:!0,children:[D.glyph," ",D.label]}),B?.model?o(t,{dimColor:!0,children:[" (",B.model,")"]}):null]}),c(t,{dimColor:!0,children:"streaming \xB7 markdown \xB7 tools \xB7 type a message, or / for commands"})]}):null,fe.map(s=>c(ce,{turn:s,width:V},s.id)),$?c(ce,{turn:$,width:V}):null]}),N?c(g,{flexDirection:"column",marginTop:1,children:N.map((s,e)=>o(g,{children:[c(t,{color:e===0?m.accent:m.muted,bold:e===0,children:s.cmd.padEnd(10)}),c(t,{dimColor:!0,children:s.desc})]},s.cmd))}):j?o(g,{marginTop:1,children:[c(t,{color:m.accent,children:"\u21B9 "}),j.items.map((s,e)=>o(t,{color:e===0?m.accent:m.muted,children:[s,e<j.items.length-1?" ":""]},e))]}):J?c(g,{marginTop:1,children:c(t,{dimColor:!0,children:J})}):null,c(g,{borderStyle:"single",borderColor:G,borderLeft:!1,borderRight:!1,borderDimColor:!v,width:"100%",children:c(g,{flexDirection:"column",width:"100%",children:ge.map((s,e,r)=>o(g,{children:[c(t,{color:G,bold:!0,children:e===0?"\u203A ":" "}),c(t,{children:s}),e===r.length-1&&!v?c(t,{color:G,children:"\u258F"}):null]},e))})}),o(g,{justifyContent:"space-between",children:[o(t,{children:[c(t,{color:m.accent,bold:!0,children:q}),o(t,{dimColor:!0,children:[" \xB7 @",T," \xB7 "]}),o(t,{color:D.color,bold:!0,children:[D.glyph," ",D.label]}),B?.model?o(t,{dimColor:!0,children:[" ",re(B.model)]}):null]}),o(t,{dimColor:!0,children:["\u21B5 send / cmds @ mention esc ",v?"stop":"exit"]})]})]})}function ce({turn:n,width:p}){let f=H(()=>ye(n,p),[n,p]),a=n.segs.some(h=>h.type==="text"&&h.content);return o(g,{flexDirection:"column",marginBottom:1,children:[o(t,{color:m.accent,bold:!0,children:[F," you"]}),n.you.split(`
|
|
3
3
|
`).map((h,w)=>o(t,{color:"white",children:[" ",h]},`u${w}`)),o(t,{color:m.agent,bold:!0,children:[F," ",n.agentId??"agent"]}),n.thinking?c(g,{flexDirection:"column",children:we(n.thinking,n.live?3:2).map((h,w)=>o(t,{dimColor:!0,italic:!0,children:[" ",h]},`th${w}`))}):null,f,n.live?c(te,{startedAt:n.startedAt,phase:a?"responding":"thinking",hint:"esc to interrupt"}):n.interrupted?o(t,{dimColor:!0,children:[" \u2298 interrupted \xB7 ",(n.elapsedMs/1e3).toFixed(1),"s"]}):n.error?o(t,{color:"red",children:[" \u2717 ",n.error]}):n.elapsedMs!=null?o(t,{dimColor:!0,children:[" \xB7 ",(n.elapsedMs/1e3).toFixed(1),"s",n.outTokens!=null?`, ${n.outTokens} tok`:""]}):null]})}function we(n,p){return n.split(`
|
|
4
4
|
`).filter(a=>a.trim()).slice(-p)}function ye(n,p){let f=[];return n.segs.forEach((a,h)=>{a.type==="tool"?f.push(o(t,{color:a.error?"red":"green",children:[" ","\u25CF ",o(t,{bold:!a.error,dimColor:a.error,children:[a.name,a.arg?o(t,{dimColor:!0,children:["(",a.arg,")"]}):null,a.error?" failed":""]})]},h)):a.content&&f.push(c(t,{children:Ce(Y(a.content,p,{balance:n.live}))},h))}),f}function Ce(n){return n.split(`
|
|
5
5
|
`).map(p=>p.length?" "+p:p).join(`
|
|
6
6
|
`)}export{Pe as ChatApp};
|
|
7
|
-
//# sourceMappingURL=ChatApp-
|
|
7
|
+
//# sourceMappingURL=ChatApp-VVBGBDKU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=absorb-eval-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-T7HWU7O4.js";import"./chunk-3DX7CKKW.js";import"./chunk-YU2JJIQH.js";import"./chunk-JTFCU5LH.js";import"./chunk-RE6N3TRQ.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-F6UAAQSU.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-UPRACUXY.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{i as JUDGE_ENTRY_CHARS,e as WEAK_CITATION,j as buildJudgePrompt,l as buildScorecard,f as checkArticle,n as envelopeUsage,h as findDuplicates,k as parseJudgeReply,b as pickSample,m as renderScorecard,a as seededRandom,o as summariseRuns,d as termOverlap,c as terms,g as uncitedWithFacts};
|
|
2
|
+
//# sourceMappingURL=absorb-eval-2XT7XBH7.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m,b as d,c as g,d as f,e as h,i as b,j as y}from"./chunk-
|
|
1
|
+
import{a as m,b as d,c as g,d as f,e as h,i as b,j as y}from"./chunk-DECMCWGN.js";import"./chunk-UPRACUXY.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";import{ImapFlow as P}from"imapflow";import M from"postal-mime";var w=8e3;async function x(n){let e=await M.parse(n),t=e.from&&"address"in e.from?e.from:void 0,r=t?.address?.trim().toLowerCase();if(!r)return null;let i=l=>e.headers.find(u=>u.key===l)?.value??"",s=p(e.references??"");if(e.inReplyTo)for(let l of p(e.inReplyTo))s.includes(l)||s.push(l);let a=i("auto-submitted").toLowerCase(),c=i("precedence").toLowerCase(),o=C(e.text??N(e.html??""));return{from:r,fromName:t?.name||void 0,subject:(e.subject??"").trim(),messageId:e.messageId?p(e.messageId)[0]:void 0,references:s,text:o.length>w?`${o.slice(0,w)}
|
|
2
2
|
[\u2026 the rest of the mail was cut]`:o,automatic:a!==""&&a!=="no"||["bulk","junk","list","auto_reply"].includes(c)||i("list-id")!==""||/^(mailer-daemon|postmaster|no-?reply)@/.test(r)}}function p(n){return n.match(/<[^<>\s]+>/g)??[]}function C(n){let e=n.replace(/\r\n/g,`
|
|
3
3
|
`).split(`
|
|
4
4
|
`),t=[];for(let r=0;r<e.length;r++){let i=e[r];if(/^On .{4,200}wrote:\s*$/.test(i)||/^On .{4,200}$/.test(i)&&/wrote:\s*$/.test(e[r+1]??"")||/^-{2,}\s*Original Message\s*-{2,}/i.test(i))break;/^>/.test(i)||t.push(i)}return t.join(`
|
|
@@ -9,4 +9,4 @@ import{a as m,b as d,c as g,d as f,e as h,i as b,j as y}from"./chunk-BIJ3JIWG.js
|
|
|
9
9
|
Subject: ${n.subject||"(none)"}
|
|
10
10
|
|
|
11
11
|
${n.text||"(no text)"}`}var A=class{constructor(e,t=()=>{}){this.opts=e;this.log=t}name="email";handler=null;timers=[];polling=new Set;failures=new Map;onMessage(e){this.handler=e}async start(){for(let[e,t]of Object.entries(this.opts.accounts)){this.poll(e);let r=setInterval(()=>{this.poll(e)},t.pollSeconds*1e3);r.unref?.(),this.timers.push(r)}}async stop(){for(let e of this.timers)clearInterval(e);this.timers=[]}health(){let e=[...this.failures];return e.length?{up:!1,reason:e.map(([t,r])=>`${t}: ${r}`).join("; ")}:{up:!0}}async poll(e){let t=this.opts.accounts[e];if(!t||this.polling.has(e))return 0;this.polling.add(e);let r=0;try{r=await this.pollAccount(e,t),this.failures.delete(e)}catch(i){let s=String(i?.message??i).slice(0,200);this.failures.get(e)!==s&&this.log(`[email] ${e}: ${s}`),this.failures.set(e,s)}finally{this.polling.delete(e)}return r}client(e){if(this.opts.imapClient)return this.opts.imapClient(e);let{imap:t}=b(e);return new P({host:t.host,port:t.port,secure:t.secure,auth:{user:t.user,pass:t.password},logger:!1})}async pollAccount(e,t){let r=this.client(t),i=[],s=g(this.opts.root,e);await r.connect();try{let c=await r.getMailboxLock(t.mailbox);try{let o=r.mailbox;if(!o)throw new Error(`cannot open ${t.mailbox}`);let l=String(o.uidValidity);if(!s||s.uidValidity!==l)return f(this.opts.root,e,{uidValidity:l,lastUid:o.uidNext-1}),0;if(o.uidNext-1>s.lastUid)for await(let u of r.fetch(`${s.lastUid+1}:*`,{uid:!0,source:!0},{uid:!0}))u.uid>s.lastUid&&u.source&&i.push({uid:u.uid,source:u.source})}finally{c.release()}}finally{await r.logout().catch(()=>r.close())}let a=0;for(let{uid:c,source:o}of i.sort((l,u)=>l.uid-u.uid))await this.handle(e,t,c,o)&&a++,s={uidValidity:s.uidValidity,lastUid:c},f(this.opts.root,e,s);return a}async handle(e,t,r,i){let s=await x(i).catch(()=>null);return s?s.from===t.address.toLowerCase()?!1:s.automatic?(this.log(`[email] ${e}: automatic mail from ${s.from} skipped`),!1):v(s.from,t.allowFrom)?(d(this.opts.root,$(e,s,m(this.opts.root,s.from))),this.handler?(await this.handler({id:s.messageId??`${e}:${r}`,channel:"email",accountId:e,sender:{id:s.from,name:s.fromName||s.from,username:s.from},text:T(s),timestamp:new Date,resolvedAgent:t.agent,channelMeta:{channel:"email",facts:[`This is an email to ${t.address}. Your reply is sent as an email${t.send==="auto"?"":" once the owner approves it"}.`]}}),!0):!1):(this.log(`[email] ${e}: ${s.from} is not in allowFrom, dropped`),!1):(this.log(`[email] ${e}: mail ${r} has no sender, skipped`),!1)}async send(e){let t=m(this.opts.root,e.chatId);if(!t)throw new Error(`no email from ${e.chatId} to reply to`);let r=this.opts.accounts[t.account];if(!r)throw new Error(`email account "${t.account}" is not set up`);let i=j(t),s=e.agentId??r.agent;if(r.send==="auto")return y(r,r.name||this.opts.agentName?.(s)||s,{to:t.to,toName:t.toName,subject:i.subject,inReplyTo:i.inReplyTo,references:i.references,text:e.text});let a=h(this.opts.root,{agent:s,account:t.account,to:t.to,to_name:t.toName,subject:i.subject,in_reply_to:i.inReplyTo,references:i.references,text:e.text});return this.log(`[email] reply to ${t.to} waits for approval: email:${a.id}`),this.opts.onDraft?.(a),`draft:${a.id}`}};export{A as EmailAdapter};
|
|
12
|
-
//# sourceMappingURL=adapter-
|
|
12
|
+
//# sourceMappingURL=adapter-ZGEMORWD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as a,B as b,C as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=agent-
|
|
1
|
+
import{A as a,B as b,C as c}from"./chunk-K3QWXVLV.js";import"./chunk-SFQUP3BP.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-JHCI6XCJ.js";import"./chunk-DSYKYZMT.js";import"./chunk-QIJLFPWE.js";export{a as createAgentContext,b as generate,c as generateStream};
|
|
2
|
+
//# sourceMappingURL=agent-4IF72I6E.js.map
|