@tickernelz/paperclip-pro-server 2026.927.0 → 2026.927.2
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/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +177 -45
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +1 -0
- package/dist/routes/openapi.js.map +1 -1
- package/dist/services/instance-settings.d.ts.map +1 -1
- package/dist/services/instance-settings.js +3 -1
- package/dist/services/instance-settings.js.map +1 -1
- package/node_modules/mdast-util-to-markdown/index.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/configure.js +19 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.js +16 -5
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/code.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +11 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/html.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image.js +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +14 -4
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link.js +24 -9
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/root.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/text.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +6 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +6 -0
- package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/index.js +34 -8
- package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/join.js +18 -1
- package/node_modules/mdast-util-to-markdown/lib/types.d.ts +50 -30
- package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/unsafe.js +15 -1
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts +23 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.js +32 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +3 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +9 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +95 -4
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +636 -57
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +12 -7
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -2
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +20 -15
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts +31 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.js +63 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/safe.js +71 -7
- package/node_modules/mdast-util-to-markdown/package.json +13 -57
- package/node_modules/mdast-util-to-markdown/readme.md +139 -84
- package/package.json +21 -21
- package/ui-dist/assets/{AgentAvatar-RxjiAwO8.js → AgentAvatar-PT82VwmU.js} +1 -1
- package/ui-dist/assets/{AgentIdentity-D4BY0hNL.js → AgentIdentity-MCshmbhZ.js} +1 -1
- package/ui-dist/assets/{Agents.production-gcp98JXS.js → Agents.production-BZi6klJA.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-CWlPErYS.js → CompanyActivity.production-hUjwDlzb.js} +1 -1
- package/ui-dist/assets/{CompanyExport-JunkVVGm.js → CompanyExport-BQmo7amJ.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-DvSrjYfs.js → CompanySkills.production-HqWy0fEs.js} +1 -1
- package/ui-dist/assets/{Costs.production-zx6HrqRG.js → Costs.production-CdRBCdli.js} +1 -1
- package/ui-dist/assets/{EmptyState-DfjPe-d3.js → EmptyState-DPcc0zYh.js} +1 -1
- package/ui-dist/assets/{MarkdownBody-CsD5-bu_.js → MarkdownBody-D0eCfSWN.js} +1 -1
- package/ui-dist/assets/{MarkdownEditor-p2rnT0Be.js → MarkdownEditor-Pip4OXiJ.js} +49 -49
- package/ui-dist/assets/{OrgChart.production-C-wrmuDn.js → OrgChart.production-C_I93OQO.js} +1 -1
- package/ui-dist/assets/{PageSkeleton-CFPaR2xk.js → PageSkeleton-DHjTwRT3.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-Skb6CK8y.js → RoutineDetail.production-BF19HlVi.js} +1 -1
- package/ui-dist/assets/{RoutineRunVariablesDialog-BWeOhxiO.js → RoutineRunVariablesDialog-IRX4TLng.js} +1 -1
- package/ui-dist/assets/{Routines.production-TpFNwHyG.js → Routines.production-BN-xoFb_.js} +1 -1
- package/ui-dist/assets/{SidebarContext-bqQ25oRc.js → SidebarContext-D01pu4wh.js} +1 -1
- package/ui-dist/assets/{StatusIcon-BJoaLFpW.js → StatusIcon-BuUYMqqU.js} +1 -1
- package/ui-dist/assets/{agents-D79f8ubB.js → agents-BlSzFh-1.js} +1 -1
- package/ui-dist/assets/{badge-Dtq5g7E6.js → badge-Cf7ihb3q.js} +1 -1
- package/ui-dist/assets/{bot-CuAIZ3O7.js → bot-DZDpMzjD.js} +1 -1
- package/ui-dist/assets/{button-BvVFpN4P.js → button-CAPbz11u.js} +1 -1
- package/ui-dist/assets/{card-Dt_3k83X.js → card-dmVcp3AX.js} +1 -1
- package/ui-dist/assets/{check-IIwgETIo.js → check-DDiXDm2i.js} +1 -1
- package/ui-dist/assets/{checkbox-Dt_GoRUY.js → checkbox-CmMbs2PZ.js} +1 -1
- package/ui-dist/assets/{chevron-down-UBZnuvt1.js → chevron-down-F9aZv-V7.js} +1 -1
- package/ui-dist/assets/{chevron-right-B0AHub3v.js → chevron-right-B9JUOr38.js} +1 -1
- package/ui-dist/assets/{clipboard-Bj5QAqRq.js → clipboard-CYJ5Q78m.js} +1 -1
- package/ui-dist/assets/{company-members-DEqvhrMC.js → company-members-BcZm1g8Q.js} +1 -1
- package/ui-dist/assets/createLucideIcon-r3v6fbGz.js +92 -0
- package/ui-dist/assets/{definition-wrbKkF1t.js → definition-Ds8jy0r3.js} +1 -1
- package/ui-dist/assets/{dist-FWFKwYyU.js → dist-5v80Jc6A.js} +1 -1
- package/ui-dist/assets/{dist-VxTJitj7.js → dist-D1zgkcBw.js} +1 -1
- package/ui-dist/assets/{environments-CkEnfa1n.js → environments-BVeNFanj.js} +1 -1
- package/ui-dist/assets/{external-link-B35J81lc.js → external-link-0lrOvZWO.js} +1 -1
- package/ui-dist/assets/{file-text-CD47Bznz.js → file-text-C9vgFckt.js} +1 -1
- package/ui-dist/assets/{health-CfAQPRgq.js → health-DeeeogeJ.js} +1 -1
- package/ui-dist/assets/{heartbeats-DLceYe5K.js → heartbeats-CK_aXmx5.js} +1 -1
- package/ui-dist/assets/{index-qzns_tVc.js → index-zttiya6r.js} +153 -153
- package/ui-dist/assets/{input-CFI8T_fr.js → input-DpsS9it-.js} +1 -1
- package/ui-dist/assets/{label-JgSsn_gH.js → label-C2ddSDJj.js} +1 -1
- package/ui-dist/assets/{loader-circle-AYbv_YhN.js → loader-circle-BD9wx-lw.js} +1 -1
- package/ui-dist/assets/{mention-chips-DPVE_n2N.js → mention-chips-DXumPrOR.js} +1 -1
- package/ui-dist/assets/{octagon-alert-2PgnRbAG.js → octagon-alert-rGMwyrWA.js} +1 -1
- package/ui-dist/assets/{rotate-ccw-D72kg6zn.js → rotate-ccw-CRAQ3Xng.js} +1 -1
- package/ui-dist/assets/{router-BrCMx2mP.js → router-DyZkoSkG.js} +2 -2
- package/ui-dist/assets/{save-fTBYxOC9.js → save-DUnPDT6R.js} +1 -1
- package/ui-dist/assets/{select-BidMsZcD.js → select-mS22eY6T.js} +1 -1
- package/ui-dist/assets/{sheet-BAx2-UjA.js → sheet-DeCxNmfl.js} +1 -1
- package/ui-dist/assets/{skeleton-CYELISHD.js → skeleton-CKir8TUW.js} +1 -1
- package/ui-dist/assets/{tabs-D5oWPScx.js → tabs-DWRZjksg.js} +1 -1
- package/ui-dist/assets/{triangle-alert-DFzcyeFH.js → triangle-alert-CgJcxSQX.js} +1 -1
- package/ui-dist/assets/{use-adapter-capabilities-aPQHbB6R.js → use-adapter-capabilities-BiWYK4zJ.js} +1 -1
- package/ui-dist/assets/{useHiddenSettings-jRtbaks6.js → useHiddenSettings-2JpxuJV7.js} +1 -1
- package/ui-dist/assets/{zap-B3DNfTNV.js → zap-P-cXfK28.js} +1 -1
- package/ui-dist/index.html +45 -45
- package/ui-dist/sw.js +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +0 -7
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +0 -1
- package/ui-dist/assets/createLucideIcon-eTR0JqwS.js +0 -92
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[![Backers][backers-badge]][collective]
|
|
9
9
|
[![Chat][chat-badge]][chat]
|
|
10
10
|
|
|
11
|
-
**[mdast][]** utility that turns a syntax tree into markdown.
|
|
11
|
+
**[mdast][github-mdast]** utility that turns a syntax tree into markdown.
|
|
12
12
|
|
|
13
13
|
## Contents
|
|
14
14
|
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
* [API](#api)
|
|
20
20
|
* [`toMarkdown(tree[, options])`](#tomarkdowntree-options)
|
|
21
21
|
* [`defaultHandlers`](#defaulthandlers)
|
|
22
|
+
* [`Attention`](#attention)
|
|
23
|
+
* [`AttentionInfo`](#attentioninfo)
|
|
22
24
|
* [`ConstructName`](#constructname)
|
|
23
25
|
* [`ConstructNameMap`](#constructnamemap)
|
|
24
26
|
* [`Handle`](#handle)
|
|
@@ -43,25 +45,27 @@
|
|
|
43
45
|
|
|
44
46
|
## What is this?
|
|
45
47
|
|
|
46
|
-
This package is a utility that takes an [mdast][]
|
|
47
|
-
it into serialized markdown.
|
|
48
|
+
This package is a utility that takes an [mdast][github-mdast]
|
|
49
|
+
syntax tree as input and turns it into serialized markdown.
|
|
48
50
|
|
|
49
51
|
This utility is a low level project.
|
|
50
|
-
It’s used in [`remark-stringify`][remark-stringify],
|
|
51
|
-
easier to transform content by abstracting
|
|
52
|
+
It’s used in [`remark-stringify`][github-remark-stringify],
|
|
53
|
+
which focusses on making it easier to transform content by abstracting
|
|
54
|
+
these internals away.
|
|
52
55
|
|
|
53
56
|
## When should I use this?
|
|
54
57
|
|
|
55
58
|
If you want to handle syntax trees manually, use this.
|
|
56
|
-
For an easier time processing content, use the **[remark][]**
|
|
59
|
+
For an easier time processing content, use the **[remark][github-remark]**
|
|
60
|
+
ecosystem instead.
|
|
57
61
|
|
|
58
62
|
You can combine this utility with other utilities to add syntax extensions.
|
|
59
63
|
Notable examples that deeply integrate with it are
|
|
60
|
-
[`mdast-util-gfm`][mdast-util-gfm],
|
|
61
|
-
[`mdast-util-mdx`][mdast-util-mdx],
|
|
62
|
-
[`mdast-util-frontmatter`][mdast-util-frontmatter],
|
|
63
|
-
[`mdast-util-math`][mdast-util-math], and
|
|
64
|
-
[`mdast-util-directive`][mdast-util-directive].
|
|
64
|
+
[`mdast-util-gfm`][github-mdast-util-gfm],
|
|
65
|
+
[`mdast-util-mdx`][github-mdast-util-mdx],
|
|
66
|
+
[`mdast-util-frontmatter`][github-mdast-util-frontmatter],
|
|
67
|
+
[`mdast-util-math`][github-mdast-util-math], and
|
|
68
|
+
[`mdast-util-directive`][github-mdast-util-directive].
|
|
65
69
|
|
|
66
70
|
## Install
|
|
67
71
|
|
|
@@ -144,11 +148,11 @@ There is no default export.
|
|
|
144
148
|
|
|
145
149
|
### `toMarkdown(tree[, options])`
|
|
146
150
|
|
|
147
|
-
Turn an **[mdast][]** syntax tree into markdown.
|
|
151
|
+
Turn an **[mdast][github-mdast]** syntax tree into markdown.
|
|
148
152
|
|
|
149
153
|
###### Parameters
|
|
150
154
|
|
|
151
|
-
* `tree` ([`Node`][
|
|
155
|
+
* `tree` ([`Node`][github-mdast-nodes])
|
|
152
156
|
— tree to serialize
|
|
153
157
|
* `options` ([`Options`][api-options], optional)
|
|
154
158
|
— configuration
|
|
@@ -161,6 +165,43 @@ Serialized markdown representing `tree` (`string`).
|
|
|
161
165
|
|
|
162
166
|
Default (CommonMark) handlers ([`Handlers`][api-handlers]).
|
|
163
167
|
|
|
168
|
+
### `Attention`
|
|
169
|
+
|
|
170
|
+
Serialize a node as attention (emphasis, strong, strikethrough) (TypeScript
|
|
171
|
+
type).
|
|
172
|
+
|
|
173
|
+
Set as the `attention` field of a [`Handle`][api-handle]
|
|
174
|
+
(`handle.attention = x`).
|
|
175
|
+
This switches to a different algorithm,
|
|
176
|
+
where attention is properly handled by `containerPhrasing`.
|
|
177
|
+
|
|
178
|
+
###### Parameters
|
|
179
|
+
|
|
180
|
+
* `node` (`any`)
|
|
181
|
+
— expected mdast node
|
|
182
|
+
* `state` ([`State`][api-state])
|
|
183
|
+
— info passed around about the current state
|
|
184
|
+
|
|
185
|
+
###### Returns
|
|
186
|
+
|
|
187
|
+
Info on how to serialize `node` ([`AttentionInfo`][api-attention-info]).
|
|
188
|
+
|
|
189
|
+
### `AttentionInfo`
|
|
190
|
+
|
|
191
|
+
Info on how to serialize attention (TypeScript type).
|
|
192
|
+
|
|
193
|
+
###### Fields
|
|
194
|
+
|
|
195
|
+
* `construct` ([`ConstructName`][api-construct-name])
|
|
196
|
+
— construct to enter (such as `'emphasis'`)
|
|
197
|
+
* `markers` (`Array<string>`)
|
|
198
|
+
— markers that can be used in order of preference (such as `['*', '_']`);
|
|
199
|
+
one or more strings, each just one ASCII punctuation character
|
|
200
|
+
* `sizes` (`Array<number>`)
|
|
201
|
+
— sizes of sequences that can be used in order of preference (such as `[2]`
|
|
202
|
+
for strong or `[2, 1]` for GFM strikethrough);
|
|
203
|
+
one or more numbers, each a positive integer
|
|
204
|
+
|
|
164
205
|
### `ConstructName`
|
|
165
206
|
|
|
166
207
|
Construct names for things generated by `mdast-util-to-markdown` (TypeScript
|
|
@@ -206,7 +247,7 @@ Handle a particular node (TypeScript type).
|
|
|
206
247
|
|
|
207
248
|
* `node` (`any`)
|
|
208
249
|
— expected mdast node
|
|
209
|
-
* `parent` ([`Node`][
|
|
250
|
+
* `parent` ([`Node`][github-mdast-nodes], optional)
|
|
210
251
|
— parent of `node`
|
|
211
252
|
* `state` ([`State`][api-state])
|
|
212
253
|
— info passed around about the current state
|
|
@@ -236,7 +277,7 @@ Info on the surrounding of the node that is serialized (TypeScript type).
|
|
|
236
277
|
|
|
237
278
|
###### Fields
|
|
238
279
|
|
|
239
|
-
* `now` ([`Point`][point])
|
|
280
|
+
* `now` ([`Point`][github-unist-point])
|
|
240
281
|
— current point
|
|
241
282
|
* `lineShift` (`number`)
|
|
242
283
|
— number of columns each line will be shifted by wrapping nodes
|
|
@@ -258,11 +299,11 @@ return defines how many blank lines to use between them.
|
|
|
258
299
|
|
|
259
300
|
###### Parameters
|
|
260
301
|
|
|
261
|
-
* `left` ([`Node`][
|
|
302
|
+
* `left` ([`Node`][github-mdast-nodes])
|
|
262
303
|
— first of two adjacent siblings
|
|
263
|
-
* `right` ([`Node`][
|
|
304
|
+
* `right` ([`Node`][github-mdast-nodes])
|
|
264
305
|
— second of two adjacent siblings
|
|
265
|
-
* `parent` ([`Node`][
|
|
306
|
+
* `parent` ([`Node`][github-mdast-nodes])
|
|
266
307
|
— parent of the two siblings
|
|
267
308
|
* `state` ([`State`][api-state])
|
|
268
309
|
— info passed around about the current state
|
|
@@ -355,7 +396,10 @@ heading as the opening sequence (`boolean`, default: `false`).
|
|
|
355
396
|
|
|
356
397
|
###### `options.emphasis`
|
|
357
398
|
|
|
358
|
-
|
|
399
|
+
Preferred marker to use for emphasis (`'*'` or `'_'`, default: `'*'`).
|
|
400
|
+
|
|
401
|
+
The other marker is sometimes used, to form for example emphasis next to or
|
|
402
|
+
inside of other emphasis (`*a*_b_`).
|
|
359
403
|
|
|
360
404
|
###### `options.fence`
|
|
361
405
|
|
|
@@ -413,7 +457,10 @@ three or more.
|
|
|
413
457
|
|
|
414
458
|
###### `options.strong`
|
|
415
459
|
|
|
416
|
-
|
|
460
|
+
Preferred marker to use for strong (`'*'` or `'_'`, default: `'*'`).
|
|
461
|
+
|
|
462
|
+
The other marker is sometimes used, to form for example strong next to or
|
|
463
|
+
inside of other strong (`**a**__b__`).
|
|
417
464
|
|
|
418
465
|
###### `options.tightDefinitions`
|
|
419
466
|
|
|
@@ -476,7 +523,7 @@ Info passed around about the current state (TypeScript type).
|
|
|
476
523
|
— positions of child nodes in their parents
|
|
477
524
|
* `associationId` (`(node: Association) => string`)
|
|
478
525
|
— get an identifier from an association to match it to others (see
|
|
479
|
-
[`Association`][association])
|
|
526
|
+
[`Association`][github-mdast-association])
|
|
480
527
|
* `enter` (`(construct: ConstructName) => () => undefined`)
|
|
481
528
|
— enter a construct (returns a corresponding exit function)
|
|
482
529
|
(see [`ConstructName`][api-construct-name])
|
|
@@ -548,11 +595,11 @@ Schema that defines when a character cannot occur (TypeScript type).
|
|
|
548
595
|
|
|
549
596
|
## List of extensions
|
|
550
597
|
|
|
551
|
-
* [`syntax-tree/mdast-util-directive`]
|
|
598
|
+
* [`syntax-tree/mdast-util-directive`][github-mdast-util-directive]
|
|
552
599
|
— directives
|
|
553
|
-
* [`syntax-tree/mdast-util-frontmatter`]
|
|
600
|
+
* [`syntax-tree/mdast-util-frontmatter`][github-mdast-util-frontmatter]
|
|
554
601
|
— frontmatter (YAML, TOML, more)
|
|
555
|
-
* [`syntax-tree/mdast-util-gfm`]
|
|
602
|
+
* [`syntax-tree/mdast-util-gfm`][github-mdast-util-gfm]
|
|
556
603
|
— GFM
|
|
557
604
|
* [`syntax-tree/mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
|
|
558
605
|
— GFM autolink literals
|
|
@@ -564,9 +611,9 @@ Schema that defines when a character cannot occur (TypeScript type).
|
|
|
564
611
|
— GFM tables
|
|
565
612
|
* [`syntax-tree/mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
|
|
566
613
|
— GFM task list items
|
|
567
|
-
* [`syntax-tree/mdast-util-math`]
|
|
614
|
+
* [`syntax-tree/mdast-util-math`][github-mdast-util-math]
|
|
568
615
|
— math
|
|
569
|
-
* [`syntax-tree/mdast-util-mdx`]
|
|
616
|
+
* [`syntax-tree/mdast-util-mdx`][github-mdast-util-mdx]
|
|
570
617
|
— MDX
|
|
571
618
|
* [`syntax-tree/mdast-util-mdx-expression`](https://github.com/syntax-tree/mdast-util-mdx-expression)
|
|
572
619
|
— MDX expressions
|
|
@@ -583,12 +630,14 @@ Extensions can add support for custom syntax.
|
|
|
583
630
|
|
|
584
631
|
## Syntax tree
|
|
585
632
|
|
|
586
|
-
The syntax tree is [mdast][].
|
|
633
|
+
The syntax tree is [mdast][github-mdast].
|
|
587
634
|
|
|
588
635
|
## Types
|
|
589
636
|
|
|
590
637
|
This package is fully typed with [TypeScript][].
|
|
591
638
|
It exports the additional types
|
|
639
|
+
[`Attention`][api-attention],
|
|
640
|
+
[`AttentionInfo`][api-attention-info],
|
|
592
641
|
[`ConstructName`][api-construct-name],
|
|
593
642
|
[`ConstructNameMap`][api-construct-name-map],
|
|
594
643
|
[`Handle`][api-handle],
|
|
@@ -619,10 +668,11 @@ It’ll do its best, but complete roundtripping is impossible given that any val
|
|
|
619
668
|
could be injected into the tree.
|
|
620
669
|
|
|
621
670
|
As markdown is sometimes used for HTML, and improper use of HTML can open you up
|
|
622
|
-
to a [cross-site scripting (XSS)][xss] attack,
|
|
671
|
+
to a [cross-site scripting (XSS)][wikipedia-xss] attack,
|
|
672
|
+
use of `mdast-util-to-markdown`
|
|
623
673
|
and parsing it again later could potentially be unsafe.
|
|
624
674
|
When parsing markdown afterwards and then going to HTML, use something like
|
|
625
|
-
[`hast-util-sanitize`][hast-util-sanitize] to make the tree safe.
|
|
675
|
+
[`hast-util-sanitize`][github-hast-util-sanitize] to make the tree safe.
|
|
626
676
|
|
|
627
677
|
## Related
|
|
628
678
|
|
|
@@ -630,121 +680,126 @@ When parsing markdown afterwards and then going to HTML, use something like
|
|
|
630
680
|
— parse markdown to mdast
|
|
631
681
|
* [`micromark/micromark`](https://github.com/micromark/micromark)
|
|
632
682
|
— parse markdown
|
|
633
|
-
* [`remarkjs/remark`]
|
|
683
|
+
* [`remarkjs/remark`][github-remark]
|
|
634
684
|
— process markdown
|
|
635
685
|
|
|
636
686
|
## Contribute
|
|
637
687
|
|
|
638
|
-
See [`contributing.md`][contributing] in
|
|
688
|
+
See [`contributing.md`][health-contributing] in
|
|
689
|
+
[`syntax-tree/.github`][health] for
|
|
639
690
|
ways to get started.
|
|
640
|
-
See [`support.md`][support] for ways to get help.
|
|
691
|
+
See [`support.md`][health-support] for ways to get help.
|
|
641
692
|
|
|
642
|
-
This project has a [code of conduct][coc].
|
|
693
|
+
This project has a [code of conduct][health-coc].
|
|
643
694
|
By interacting with this repository, organization, or community you agree to
|
|
644
695
|
abide by its terms.
|
|
645
696
|
|
|
646
697
|
## License
|
|
647
698
|
|
|
648
|
-
[MIT][license] © [Titus Wormer][
|
|
699
|
+
[MIT][license] © [Titus Wormer][wooorm]
|
|
649
700
|
|
|
650
701
|
<!-- Definitions -->
|
|
651
702
|
|
|
652
|
-
[
|
|
703
|
+
[api-attention]: #attention
|
|
653
704
|
|
|
654
|
-
[
|
|
705
|
+
[api-attention-info]: #attentioninfo
|
|
655
706
|
|
|
656
|
-
[
|
|
707
|
+
[api-construct-name]: #constructname
|
|
657
708
|
|
|
658
|
-
[
|
|
709
|
+
[api-construct-name-map]: #constructnamemap
|
|
659
710
|
|
|
660
|
-
[
|
|
711
|
+
[api-default-handlers]: #defaulthandlers
|
|
661
712
|
|
|
662
|
-
[
|
|
713
|
+
[api-handle]: #handle
|
|
663
714
|
|
|
664
|
-
[
|
|
715
|
+
[api-handlers]: #handlers
|
|
665
716
|
|
|
666
|
-
[
|
|
717
|
+
[api-info]: #info
|
|
667
718
|
|
|
668
|
-
[
|
|
719
|
+
[api-join]: #join
|
|
669
720
|
|
|
670
|
-
[
|
|
721
|
+
[api-map]: #map
|
|
671
722
|
|
|
672
|
-
[
|
|
723
|
+
[api-options]: #options
|
|
673
724
|
|
|
674
|
-
[
|
|
725
|
+
[api-safe-config]: #safeconfig
|
|
675
726
|
|
|
676
|
-
[
|
|
727
|
+
[api-state]: #state
|
|
677
728
|
|
|
678
|
-
[
|
|
729
|
+
[api-to-markdown]: #tomarkdowntree-options
|
|
679
730
|
|
|
680
|
-
[
|
|
731
|
+
[api-tracker]: #tracker
|
|
681
732
|
|
|
682
|
-
[
|
|
733
|
+
[api-unsafe]: #unsafe
|
|
683
734
|
|
|
684
|
-
[
|
|
735
|
+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
|
|
685
736
|
|
|
686
|
-
[
|
|
737
|
+
[build]: https://github.com/syntax-tree/mdast-util-to-markdown/actions
|
|
687
738
|
|
|
688
|
-
[
|
|
739
|
+
[build-badge]: https://github.com/syntax-tree/mdast-util-to-markdown/workflows/main/badge.svg
|
|
689
740
|
|
|
690
|
-
[
|
|
741
|
+
[chat]: https://github.com/syntax-tree/unist/discussions
|
|
691
742
|
|
|
692
|
-
[
|
|
743
|
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
|
|
693
744
|
|
|
694
|
-
[
|
|
745
|
+
[collective]: https://opencollective.com/unified
|
|
695
746
|
|
|
696
|
-
[
|
|
747
|
+
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-to-markdown
|
|
697
748
|
|
|
698
|
-
[
|
|
749
|
+
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-to-markdown.svg
|
|
699
750
|
|
|
700
|
-
[
|
|
751
|
+
[downloads]: https://www.npmjs.com/package/mdast-util-to-markdown
|
|
701
752
|
|
|
702
|
-
[
|
|
753
|
+
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-to-markdown.svg
|
|
703
754
|
|
|
704
|
-
[
|
|
755
|
+
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
705
756
|
|
|
706
|
-
[
|
|
757
|
+
[esmsh]: https://esm.sh
|
|
707
758
|
|
|
708
|
-
[
|
|
759
|
+
[github-hast-util-sanitize]: https://github.com/syntax-tree/hast-util-sanitize
|
|
709
760
|
|
|
710
|
-
[mdast
|
|
761
|
+
[github-mdast]: https://github.com/syntax-tree/mdast
|
|
711
762
|
|
|
712
|
-
[mdast-
|
|
763
|
+
[github-mdast-association]: https://github.com/syntax-tree/mdast#association
|
|
713
764
|
|
|
714
|
-
[mdast-
|
|
765
|
+
[github-mdast-nodes]: https://github.com/syntax-tree/mdast#nodes
|
|
715
766
|
|
|
716
|
-
[mdast-util-
|
|
767
|
+
[github-mdast-util-directive]: https://github.com/syntax-tree/mdast-util-directive
|
|
717
768
|
|
|
718
|
-
[mdast-util-
|
|
769
|
+
[github-mdast-util-frontmatter]: https://github.com/syntax-tree/mdast-util-frontmatter
|
|
719
770
|
|
|
720
|
-
[
|
|
771
|
+
[github-mdast-util-gfm]: https://github.com/syntax-tree/mdast-util-gfm
|
|
721
772
|
|
|
722
|
-
[
|
|
773
|
+
[github-mdast-util-math]: https://github.com/syntax-tree/mdast-util-math
|
|
723
774
|
|
|
724
|
-
[
|
|
775
|
+
[github-mdast-util-mdx]: https://github.com/syntax-tree/mdast-util-mdx
|
|
725
776
|
|
|
726
|
-
[
|
|
777
|
+
[github-remark]: https://github.com/remarkjs/remark
|
|
727
778
|
|
|
728
|
-
[
|
|
779
|
+
[github-remark-stringify]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify
|
|
729
780
|
|
|
730
|
-
[
|
|
781
|
+
[github-unist-point]: https://github.com/syntax-tree/unist#point
|
|
731
782
|
|
|
732
|
-
[
|
|
783
|
+
[health]: https://github.com/syntax-tree/.github
|
|
733
784
|
|
|
734
|
-
[
|
|
785
|
+
[health-coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
|
|
735
786
|
|
|
736
|
-
[
|
|
787
|
+
[health-contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
|
|
737
788
|
|
|
738
|
-
[
|
|
789
|
+
[health-support]: https://github.com/syntax-tree/.github/blob/main/support.md
|
|
739
790
|
|
|
740
|
-
[
|
|
791
|
+
[license]: license
|
|
741
792
|
|
|
742
|
-
[
|
|
793
|
+
[npm]: https://docs.npmjs.com/cli/install
|
|
743
794
|
|
|
744
|
-
[
|
|
795
|
+
[size]: https://bundlejs.com/?q=mdast-util-to-markdown
|
|
745
796
|
|
|
746
|
-
[
|
|
797
|
+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-to-markdown
|
|
747
798
|
|
|
748
|
-
[
|
|
799
|
+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
|
|
749
800
|
|
|
750
|
-
[
|
|
801
|
+
[typescript]: https://www.typescriptlang.org
|
|
802
|
+
|
|
803
|
+
[wikipedia-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
|
|
804
|
+
|
|
805
|
+
[wooorm]: https://wooorm.com
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tickernelz/paperclip-pro-server",
|
|
3
|
-
"version": "2026.927.
|
|
3
|
+
"version": "2026.927.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/tickernelz/paperclip-pro",
|
|
6
6
|
"bugs": {
|
|
@@ -45,25 +45,25 @@
|
|
|
45
45
|
"@discordjs/ws": "1.2.3",
|
|
46
46
|
"@grpc/grpc-js": "1.14.4",
|
|
47
47
|
"@opentelemetry/api": "^1.9.0",
|
|
48
|
-
"@tickernelz/paperclip-pro-adapter-claude-local": "2026.927.
|
|
49
|
-
"@tickernelz/paperclip-pro-adapter-codex-local": "2026.927.
|
|
50
|
-
"@tickernelz/paperclip-pro-adapter-cursor-cloud": "2026.927.
|
|
51
|
-
"@tickernelz/paperclip-pro-adapter-cursor-local": "2026.927.
|
|
52
|
-
"@tickernelz/paperclip-pro-adapter-gemini-local": "2026.927.
|
|
53
|
-
"@tickernelz/paperclip-pro-adapter-grok-local": "2026.927.
|
|
54
|
-
"@tickernelz/paperclip-pro-adapter-kimi-local": "2026.927.
|
|
55
|
-
"@tickernelz/paperclip-pro-adapter-openclaw-gateway": "2026.927.
|
|
56
|
-
"@tickernelz/paperclip-pro-adapter-omp-local": "2026.927.
|
|
57
|
-
"@tickernelz/paperclip-pro-adapter-opencode-local": "2026.927.
|
|
58
|
-
"@tickernelz/paperclip-pro-adapter-pi-local": "2026.927.
|
|
59
|
-
"@tickernelz/paperclip-pro-adapter-utils": "2026.927.
|
|
60
|
-
"@tickernelz/paperclip-pro-db": "2026.927.
|
|
61
|
-
"@tickernelz/paperclip-pro-hermes-paperclip-adapter": "2026.927.
|
|
62
|
-
"@tickernelz/paperclip-pro-mcp-server": "2026.927.
|
|
63
|
-
"@tickernelz/paperclip-pro-plugin-sdk": "2026.927.
|
|
64
|
-
"@tickernelz/paperclip-pro-shared": "2026.927.
|
|
65
|
-
"@tickernelz/paperclip-pro-teams-catalog": "2026.927.
|
|
66
|
-
"@tickernelz/paperclip-pro-skills-catalog": "2026.927.
|
|
48
|
+
"@tickernelz/paperclip-pro-adapter-claude-local": "2026.927.2",
|
|
49
|
+
"@tickernelz/paperclip-pro-adapter-codex-local": "2026.927.2",
|
|
50
|
+
"@tickernelz/paperclip-pro-adapter-cursor-cloud": "2026.927.2",
|
|
51
|
+
"@tickernelz/paperclip-pro-adapter-cursor-local": "2026.927.2",
|
|
52
|
+
"@tickernelz/paperclip-pro-adapter-gemini-local": "2026.927.2",
|
|
53
|
+
"@tickernelz/paperclip-pro-adapter-grok-local": "2026.927.2",
|
|
54
|
+
"@tickernelz/paperclip-pro-adapter-kimi-local": "2026.927.2",
|
|
55
|
+
"@tickernelz/paperclip-pro-adapter-openclaw-gateway": "2026.927.2",
|
|
56
|
+
"@tickernelz/paperclip-pro-adapter-omp-local": "2026.927.2",
|
|
57
|
+
"@tickernelz/paperclip-pro-adapter-opencode-local": "2026.927.2",
|
|
58
|
+
"@tickernelz/paperclip-pro-adapter-pi-local": "2026.927.2",
|
|
59
|
+
"@tickernelz/paperclip-pro-adapter-utils": "2026.927.2",
|
|
60
|
+
"@tickernelz/paperclip-pro-db": "2026.927.2",
|
|
61
|
+
"@tickernelz/paperclip-pro-hermes-paperclip-adapter": "2026.927.2",
|
|
62
|
+
"@tickernelz/paperclip-pro-mcp-server": "2026.927.2",
|
|
63
|
+
"@tickernelz/paperclip-pro-plugin-sdk": "2026.927.2",
|
|
64
|
+
"@tickernelz/paperclip-pro-shared": "2026.927.2",
|
|
65
|
+
"@tickernelz/paperclip-pro-teams-catalog": "2026.927.2",
|
|
66
|
+
"@tickernelz/paperclip-pro-skills-catalog": "2026.927.2",
|
|
67
67
|
"@photon-ai/advanced-imessage": "2.1.0",
|
|
68
68
|
"@vercel/connect": "0.6.1",
|
|
69
69
|
"acorn": "8.18.0",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"acpx"
|
|
114
114
|
],
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@tickernelz/paperclip-pro-paperclip-runner": "2026.927.
|
|
116
|
+
"@tickernelz/paperclip-pro-paperclip-runner": "2026.927.2",
|
|
117
117
|
"@types/express": "^5.0.0",
|
|
118
118
|
"@types/express-serve-static-core": "^5.1.3",
|
|
119
119
|
"@types/jsdom": "^30.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty;var o=(a,e)=>b(a,"name",{value:e,configurable:!0});import{i as C}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as E,Lr as w,S as v,c as N,l as A,lt as h,n as R,o as z,pt as k}from"./createLucideIcon-
|
|
1
|
+
var b=Object.defineProperty;var o=(a,e)=>b(a,"name",{value:e,configurable:!0});import{i as C}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as E,Lr as w,S as v,c as N,l as A,lt as h,n as R,o as z,pt as k}from"./createLucideIcon-r3v6fbGz.js";var m=C(w(),1),i=C(E(),1),y=Object.defineProperty,g=o((a,e)=>y(a,"name",{value:e,configurable:!0}),"__name"),I="Avatar",[T,X]=N(I),F=[0,()=>{}],[P,_]=T(I),M=m.forwardRef(g(o(function(e,t){const{__scopeAvatar:s,...n}=e,[r,u]=m.useState("idle"),[c,l]=S();return(0,i.jsx)(P,{scope:s,imageLoadingStatus:r,setImageLoadingStatus:u,imageCount:c,setImageCount:l,children:(0,i.jsx)(A.span,{...n,ref:t})})},"Avatar2"),"Avatar")),U="AvatarImage",q=m.forwardRef(g(o(function(e,t){const{__scopeAvatar:s,src:n,onLoadingStatusChange:r,...u}=e,c=_(U,s);c.setImageCount;const l=j(n,{referrerPolicy:u.referrerPolicy,crossOrigin:u.crossOrigin,loadingStatus:c.imageLoadingStatus,setLoadingStatus:c.setImageLoadingStatus}),d=R(f=>{r?.(f)}),p=m.useRef(l);return z(()=>{const f=p.current;p.current=l,l!==f&&d(l)},[l,d]),l==="loaded"?(0,i.jsx)(A.img,{...u,ref:t,src:n}):null},"AvatarImage2"),"AvatarImage")),O="AvatarFallback",G=m.forwardRef(g(o(function(e,t){const{__scopeAvatar:s,delayMs:n,...r}=e,u=_(O,s),[c,l]=m.useState(n===void 0);return m.useEffect(()=>{if(n!==void 0){const d=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(d)}},[n]),c&&u.imageLoadingStatus!=="loaded"?(0,i.jsx)(A.span,{...r,ref:t}):null},"AvatarFallback2"),"AvatarFallback"));function j(a,{loadingStatus:e,setLoadingStatus:t,referrerPolicy:s,crossOrigin:n}){return z(()=>{if(!a){t("error");return}const r=new window.Image,u=g(l=>{const d=l.currentTarget;t(x(d))},"handleLoad"),c=g(()=>t("error"),"handleError");return r.addEventListener("load",u),r.addEventListener("error",c),s&&(r.referrerPolicy=s),r.crossOrigin=n??null,r.src=a,t(x(r)),()=>{r.removeEventListener("load",u),r.removeEventListener("error",c),t("idle")}},[a,n,s,t]),e}o(j,"useImageLoadingStatus");g(j,"useImageLoadingStatus");function x(a){return a.complete?a.naturalWidth>0?"loaded":"error":"loading"}o(x,"getImageLoadingStatus");g(x,"getImageLoadingStatus");function S(){return F}o(S,"useImageCount");g(S,"useImageCount");function W(a){}o(W,"useUpdateImageCount");g(W,"useUpdateImageCount");function $({className:a,size:e="default",shape:t="circle",...s}){return(0,i.jsx)(M,{"data-slot":"avatar","data-size":e,"data-shape":t,className:v("group/avatar relative flex size-8 shrink-0 overflow-hidden select-none data-[size=lg]:size-10 data-[size=sm]:size-6 data-[size=xs]:size-5",t==="square"?"rounded-md":"rounded-full",a),...s})}o($,"Avatar");function B({className:a,...e}){return(0,i.jsx)(q,{"data-slot":"avatar-image",className:v("aspect-square size-full object-cover",a),...e})}o(B,"AvatarImage");function K({className:a,...e}){return(0,i.jsx)(G,{"data-slot":"avatar-fallback",className:v("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[shape=square]/avatar:rounded-md group-data-[size=sm]/avatar:text-xs group-data-[size=xs]/avatar:text-(length:--text-nano)",a),...e})}o(K,"AvatarFallback");function Y({className:a,...e}){return(0,i.jsx)("div",{"data-slot":"avatar-group",className:v("*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2",a),...e})}o(Y,"AvatarGroup");function Z({className:a,...e}){return(0,i.jsx)("div",{"data-slot":"avatar-group-count",className:v("bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",a),...e})}o(Z,"AvatarGroupCount");function L(a){const e=a.trim().split(/\s+/);return e.length>=2?(e[0][0]+e[e.length-1][0]).toUpperCase():a.slice(0,2).toUpperCase()}o(L,"deriveInitials");var V={xs:"text-sm",sm:"text-xs",default:"text-sm",lg:"text-sm"};function aa({name:a,avatarUrl:e,initials:t,size:s="default",shape:n="circle",className:r}){const u=t??L(a);return(0,i.jsxs)("span",{className:v("inline-flex min-w-0 gap-1.5 items-center",s==="xs"&&"gap-1",s==="lg"&&"gap-2",r),title:a,children:[(0,i.jsxs)($,{size:s,shape:n,children:[e&&(0,i.jsx)(B,{src:e,alt:a}),(0,i.jsx)(K,{children:u})]}),(0,i.jsx)("span",{className:v("truncate",V[s]),children:a})]})}o(aa,"Identity");var D={16:"size-4",20:"size-5",24:"size-6",32:"size-8",40:"size-10",48:"size-12",64:"size-16",96:"size-24",128:"size-32",256:"size-64",512:"size-128"};function ea({agent:a,appearance:e,size:t=24,name:s,label:n,pose:r="rest",muted:u=!1,className:c}){const l=k(e??a?.appearance,a?.id),d=h(l,t,1,r,u),[p,f]=(0,m.useState)(null);return(0,i.jsx)("span",{"data-slot":"agent-avatar",className:v("relative inline-flex shrink-0 items-center justify-center align-middle",D[t],c),role:n?"img":void 0,"aria-label":n,"aria-hidden":n?void 0:!0,children:p===d?(0,i.jsx)("span",{className:"text-xs text-muted-foreground",children:L(s??a?.name??"Agent")}):(0,i.jsx)("img",{src:d,srcSet:`${h(l,t,2,r,u)} 2x`,alt:"",width:t,height:t,decoding:"async",loading:"lazy",className:"size-full object-contain",onError:o(()=>f(d),"onError")})})}o(ea,"AgentAvatar");export{$ as a,Z as c,L as i,B as l,D as n,K as o,aa as r,Y as s,ea as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var m=Object.defineProperty;var r=(t,e)=>m(t,"name",{value:e,configurable:!0});import{i}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as x,S as n}from"./createLucideIcon-
|
|
1
|
+
var m=Object.defineProperty;var r=(t,e)=>m(t,"name",{value:e,configurable:!0});import{i}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as x,S as n}from"./createLucideIcon-r3v6fbGz.js";import{t as l}from"./AgentAvatar-PT82VwmU.js";var s=i(x(),1);function f({agent:t,size:e="default",className:a}){return(0,s.jsxs)("span",{title:t.name,className:n("inline-flex min-w-0 items-center gap-1.5",a),children:[(0,s.jsx)(l,{agent:t,size:{xs:20,sm:24,default:32,lg:40}[e]}),(0,s.jsx)("span",{className:n("truncate",e==="sm"?"text-xs":"text-sm"),children:t.name??"Agent"})]})}r(f,"AgentIdentity");export{f as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
var Pe=Object.defineProperty;var n=(e,a)=>Pe(e,"name",{value:a,configurable:!0});import{i as oe}from"./rolldown-runtime-ZpX3ckPj.js";import{En as ke,Fr as qe,Lr as Me,S as B,U as Fe,Y as j,_ as ce,g as U,nr as N,z as Re}from"./createLucideIcon-eTR0JqwS.js";import{t as $e}from"./preload-helper-CceJXRIF.js";import{it as Be,o as ze,t as de}from"./router-BrCMx2mP.js";import{S as Ke}from"./zap-B3DNfTNV.js";import{t as ue}from"./AgentAvatar-RxjiAwO8.js";import{t as Oe}from"./tabs-D5oWPScx.js";import{t as ae}from"./agents-D79f8ubB.js";import{r as De,t as re}from"./EmptyState-DfjPe-d3.js";import{t as ie}from"./bot-CuAIZ3O7.js";import{k as Ue,t as V}from"./button-BvVFpN4P.js";import{i as Ve,o as He,t as Ge}from"./heartbeats-DLceYe5K.js";import{t as me}from"./triangle-alert-DFzcyeFH.js";import{n as Qe}from"./SidebarContext-bqQ25oRc.js";import{n as Je,t as le}from"./environments-CkEnfa1n.js";import{t as Ye}from"./PageSkeleton-CFPaR2xk.js";import{$t as We,It as Xe,Jt as Ze,Lt as pe,Wt as H,Yt as et,an as ge,cn as tt,dn as st,in as nt,nn as xe,on as G,rn as at,sn as rt,un as fe}from"./index-qzns_tVc.js";var g=oe(Me(),1),t=oe(qe(),1),he=ke,it=(0,g.lazy)(()=>$e(()=>import("./index-qzns_tVc.js").then(e=>e.wt).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,43,44,45,46,47,48]))),lt=["all","active","paused","error","builtin"],ot=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"paused",label:"Paused"},{value:"error",label:"Error"},{value:"builtin",label:"Built-in"}];function ct(e){return lt.includes(e)}n(ct,"isFilterTab");var J={label:"Local",detail:"Paperclip host",title:"Local - Paperclip host"},ve={label:"—",detail:"Loading environment",title:"Loading environment"},be=new Set(["terminated","pending_approval"]);function je(e,a){return a==="all"?!0:a==="active"?e==="active"||e==="running"||e==="idle":a==="paused"?e==="paused":a==="error"?e==="error":!0}n(je,"matchesFilter");function dt(e,a,i){return e.filter(r=>be.has(r.status)?!1:a==="builtin"?i.has(r.id):je(r.status,a)).sort((r,o)=>r.name.localeCompare(o.name))}n(dt,"filterAgents");function ut(e){const a=e.adapterConfig?.model;if(typeof a!="string")return null;const i=a.trim();return i.length>0?i:null}n(ut,"getConfiguredModel");function mt(e){return e==="ssh"?"SSH":e.charAt(0).toUpperCase()+e.slice(1)}n(mt,"formatEnvironmentDriver");function pt(e,a){const i=typeof e.config.provider=="string"?e.config.provider.trim():"";return i?a?.sandboxProviders?.[i]?.displayName??i:"Sandbox"}n(pt,"getSandboxProviderLabel");function gt(e,a){const i=Ze(e)?"Managed by Paperclip":e.driver==="sandbox"?`${pt(e,a)} sandbox provider`:e.driver==="local"?"Paperclip host":mt(e.driver);return{label:e.name,detail:i,title:`${e.name} - ${i}`}}n(gt,"describeEnvironment");function xt(e){return{label:"Unknown environment",detail:e.slice(0,8),title:`Unknown environment - ${e}`}}n(xt,"describeMissingEnvironment");function ft(e,a,i,r){const o=e.defaultEnvironmentId??i;if(!o)return J;const x=a.get(o);return x?gt(x,r):xt(o)}n(ft,"resolveAgentEnvironment");function Ne(e,a,i){return e.reduce((r,o)=>{const x=Ne(o.reports,a,i);return be.has(o.status)?(r.push(...x),r):(((a==="builtin"?i.has(o.id):je(o.status,a))||x.length>0)&&r.push({...o,reports:x}),r)},[]).sort((r,o)=>r.name.localeCompare(o.name))}n(Ne,"filterOrgTree");function Mt(){const{selectedCompanyId:e}=Fe(),{openNewAgent:a}=Ve(),{setBreadcrumbs:i}=De(),r=ze(),o=Be(),{isMobile:x}=Qe(),C=o.pathname.split("/").pop()??"all",v=ct(C)?C:"all",[S,m]=(0,g.useState)("org"),A=x,p=A?"list":S,{data:l}=N({queryKey:j.instance.settings,queryFn:n(()=>Je.get(),"queryFn"),enabled:!!e}),u=l?.experimental.enableBuiltInAgents===!0,h=v==="builtin"&&!u?"all":v,z=(0,g.useMemo)(()=>ot.filter(s=>s.value!=="builtin"||u),[u]),{data:E}=N({queryKey:j.builtInAgents.list(e),queryFn:n(()=>st.list(e),"queryFn"),enabled:!!e&&u}),b=(0,g.useMemo)(()=>{const s=new Map;if(!u)return s;for(const c of E??[])c.agentId&&s.set(c.agentId,c);return s},[E,u]),k=(0,g.useMemo)(()=>new Set(b.keys()),[b]),[y,_]=(0,g.useState)(null),{data:d,isLoading:Ie,error:Y}=N({queryKey:j.agents.list(e),queryFn:n(()=>ae.list(e),"queryFn"),enabled:!!e}),{data:T}=N({queryKey:j.org(e),queryFn:n(()=>ae.org(e),"queryFn"),enabled:!!e&&p==="org"}),q=l?.experimental.enableEnvironments===!0,{data:L}=N({queryKey:j.environments.list(e),queryFn:n(()=>le.list(e),"queryFn"),enabled:!!e&&q}),{data:W}=N({queryKey:j.environments.capabilities(e),queryFn:n(()=>le.capabilities(e),"queryFn"),enabled:!!e&&q}),X=[...j.liveRuns(e),"agents-page"],K=nt({companyId:e,resourceKey:"live-runs:agents-page",queryKey:X,enabled:!!e,refetchInterval:15e3,leaderOnly:!0}),{data:O,dataUpdatedAt:Ce}=N({queryKey:X,queryFn:n(()=>Ge.liveRunsForCompany(e),"queryFn"),enabled:K.enabled,refetchInterval:K.refetchInterval});at(K,O,Ce);const M=tt(e),f=rt(e),F=(0,g.useMemo)(()=>{const s=new Map;for(const c of O??[]){if(c.status!=="running"&&c.status!=="queued")continue;const P=s.get(c.agentId);if(P){P.liveCount+=1;continue}s.set(c.agentId,{runId:c.id,liveCount:1})}return s},[O]),Se=(0,g.useMemo)(()=>{const s=new Map;for(const c of d??[])s.set(c.id,c);return s},[d]),Z=(0,g.useMemo)(()=>{const s=new Map;for(const c of L??[])s.set(c.id,c);return s},[L]),ee=(0,g.useMemo)(()=>{const s=new Map;for(const c of d??[])s.set(c.id,ft(c,Z,l?.defaultEnvironmentId??null,W));return s},[d,Z,W,l?.defaultEnvironmentId]);if((0,g.useEffect)(()=>{i([{label:"Agents"}])},[i]),(0,g.useEffect)(()=>{e&&v==="builtin"&&l&&!u&&r("/agents/all",{replace:!0})},[u,l,r,v,e]),!e)return(0,t.jsx)(re,{icon:ie,message:"Select a company to view agents."});if(Ie)return(0,t.jsx)(Ye,{variant:"list"});const w=dt(d??[],h,k),D=Ne(T??[],h,k),te=q&&L===void 0,se=q&&(L===void 0||L.length>1),Ae=n(s=>te?ve:ee.get(s)??J,"resolveRenderedEnvironment"),Ee=n(s=>{const c=s.orgChainHealth?.status==="invalid_org_chain",P=f.isPending&&f.variables?.resourceType==="agent"&&f.variables.resourceId===s.id,_e=P&&f.variables?.starred!==void 0,ne=P&&f.variables?.starred===void 0,Te=ge(M.data,"agent",s.id),I=b.get(s.id),Le=I?.status==="needs_setup"||I?.status==="pending_approval",R=I&&Le?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(fe,{status:I.status}),I.status==="needs_setup"&&(0,t.jsx)("span",{onClick:n($=>{$.preventDefault(),$.stopPropagation()},"onClick"),children:(0,t.jsx)(V,{size:"xs",variant:"outline",onClick:n(()=>_(I),"onClick"),children:"Set up"})})]}):null;return(0,t.jsx)(Xe,{title:s.name,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:`${he[s.role]??s.role}${s.title?` - ${s.title}`:""}`,to:ce(s),className:B("group",s.pausedAt&&h!=="paused"?"opacity-50":"",G(M.data,"agent",s.id)==="left"?"sm:text-foreground/55":""),leading:c?(0,t.jsx)(me,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(ue,{agent:s,size:32}),secondaryRow:R?(0,t.jsx)("div",{className:"xl:hidden flex flex-wrap items-center gap-1.5",children:R}):void 0,meta:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[R&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-1.5",children:R}),(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(we,{agent:s,environment:Ae(s.id),showEnvironment:se})})]}),metaSpacerClassName:"hidden xl:block",trailing:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[F.has(s.id)&&(0,t.jsx)(Q,{agentRef:U(s),runId:F.get(s.id).runId,liveCount:F.get(s.id).liveCount}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(H,{status:s.status})}),(0,t.jsx)(xe,{size:"row",starred:Te,pending:_e,resourceName:s.name,onToggle:n($=>f.mutate({resourceType:"agent",resourceId:s.id,resourceName:s.name,starred:$}),"onToggle")})]}),(0,t.jsx)(pe,{state:G(M.data,"agent",s.id),pending:ne,pendingState:ne?f.variables?.state??null:null,resourceName:s.name,onJoin:n(()=>f.mutate({resourceType:"agent",resourceId:s.id,resourceName:s.name,state:"joined"}),"onJoin"),onLeave:n(()=>f.mutate({resourceType:"agent",resourceId:s.id,resourceName:s.name,state:"left"}),"onLeave")})]})},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)(Oe,{value:h,onValueChange:n(s=>r(`/agents/${s}`),"onValueChange"),children:(0,t.jsx)(We,{items:z,value:h,onValueChange:n(s=>r(`/agents/${s}`),"onValueChange")})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center border border-border",role:"group","aria-label":"View mode",children:[(0,t.jsx)("button",{className:B("p-1.5 transition-colors",p==="list"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:n(()=>m("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":p==="list",children:(0,t.jsx)(He,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{className:B("p-1.5 transition-colors",p==="org"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:n(()=>m("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":p==="org",children:(0,t.jsx)(Ke,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)(V,{size:"sm",variant:"outline",onClick:a,children:[(0,t.jsx)(Ue,{className:"h-3.5 w-3.5 mr-1.5"}),"New Agent"]})]})]}),w.length>0&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[w.length," agent",w.length!==1?"s":""]}),Y&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:Y.message}),d&&d.length===0&&(0,t.jsx)(re,{icon:ie,message:"Create your first agent to get started.",action:"New Agent",onAction:a}),p==="list"&&w.length>0&&(0,t.jsx)("div",{children:w.map(Ee)}),p==="list"&&d&&d.length>0&&w.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),p==="org"&&D.length>0&&(0,t.jsx)("div",{className:"py-1",children:D.map(s=>(0,t.jsx)(ye,{node:s,depth:0,agentMap:Se,liveRunByAgent:F,environmentByAgentId:ee,environmentDataLoading:te,showEnvironment:se,tab:h,memberships:M.data,membershipMutation:f,builtInByAgentId:b,onConfigureBuiltIn:_},s.id))}),p==="org"&&T&&T.length>0&&D.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),p==="org"&&T&&T.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),y&&e&&(0,t.jsx)(g.Suspense,{fallback:null,children:(0,t.jsx)(it,{companyId:e,state:y,open:y!==null,onOpenChange:n(s=>{s||_(null)},"onOpenChange")})})]})}n(Mt,"Agents");function ye({node:e,depth:a,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:x,showEnvironment:C,tab:v,memberships:S,membershipMutation:m,builtInByAgentId:A,onConfigureBuiltIn:p}){const l=i.get(e.id),u=A.get(e.id),h=u?.status==="needs_setup"||u?.status==="pending_approval",z=!!(l&&l.orgChainHealth?.status==="invalid_org_chain"),E=G(S,"agent",e.id),b=m.isPending&&m.variables?.resourceType==="agent"&&m.variables.resourceId===e.id,k=b&&m.variables?.starred!==void 0,y=b&&m.variables?.starred===void 0,_=ge(S,"agent",e.id);return(0,t.jsxs)("div",{style:{paddingLeft:a*24},children:[(0,t.jsxs)(de,{to:l?ce(l):`/agents/${e.id}`,className:B("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",E==="left"&&"sm:text-foreground/55"),children:[z?(0,t.jsx)(me,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(ue,{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:[he[e.role]??e.role,l?.title?` - ${l.title}`:""]})]}),u&&h&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(fe,{status:u.status}),u.status==="needs_setup"&&(0,t.jsx)("span",{onClick:n(d=>{d.preventDefault(),d.stopPropagation()},"onClick"),children:(0,t.jsx)(V,{size:"xs",variant:"outline",onClick:n(()=>p(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)(Q,{agentRef:l?U(l):e.id,runId:r.get(e.id).runId,liveCount:r.get(e.id).liveCount}):(0,t.jsx)(H,{status:e.status})}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[r.has(e.id)&&(0,t.jsx)(Q,{agentRef:l?U(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)(we,{agent:l,environment:x?ve:o.get(l.id)??J,showEnvironment:C})}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(H,{status:e.status})})]}),(0,t.jsx)(pe,{state:E,pending:y,pendingState:y?m.variables?.state:null,resourceName:e.name,onJoin:n(()=>m.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,state:"joined"}),"onJoin"),onLeave:n(()=>m.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,state:"left"}),"onLeave")}),(0,t.jsx)("div",{className:"hidden sm:flex items-center gap-3",children:(0,t.jsx)(xe,{size:"row",starred:_,pending:k,resourceName:e.name,onToggle:n(d=>m.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,starred:d}),"onToggle")})})]})]}),e.reports&&e.reports.length>0&&(0,t.jsx)("div",{className:"border-l border-border ml-4",children:e.reports.map(d=>(0,t.jsx)(ye,{node:d,depth:a+1,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:x,showEnvironment:C,tab:v,memberships:S,membershipMutation:m,builtInByAgentId:A,onConfigureBuiltIn:p},d.id))})]})}n(ye,"OrgTreeNode");function we({agent:e,environment:a,showEnvironment:i}){const r=ut(e),o=et(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:a.title,children:a.label}),(0,t.jsx)("div",{className:"truncate text-(length:--text-micro) text-muted-foreground/70",children:a.detail})]}),(0,t.jsx)("span",{className:"w-24 whitespace-nowrap text-right text-xs text-muted-foreground",children:e.lastHeartbeatAt?Re(e.lastHeartbeatAt):"—"})]})}n(we,"AgentMetaColumns");function Q({agentRef:e,runId:a,liveCount:i}){return(0,t.jsxs)(de,{to:`/agents/${e}/runs/${a}`,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:n(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})`:""]})]})}n(Q,"LiveRunIndicator");export{Mt as Agents};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-zttiya6r.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/createLucideIcon-r3v6fbGz.js","assets/preload-helper-CceJXRIF.js","assets/router-DyZkoSkG.js","assets/zap-P-cXfK28.js","assets/agents-BlSzFh-1.js","assets/EmptyState-DPcc0zYh.js","assets/button-CAPbz11u.js","assets/RoutineRunVariablesDialog-IRX4TLng.js","assets/mention-chips-DXumPrOR.js","assets/bot-DZDpMzjD.js","assets/MarkdownEditor-Pip4OXiJ.js","assets/dist-D1zgkcBw.js","assets/dist-5v80Jc6A.js","assets/AgentAvatar-PT82VwmU.js","assets/dist-DCJXgQu0.js","assets/sheet-DeCxNmfl.js","assets/checkbox-CmMbs2PZ.js","assets/check-DDiXDm2i.js","assets/chevron-right-B9JUOr38.js","assets/label-C2ddSDJj.js","assets/StatusIcon-BuUYMqqU.js","assets/clipboard-CYJ5Q78m.js","assets/loader-circle-BD9wx-lw.js","assets/octagon-alert-rGMwyrWA.js","assets/select-mS22eY6T.js","assets/chevron-down-F9aZv-V7.js","assets/heartbeats-CK_aXmx5.js","assets/useHiddenSettings-2JpxuJV7.js","assets/health-DeeeogeJ.js","assets/rotate-ccw-CRAQ3Xng.js","assets/triangle-alert-CgJcxSQX.js","assets/badge-Cf7ihb3q.js","assets/environments-BVeNFanj.js","assets/input-DpsS9it-.js","assets/company-members-BcZm1g8Q.js","assets/AgentIdentity-MCshmbhZ.js","assets/card-dmVcp3AX.js","assets/PageSkeleton-DHjTwRT3.js","assets/skeleton-CKir8TUW.js","assets/tabs-DWRZjksg.js","assets/use-adapter-capabilities-BiWYK4zJ.js","assets/save-DUnPDT6R.js","assets/external-link-0lrOvZWO.js","assets/MarkdownBody-D0eCfSWN.js","assets/file-text-C9vgFckt.js","assets/SidebarContext-D01pu4wh.js","assets/index-GCNIGBzC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Pe=Object.defineProperty;var n=(e,a)=>Pe(e,"name",{value:a,configurable:!0});import{i as oe}from"./rolldown-runtime-ZpX3ckPj.js";import{En as ke,Fr as qe,Lr as Me,S as B,U as Fe,Y as j,_ as ce,g as U,nr as N,z as Re}from"./createLucideIcon-r3v6fbGz.js";import{t as $e}from"./preload-helper-CceJXRIF.js";import{it as Be,o as ze,t as de}from"./router-DyZkoSkG.js";import{S as Ke}from"./zap-P-cXfK28.js";import{t as ue}from"./AgentAvatar-PT82VwmU.js";import{t as Oe}from"./tabs-DWRZjksg.js";import{t as ae}from"./agents-BlSzFh-1.js";import{r as De,t as re}from"./EmptyState-DPcc0zYh.js";import{t as ie}from"./bot-DZDpMzjD.js";import{k as Ue,t as V}from"./button-CAPbz11u.js";import{i as Ve,o as He,t as Ge}from"./heartbeats-CK_aXmx5.js";import{t as me}from"./triangle-alert-CgJcxSQX.js";import{n as Qe}from"./SidebarContext-D01pu4wh.js";import{n as Je,t as le}from"./environments-BVeNFanj.js";import{t as Ye}from"./PageSkeleton-DHjTwRT3.js";import{$t as We,It as Xe,Jt as Ze,Lt as pe,Wt as H,Yt as et,an as ge,cn as tt,dn as st,in as nt,nn as xe,on as G,rn as at,sn as rt,un as fe}from"./index-zttiya6r.js";var g=oe(Me(),1),t=oe(qe(),1),he=ke,it=(0,g.lazy)(()=>$e(()=>import("./index-zttiya6r.js").then(e=>e.wt).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,43,44,45,46,47,48]))),lt=["all","active","paused","error","builtin"],ot=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"paused",label:"Paused"},{value:"error",label:"Error"},{value:"builtin",label:"Built-in"}];function ct(e){return lt.includes(e)}n(ct,"isFilterTab");var J={label:"Local",detail:"Paperclip host",title:"Local - Paperclip host"},ve={label:"—",detail:"Loading environment",title:"Loading environment"},be=new Set(["terminated","pending_approval"]);function je(e,a){return a==="all"?!0:a==="active"?e==="active"||e==="running"||e==="idle":a==="paused"?e==="paused":a==="error"?e==="error":!0}n(je,"matchesFilter");function dt(e,a,i){return e.filter(r=>be.has(r.status)?!1:a==="builtin"?i.has(r.id):je(r.status,a)).sort((r,o)=>r.name.localeCompare(o.name))}n(dt,"filterAgents");function ut(e){const a=e.adapterConfig?.model;if(typeof a!="string")return null;const i=a.trim();return i.length>0?i:null}n(ut,"getConfiguredModel");function mt(e){return e==="ssh"?"SSH":e.charAt(0).toUpperCase()+e.slice(1)}n(mt,"formatEnvironmentDriver");function pt(e,a){const i=typeof e.config.provider=="string"?e.config.provider.trim():"";return i?a?.sandboxProviders?.[i]?.displayName??i:"Sandbox"}n(pt,"getSandboxProviderLabel");function gt(e,a){const i=Ze(e)?"Managed by Paperclip":e.driver==="sandbox"?`${pt(e,a)} sandbox provider`:e.driver==="local"?"Paperclip host":mt(e.driver);return{label:e.name,detail:i,title:`${e.name} - ${i}`}}n(gt,"describeEnvironment");function xt(e){return{label:"Unknown environment",detail:e.slice(0,8),title:`Unknown environment - ${e}`}}n(xt,"describeMissingEnvironment");function ft(e,a,i,r){const o=e.defaultEnvironmentId??i;if(!o)return J;const x=a.get(o);return x?gt(x,r):xt(o)}n(ft,"resolveAgentEnvironment");function Ne(e,a,i){return e.reduce((r,o)=>{const x=Ne(o.reports,a,i);return be.has(o.status)?(r.push(...x),r):(((a==="builtin"?i.has(o.id):je(o.status,a))||x.length>0)&&r.push({...o,reports:x}),r)},[]).sort((r,o)=>r.name.localeCompare(o.name))}n(Ne,"filterOrgTree");function Mt(){const{selectedCompanyId:e}=Fe(),{openNewAgent:a}=Ve(),{setBreadcrumbs:i}=De(),r=ze(),o=Be(),{isMobile:x}=Qe(),C=o.pathname.split("/").pop()??"all",v=ct(C)?C:"all",[S,m]=(0,g.useState)("org"),A=x,p=A?"list":S,{data:l}=N({queryKey:j.instance.settings,queryFn:n(()=>Je.get(),"queryFn"),enabled:!!e}),u=l?.experimental.enableBuiltInAgents===!0,h=v==="builtin"&&!u?"all":v,z=(0,g.useMemo)(()=>ot.filter(s=>s.value!=="builtin"||u),[u]),{data:E}=N({queryKey:j.builtInAgents.list(e),queryFn:n(()=>st.list(e),"queryFn"),enabled:!!e&&u}),b=(0,g.useMemo)(()=>{const s=new Map;if(!u)return s;for(const c of E??[])c.agentId&&s.set(c.agentId,c);return s},[E,u]),k=(0,g.useMemo)(()=>new Set(b.keys()),[b]),[y,_]=(0,g.useState)(null),{data:d,isLoading:Ie,error:Y}=N({queryKey:j.agents.list(e),queryFn:n(()=>ae.list(e),"queryFn"),enabled:!!e}),{data:T}=N({queryKey:j.org(e),queryFn:n(()=>ae.org(e),"queryFn"),enabled:!!e&&p==="org"}),q=l?.experimental.enableEnvironments===!0,{data:L}=N({queryKey:j.environments.list(e),queryFn:n(()=>le.list(e),"queryFn"),enabled:!!e&&q}),{data:W}=N({queryKey:j.environments.capabilities(e),queryFn:n(()=>le.capabilities(e),"queryFn"),enabled:!!e&&q}),X=[...j.liveRuns(e),"agents-page"],K=nt({companyId:e,resourceKey:"live-runs:agents-page",queryKey:X,enabled:!!e,refetchInterval:15e3,leaderOnly:!0}),{data:O,dataUpdatedAt:Ce}=N({queryKey:X,queryFn:n(()=>Ge.liveRunsForCompany(e),"queryFn"),enabled:K.enabled,refetchInterval:K.refetchInterval});at(K,O,Ce);const M=tt(e),f=rt(e),F=(0,g.useMemo)(()=>{const s=new Map;for(const c of O??[]){if(c.status!=="running"&&c.status!=="queued")continue;const P=s.get(c.agentId);if(P){P.liveCount+=1;continue}s.set(c.agentId,{runId:c.id,liveCount:1})}return s},[O]),Se=(0,g.useMemo)(()=>{const s=new Map;for(const c of d??[])s.set(c.id,c);return s},[d]),Z=(0,g.useMemo)(()=>{const s=new Map;for(const c of L??[])s.set(c.id,c);return s},[L]),ee=(0,g.useMemo)(()=>{const s=new Map;for(const c of d??[])s.set(c.id,ft(c,Z,l?.defaultEnvironmentId??null,W));return s},[d,Z,W,l?.defaultEnvironmentId]);if((0,g.useEffect)(()=>{i([{label:"Agents"}])},[i]),(0,g.useEffect)(()=>{e&&v==="builtin"&&l&&!u&&r("/agents/all",{replace:!0})},[u,l,r,v,e]),!e)return(0,t.jsx)(re,{icon:ie,message:"Select a company to view agents."});if(Ie)return(0,t.jsx)(Ye,{variant:"list"});const w=dt(d??[],h,k),D=Ne(T??[],h,k),te=q&&L===void 0,se=q&&(L===void 0||L.length>1),Ae=n(s=>te?ve:ee.get(s)??J,"resolveRenderedEnvironment"),Ee=n(s=>{const c=s.orgChainHealth?.status==="invalid_org_chain",P=f.isPending&&f.variables?.resourceType==="agent"&&f.variables.resourceId===s.id,_e=P&&f.variables?.starred!==void 0,ne=P&&f.variables?.starred===void 0,Te=ge(M.data,"agent",s.id),I=b.get(s.id),Le=I?.status==="needs_setup"||I?.status==="pending_approval",R=I&&Le?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(fe,{status:I.status}),I.status==="needs_setup"&&(0,t.jsx)("span",{onClick:n($=>{$.preventDefault(),$.stopPropagation()},"onClick"),children:(0,t.jsx)(V,{size:"xs",variant:"outline",onClick:n(()=>_(I),"onClick"),children:"Set up"})})]}):null;return(0,t.jsx)(Xe,{title:s.name,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:`${he[s.role]??s.role}${s.title?` - ${s.title}`:""}`,to:ce(s),className:B("group",s.pausedAt&&h!=="paused"?"opacity-50":"",G(M.data,"agent",s.id)==="left"?"sm:text-foreground/55":""),leading:c?(0,t.jsx)(me,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(ue,{agent:s,size:32}),secondaryRow:R?(0,t.jsx)("div",{className:"xl:hidden flex flex-wrap items-center gap-1.5",children:R}):void 0,meta:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[R&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-1.5",children:R}),(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(we,{agent:s,environment:Ae(s.id),showEnvironment:se})})]}),metaSpacerClassName:"hidden xl:block",trailing:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[F.has(s.id)&&(0,t.jsx)(Q,{agentRef:U(s),runId:F.get(s.id).runId,liveCount:F.get(s.id).liveCount}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(H,{status:s.status})}),(0,t.jsx)(xe,{size:"row",starred:Te,pending:_e,resourceName:s.name,onToggle:n($=>f.mutate({resourceType:"agent",resourceId:s.id,resourceName:s.name,starred:$}),"onToggle")})]}),(0,t.jsx)(pe,{state:G(M.data,"agent",s.id),pending:ne,pendingState:ne?f.variables?.state??null:null,resourceName:s.name,onJoin:n(()=>f.mutate({resourceType:"agent",resourceId:s.id,resourceName:s.name,state:"joined"}),"onJoin"),onLeave:n(()=>f.mutate({resourceType:"agent",resourceId:s.id,resourceName:s.name,state:"left"}),"onLeave")})]})},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)(Oe,{value:h,onValueChange:n(s=>r(`/agents/${s}`),"onValueChange"),children:(0,t.jsx)(We,{items:z,value:h,onValueChange:n(s=>r(`/agents/${s}`),"onValueChange")})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center border border-border",role:"group","aria-label":"View mode",children:[(0,t.jsx)("button",{className:B("p-1.5 transition-colors",p==="list"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:n(()=>m("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":p==="list",children:(0,t.jsx)(He,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{className:B("p-1.5 transition-colors",p==="org"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:n(()=>m("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":p==="org",children:(0,t.jsx)(Ke,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)(V,{size:"sm",variant:"outline",onClick:a,children:[(0,t.jsx)(Ue,{className:"h-3.5 w-3.5 mr-1.5"}),"New Agent"]})]})]}),w.length>0&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[w.length," agent",w.length!==1?"s":""]}),Y&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:Y.message}),d&&d.length===0&&(0,t.jsx)(re,{icon:ie,message:"Create your first agent to get started.",action:"New Agent",onAction:a}),p==="list"&&w.length>0&&(0,t.jsx)("div",{children:w.map(Ee)}),p==="list"&&d&&d.length>0&&w.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),p==="org"&&D.length>0&&(0,t.jsx)("div",{className:"py-1",children:D.map(s=>(0,t.jsx)(ye,{node:s,depth:0,agentMap:Se,liveRunByAgent:F,environmentByAgentId:ee,environmentDataLoading:te,showEnvironment:se,tab:h,memberships:M.data,membershipMutation:f,builtInByAgentId:b,onConfigureBuiltIn:_},s.id))}),p==="org"&&T&&T.length>0&&D.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected status."}),p==="org"&&T&&T.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),y&&e&&(0,t.jsx)(g.Suspense,{fallback:null,children:(0,t.jsx)(it,{companyId:e,state:y,open:y!==null,onOpenChange:n(s=>{s||_(null)},"onOpenChange")})})]})}n(Mt,"Agents");function ye({node:e,depth:a,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:x,showEnvironment:C,tab:v,memberships:S,membershipMutation:m,builtInByAgentId:A,onConfigureBuiltIn:p}){const l=i.get(e.id),u=A.get(e.id),h=u?.status==="needs_setup"||u?.status==="pending_approval",z=!!(l&&l.orgChainHealth?.status==="invalid_org_chain"),E=G(S,"agent",e.id),b=m.isPending&&m.variables?.resourceType==="agent"&&m.variables.resourceId===e.id,k=b&&m.variables?.starred!==void 0,y=b&&m.variables?.starred===void 0,_=ge(S,"agent",e.id);return(0,t.jsxs)("div",{style:{paddingLeft:a*24},children:[(0,t.jsxs)(de,{to:l?ce(l):`/agents/${e.id}`,className:B("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",E==="left"&&"sm:text-foreground/55"),children:[z?(0,t.jsx)(me,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(ue,{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:[he[e.role]??e.role,l?.title?` - ${l.title}`:""]})]}),u&&h&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(fe,{status:u.status}),u.status==="needs_setup"&&(0,t.jsx)("span",{onClick:n(d=>{d.preventDefault(),d.stopPropagation()},"onClick"),children:(0,t.jsx)(V,{size:"xs",variant:"outline",onClick:n(()=>p(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)(Q,{agentRef:l?U(l):e.id,runId:r.get(e.id).runId,liveCount:r.get(e.id).liveCount}):(0,t.jsx)(H,{status:e.status})}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[r.has(e.id)&&(0,t.jsx)(Q,{agentRef:l?U(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)(we,{agent:l,environment:x?ve:o.get(l.id)??J,showEnvironment:C})}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(H,{status:e.status})})]}),(0,t.jsx)(pe,{state:E,pending:y,pendingState:y?m.variables?.state:null,resourceName:e.name,onJoin:n(()=>m.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,state:"joined"}),"onJoin"),onLeave:n(()=>m.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,state:"left"}),"onLeave")}),(0,t.jsx)("div",{className:"hidden sm:flex items-center gap-3",children:(0,t.jsx)(xe,{size:"row",starred:_,pending:k,resourceName:e.name,onToggle:n(d=>m.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,starred:d}),"onToggle")})})]})]}),e.reports&&e.reports.length>0&&(0,t.jsx)("div",{className:"border-l border-border ml-4",children:e.reports.map(d=>(0,t.jsx)(ye,{node:d,depth:a+1,agentMap:i,liveRunByAgent:r,environmentByAgentId:o,environmentDataLoading:x,showEnvironment:C,tab:v,memberships:S,membershipMutation:m,builtInByAgentId:A,onConfigureBuiltIn:p},d.id))})]})}n(ye,"OrgTreeNode");function we({agent:e,environment:a,showEnvironment:i}){const r=ut(e),o=et(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:a.title,children:a.label}),(0,t.jsx)("div",{className:"truncate text-(length:--text-micro) text-muted-foreground/70",children:a.detail})]}),(0,t.jsx)("span",{className:"w-24 whitespace-nowrap text-right text-xs text-muted-foreground",children:e.lastHeartbeatAt?Re(e.lastHeartbeatAt):"—"})]})}n(we,"AgentMetaColumns");function Q({agentRef:e,runId:a,liveCount:i}){return(0,t.jsxs)(de,{to:`/agents/${e}/runs/${a}`,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:n(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})`:""]})]})}n(Q,"LiveRunIndicator");export{Mt as Agents};
|