@tickernelz/paperclip-pro-server 2026.1015.0 → 2026.1016.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/dist/build-info.json +1 -1
- package/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +9 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +91 -10
- package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/undici/lib/web/fetch/index.js +7 -9
- package/node_modules/undici/lib/web/websocket/receiver.js +14 -0
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +14 -0
- package/package.json +21 -21
- package/ui-dist/assets/{Agents.production-BHWznw8y.js → Agents.production-DIaVNv5W.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-8aUIBuOH.js → CompanyActivity.production-COeIjyrE.js} +1 -1
- package/ui-dist/assets/{CompanyExport-wysQLLwi.js → CompanyExport-DFKM1JZ0.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-CeGKxxeo.js → CompanySkills.production-CPj5Qynu.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-Bv25raI7.js → OrgChart.production-3hIsv6lZ.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-BP0s3T7M.js → RoutineDetail.production-pV8pGrgf.js} +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-DVWsHef0.js +5 -0
- package/ui-dist/assets/{Routines.production-BQL74XW8.js → Routines.production-V6ORo8Wf.js} +1 -1
- package/ui-dist/assets/{definition-CX59WzhL.js → definition-XsWZgWl5.js} +1 -1
- package/ui-dist/assets/{index-BM-RkEuH.css → index-C8wuDMl2.css} +1 -1
- package/ui-dist/assets/{index-DvHeLBFO.js → index-CdVVFoXg.js} +156 -156
- package/ui-dist/index.html +3 -3
- package/ui-dist/sw.js +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-DMTFaEse.js +0 -5
package/dist/build-info.json
CHANGED
|
@@ -29,6 +29,8 @@ Returns: `Client`
|
|
|
29
29
|
* **webSocket** `WebSocketOptions` (optional) - WebSocket-specific configuration options.
|
|
30
30
|
* **maxFragments** `number` (optional) - Default: `131072` - Maximum number of fragments in a message. Set to 0 to disable the limit.
|
|
31
31
|
* **maxPayloadSize** `number` (optional) - Default: `134217728` (128 MB) - Maximum allowed payload size in bytes for WebSocket messages. Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages. Set to 0 to disable the limit.
|
|
32
|
+
* **eventSource** `EventSourceOptions` (optional) - EventSource-specific configuration options.
|
|
33
|
+
* **maxEventSize** `number` (optional) - The maximum total bytes of data and metadata field values retained for a pending EventSource event. Each unfinished line is separately limited to this value plus seven syntax bytes. The number of `data:` lines per event and input chunks buffered for an unfinished line are each limited to `min(131072, max(1024, floor(maxEventSize / 128)))` to bound object overhead. Set to `0` to disable these limits. Default: `buffer.kStringMaxLength`.
|
|
32
34
|
* **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections.
|
|
33
35
|
* **connect** `ConnectOptions | Function | null` (optional) - Default: `null`.
|
|
34
36
|
* **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body.
|
|
@@ -23,7 +23,7 @@ function defaultFactory (origin, opts) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
class Agent extends DispatcherBase {
|
|
26
|
-
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
|
26
|
+
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, tls, ...options } = {}) {
|
|
27
27
|
if (typeof factory !== 'function') {
|
|
28
28
|
throw new InvalidArgumentError('factory must be a function.')
|
|
29
29
|
}
|
|
@@ -42,11 +42,15 @@ class Agent extends DispatcherBase {
|
|
|
42
42
|
connect = { ...connect }
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
if (tls && typeof tls !== 'function') {
|
|
46
|
+
tls = { ...tls }
|
|
47
|
+
}
|
|
48
|
+
|
|
45
49
|
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent)
|
|
46
50
|
? options.interceptors.Agent
|
|
47
51
|
: [createRedirectInterceptor({ maxRedirections })]
|
|
48
52
|
|
|
49
|
-
this[kOptions] = { ...util.deepClone(options), connect }
|
|
53
|
+
this[kOptions] = { ...util.deepClone(options), connect, tls }
|
|
50
54
|
this[kOptions].interceptors = options.interceptors
|
|
51
55
|
? { ...options.interceptors }
|
|
52
56
|
: undefined
|
|
@@ -727,8 +727,6 @@ async function connectH1 (client, socket) {
|
|
|
727
727
|
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
|
728
728
|
|
|
729
729
|
addListener(socket, 'error', function (err) {
|
|
730
|
-
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
731
|
-
|
|
732
730
|
const parser = this[kParser]
|
|
733
731
|
|
|
734
732
|
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
|
@@ -136,8 +136,6 @@ async function connectH2 (client, socket) {
|
|
|
136
136
|
socket[kHTTP2Session] = session
|
|
137
137
|
|
|
138
138
|
util.addListener(socket, 'error', function (err) {
|
|
139
|
-
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
140
|
-
|
|
141
139
|
this[kError] = err
|
|
142
140
|
|
|
143
141
|
this[kClient][kOnError](err)
|
|
@@ -211,8 +209,6 @@ function resumeH2 (client) {
|
|
|
211
209
|
}
|
|
212
210
|
|
|
213
211
|
function onHttp2SessionError (err) {
|
|
214
|
-
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
215
|
-
|
|
216
212
|
this[kSocket][kError] = err
|
|
217
213
|
this[kClient][kOnError](err)
|
|
218
214
|
}
|
|
@@ -107,9 +107,10 @@ class Client extends DispatcherBase {
|
|
|
107
107
|
// h2
|
|
108
108
|
maxConcurrentStreams,
|
|
109
109
|
allowH2,
|
|
110
|
-
webSocket
|
|
110
|
+
webSocket,
|
|
111
|
+
eventSource
|
|
111
112
|
} = {}) {
|
|
112
|
-
super({ webSocket })
|
|
113
|
+
super({ webSocket, eventSource })
|
|
113
114
|
|
|
114
115
|
if (keepAlive !== undefined) {
|
|
115
116
|
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const buffer = require('node:buffer')
|
|
3
4
|
const Dispatcher = require('./dispatcher')
|
|
4
5
|
const {
|
|
5
6
|
ClientDestroyedError,
|
|
@@ -12,6 +13,7 @@ const kOnDestroyed = Symbol('onDestroyed')
|
|
|
12
13
|
const kOnClosed = Symbol('onClosed')
|
|
13
14
|
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
|
14
15
|
const kWebSocketOptions = Symbol('webSocketOptions')
|
|
16
|
+
const kEventSourceOptions = Symbol('eventSourceOptions')
|
|
15
17
|
|
|
16
18
|
class DispatcherBase extends Dispatcher {
|
|
17
19
|
constructor (opts) {
|
|
@@ -22,6 +24,7 @@ class DispatcherBase extends Dispatcher {
|
|
|
22
24
|
this[kClosed] = false
|
|
23
25
|
this[kOnClosed] = []
|
|
24
26
|
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
|
27
|
+
this[kEventSourceOptions] = opts?.eventSource ?? {}
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
get webSocketOptions () {
|
|
@@ -31,6 +34,12 @@ class DispatcherBase extends Dispatcher {
|
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
|
|
37
|
+
get eventSourceOptions () {
|
|
38
|
+
return {
|
|
39
|
+
maxEventSize: this[kEventSourceOptions].maxEventSize ?? buffer.kStringMaxLength
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
34
43
|
get destroyed () {
|
|
35
44
|
return this[kDestroyed]
|
|
36
45
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
+
const buffer = require('node:buffer')
|
|
2
3
|
const { Transform } = require('node:stream')
|
|
3
4
|
const { isASCIINumber, isValidLastEventId } = require('./util')
|
|
4
5
|
|
|
@@ -23,11 +24,19 @@ const COLON = 0x3A
|
|
|
23
24
|
*/
|
|
24
25
|
const SPACE = 0x20
|
|
25
26
|
|
|
27
|
+
const defaultMaxEventSize = buffer.kStringMaxLength
|
|
28
|
+
|
|
26
29
|
const DATA = Buffer.from('data')
|
|
27
30
|
const EVENT = Buffer.from('event')
|
|
28
31
|
const ID = Buffer.from('id')
|
|
29
32
|
const RETRY = Buffer.from('retry')
|
|
30
33
|
|
|
34
|
+
// Each data field creates a string node, and each unconsumed input chunk keeps
|
|
35
|
+
// a Buffer wrapper. The absolute ceiling protects the large default byte limit.
|
|
36
|
+
const minParserItems = 1024
|
|
37
|
+
const maxParserItems = 131072
|
|
38
|
+
const bytesPerParserItem = 128
|
|
39
|
+
|
|
31
40
|
function isASCIINumberBytes (buffer, start) {
|
|
32
41
|
if (start >= buffer.length) {
|
|
33
42
|
return false
|
|
@@ -66,6 +75,12 @@ function isFieldName (line, length, field) {
|
|
|
66
75
|
return true
|
|
67
76
|
}
|
|
68
77
|
|
|
78
|
+
function createMaxEventSizeExceededError () {
|
|
79
|
+
const error = new Error('EventSource message size exceeded')
|
|
80
|
+
error.aborted = false
|
|
81
|
+
return error
|
|
82
|
+
}
|
|
83
|
+
|
|
69
84
|
/**
|
|
70
85
|
* @typedef {object} EventSourceStreamEvent
|
|
71
86
|
* @type {object}
|
|
@@ -114,6 +129,13 @@ class EventSourceStream extends Transform {
|
|
|
114
129
|
pos = 0
|
|
115
130
|
lineChunkIndex = 0
|
|
116
131
|
linePos = 0
|
|
132
|
+
lineLength = 0
|
|
133
|
+
eventSize = 0
|
|
134
|
+
eventFieldSizes = { data: 0, event: 0, id: 0, retry: 0 }
|
|
135
|
+
dataLineCount = 0
|
|
136
|
+
maxEventSize
|
|
137
|
+
maxDataLines
|
|
138
|
+
maxBufferedChunks
|
|
117
139
|
|
|
118
140
|
event = {
|
|
119
141
|
data: undefined,
|
|
@@ -124,6 +146,7 @@ class EventSourceStream extends Transform {
|
|
|
124
146
|
|
|
125
147
|
/**
|
|
126
148
|
* @param {object} options
|
|
149
|
+
* @param {number} [options.maxEventSize]
|
|
127
150
|
* @param {eventSourceSettings} options.eventSourceSettings
|
|
128
151
|
* @param {Function} [options.push]
|
|
129
152
|
*/
|
|
@@ -135,6 +158,12 @@ class EventSourceStream extends Transform {
|
|
|
135
158
|
super(options)
|
|
136
159
|
|
|
137
160
|
this.state = options.eventSourceSettings || {}
|
|
161
|
+
this.maxEventSize = options.maxEventSize ?? defaultMaxEventSize
|
|
162
|
+
const parserItemLimit = this.maxEventSize > 0
|
|
163
|
+
? Math.min(maxParserItems, Math.max(minParserItems, Math.floor(this.maxEventSize / bytesPerParserItem)))
|
|
164
|
+
: 0
|
|
165
|
+
this.maxDataLines = parserItemLimit
|
|
166
|
+
this.maxBufferedChunks = parserItemLimit
|
|
138
167
|
if (options.push) {
|
|
139
168
|
this.push = options.push
|
|
140
169
|
}
|
|
@@ -152,6 +181,14 @@ class EventSourceStream extends Transform {
|
|
|
152
181
|
return
|
|
153
182
|
}
|
|
154
183
|
|
|
184
|
+
// A leading line ending can immediately release the currently buffered
|
|
185
|
+
// line, even when it uses the final allowed chunk slot.
|
|
186
|
+
if (this.maxEventSize > 0 &&
|
|
187
|
+
this.chunks.length >= this.maxBufferedChunks &&
|
|
188
|
+
chunk[0] !== LF && chunk[0] !== CR) {
|
|
189
|
+
callback(createMaxEventSizeExceededError())
|
|
190
|
+
return
|
|
191
|
+
}
|
|
155
192
|
this.chunks.push(chunk)
|
|
156
193
|
|
|
157
194
|
// Strip leading byte-order-mark if we opened the stream and started
|
|
@@ -230,7 +267,12 @@ class EventSourceStream extends Transform {
|
|
|
230
267
|
|
|
231
268
|
// In any case, we can process the line as we reached an
|
|
232
269
|
// end-of-line character
|
|
233
|
-
|
|
270
|
+
try {
|
|
271
|
+
this.parseLine(this.readLine(), this.event)
|
|
272
|
+
} catch (error) {
|
|
273
|
+
callback(error)
|
|
274
|
+
return
|
|
275
|
+
}
|
|
234
276
|
this.consumeCurrentByte()
|
|
235
277
|
// A line was processed and this could be the end of the event. We need
|
|
236
278
|
// to check if the next line is empty to determine if the event is
|
|
@@ -239,15 +281,28 @@ class EventSourceStream extends Transform {
|
|
|
239
281
|
continue
|
|
240
282
|
}
|
|
241
283
|
|
|
284
|
+
// readLine() is only called after CR or LF. Reject an unfinished line
|
|
285
|
+
// before it can retain an unbounded number of decoded chunks. The seven
|
|
286
|
+
// extra bytes allow the longest field prefix ("event: " or "retry: ").
|
|
287
|
+
if (this.maxEventSize > 0 && ++this.lineLength > this.maxEventSize + 7) {
|
|
288
|
+
callback(createMaxEventSizeExceededError())
|
|
289
|
+
return
|
|
290
|
+
}
|
|
242
291
|
this.advanceCursor()
|
|
243
292
|
}
|
|
244
293
|
|
|
245
294
|
callback()
|
|
246
295
|
}
|
|
247
296
|
|
|
297
|
+
_destroy (error, callback) {
|
|
298
|
+
this.chunks.length = 0
|
|
299
|
+
this.clearEvent()
|
|
300
|
+
super._destroy(error, callback)
|
|
301
|
+
}
|
|
302
|
+
|
|
248
303
|
/**
|
|
249
304
|
* @param {Buffer} line
|
|
250
|
-
* @param {
|
|
305
|
+
* @param {EventSourceStreamEvent} event
|
|
251
306
|
*/
|
|
252
307
|
parseLine (line, event) {
|
|
253
308
|
// If the line is empty (a blank line)
|
|
@@ -281,6 +336,13 @@ class EventSourceStream extends Transform {
|
|
|
281
336
|
}
|
|
282
337
|
|
|
283
338
|
if (isFieldName(line, fieldLength, DATA)) {
|
|
339
|
+
if (this.maxEventSize > 0 && this.dataLineCount >= this.maxDataLines) {
|
|
340
|
+
throw createMaxEventSizeExceededError()
|
|
341
|
+
}
|
|
342
|
+
const valueBytes = line.length - valueStart
|
|
343
|
+
const dataSize = this.eventFieldSizes.data + (event.data === undefined ? 0 : 1) + valueBytes
|
|
344
|
+
this.setEventFieldSize('data', dataSize)
|
|
345
|
+
|
|
284
346
|
const value = line.toString('utf8', valueStart)
|
|
285
347
|
|
|
286
348
|
if (event.data === undefined) {
|
|
@@ -288,11 +350,13 @@ class EventSourceStream extends Transform {
|
|
|
288
350
|
} else {
|
|
289
351
|
event.data += `\n${value}`
|
|
290
352
|
}
|
|
353
|
+
this.dataLineCount++
|
|
291
354
|
return
|
|
292
355
|
}
|
|
293
356
|
|
|
294
357
|
if (isFieldName(line, fieldLength, RETRY)) {
|
|
295
358
|
if (isASCIINumberBytes(line, valueStart)) {
|
|
359
|
+
this.setEventFieldSize('retry', line.length - valueStart)
|
|
296
360
|
event.retry = line.toString('utf8', valueStart)
|
|
297
361
|
}
|
|
298
362
|
return
|
|
@@ -300,20 +364,29 @@ class EventSourceStream extends Transform {
|
|
|
300
364
|
|
|
301
365
|
if (isFieldName(line, fieldLength, ID)) {
|
|
302
366
|
if (isValidLastEventIdBytes(line, valueStart)) {
|
|
367
|
+
this.setEventFieldSize('id', line.length - valueStart)
|
|
303
368
|
event.id = line.toString('utf8', valueStart)
|
|
304
369
|
}
|
|
305
370
|
return
|
|
306
371
|
}
|
|
307
372
|
|
|
308
373
|
if (isFieldName(line, fieldLength, EVENT)) {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
event.event = value
|
|
374
|
+
if (valueStart < line.length) {
|
|
375
|
+
this.setEventFieldSize('event', line.length - valueStart)
|
|
376
|
+
event.event = line.toString('utf8', valueStart)
|
|
313
377
|
}
|
|
314
378
|
}
|
|
315
379
|
}
|
|
316
380
|
|
|
381
|
+
setEventFieldSize (field, size) {
|
|
382
|
+
const eventSize = this.eventSize - this.eventFieldSizes[field] + size
|
|
383
|
+
if (this.maxEventSize > 0 && eventSize > this.maxEventSize) {
|
|
384
|
+
throw createMaxEventSizeExceededError()
|
|
385
|
+
}
|
|
386
|
+
this.eventSize = eventSize
|
|
387
|
+
this.eventFieldSizes[field] = size
|
|
388
|
+
}
|
|
389
|
+
|
|
317
390
|
/**
|
|
318
391
|
* @param {EventSourceStreamEvent} event
|
|
319
392
|
*/
|
|
@@ -344,6 +417,12 @@ class EventSourceStream extends Transform {
|
|
|
344
417
|
this.event.event = undefined
|
|
345
418
|
this.event.id = undefined
|
|
346
419
|
this.event.retry = undefined
|
|
420
|
+
this.eventSize = 0
|
|
421
|
+
this.dataLineCount = 0
|
|
422
|
+
this.eventFieldSizes.data = 0
|
|
423
|
+
this.eventFieldSizes.event = 0
|
|
424
|
+
this.eventFieldSizes.id = 0
|
|
425
|
+
this.eventFieldSizes.retry = 0
|
|
347
426
|
}
|
|
348
427
|
|
|
349
428
|
hasPendingEvent () {
|
|
@@ -379,14 +458,16 @@ class EventSourceStream extends Transform {
|
|
|
379
458
|
syncLineStartToCursor () {
|
|
380
459
|
this.lineChunkIndex = this.chunkIndex
|
|
381
460
|
this.linePos = this.pos
|
|
461
|
+
this.lineLength = 0
|
|
382
462
|
this.dropConsumedChunks()
|
|
383
463
|
}
|
|
384
464
|
|
|
385
465
|
dropConsumedChunks () {
|
|
386
|
-
|
|
387
|
-
this.
|
|
388
|
-
this.
|
|
389
|
-
this.
|
|
466
|
+
if (this.lineChunkIndex > 0) {
|
|
467
|
+
const consumed = this.lineChunkIndex
|
|
468
|
+
this.chunks.splice(0, consumed)
|
|
469
|
+
this.lineChunkIndex = 0
|
|
470
|
+
this.chunkIndex -= consumed
|
|
390
471
|
}
|
|
391
472
|
|
|
392
473
|
if (this.chunkIndex === this.chunks.length) {
|
|
@@ -11,6 +11,7 @@ const { isNetworkError } = require('../fetch/response')
|
|
|
11
11
|
const { delay } = require('./util')
|
|
12
12
|
const { kEnumerableProperty } = require('../../core/util')
|
|
13
13
|
const { environmentSettingsObject } = require('../fetch/util')
|
|
14
|
+
const { getGlobalDispatcher } = require('../../global')
|
|
14
15
|
|
|
15
16
|
let experimentalWarned = false
|
|
16
17
|
|
|
@@ -292,6 +293,7 @@ class EventSource extends EventTarget {
|
|
|
292
293
|
|
|
293
294
|
const eventSourceStream = new EventSourceStream({
|
|
294
295
|
eventSourceSettings: this.#state,
|
|
296
|
+
maxEventSize: this.#dispatcher.eventSourceOptions?.maxEventSize,
|
|
295
297
|
push: (event) => {
|
|
296
298
|
this.dispatchEvent(createFastMessageEvent(
|
|
297
299
|
event.type,
|
|
@@ -470,7 +472,8 @@ webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([
|
|
|
470
472
|
},
|
|
471
473
|
{
|
|
472
474
|
key: 'dispatcher', // undici only
|
|
473
|
-
converter: webidl.converters.any
|
|
475
|
+
converter: webidl.converters.any,
|
|
476
|
+
defaultValue: () => getGlobalDispatcher()
|
|
474
477
|
}
|
|
475
478
|
])
|
|
476
479
|
|
|
@@ -1950,8 +1950,10 @@ async function httpNetworkFetch (
|
|
|
1950
1950
|
// 19. Run these steps in parallel:
|
|
1951
1951
|
|
|
1952
1952
|
// 1. Run these steps, but abort when fetchParams is canceled:
|
|
1953
|
-
fetchParams.controller.
|
|
1954
|
-
|
|
1953
|
+
if (!fetchParams.controller.resume) {
|
|
1954
|
+
fetchParams.controller.on('terminated', onAborted)
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1955
1957
|
fetchParams.controller.resume = async () => {
|
|
1956
1958
|
// 1. While true
|
|
1957
1959
|
while (true) {
|
|
@@ -2120,8 +2122,6 @@ async function httpNetworkFetch (
|
|
|
2120
2122
|
}
|
|
2121
2123
|
location = headersList.get('location', true)
|
|
2122
2124
|
|
|
2123
|
-
this.body = new Readable({ read: resume })
|
|
2124
|
-
|
|
2125
2125
|
const decoders = []
|
|
2126
2126
|
|
|
2127
2127
|
const willFollow = location && request.redirect === 'follow' &&
|
|
@@ -2139,7 +2139,7 @@ async function httpNetworkFetch (
|
|
|
2139
2139
|
// CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).
|
|
2140
2140
|
const maxContentEncodings = 5
|
|
2141
2141
|
if (codings.length > maxContentEncodings) {
|
|
2142
|
-
|
|
2142
|
+
this.abort(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))
|
|
2143
2143
|
return true
|
|
2144
2144
|
}
|
|
2145
2145
|
|
|
@@ -2172,6 +2172,8 @@ async function httpNetworkFetch (
|
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
2174
|
|
|
2175
|
+
this.body = new Readable({ read: resume })
|
|
2176
|
+
|
|
2175
2177
|
const onError = this.onError.bind(this)
|
|
2176
2178
|
|
|
2177
2179
|
resolve({
|
|
@@ -2218,10 +2220,6 @@ async function httpNetworkFetch (
|
|
|
2218
2220
|
fetchParams.controller.off('terminated', this.abort)
|
|
2219
2221
|
}
|
|
2220
2222
|
|
|
2221
|
-
if (fetchParams.controller.onAborted) {
|
|
2222
|
-
fetchParams.controller.off('terminated', fetchParams.controller.onAborted)
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
2223
|
fetchParams.controller.ended = true
|
|
2226
2224
|
|
|
2227
2225
|
this.body.push(null)
|
|
@@ -249,6 +249,20 @@ class ByteParser extends Writable {
|
|
|
249
249
|
if (isControlFrame(this.#info.opcode)) {
|
|
250
250
|
this.#loop = this.parseControlFrame(body)
|
|
251
251
|
this.#state = parserStates.INFO
|
|
252
|
+
|
|
253
|
+
// If the automatic PONG/CLOSE reply filled the socket's write buffer,
|
|
254
|
+
// stop parsing and resume on drain so a PING flood cannot grow the
|
|
255
|
+
// outbound queue without bound.
|
|
256
|
+
const socket = this.ws[kResponse].socket
|
|
257
|
+
if (this.#loop && socket.writableNeedDrain) {
|
|
258
|
+
this.#loop = false
|
|
259
|
+
socket.once('drain', () => {
|
|
260
|
+
if (this.destroyed) return
|
|
261
|
+
this.#loop = true
|
|
262
|
+
this.run(callback)
|
|
263
|
+
})
|
|
264
|
+
return
|
|
265
|
+
}
|
|
252
266
|
} else {
|
|
253
267
|
if (!this.#info.compressed) {
|
|
254
268
|
if (!this.writeFragments(body)) {
|
|
@@ -80,6 +80,8 @@ export declare namespace Client {
|
|
|
80
80
|
maxResponseSize?: number;
|
|
81
81
|
/** WebSocket-specific options */
|
|
82
82
|
webSocket?: Client.WebSocketOptions;
|
|
83
|
+
/** EventSource-specific options */
|
|
84
|
+
eventSource?: Client.EventSourceOptions;
|
|
83
85
|
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
84
86
|
autoSelectFamily?: boolean;
|
|
85
87
|
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
@@ -120,6 +122,18 @@ export declare namespace Client {
|
|
|
120
122
|
*/
|
|
121
123
|
maxPayloadSize?: number;
|
|
122
124
|
}
|
|
125
|
+
export interface EventSourceOptions {
|
|
126
|
+
/**
|
|
127
|
+
* Maximum total bytes of data and metadata field values retained for a
|
|
128
|
+
* pending EventSource event. Each unfinished line is separately bounded
|
|
129
|
+
* to this value plus seven syntax bytes. The number of data lines per
|
|
130
|
+
* event and buffered input chunks are each limited to
|
|
131
|
+
* min(131072, max(1024, floor(maxEventSize / 128))).
|
|
132
|
+
* Set to 0 to disable these limits.
|
|
133
|
+
* @default buffer.kStringMaxLength
|
|
134
|
+
*/
|
|
135
|
+
maxEventSize?: number;
|
|
136
|
+
}
|
|
123
137
|
}
|
|
124
138
|
|
|
125
139
|
export default Client;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tickernelz/paperclip-pro-server",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1016.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/tickernelz/paperclip-pro",
|
|
6
6
|
"bugs": {
|
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
"@openrouter/ai-sdk-provider": "3.1.0",
|
|
55
55
|
"@opentelemetry/api": "^1.9.0",
|
|
56
56
|
"@photon-ai/advanced-imessage": "2.1.0",
|
|
57
|
-
"@tickernelz/paperclip-pro-adapter-claude-local": "2026.
|
|
58
|
-
"@tickernelz/paperclip-pro-adapter-codex-local": "2026.
|
|
59
|
-
"@tickernelz/paperclip-pro-adapter-cursor-cloud": "2026.
|
|
60
|
-
"@tickernelz/paperclip-pro-adapter-cursor-local": "2026.
|
|
61
|
-
"@tickernelz/paperclip-pro-adapter-gemini-local": "2026.
|
|
62
|
-
"@tickernelz/paperclip-pro-adapter-grok-local": "2026.
|
|
63
|
-
"@tickernelz/paperclip-pro-adapter-kimi-local": "2026.
|
|
64
|
-
"@tickernelz/paperclip-pro-adapter-omp-local": "2026.
|
|
65
|
-
"@tickernelz/paperclip-pro-adapter-openclaw-gateway": "2026.
|
|
66
|
-
"@tickernelz/paperclip-pro-adapter-opencode-local": "2026.
|
|
67
|
-
"@tickernelz/paperclip-pro-adapter-pi-local": "2026.
|
|
68
|
-
"@tickernelz/paperclip-pro-adapter-utils": "2026.
|
|
69
|
-
"@tickernelz/paperclip-pro-db": "2026.
|
|
70
|
-
"@tickernelz/paperclip-pro-hermes-paperclip-adapter": "2026.
|
|
71
|
-
"@tickernelz/paperclip-pro-mcp-server": "2026.
|
|
72
|
-
"@tickernelz/paperclip-pro-plugin-sdk": "2026.
|
|
73
|
-
"@tickernelz/paperclip-pro-shared": "2026.
|
|
74
|
-
"@tickernelz/paperclip-pro-skills-catalog": "2026.
|
|
75
|
-
"@tickernelz/paperclip-pro-teams-catalog": "2026.
|
|
57
|
+
"@tickernelz/paperclip-pro-adapter-claude-local": "2026.1016.0",
|
|
58
|
+
"@tickernelz/paperclip-pro-adapter-codex-local": "2026.1016.0",
|
|
59
|
+
"@tickernelz/paperclip-pro-adapter-cursor-cloud": "2026.1016.0",
|
|
60
|
+
"@tickernelz/paperclip-pro-adapter-cursor-local": "2026.1016.0",
|
|
61
|
+
"@tickernelz/paperclip-pro-adapter-gemini-local": "2026.1016.0",
|
|
62
|
+
"@tickernelz/paperclip-pro-adapter-grok-local": "2026.1016.0",
|
|
63
|
+
"@tickernelz/paperclip-pro-adapter-kimi-local": "2026.1016.0",
|
|
64
|
+
"@tickernelz/paperclip-pro-adapter-omp-local": "2026.1016.0",
|
|
65
|
+
"@tickernelz/paperclip-pro-adapter-openclaw-gateway": "2026.1016.0",
|
|
66
|
+
"@tickernelz/paperclip-pro-adapter-opencode-local": "2026.1016.0",
|
|
67
|
+
"@tickernelz/paperclip-pro-adapter-pi-local": "2026.1016.0",
|
|
68
|
+
"@tickernelz/paperclip-pro-adapter-utils": "2026.1016.0",
|
|
69
|
+
"@tickernelz/paperclip-pro-db": "2026.1016.0",
|
|
70
|
+
"@tickernelz/paperclip-pro-hermes-paperclip-adapter": "2026.1016.0",
|
|
71
|
+
"@tickernelz/paperclip-pro-mcp-server": "2026.1016.0",
|
|
72
|
+
"@tickernelz/paperclip-pro-plugin-sdk": "2026.1016.0",
|
|
73
|
+
"@tickernelz/paperclip-pro-shared": "2026.1016.0",
|
|
74
|
+
"@tickernelz/paperclip-pro-skills-catalog": "2026.1016.0",
|
|
75
|
+
"@tickernelz/paperclip-pro-teams-catalog": "2026.1016.0",
|
|
76
76
|
"@vercel/connect": "2.3.3",
|
|
77
77
|
"acorn": "8.18.0",
|
|
78
78
|
"acpx": "0.13.1",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"acpx"
|
|
129
129
|
],
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@tickernelz/paperclip-pro-paperclip-runner": "2026.
|
|
131
|
+
"@tickernelz/paperclip-pro-paperclip-runner": "2026.1016.0",
|
|
132
132
|
"@types/compression": "^1.8.1",
|
|
133
133
|
"@types/express": "^5.0.0",
|
|
134
134
|
"@types/express-serve-static-core": "^5.1.3",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
var Ie=Object.defineProperty;var a=(e,n)=>Ie(e,"name",{value:n,configurable:!0});import{i as ae}from"./rolldown-runtime-ZpX3ckPj.js";import{B as re,G as T,St as b,Va as Ae,_i as Ce,aa as j,ht as Se,ut as _e,z as $,za as Ee}from"./agent-avatar-url-BnmqahQ7.js";import{t as Le}from"./preload-helper-CceJXRIF.js";import{Ln as Me,ct as Te,f as ke,i as K,n as qe,r as ee,s as ie,yt as Pe}from"./BreadcrumbContext-Bxr1TyKN.js";import{m as le}from"./alert-dialog-BxpRolrb.js";import{t as oe}from"./AgentAvatar-DZh8tNnK.js";import{t as Be}from"./tabs-BfOtoFWj.js";import{t as te}from"./bot-DpNd1tv2.js";import{i as Fe,o as Re,t as $e}from"./heartbeats-Dae6h2SU.js";import{i as Ke,n as De,t as se}from"./environments-Bj-4l7Ol.js";import{t as ne}from"./EmptyState-DliXLd04.js";import{t as Oe}from"./PageSkeleton-BZF4K6Hf.js";import{Dt as ze,Ft as D,Gt as Ve,Kt as ce,Lt as Ge,Rt as Ue,Vt as He,Wt as Qe,Xt as We,Yt as ue,Zt as Xe,qt as Ye}from"./index-DvHeLBFO.js";var d=ae(Ae(),1),t=ae(Ee(),1),de=Ce,Ze=(0,d.lazy)(()=>Le(()=>import("./index-DvHeLBFO.js").then(e=>e.gt).then(e=>({default:e.ConfigureBuiltInAgentModal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]))),Je=["all","active","paused","error","builtin"],et=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"paused",label:"Paused"},{value:"error",label:"Error"},{value:"builtin",label:"Built-in"}];function tt(e){return Je.includes(e)}a(tt,"isFilterTab");var z={label:"Local",detail:"Paperclip host",title:"Local - Paperclip host"},me={label:"—",detail:"Loading environment",title:"Loading environment"},pe=new Set(["terminated","pending_approval"]);function ge(e,n){return n==="all"?!0:n==="active"?e==="active"||e==="running"||e==="idle":n==="paused"?e==="paused":n==="error"?e==="error":!0}a(ge,"matchesFilter");function st(e,n,i){return e.filter(r=>pe.has(r.status)?!1:n==="builtin"?i.has(r.id):ge(r.status,n)).sort((r,o)=>r.name.localeCompare(o.name))}a(st,"filterAgents");function nt(e){const n=e.adapterConfig?.model;if(typeof n!="string")return null;const i=n.trim();return i.length>0?i:null}a(nt,"getConfiguredModel");function at(e){return e==="ssh"?"SSH":e.charAt(0).toUpperCase()+e.slice(1)}a(at,"formatEnvironmentDriver");function rt(e,n){const i=typeof e.config.provider=="string"?e.config.provider.trim():"";return i?n?.sandboxProviders?.[i]?.displayName??i:"Sandbox"}a(rt,"getSandboxProviderLabel");function it(e,n){const i=Ge(e)?"Managed by Paperclip":e.driver==="sandbox"?`${rt(e,n)} sandbox provider`:e.driver==="local"?"Paperclip host":at(e.driver);return{label:e.name,detail:i,title:`${e.name} - ${i}`}}a(it,"describeEnvironment");function lt(e){return{label:"Unknown environment",detail:e.slice(0,8),title:`Unknown environment - ${e}`}}a(lt,"describeMissingEnvironment");function ot(e,n,i,r){const o=e.defaultEnvironmentId??i;if(!o)return z;const m=n.get(o);return m?it(m,r):lt(o)}a(ot,"resolveAgentEnvironment");function xe(e,n,i){return e.reduce((r,o)=>{const m=xe(o.reports,n,i);return pe.has(o.status)?(r.push(...m),r):(((n==="builtin"?i.has(o.id):ge(o.status,n))||m.length>0)&&r.push({...o,reports:m}),r)},[]).sort((r,o)=>r.name.localeCompare(o.name))}a(xe,"filterOrgTree");function wt(){const{selectedCompanyId:e}=Se(),{openNewAgent:n}=Fe(),{setBreadcrumbs:i}=qe(),r=ke(),o=Me(),{isMobile:m}=Ke(),N=o.pathname.split("/").pop()??"all",v=tt(N)?N:"all",[S,w]=(0,d.useState)("org"),I=m,l=I?"list":S,{data:u}=j({queryKey:b.instance.settings,queryFn:a(()=>De.get(),"queryFn"),enabled:!!e}),p=u?.experimental.enableBuiltInAgents===!0,f=v==="builtin"&&!p?"all":v,k=(0,d.useMemo)(()=>et.filter(s=>s.value!=="builtin"||p),[p]),{data:h}=j({queryKey:b.builtInAgents.list(e),queryFn:a(()=>We.list(e),"queryFn"),enabled:!!e&&p}),_=(0,d.useMemo)(()=>{const s=new Map;if(!p)return s;for(const c of h??[])c.agentId&&s.set(c.agentId,c);return s},[h,p]),V=(0,d.useMemo)(()=>new Set(_.keys()),[_]),[q,P]=(0,d.useState)(null),{data:g,isLoading:ve,error:G}=j({queryKey:b.agents.list(e),queryFn:a(()=>ee.list(e),"queryFn"),enabled:!!e}),{data:A}=j({queryKey:b.org(e),queryFn:a(()=>ee.org(e),"queryFn"),enabled:!!e&&l==="org"}),E=u?.experimental.enableEnvironments===!0,{data:C}=j({queryKey:b.environments.list(e),queryFn:a(()=>se.list(e),"queryFn"),enabled:!!e&&E}),{data:U}=j({queryKey:b.environments.capabilities(e),queryFn:a(()=>se.capabilities(e),"queryFn"),enabled:!!e&&E}),H=[...b.liveRuns(e),"agents-page"],B=Ve({companyId:e,resourceKey:"live-runs:agents-page",queryKey:H,enabled:!!e,refetchInterval:15e3,leaderOnly:!0}),{data:F,dataUpdatedAt:be}=j({queryKey:H,queryFn:a(()=>$e.liveRunsForCompany(e),"queryFn"),enabled:B.enabled,refetchInterval:B.refetchInterval});Qe(B,F,be);const Q=Ye(e),L=(0,d.useMemo)(()=>{const s=new Map;for(const c of F??[]){if(c.status!=="running"&&c.status!=="queued")continue;const x=s.get(c.agentId);if(x){x.liveCount+=1;continue}s.set(c.agentId,{runId:c.id,liveCount:1})}return s},[F]),je=(0,d.useMemo)(()=>{const s=new Map;for(const c of g??[])s.set(c.id,c);return s},[g]),W=(0,d.useMemo)(()=>{const s=new Map;for(const c of C??[])s.set(c.id,c);return s},[C]),X=(0,d.useMemo)(()=>{const s=new Map;for(const c of g??[])s.set(c.id,ot(c,W,u?.defaultEnvironmentId??null,U));return s},[g,W,U,u?.defaultEnvironmentId]);if((0,d.useEffect)(()=>{i([{label:"Agents"}])},[i]),(0,d.useEffect)(()=>{e&&v==="builtin"&&u&&!p&&r("/agents/all",{replace:!0})},[p,u,r,v,e]),!e)return(0,t.jsx)(ne,{icon:te,message:"Select a company to view agents."});if(ve)return(0,t.jsx)(Oe,{variant:"list"});const y=st(g??[],f,V),R=xe(A??[],f,V),Y=E&&C===void 0,Z=E&&(C===void 0||C.length>1),ye=a(s=>Y?me:X.get(s)??z,"resolveRenderedEnvironment"),Ne=a(s=>{const c=s.orgChainHealth?.status==="invalid_org_chain",x=_.get(s.id),we=x?.status==="needs_setup"||x?.status==="pending_approval",M=x&&we?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ue,{status:x.status}),x.status==="needs_setup"&&(0,t.jsx)("span",{onClick:a(J=>{J.preventDefault(),J.stopPropagation()},"onClick"),children:(0,t.jsx)(K,{size:"xs",variant:"outline",onClick:a(()=>P(x),"onClick"),children:"Set up"})})]}):null;return(0,t.jsx)(ze,{title:s.name,titleAccessory:(0,t.jsx)(Xe,{agentId:s.id,companyId:s.companyId}),titleClassName:"flex-1 xl:flex-none xl:w-56",titleTextClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitleClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitle:`${de[s.role]??s.role}${s.title?` - ${s.title}`:""}`,to:re(s),className:T("group",s.pausedAt&&f!=="paused"?"opacity-50":"",ce(Q.data,"agent",s.id)==="left"?"sm:text-foreground/55":""),leading:c?(0,t.jsx)(le,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(oe,{agent:s,size:32}),secondaryRow:M?(0,t.jsx)("div",{className:"xl:hidden flex flex-wrap items-center gap-1.5",children:M}):void 0,meta:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[M&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-1.5",children:M}),(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(he,{agent:s,environment:ye(s.id),showEnvironment:Z})})]}),metaSpacerClassName:"hidden xl:block",trailing:(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[L.has(s.id)&&(0,t.jsx)(O,{agentRef:$(s),runId:L.get(s.id).runId,liveCount:L.get(s.id).liveCount}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(D,{status:s.status})})]})})},s.id)},"renderAgentRow");return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)(Be,{value:f,onValueChange:a(s=>r(`/agents/${s}`),"onValueChange"),children:(0,t.jsx)(He,{items:k,value:f,onValueChange:a(s=>r(`/agents/${s}`),"onValueChange")})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!I&&(0,t.jsxs)("div",{className:"flex items-center border border-border",role:"group","aria-label":"View mode",children:[(0,t.jsx)("button",{className:T("p-1.5 transition-colors",l==="list"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:a(()=>w("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":l==="list",children:(0,t.jsx)(Re,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{className:T("p-1.5 transition-colors",l==="org"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:a(()=>w("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":l==="org",children:(0,t.jsx)(Pe,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)(K,{size:"sm",variant:"outline",onClick:n,children:[(0,t.jsx)(Te,{className:"h-3.5 w-3.5 mr-1.5"}),"New Agent"]})]})]}),y.length>0&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[y.length," agent",y.length!==1?"s":""]}),G&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:G.message}),g&&g.length===0&&(0,t.jsx)(ne,{icon:te,message:"Create your first agent to get started.",action:"New Agent",onAction:n}),l==="list"&&y.length>0&&(0,t.jsx)("div",{children:y.map(Ne)}),l==="list"&&g&&g.length>0&&y.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),l==="org"&&R.length>0&&(0,t.jsx)("div",{className:"py-1",children:R.map(s=>(0,t.jsx)(fe,{node:s,depth:0,agentMap:je,liveRunByAgent:L,environmentByAgentId:X,environmentDataLoading:Y,showEnvironment:Z,tab:f,memberships:Q.data,builtInByAgentId:_,onConfigureBuiltIn:P},s.id))}),l==="org"&&A&&A.length>0&&R.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),l==="org"&&A&&A.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),q&&e&&(0,t.jsx)(d.Suspense,{fallback:null,children:(0,t.jsx)(Ze,{companyId:e,state:q,open:q!==null,onOpenChange:a(s=>{s||P(null)},"onOpenChange")})})]})}a(wt,"Agents");function fe({node:e,depth:n,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:m,showEnvironment:N,tab:v,memberships:S,builtInByAgentId:w,onConfigureBuiltIn:I}){const l=i.get(e.id),u=w.get(e.id),p=u?.status==="needs_setup"||u?.status==="pending_approval",f=!!(l&&l.orgChainHealth?.status==="invalid_org_chain"),k=ce(S,"agent",e.id);return(0,t.jsxs)("div",{style:{paddingLeft:n*24},children:[(0,t.jsxs)(ie,{to:l?re(l):`/agents/${e.id}`,className:T("group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-accent/50 transition-colors w-full text-left no-underline text-inherit",l?.pausedAt&&v!=="paused"&&"opacity-50",k==="left"&&"sm:text-foreground/55"),children:[f?(0,t.jsx)(le,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(oe,{agent:l??e,size:24}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"min-w-(--sz-7rem) truncate",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:[de[e.role]??e.role,l?.title?` - ${l.title}`:""]})]}),u&&p&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(ue,{status:u.status}),u.status==="needs_setup"&&(0,t.jsx)("span",{onClick:a(h=>{h.preventDefault(),h.stopPropagation()},"onClick"),children:(0,t.jsx)(K,{size:"xs",variant:"outline",onClick:a(()=>I(u),"onClick"),children:"Set up"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,t.jsx)("span",{className:"sm:hidden",children:r.has(e.id)?(0,t.jsx)(O,{agentRef:l?$(l):e.id,runId:r.get(e.id).runId,liveCount:r.get(e.id).liveCount}):(0,t.jsx)(D,{status:e.status})}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[r.has(e.id)&&(0,t.jsx)(O,{agentRef:l?$(l):e.id,runId:r.get(e.id).runId,liveCount:r.get(e.id).liveCount}),l&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(he,{agent:l,environment:m?me:o.get(l.id)??z,showEnvironment:N})}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(D,{status:e.status})})]})]})]}),e.reports&&e.reports.length>0&&(0,t.jsx)("div",{className:"border-l border-border ml-4",children:e.reports.map(h=>(0,t.jsx)(fe,{node:h,depth:n+1,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:m,showEnvironment:N,tab:v,memberships:S,builtInByAgentId:w,onConfigureBuiltIn:I},h.id))})]})}a(fe,"OrgTreeNode");function he({agent:e,environment:n,showEnvironment:i}){const r=nt(e),o=Ue(e.adapterType);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate font-mono text-xs text-muted-foreground",title:r??void 0,children:r??"—"}),(0,t.jsx)("div",{className:"truncate font-mono text-(length:--text-micro) text-muted-foreground/70",title:o,children:o})]}),i&&(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate text-xs text-muted-foreground",title:n.title,children:n.label}),(0,t.jsx)("div",{className:"truncate text-(length:--text-micro) text-muted-foreground/70",children:n.detail})]}),(0,t.jsx)("span",{className:"w-24 whitespace-nowrap text-right text-xs text-muted-foreground",children:e.lastHeartbeatAt?_e(e.lastHeartbeatAt):"—"})]})}a(he,"AgentMetaColumns");function O({agentRef:e,runId:n,liveCount:i}){return(0,t.jsxs)(ie,{to:`/agents/${e}/runs/${n}`,className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline",onClick:a(r=>r.stopPropagation(),"onClick"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,t.jsxs)("span",{className:"text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400",children:["Live",i>1?` (${i})`:""]})]})}a(O,"LiveRunIndicator");export{wt as Agents};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CdVVFoXg.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/agent-avatar-url-BnmqahQ7.js","assets/preload-helper-CceJXRIF.js","assets/BreadcrumbContext-Bxr1TyKN.js","assets/label-YjU0jMtG.js","assets/mention-chips-ClRmijVb.js","assets/dist-CvM0_U_m.js","assets/dist-BrRwU9U9.js","assets/checkbox-5wFlZdZn.js","assets/check-BiXfODpl.js","assets/clipboard-CTmezHYG.js","assets/RoutineRunVariablesDialog-DVWsHef0.js","assets/alert-dialog-BxpRolrb.js","assets/AgentAvatar-DZh8tNnK.js","assets/MarkdownEditor-D7suACD6.js","assets/dist-CMegW-DS.js","assets/dist-BhxPxuMy.js","assets/StatusIcon-YdJnE47W.js","assets/badge-D5aOL1Ll.js","assets/bot-DpNd1tv2.js","assets/select-DRgGQ-iP.js","assets/ToastContext-Dh8dPdr5.js","assets/sheet-CACWxbsc.js","assets/heartbeats-Dae6h2SU.js","assets/useHiddenSettings-Dz7GWNDr.js","assets/health-D8T5Zr74.js","assets/rotate-ccw-2WnWy1fs.js","assets/environments-Bj-4l7Ol.js","assets/input-CtLHwxEw.js","assets/company-members-Dd6xBf6K.js","assets/card-PCL2aF_L.js","assets/EmptyState-DliXLd04.js","assets/PageSkeleton-BZF4K6Hf.js","assets/skeleton-DCrngTtF.js","assets/tabs-BfOtoFWj.js","assets/use-adapter-capabilities-JhD0-FlQ.js","assets/use-copy-action-qHyHFl14.js","assets/arrow-right-bnOoaiPg.js","assets/external-link-LnxJtUIq.js","assets/MarkdownBody-B5ygzgk6.js","assets/file-text-Ba5Wddur.js","assets/index-C8wuDMl2.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ie=Object.defineProperty;var a=(e,n)=>Ie(e,"name",{value:n,configurable:!0});import{i as ae}from"./rolldown-runtime-ZpX3ckPj.js";import{B as re,G as T,St as b,Va as Ae,_i as Ce,aa as j,ht as Se,ut as _e,z as $,za as Ee}from"./agent-avatar-url-BnmqahQ7.js";import{t as Le}from"./preload-helper-CceJXRIF.js";import{Ln as Me,ct as Te,f as ke,i as K,n as qe,r as ee,s as ie,yt as Pe}from"./BreadcrumbContext-Bxr1TyKN.js";import{m as le}from"./alert-dialog-BxpRolrb.js";import{t as oe}from"./AgentAvatar-DZh8tNnK.js";import{t as Be}from"./tabs-BfOtoFWj.js";import{t as te}from"./bot-DpNd1tv2.js";import{i as Fe,o as Re,t as $e}from"./heartbeats-Dae6h2SU.js";import{i as Ke,n as De,t as se}from"./environments-Bj-4l7Ol.js";import{t as ne}from"./EmptyState-DliXLd04.js";import{t as Oe}from"./PageSkeleton-BZF4K6Hf.js";import{Dt as ze,Ft as D,Gt as Ve,Kt as ce,Lt as Ge,Rt as Ue,Vt as He,Wt as Qe,Xt as We,Yt as ue,Zt as Xe,qt as Ye}from"./index-CdVVFoXg.js";var d=ae(Ae(),1),t=ae(Ee(),1),de=Ce,Ze=(0,d.lazy)(()=>Le(()=>import("./index-CdVVFoXg.js").then(e=>e.gt).then(e=>({default:e.ConfigureBuiltInAgentModal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]))),Je=["all","active","paused","error","builtin"],et=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"paused",label:"Paused"},{value:"error",label:"Error"},{value:"builtin",label:"Built-in"}];function tt(e){return Je.includes(e)}a(tt,"isFilterTab");var z={label:"Local",detail:"Paperclip host",title:"Local - Paperclip host"},me={label:"—",detail:"Loading environment",title:"Loading environment"},pe=new Set(["terminated","pending_approval"]);function ge(e,n){return n==="all"?!0:n==="active"?e==="active"||e==="running"||e==="idle":n==="paused"?e==="paused":n==="error"?e==="error":!0}a(ge,"matchesFilter");function st(e,n,i){return e.filter(r=>pe.has(r.status)?!1:n==="builtin"?i.has(r.id):ge(r.status,n)).sort((r,o)=>r.name.localeCompare(o.name))}a(st,"filterAgents");function nt(e){const n=e.adapterConfig?.model;if(typeof n!="string")return null;const i=n.trim();return i.length>0?i:null}a(nt,"getConfiguredModel");function at(e){return e==="ssh"?"SSH":e.charAt(0).toUpperCase()+e.slice(1)}a(at,"formatEnvironmentDriver");function rt(e,n){const i=typeof e.config.provider=="string"?e.config.provider.trim():"";return i?n?.sandboxProviders?.[i]?.displayName??i:"Sandbox"}a(rt,"getSandboxProviderLabel");function it(e,n){const i=Ge(e)?"Managed by Paperclip":e.driver==="sandbox"?`${rt(e,n)} sandbox provider`:e.driver==="local"?"Paperclip host":at(e.driver);return{label:e.name,detail:i,title:`${e.name} - ${i}`}}a(it,"describeEnvironment");function lt(e){return{label:"Unknown environment",detail:e.slice(0,8),title:`Unknown environment - ${e}`}}a(lt,"describeMissingEnvironment");function ot(e,n,i,r){const o=e.defaultEnvironmentId??i;if(!o)return z;const m=n.get(o);return m?it(m,r):lt(o)}a(ot,"resolveAgentEnvironment");function xe(e,n,i){return e.reduce((r,o)=>{const m=xe(o.reports,n,i);return pe.has(o.status)?(r.push(...m),r):(((n==="builtin"?i.has(o.id):ge(o.status,n))||m.length>0)&&r.push({...o,reports:m}),r)},[]).sort((r,o)=>r.name.localeCompare(o.name))}a(xe,"filterOrgTree");function wt(){const{selectedCompanyId:e}=Se(),{openNewAgent:n}=Fe(),{setBreadcrumbs:i}=qe(),r=ke(),o=Me(),{isMobile:m}=Ke(),N=o.pathname.split("/").pop()??"all",v=tt(N)?N:"all",[S,w]=(0,d.useState)("org"),I=m,l=I?"list":S,{data:u}=j({queryKey:b.instance.settings,queryFn:a(()=>De.get(),"queryFn"),enabled:!!e}),p=u?.experimental.enableBuiltInAgents===!0,f=v==="builtin"&&!p?"all":v,k=(0,d.useMemo)(()=>et.filter(s=>s.value!=="builtin"||p),[p]),{data:h}=j({queryKey:b.builtInAgents.list(e),queryFn:a(()=>We.list(e),"queryFn"),enabled:!!e&&p}),_=(0,d.useMemo)(()=>{const s=new Map;if(!p)return s;for(const c of h??[])c.agentId&&s.set(c.agentId,c);return s},[h,p]),V=(0,d.useMemo)(()=>new Set(_.keys()),[_]),[q,P]=(0,d.useState)(null),{data:g,isLoading:ve,error:G}=j({queryKey:b.agents.list(e),queryFn:a(()=>ee.list(e),"queryFn"),enabled:!!e}),{data:A}=j({queryKey:b.org(e),queryFn:a(()=>ee.org(e),"queryFn"),enabled:!!e&&l==="org"}),E=u?.experimental.enableEnvironments===!0,{data:C}=j({queryKey:b.environments.list(e),queryFn:a(()=>se.list(e),"queryFn"),enabled:!!e&&E}),{data:U}=j({queryKey:b.environments.capabilities(e),queryFn:a(()=>se.capabilities(e),"queryFn"),enabled:!!e&&E}),H=[...b.liveRuns(e),"agents-page"],B=Ve({companyId:e,resourceKey:"live-runs:agents-page",queryKey:H,enabled:!!e,refetchInterval:15e3,leaderOnly:!0}),{data:F,dataUpdatedAt:be}=j({queryKey:H,queryFn:a(()=>$e.liveRunsForCompany(e),"queryFn"),enabled:B.enabled,refetchInterval:B.refetchInterval});Qe(B,F,be);const Q=Ye(e),L=(0,d.useMemo)(()=>{const s=new Map;for(const c of F??[]){if(c.status!=="running"&&c.status!=="queued")continue;const x=s.get(c.agentId);if(x){x.liveCount+=1;continue}s.set(c.agentId,{runId:c.id,liveCount:1})}return s},[F]),je=(0,d.useMemo)(()=>{const s=new Map;for(const c of g??[])s.set(c.id,c);return s},[g]),W=(0,d.useMemo)(()=>{const s=new Map;for(const c of C??[])s.set(c.id,c);return s},[C]),X=(0,d.useMemo)(()=>{const s=new Map;for(const c of g??[])s.set(c.id,ot(c,W,u?.defaultEnvironmentId??null,U));return s},[g,W,U,u?.defaultEnvironmentId]);if((0,d.useEffect)(()=>{i([{label:"Agents"}])},[i]),(0,d.useEffect)(()=>{e&&v==="builtin"&&u&&!p&&r("/agents/all",{replace:!0})},[p,u,r,v,e]),!e)return(0,t.jsx)(ne,{icon:te,message:"Select a company to view agents."});if(ve)return(0,t.jsx)(Oe,{variant:"list"});const y=st(g??[],f,V),R=xe(A??[],f,V),Y=E&&C===void 0,Z=E&&(C===void 0||C.length>1),ye=a(s=>Y?me:X.get(s)??z,"resolveRenderedEnvironment"),Ne=a(s=>{const c=s.orgChainHealth?.status==="invalid_org_chain",x=_.get(s.id),we=x?.status==="needs_setup"||x?.status==="pending_approval",M=x&&we?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ue,{status:x.status}),x.status==="needs_setup"&&(0,t.jsx)("span",{onClick:a(J=>{J.preventDefault(),J.stopPropagation()},"onClick"),children:(0,t.jsx)(K,{size:"xs",variant:"outline",onClick:a(()=>P(x),"onClick"),children:"Set up"})})]}):null;return(0,t.jsx)(ze,{title:s.name,titleAccessory:(0,t.jsx)(Xe,{agentId:s.id,companyId:s.companyId}),titleClassName:"flex-1 xl:flex-none xl:w-56",titleTextClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitleClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitle:`${de[s.role]??s.role}${s.title?` - ${s.title}`:""}`,to:re(s),className:T("group",s.pausedAt&&f!=="paused"?"opacity-50":"",ce(Q.data,"agent",s.id)==="left"?"sm:text-foreground/55":""),leading:c?(0,t.jsx)(le,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(oe,{agent:s,size:32}),secondaryRow:M?(0,t.jsx)("div",{className:"xl:hidden flex flex-wrap items-center gap-1.5",children:M}):void 0,meta:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[M&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-1.5",children:M}),(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(he,{agent:s,environment:ye(s.id),showEnvironment:Z})})]}),metaSpacerClassName:"hidden xl:block",trailing:(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[L.has(s.id)&&(0,t.jsx)(O,{agentRef:$(s),runId:L.get(s.id).runId,liveCount:L.get(s.id).liveCount}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(D,{status:s.status})})]})})},s.id)},"renderAgentRow");return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)(Be,{value:f,onValueChange:a(s=>r(`/agents/${s}`),"onValueChange"),children:(0,t.jsx)(He,{items:k,value:f,onValueChange:a(s=>r(`/agents/${s}`),"onValueChange")})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!I&&(0,t.jsxs)("div",{className:"flex items-center border border-border",role:"group","aria-label":"View mode",children:[(0,t.jsx)("button",{className:T("p-1.5 transition-colors",l==="list"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:a(()=>w("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":l==="list",children:(0,t.jsx)(Re,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{className:T("p-1.5 transition-colors",l==="org"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:a(()=>w("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":l==="org",children:(0,t.jsx)(Pe,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)(K,{size:"sm",variant:"outline",onClick:n,children:[(0,t.jsx)(Te,{className:"h-3.5 w-3.5 mr-1.5"}),"New Agent"]})]})]}),y.length>0&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[y.length," agent",y.length!==1?"s":""]}),G&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:G.message}),g&&g.length===0&&(0,t.jsx)(ne,{icon:te,message:"Create your first agent to get started.",action:"New Agent",onAction:n}),l==="list"&&y.length>0&&(0,t.jsx)("div",{children:y.map(Ne)}),l==="list"&&g&&g.length>0&&y.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),l==="org"&&R.length>0&&(0,t.jsx)("div",{className:"py-1",children:R.map(s=>(0,t.jsx)(fe,{node:s,depth:0,agentMap:je,liveRunByAgent:L,environmentByAgentId:X,environmentDataLoading:Y,showEnvironment:Z,tab:f,memberships:Q.data,builtInByAgentId:_,onConfigureBuiltIn:P},s.id))}),l==="org"&&A&&A.length>0&&R.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),l==="org"&&A&&A.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),q&&e&&(0,t.jsx)(d.Suspense,{fallback:null,children:(0,t.jsx)(Ze,{companyId:e,state:q,open:q!==null,onOpenChange:a(s=>{s||P(null)},"onOpenChange")})})]})}a(wt,"Agents");function fe({node:e,depth:n,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:m,showEnvironment:N,tab:v,memberships:S,builtInByAgentId:w,onConfigureBuiltIn:I}){const l=i.get(e.id),u=w.get(e.id),p=u?.status==="needs_setup"||u?.status==="pending_approval",f=!!(l&&l.orgChainHealth?.status==="invalid_org_chain"),k=ce(S,"agent",e.id);return(0,t.jsxs)("div",{style:{paddingLeft:n*24},children:[(0,t.jsxs)(ie,{to:l?re(l):`/agents/${e.id}`,className:T("group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-accent/50 transition-colors w-full text-left no-underline text-inherit",l?.pausedAt&&v!=="paused"&&"opacity-50",k==="left"&&"sm:text-foreground/55"),children:[f?(0,t.jsx)(le,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(oe,{agent:l??e,size:24}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"min-w-(--sz-7rem) truncate",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:[de[e.role]??e.role,l?.title?` - ${l.title}`:""]})]}),u&&p&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(ue,{status:u.status}),u.status==="needs_setup"&&(0,t.jsx)("span",{onClick:a(h=>{h.preventDefault(),h.stopPropagation()},"onClick"),children:(0,t.jsx)(K,{size:"xs",variant:"outline",onClick:a(()=>I(u),"onClick"),children:"Set up"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,t.jsx)("span",{className:"sm:hidden",children:r.has(e.id)?(0,t.jsx)(O,{agentRef:l?$(l):e.id,runId:r.get(e.id).runId,liveCount:r.get(e.id).liveCount}):(0,t.jsx)(D,{status:e.status})}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[r.has(e.id)&&(0,t.jsx)(O,{agentRef:l?$(l):e.id,runId:r.get(e.id).runId,liveCount:r.get(e.id).liveCount}),l&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(he,{agent:l,environment:m?me:o.get(l.id)??z,showEnvironment:N})}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(D,{status:e.status})})]})]})]}),e.reports&&e.reports.length>0&&(0,t.jsx)("div",{className:"border-l border-border ml-4",children:e.reports.map(h=>(0,t.jsx)(fe,{node:h,depth:n+1,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:m,showEnvironment:N,tab:v,memberships:S,builtInByAgentId:w,onConfigureBuiltIn:I},h.id))})]})}a(fe,"OrgTreeNode");function he({agent:e,environment:n,showEnvironment:i}){const r=nt(e),o=Ue(e.adapterType);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate font-mono text-xs text-muted-foreground",title:r??void 0,children:r??"—"}),(0,t.jsx)("div",{className:"truncate font-mono text-(length:--text-micro) text-muted-foreground/70",title:o,children:o})]}),i&&(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate text-xs text-muted-foreground",title:n.title,children:n.label}),(0,t.jsx)("div",{className:"truncate text-(length:--text-micro) text-muted-foreground/70",children:n.detail})]}),(0,t.jsx)("span",{className:"w-24 whitespace-nowrap text-right text-xs text-muted-foreground",children:e.lastHeartbeatAt?_e(e.lastHeartbeatAt):"—"})]})}a(he,"AgentMetaColumns");function O({agentRef:e,runId:n,liveCount:i}){return(0,t.jsxs)(ie,{to:`/agents/${e}/runs/${n}`,className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline",onClick:a(r=>r.stopPropagation(),"onClick"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,t.jsxs)("span",{className:"text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400",children:["Live",i>1?` (${i})`:""]})]})}a(O,"LiveRunIndicator");export{wt as Agents};
|