codex-mobile-re 0.1.88
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/LICENSE +11 -0
- package/README.md +278 -0
- package/dist/assets/AutomationsPanel-Dp8RsslP.js +1 -0
- package/dist/assets/AutomationsPanel-VRBbmMYW.css +1 -0
- package/dist/assets/DirectoryHub-BOxKTf5g.js +2 -0
- package/dist/assets/DirectoryHub-CIkiWzxh.css +1 -0
- package/dist/assets/ReviewPane-BI8SWSDv.js +1 -0
- package/dist/assets/ReviewPane-Q55bhcnB.css +1 -0
- package/dist/assets/ThreadConversation-DYiDMOhU.js +39 -0
- package/dist/assets/ThreadConversation-DoR0Kazk.css +1 -0
- package/dist/assets/ThreadTerminalPanel-CgxRx_qQ.js +38 -0
- package/dist/assets/ThreadTerminalPanel-O7IxAyfy.css +32 -0
- package/dist/assets/common-BeuopZEI.js +5 -0
- package/dist/assets/index-8nj0j9KO.css +1 -0
- package/dist/assets/index-BrpaGwQT.js +86 -0
- package/dist/assets/index.esm-Bx2Y2PLG.js +376 -0
- package/dist/assets/index.esm-Cxn_LBGD.js +16 -0
- package/dist/assets/index.esm-DYMAm9mq.js +1666 -0
- package/dist/assets/sanitizeHtml-LuNwludj.js +1 -0
- package/dist/icons/apple-touch-icon.png +0 -0
- package/dist/icons/codexui-icon.svg +52 -0
- package/dist/icons/maskable-512x512.png +0 -0
- package/dist/icons/pwa-192x192.png +0 -0
- package/dist/icons/pwa-512x512.png +0 -0
- package/dist/icons/pwa-icon.svg +38 -0
- package/dist/icons/pwa-maskable.svg +36 -0
- package/dist/index.html +21 -0
- package/dist/manifest.webmanifest +36 -0
- package/dist/sw.js +92 -0
- package/dist-cli/index.js +16110 -0
- package/dist-cli/index.js.map +1 -0
- package/package.json +84 -0
- package/scripts/dev-random-home.cjs +21 -0
- package/scripts/dev.cjs +69 -0
- package/scripts/fix-pty-native-build.cjs +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Pavel Voronin, Igor Levochkin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the βSoftwareβ), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED βAS ISβ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
|
11
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# π₯ codexapp
|
|
2
|
+
|
|
3
|
+
### π Run Codex App UI Anywhere: Linux, Windows, or Termux on Android π
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/codexapp)
|
|
6
|
+
[](#-quick-start)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
|
|
10
|
+
> **Codex UI in your browser. No drama. One command.**
|
|
11
|
+
>
|
|
12
|
+
> **Yes, that is your Codex desktop app experience exposed over web UI. Yes, it runs cross-platform.**
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
βββββββ βββββββ βββββββ βββββββββββ ββββββ ββββββ
|
|
16
|
+
ββββββββββββββββββββββββββββββββββββββββββββ ββββββ
|
|
17
|
+
βββ βββ ββββββ βββββββββ ββββββ βββ ββββββ
|
|
18
|
+
βββ βββ ββββββ βββββββββ ββββββ βββ ββββββ
|
|
19
|
+
βββββββββββββββββββββββββββββββββββββ βββββββββββββββ
|
|
20
|
+
βββββββ βββββββ βββββββ βββββββββββ βββ βββββββ βββ
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
<img width="1366" height="900" alt="image" src="https://github.com/user-attachments/assets/1a3578ba-add8-49a2-88b4-08195a7f0140" />
|
|
25
|
+
|
|
26
|
+
## π€― What Is This?
|
|
27
|
+
**`codexapp`** is a lightweight bridge that gives you a browser-accessible UI for Codex app-server workflows.
|
|
28
|
+
|
|
29
|
+
You run one command. It starts a local web server. You open it from your machine, your LAN, or wherever your setup allows.
|
|
30
|
+
|
|
31
|
+
**TL;DR π§ : Codex app UI, unlocked for Linux, Windows, and Termux-powered Android setups.**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## β‘ Quick Start
|
|
36
|
+
> **The main event.**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# π Run instantly (recommended)
|
|
40
|
+
npx codexapp
|
|
41
|
+
|
|
42
|
+
# π Then open in browser
|
|
43
|
+
# http://localhost:18923
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
By default, `codexapp` now also starts:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cloudflared tunnel --url http://localhost:<port>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
It prints the tunnel URL, terminal QR code, and password together in startup output.
|
|
53
|
+
Use `--no-tunnel` to disable this behavior.
|
|
54
|
+
|
|
55
|
+
If you are using a provider or AI gateway that is already authenticated and do not want `codexapp` to force `codex login` during startup, use:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx codexapp --no-login
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Linux π§
|
|
62
|
+
```bash
|
|
63
|
+
node -v # should be 18+
|
|
64
|
+
npx codexapp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Windows πͺ (PowerShell)
|
|
68
|
+
```powershell
|
|
69
|
+
node -v # 18+
|
|
70
|
+
npx codexapp
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Termux (Android) π€
|
|
74
|
+
```bash
|
|
75
|
+
pkg update && pkg upgrade -y
|
|
76
|
+
pkg install nodejs -y
|
|
77
|
+
npx codexapp
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Android background requirements:
|
|
81
|
+
|
|
82
|
+
1. Keep `codexapp` running in the current Termux session (do not close it).
|
|
83
|
+
2. In Android settings, disable battery optimization for `Termux`.
|
|
84
|
+
3. Keep the persistent Termux notification enabled so Android is less likely to kill it.
|
|
85
|
+
4. Optional but recommended in Termux:
|
|
86
|
+
```bash
|
|
87
|
+
termux-wake-lock
|
|
88
|
+
```
|
|
89
|
+
5. Open the shown URL in your Android browser. If the app is killed, return to Termux and run `npx codexapp` again.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## iPhone / iPad via Tailscale Serve
|
|
94
|
+
|
|
95
|
+
If you want to use codexUI from iPhone or iPad Safari, serving it over HTTPS is recommended.
|
|
96
|
+
|
|
97
|
+
A practical private setup is to run codexUI locally and publish it inside your tailnet with Tailscale Serve:
|
|
98
|
+
|
|
99
|
+
```powershell
|
|
100
|
+
npx codexapp --no-tunnel --port 5900
|
|
101
|
+
tailscale serve --bg 5900
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Then open:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
https://<your-machine>.<your-tailnet>.ts.net
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This setup worked well in practice for:
|
|
111
|
+
|
|
112
|
+
- iPhone Safari access
|
|
113
|
+
- Add to Home Screen
|
|
114
|
+
- the built-in dictation / transcription feature in the app
|
|
115
|
+
- viewing the same projects and conversations from the Windows host
|
|
116
|
+
|
|
117
|
+
Notes:
|
|
118
|
+
|
|
119
|
+
- Tailscale Serve keeps access private to your tailnet
|
|
120
|
+
- on iOS, HTTPS / secure context appears to be important for mobile browser access and dictation
|
|
121
|
+
- some minor mobile Safari CSS issues may still exist, but they do not prevent normal use
|
|
122
|
+
- depending on proxying details, authentication behavior may differ from direct remote access
|
|
123
|
+
- if conversations created in the web UI do not immediately appear in the Windows app, restarting the Windows app may refresh them
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## β¨ Features
|
|
128
|
+
> **The payload.**
|
|
129
|
+
|
|
130
|
+
- π One-command launch with `npx codexapp`
|
|
131
|
+
- π Cross-platform support for Linux, Windows, and Termux on Android
|
|
132
|
+
- π₯οΈ Browser-first Codex UI flow on `http://localhost:18923`
|
|
133
|
+
- π LAN-friendly access from other devices on the same network
|
|
134
|
+
- π§ͺ Remote/headless-friendly setup for server-based Codex usage
|
|
135
|
+
- π Works with reverse proxies and tunneling setups
|
|
136
|
+
- β‘ No global install required for quick experimentation
|
|
137
|
+
- ποΈ Built-in hold-to-dictate voice input with transcription to composer draft
|
|
138
|
+
- π€ Optional Telegram bot bridge: send messages to bot, forward into mapped thread, send assistant reply back to Telegram
|
|
139
|
+
- πΎ Project portability: export a project as a ZIP from project or thread menus, including matching Codex chat JSONL history under `.codex-project/chats/`
|
|
140
|
+
- π¦ Project import: restore exported project ZIPs from the browser via `Import Project`
|
|
141
|
+
- π Imported chats are rewritten for the destination `CODEX_HOME`, project path, and currently selected provider/model so they can be resumed in the new environment
|
|
142
|
+
- βοΈ Project ZIP performance: exports stream ZIP bytes with response backpressure handling and skip generated/git-ignored folders; imports still buffer the selected ZIP once because the browser upload arrives as a single file
|
|
143
|
+
|
|
144
|
+
### Telegram Bot Bridge (Optional)
|
|
145
|
+
|
|
146
|
+
Set these environment variables before starting `codexapp`:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
export TELEGRAM_BOT_TOKEN="<your-telegram-bot-token>"
|
|
150
|
+
export TELEGRAM_ALLOWED_USER_IDS="<your-telegram-user-id>,<optional-second-id>"
|
|
151
|
+
export TELEGRAM_DEFAULT_CWD="$PWD" # optional, defaults to current working directory
|
|
152
|
+
npx codexapp
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`TELEGRAM_ALLOWED_USER_IDS` is required for safe access. Only allowlisted Telegram user IDs can use the bridge. If no allowed user IDs are configured, incoming Telegram messages are rejected.
|
|
156
|
+
|
|
157
|
+
To find your Telegram user ID:
|
|
158
|
+
|
|
159
|
+
1. Send a message to your bot.
|
|
160
|
+
2. Run `curl "https://api.telegram.org/bot<your-telegram-bot-token>/getUpdates"`.
|
|
161
|
+
3. Read `message.from.id` from the returned update payload.
|
|
162
|
+
|
|
163
|
+
Bot commands:
|
|
164
|
+
|
|
165
|
+
- `/start` show quick help and thread picker
|
|
166
|
+
- `/threads` list recent threads and pick one
|
|
167
|
+
- `/newthread` create and map a new Codex thread for this Telegram chat
|
|
168
|
+
- `/thread <threadId>` map current Telegram chat to an existing thread
|
|
169
|
+
- `/current` show currently connected thread for this chat
|
|
170
|
+
- `/history` show recent history for current thread
|
|
171
|
+
- `/status` show bridge/mapping status
|
|
172
|
+
- `/whoami` show your Telegram user/chat IDs and authorization state
|
|
173
|
+
- `/help` show command reference
|
|
174
|
+
|
|
175
|
+
Outgoing assistant messages are sent with Telegram `parse_mode=HTML` for formatting, with automatic plain-text fallback if HTML delivery fails.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## π§© Recent Product Features (from main commits)
|
|
180
|
+
> **Not just launch. Actual UX upgrades.**
|
|
181
|
+
|
|
182
|
+
- ποΈ Searchable project picker in new-thread flow
|
|
183
|
+
- β "Create Project" button next to "Select folder" with browser prompt
|
|
184
|
+
- π New projects get pinned to top automatically
|
|
185
|
+
- π§ Smart default new-project name suggestion via server-side free-directory scan (`New Project (N)`)
|
|
186
|
+
- π Project order persisted globally to workspace roots state
|
|
187
|
+
- π§΅ Optimistic in-progress threads preserved during refresh/poll cycles
|
|
188
|
+
- π± Mobile drawer sidebar in desktop layout (teleported overlay + swipe-friendly structure)
|
|
189
|
+
- ποΈ Skills Hub mobile-friendly spacing/toolbar layout improvements
|
|
190
|
+
- πͺ Skill detail modal tuned for mobile sheet-style behavior
|
|
191
|
+
- π§ͺ Skills Hub event typing fix for `SkillCard` select emit compatibility
|
|
192
|
+
- ποΈ Voice dictation flow in composer (`hold to dictate` -> transcribe -> append text)
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## π What Can You Do With This?
|
|
197
|
+
|
|
198
|
+
| π₯ Use Case | π₯ What You Get |
|
|
199
|
+
|---|---|
|
|
200
|
+
| π» Linux workstation | Run Codex UI in browser without depending on desktop shell |
|
|
201
|
+
| πͺ Windows machine | Launch web UI and access from Chrome/Edge quickly |
|
|
202
|
+
| π± Termux on Android | Start service in Termux and control from mobile browser |
|
|
203
|
+
| π§ͺ Remote dev box | Keep Codex process on server, view UI from client device |
|
|
204
|
+
| π LAN sharing | Open UI from another device on same network |
|
|
205
|
+
| π§° Headless workflows | Keep terminal + browser split for productivity |
|
|
206
|
+
| π Custom routing | Put behind reverse proxy/tunnel if needed |
|
|
207
|
+
| β‘ Fast experiments | `npx` run without full global setup |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## πΌοΈ Screenshots
|
|
212
|
+
|
|
213
|
+
### Skills Hub
|
|
214
|
+

|
|
215
|
+
|
|
216
|
+
### Chat
|
|
217
|
+

|
|
218
|
+
|
|
219
|
+
### Mobile UI
|
|
220
|
+

|
|
221
|
+

|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## ποΈ Architecture
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
βββββββββββββββββββββββββββββββ
|
|
229
|
+
β Browser (Desktop/Mobile) β
|
|
230
|
+
ββββββββββββββββ¬βββββββββββββββ
|
|
231
|
+
β HTTP/WebSocket
|
|
232
|
+
ββββββββββββββββΌβββββββββββββββ
|
|
233
|
+
β codexapp β
|
|
234
|
+
β (Express + Vue UI bridge) β
|
|
235
|
+
ββββββββββββββββ¬βββββββββββββββ
|
|
236
|
+
β RPC/Bridge calls
|
|
237
|
+
ββββββββββββββββΌβββββββββββββββ
|
|
238
|
+
β Codex App Server β
|
|
239
|
+
βββββββββββββββββββββββββββββββ
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## π― Requirements
|
|
245
|
+
- β
Node.js `18+`
|
|
246
|
+
- β
Codex app-server environment available
|
|
247
|
+
- β
Browser access to host/port
|
|
248
|
+
- β
Microphone permission (only for voice dictation)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## π Troubleshooting
|
|
253
|
+
|
|
254
|
+
| β Problem | β
Fix |
|
|
255
|
+
|---|---|
|
|
256
|
+
| Port already in use | Run on a free port or stop old process |
|
|
257
|
+
| `npx` fails | Update npm/node, then retry |
|
|
258
|
+
| Termux install fails | `pkg update && pkg upgrade` then reinstall `nodejs` |
|
|
259
|
+
| Canβt open from other device | Check firewall, bind address, and LAN routing |
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## π€ Contributing
|
|
264
|
+
Issues and PRs are welcome.
|
|
265
|
+
Bring bug reports, platform notes, and setup improvements.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## β Star This Repo
|
|
270
|
+
If you believe Codex UI should be accessible from **any machine, any OS, any screen**, star this project and share it. β
|
|
271
|
+
|
|
272
|
+
<div align="center">
|
|
273
|
+
Built for speed, portability, and a little bit of chaos π
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
Forked from [pavel-voronin/codex-web-local](https://github.com/pavel-voronin/codex-web-local) by Pavel Voronin.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as X,q as f,l as w,M as Z,as as tt,at,o as c,a as v,b as e,t as n,u as i,e as B,g as U,au as A,F as et,r as ot,a2 as x,w as I,n as st,c as L,av as F,j as nt,k as _,_ as ut}from"./index-BrpaGwQT.js";const it={class:"automations-panel"},lt={class:"automations-toolbar"},rt={class:"automations-summary"},ct={class:"automations-actions"},dt=["title"],mt=["disabled"],pt={key:0,class:"automations-error"},vt={key:1,class:"automations-empty"},ht={key:2,class:"automations-empty"},ft={key:3,class:"automations-layout"},_t=["aria-label"],yt=["onClick","onKeydown"],bt=["data-status"],gt={class:"automation-row-main"},At={class:"automation-row-title"},Lt={class:"automation-row-meta"},Et={class:"automation-row-side"},kt=["data-status"],Ct={class:"automation-row-schedule"},wt=["onClick"],It=["aria-label"],jt={class:"automation-detail-heading"},Rt=["data-status"],Tt={class:"automation-detail-title-wrap"},$t={class:"automation-detail-grid"},Kt=["title"],Mt={class:"automation-detail-prompt"},Nt=X({__name:"AutomationsPanel",props:{groups:{},projectCwdByName:{},projectDisplayNameById:{},selectedAutomationId:{}},emits:["select-automation","edit-automation","create-automation"],setup(V,{expose:Q,emit:Y}){const h=V,E=Y,j=f({}),R=f({}),{t:s}=nt(),y=f(!1),b=f(""),d=f(h.selectedAutomationId??""),p=f(""),z=_(()=>{const t=new Map;for(const a of h.groups)for(const o of a.threads)t.set(o.id,o.title);return t}),H=_(()=>{var a,o;const t=new Map;for(const l of h.groups){const u=(a=h.projectCwdByName[l.projectName])==null?void 0:a.trim(),g=((o=h.projectDisplayNameById[l.projectName])==null?void 0:o.trim())||l.projectName;u&&t.set(u,g)}return t}),m=_(()=>{const t=[];for(const[a,o]of Object.entries(j.value)){const l=z.value.get(a)??a;for(const u of o)t.push({rowKey:M("thread",a,u.id),automation:u,scope:"thread",scopeLabel:s("Heartbeat"),targetLabel:l,targetTitle:a,scheduleLabel:N(u)})}for(const[a,o]of Object.entries(R.value)){const l=H.value.get(a)??J(a);for(const u of o)t.push({rowKey:M("project",a,u.id),automation:u,scope:"project",scopeLabel:s("Project"),targetLabel:l,targetTitle:a,scheduleLabel:N(u)})}return t.sort((a,o)=>{const l=a.automation.status==="ACTIVE"?0:1,u=o.automation.status==="ACTIVE"?0:1;if(l!==u)return l-u;const g=a.automation.createdAtMs??0,P=o.automation.createdAtMs??0;if(g!==P)return P-g;const D=a.automation.updatedAtMs??0,S=o.automation.updatedAtMs??0;return D!==S?S-D:a.automation.name.localeCompare(o.automation.name)})}),O=_(()=>m.value.filter(t=>t.automation.status==="ACTIVE").length),W=_(()=>m.value.filter(t=>t.automation.status==="PAUSED").length),r=_(()=>m.value.find(t=>t.rowKey===p.value)??m.value.find(t=>t.automation.id===d.value)??m.value[0]??null);w(()=>h.selectedAutomationId,t=>{t&&(d.value=t,p.value=K(t))}),w(d,t=>{t&&E("select-automation",t)}),w(m,t=>{if(t.length===0){d.value="",p.value="";return}if(!(p.value&&t.some(a=>a.rowKey===p.value))){if(d.value&&t.some(a=>a.automation.id===d.value)){p.value=K(d.value);return}(!d.value||!t.some(a=>a.automation.id===d.value))&&(d.value=t[0].automation.id,p.value=t[0].rowKey)}}),Z(()=>{k()}),Q({loadAutomations:k});async function k(){y.value=!0,b.value="";try{const[t,a]=await Promise.all([tt(),at()]);j.value=t,R.value=a}catch(t){b.value=t instanceof Error?t.message:s("Failed to load automations")}finally{y.value=!1}}function T(t){return s(t==="PAUSED"?"Paused":"Active")}function $(t){E("edit-automation",{scope:t.scope,target:t.targetTitle,automation:t.automation})}function q(){E("create-automation")}function C(t){p.value=t.rowKey,d.value=t.automation.id}function K(t){var a;return((a=m.value.find(o=>o.automation.id===t))==null?void 0:a.rowKey)??""}function M(t,a,o){return`${t}:${a}:${o}`}function N(t){var o,l;if(t.status==="PAUSED")return s("Paused");if(t.nextRunAtMs)return`${s("Next")} ${G(t.nextRunAtMs)}`;const a=t.rrule.trim();if(/FREQ=MINUTELY/i.test(a)){const u=((o=/INTERVAL=(\d+)/i.exec(a))==null?void 0:o[1])??"1";return u==="1"?s("Every minute"):`${s("Every")} ${u} ${s("minutes")}`}if(/FREQ=HOURLY/i.test(a)){const u=((l=/INTERVAL=(\d+)/i.exec(a))==null?void 0:l[1])??"1";return u==="1"?s("Hourly"):`${s("Every")} ${u} ${s("hours")}`}return/FREQ=DAILY/i.test(a)?s("Daily"):/FREQ=WEEKLY/i.test(a)?s("Weekly"):s("Custom schedule")}function G(t){return new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function J(t){return t.replace(/\/+$/,"").split("/").filter(Boolean).pop()??t}return(t,a)=>(c(),v("div",it,[e("div",lt,[e("div",rt,[e("span",null,n(m.value.length)+" "+n(i(s)("total")),1),e("span",null,n(O.value)+" "+n(i(s)("active")),1),e("span",null,n(W.value)+" "+n(i(s)("paused")),1)]),e("div",ct,[e("button",{class:"automations-create",type:"button",title:i(s)("Create a new automation"),onClick:q},n(i(s)("New automation")),9,dt),e("button",{class:"automations-refresh",type:"button",disabled:y.value,onClick:k},n(y.value?i(s)("Refreshing..."):i(s)("Refresh")),9,mt)])]),b.value?(c(),v("p",pt,n(b.value),1)):B("",!0),y.value&&m.value.length===0?(c(),v("div",vt,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("Loading automations...")),1)])):m.value.length===0?(c(),v("div",ht,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("No automations yet")),1),e("span",null,n(i(s)("Use a thread or project menu to add an automation.")),1)])):(c(),v("div",ft,[e("section",{class:"automations-list","aria-label":i(s)("Automations")},[(c(!0),v(et,null,ot(m.value,o=>(c(),v("div",{key:o.rowKey,class:st(["automation-row",{"is-selected":p.value===o.rowKey}]),role:"button",tabindex:"0",onClick:l=>C(o),onKeydown:[x(I(l=>C(o),["prevent"]),["enter"]),x(I(l=>C(o),["prevent"]),["space"])]},[e("span",{class:"automation-row-icon","data-status":o.automation.status},[o.automation.status==="PAUSED"?(c(),L(F,{key:0})):(c(),L(A,{key:1}))],8,bt),e("span",gt,[e("span",At,n(o.automation.name),1),e("span",Lt,n(o.scopeLabel)+" β’ "+n(o.targetLabel),1)]),e("span",Et,[e("span",{class:"automation-row-status","data-status":o.automation.status},n(T(o.automation.status)),9,kt),e("span",Ct,n(o.scheduleLabel),1)]),e("button",{class:"automation-edit-button",type:"button",onClick:I(l=>$(o),["stop"])},n(i(s)("Edit")),9,wt)],42,yt))),128))],8,_t),r.value?(c(),v("aside",{key:0,class:"automation-detail","aria-label":i(s)("Automation details")},[e("div",jt,[e("span",{class:"automation-detail-icon","data-status":r.value.automation.status},[r.value.automation.status==="PAUSED"?(c(),L(F,{key:0})):(c(),L(A,{key:1}))],8,Rt),e("div",Tt,[e("h2",null,n(r.value.automation.name),1),e("span",null,n(r.value.scopeLabel),1)]),e("button",{class:"automation-detail-edit",type:"button",onClick:a[0]||(a[0]=o=>$(r.value))},n(i(s)("Edit")),1)]),e("dl",$t,[e("div",null,[e("dt",null,n(i(s)("Status")),1),e("dd",null,n(T(r.value.automation.status)),1)]),e("div",null,[e("dt",null,n(i(s)("Schedule")),1),e("dd",null,n(r.value.scheduleLabel),1)]),e("div",null,[e("dt",null,n(i(s)("Target")),1),e("dd",{title:r.value.targetTitle},n(r.value.targetLabel),9,Kt)]),e("div",null,[a[1]||(a[1]=e("dt",null,"ID",-1)),e("dd",null,n(r.value.automation.id),1)])]),e("section",Mt,[e("h3",null,n(i(s)("Prompt")),1),e("p",null,n(r.value.automation.prompt),1)])],8,It)):B("",!0)]))]))}}),Dt=ut(Nt,[["__scopeId","data-v-44d1a098"]]);export{Dt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-44d1a098],[data-v-44d1a098]:before,[data-v-44d1a098]:after,[data-v-44d1a098]::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-leading:initial}}}.automations-panel[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * 3);min-height:0;padding-inline:calc(var(--spacing,.25rem) * 2);padding-bottom:calc(var(--spacing,.25rem) * 3);flex-direction:column;flex:1;display:flex}@media (min-width:40rem){.automations-panel[data-v-44d1a098]{padding-inline:calc(var(--spacing,.25rem) * 6);padding-bottom:calc(var(--spacing,.25rem) * 6)}}.automations-toolbar[data-v-44d1a098]{justify-content:space-between;align-items:center;gap:calc(var(--spacing,.25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));padding-bottom:calc(var(--spacing,.25rem) * 3);flex-shrink:0;display:flex}.automations-summary[data-v-44d1a098]{align-items:center;gap:calc(var(--spacing,.25rem) * 2);min-width:0;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-500,oklch(55.2% .016 285.938));flex-wrap:wrap;display:flex}.automations-summary span[data-v-44d1a098]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375));padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:var(--spacing,.25rem);border-radius:3.40282e38px}.automations-actions[data-v-44d1a098]{align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-shrink:0;display:flex}.automations-refresh[data-v-44d1a098],.automations-create[data-v-44d1a098]{height:calc(var(--spacing,.25rem) * 8);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);padding-inline:calc(var(--spacing,.25rem) * 3);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-700,oklch(37% .013 285.805));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));border-radius:3.40282e38px;flex-shrink:0}@media (hover:hover){:is(.automations-refresh[data-v-44d1a098],.automations-create[data-v-44d1a098]):hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}:is(.automations-refresh[data-v-44d1a098],.automations-create[data-v-44d1a098]):disabled{opacity:.6}.automations-error[data-v-44d1a098]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-rose-200,oklch(89.2% .058 10.001));background-color:var(--color-rose-50,oklch(96.9% .015 12.422));padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));color:var(--color-rose-700,oklch(51.4% .222 16.935));margin:0}.automations-layout[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * 3);flex:1;grid-template-columns:repeat(1,minmax(0,1fr));min-height:0;display:grid}@media (min-width:64rem){.automations-layout[data-v-44d1a098]{grid-template-columns:minmax(0,1fr) minmax(320px,420px)}}.automations-list[data-v-44d1a098]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);min-height:0;overflow-y:auto}.automation-row[data-v-44d1a098]{align-items:center;gap:calc(var(--spacing,.25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-100,oklch(96.7% .001 286.375));width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 3);text-align:left;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));grid-template-columns:auto minmax(0,1fr) auto auto;display:grid}.automation-row[data-v-44d1a098]:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.automation-row[data-v-44d1a098]:hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}.automation-row.is-selected[data-v-44d1a098]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375))}.automation-row-icon[data-v-44d1a098],.automation-detail-icon[data-v-44d1a098]{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);background-color:var(--color-emerald-100,oklch(95% .052 163.051));color:var(--color-emerald-700,oklch(50.8% .118 165.612));border-radius:3.40282e38px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.automation-row-icon[data-status=PAUSED][data-v-44d1a098],.automation-detail-icon[data-status=PAUSED][data-v-44d1a098]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375));color:var(--color-zinc-500,oklch(55.2% .016 285.938))}:is(.automation-row-icon[data-v-44d1a098] svg,.automation-detail-icon[data-v-44d1a098] svg){height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4)}.automation-row-main[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * .5);flex-direction:column;min-width:0;display:flex}.automation-row-title[data-v-44d1a098]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-950,oklch(14.1% .005 285.823));overflow:hidden}.automation-row-meta[data-v-44d1a098]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-500,oklch(55.2% .016 285.938));overflow:hidden}.automation-row-side[data-v-44d1a098]{min-width:calc(var(--spacing,.25rem) * 24);align-items:flex-end;gap:calc(var(--spacing,.25rem) * .5);text-align:right;flex-direction:column;display:flex}.automation-row-status[data-v-44d1a098]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-emerald-700,oklch(50.8% .118 165.612))}.automation-row-status[data-status=PAUSED][data-v-44d1a098]{color:var(--color-zinc-500,oklch(55.2% .016 285.938))}.automation-row-schedule[data-v-44d1a098]{max-width:calc(var(--spacing,.25rem) * 36);text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-500,oklch(55.2% .016 285.938));overflow:hidden}.automation-edit-button[data-v-44d1a098],.automation-detail-edit[data-v-44d1a098]{height:calc(var(--spacing,.25rem) * 7);border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);padding-inline:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-700,oklch(37% .013 285.805));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));flex-shrink:0}@media (hover:hover){:is(.automation-edit-button[data-v-44d1a098],.automation-detail-edit[data-v-44d1a098]):hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}.automation-detail-edit[data-v-44d1a098]{margin-left:auto}.automation-detail[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * 4);border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);min-height:0;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex;overflow-y:auto}.automation-detail-heading[data-v-44d1a098]{align-items:center;gap:calc(var(--spacing,.25rem) * 3);min-width:0;display:flex}.automation-detail-title-wrap[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * .5);flex-direction:column;min-width:0;display:flex}.automation-detail-title-wrap h2[data-v-44d1a098]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);color:var(--color-zinc-950,oklch(14.1% .005 285.823));margin:0;overflow:hidden}.automation-detail-title-wrap span[data-v-44d1a098]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);--tw-tracking:.14em;letter-spacing:.14em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase}.automation-detail-grid[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * 2);grid-template-columns:repeat(1,minmax(0,1fr));display:grid}@media (min-width:40rem){.automation-detail-grid[data-v-44d1a098]{grid-template-columns:repeat(2,minmax(0,1fr))}}.automation-detail-grid div[data-v-44d1a098]{border-radius:var(--radius-lg,.5rem);background-color:var(--color-zinc-50,oklch(98.5% 0 none));min-width:0;padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}.automation-detail-grid dt[data-v-44d1a098]{--tw-font-weight:var(--font-weight-medium,500);font-size:11px;font-weight:var(--font-weight-medium,500);--tw-tracking:.12em;letter-spacing:.12em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase}.automation-detail-grid dd[data-v-44d1a098]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));color:var(--color-zinc-900,oklch(21% .006 285.885));margin:0;overflow:hidden}.automation-detail-prompt[data-v-44d1a098]{gap:calc(var(--spacing,.25rem) * 2);flex-direction:column;min-height:0;display:flex}.automation-detail-prompt h3[data-v-44d1a098]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);--tw-tracking:.14em;letter-spacing:.14em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase;margin:0}.automation-detail-prompt p[data-v-44d1a098]{border-radius:var(--radius-lg,.5rem);background-color:var(--color-zinc-50,oklch(98.5% 0 none));padding:calc(var(--spacing,.25rem) * 3);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 6);line-height:calc(var(--spacing,.25rem) * 6);white-space:pre-wrap;color:var(--color-zinc-800,oklch(27.4% .006 286.033));margin:0}.automations-empty[data-v-44d1a098]{min-height:calc(var(--spacing,.25rem) * 72);width:100%;max-width:var(--container-xl,36rem);justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 2);text-align:center;color:var(--color-zinc-500,oklch(55.2% .016 285.938));flex-direction:column;flex:1;margin-inline:auto;display:flex}.automations-empty-icon[data-v-44d1a098]{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);color:var(--color-zinc-400,oklch(70.5% .015 286.067))}.automations-empty p[data-v-44d1a098]{font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-800,oklch(27.4% .006 286.033));margin:0}.automations-empty span[data-v-44d1a098]{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-leading{syntax:"*";inherits:false}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.esm-Cxn_LBGD.js","assets/index.esm-Bx2Y2PLG.js","assets/index.esm-DYMAm9mq.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as rt,o as a,a as l,n as K,b as s,t as i,F as O,u as n,e as u,w as Be,g as je,Y as ua,r as z,j as ct,k as w,_ as ut,l as Te,c as He,I as da,T as it,q as d,E as os,m as ds,M as ps,f as nt,Z as Ye,$ as Je,z as is,y as pa,v as va,a0 as ya,a1 as ha,a2 as ma,p as ga,a3 as fa,i as ka,a4 as ba,a5 as _a,a6 as wa,a7 as Ca,a8 as Sa,a9 as $a,aa as Pa,ab as Aa,ac as Ia,ad as La,ae as Ea,af as Ta,ag as Ua,ah as Na,ai as Ma,aj as Fa,ak as Da,al as Oa,am as Ra,an as xa,ao as Ga,ap as Ba,aq as ns,ar as ja}from"./index-BrpaGwQT.js";import{s as Ha}from"./sanitizeHtml-LuNwludj.js";const za=[[/(gmail|google calendar|google docs|google sheets|google drive|github|slack|notion|linear|outlook|supabase)/i,140],[/(email|calendar|document|sheet|drive|repo|issue|message|project|database|crm|deploy)/i,50]];function vs(v){return v.trim().toLowerCase()}function Ka(v,R){return R.reduce((g,[P,S])=>g+(P.test(v)?S:0),0)}function rs(v){return v.activeCount*1e3+(v.isNoAuth?300:0)+v.toolsCount*3+v.triggersCount*4+Ka(`${v.name} ${v.slug} ${v.description}`,za)}function Va(v,R){const g=vs(R);if(!g)return 0;const P=v.name.toLowerCase(),S=v.slug.toLowerCase();return P===g||S===g?1e6:P.replace(/\s+/gu,"")===g.replace(/\s+/gu,"")?9e5:P.startsWith(g)||S.startsWith(g)?8e5:P.includes(g)||S.includes(g)?7e5:0}function Ge(v){return v.activeCount>0?0:v.totalConnections>0?1:v.isNoAuth?2:3}function qa(v,R,g=""){const P=vs(g),S=L=>Va(L,P);return R==="name"?[...v].sort((L,E)=>S(E)-S(L)||Ge(L)-Ge(E)||L.name.localeCompare(E.name)):R==="date"?[...v].sort((L,E)=>S(E)-S(L)||Ge(L)-Ge(E)||L.name.localeCompare(E.name)):[...v].sort((L,E)=>S(E)-S(L)||Ge(L)-Ge(E)||rs(E)-rs(L)||L.name.localeCompare(E.name))}const Wa={class:"skill-card-top"},Qa=["src","alt"],Ya={key:1,class:"skill-card-avatar-fallback"},Ja={class:"skill-card-info"},Za={class:"skill-card-header"},Xa={class:"skill-card-name"},el={key:0,class:"skill-card-badge-disabled"},tl={key:1,class:"skill-card-badge"},sl={key:0,class:"skill-card-owner"},al=["title"],ll={key:0,class:"skill-card-desc"},ol={key:1,class:"skill-card-meta-row"},il=rt({__name:"SkillCard",props:{skill:{},showStatusBadge:{type:Boolean,default:!0},showBrowseAction:{type:Boolean,default:!0},showOwner:{type:Boolean,default:!0}},emits:["select"],setup(v){const R=v,{t:g}=ct(),P=w(()=>R.showStatusBadge!==!1),S=w(()=>R.showBrowseAction!==!1),L=w(()=>R.showOwner!==!1),E=w(()=>{const r=R.skill.path;return r?r.endsWith("/SKILL.md")?r.slice(0,-9):r:""});function F(){const r=E.value;r&&window.open(`/codex-local-browse${encodeURI(r)}`,"_blank","noopener,noreferrer")}const U=w(()=>{const r=R.skill.publishedAt;if(!r)return"";const B=new Date(r),W=Date.now()-r;return W<36e5?`${Math.floor(W/6e4)}${g("ago")}`:W<864e5?`${Math.floor(W/36e5)}${g("ago")}`:W<2592e6?`${Math.floor(W/864e5)}${g("ago")}`:B.toLocaleDateString("en-US",{month:"short",day:"numeric"})}),x=w(()=>{const r=[];return R.skill.installCountLabel&&r.push(R.skill.installCountLabel),U.value&&r.push(U.value),r});function V(r){const B=r.target;B.style.display="none"}return(r,B)=>(a(),l("button",{class:K(["skill-card",{"is-disabled":v.skill.installed&&v.skill.enabled===!1}]),type:"button",onClick:B[0]||(B[0]=q=>r.$emit("select",v.skill))},[s("div",Wa,[v.skill.avatarUrl?(a(),l("img",{key:0,class:"skill-card-avatar",src:v.skill.avatarUrl,alt:v.skill.owner,loading:"lazy",onError:V},null,40,Qa)):(a(),l("div",Ya,i(v.skill.owner.charAt(0)),1)),s("div",Ja,[s("div",Za,[s("span",Xa,i(v.skill.displayName||v.skill.name),1),P.value?(a(),l(O,{key:0},[v.skill.installed&&v.skill.enabled===!1?(a(),l("span",el,i(n(g)("Disabled")),1)):v.skill.installed?(a(),l("span",tl,i(n(g)("Installed")),1)):u("",!0)],64)):u("",!0)]),L.value?(a(),l("span",sl,i(v.skill.owner),1)):u("",!0)]),S.value&&v.skill.installed&&E.value?(a(),l("button",{key:2,class:"skill-card-browse",type:"button",title:n(g)("Browse files"),onClick:Be(F,["stop"])},[je(ua,{class:"skill-card-browse-icon"})],8,al)):u("",!0)]),v.skill.description?(a(),l("p",ll,i(v.skill.description),1)):u("",!0),x.value.length>0?(a(),l("div",ol,[(a(!0),l(O,null,z(x.value,q=>(a(),l("span",{key:q,class:"skill-card-meta"},i(q),1))),128))])):u("",!0)],2))}}),cs=ut(il,[["__scopeId","data-v-2dc2f3b0"]]),nl={class:"sdm-panel"},rl={class:"sdm-header"},cl={class:"sdm-title-area"},ul=["src","alt"],dl={class:"sdm-title-col"},pl={class:"sdm-title-row"},vl={class:"sdm-title"},yl={key:0,class:"sdm-badge-disabled"},hl={class:"sdm-owner"},ml=["aria-label"],gl={class:"sdm-body"},fl={key:0,class:"sdm-desc"},kl={key:1,class:"sdm-readme-loading"},bl=["innerHTML"],_l=["href"],wl={class:"sdm-footer"},Cl={class:"sdm-footer-actions"},Sl=["disabled"],$l=["disabled"],Pl=["disabled"],Al=["disabled"],Il=rt({__name:"SkillDetailModal",props:{skill:{},visible:{type:Boolean},isInstalling:{type:Boolean},isUninstalling:{type:Boolean},isTrying:{type:Boolean}},emits:["close","install","uninstall","toggle-enabled","try"],setup(v,{emit:R}){const g=v,P=R,S=d(null),L=d(""),E=d(""),F=d(!1),{t:U}=ct(),x=w(()=>S.value??g.skill.enabled??!0),V=w(()=>g.isInstalling===!0||g.isUninstalling===!0),r=w(()=>L.value||g.skill.description),B=w(()=>{const _=g.skill.path;return _?_.endsWith("/SKILL.md")?_.slice(0,-9):_:""}),q=w(()=>{const _=E.value;if(!_)return"";const N=_.replace(/^---[\s\S]*?---\s*/,"");return Ha(W(N))});function W(_){return _.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/^### (.+)$/gm,"<h4>$1</h4>").replace(/^## (.+)$/gm,"<h3>$1</h3>").replace(/^# (.+)$/gm,"<h2>$1</h2>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/(<li>.*<\/li>\n?)+/g,"<ul>$&</ul>").replace(/\n{2,}/g,"<br/><br/>").replace(/\n/g,"<br/>")}async function le(){if(!(!g.skill.owner||!g.skill.name)){F.value=!0,L.value="",E.value="";try{const _=new URLSearchParams({owner:g.skill.owner,name:g.skill.name});g.skill.installed&&_.set("installed","true"),g.skill.path&&_.set("path",g.skill.path);const N=await fetch(`/codex-api/skills-hub/readme?${_}`);if(!N.ok)return;const j=await N.json();E.value=j.content??"",L.value=j.description??""}catch{}finally{F.value=!1}}}Te(()=>g.visible,_=>{_&&(S.value=null,L.value="",E.value="",le())});function I(){P("install",g.skill)}function f(){P("uninstall",g.skill)}function b(){const _=!x.value;S.value=_,P("toggle-enabled",g.skill,_)}function m(){g.isTrying||P("try",g.skill)}function Q(){const _=B.value;_&&window.open(`/codex-local-browse${encodeURI(_)}`,"_blank","noopener,noreferrer")}return(_,N)=>(a(),He(it,{to:"body"},[v.visible?(a(),l("div",{key:0,class:"sdm-overlay",onClick:N[1]||(N[1]=Be(j=>_.$emit("close"),["self"]))},[s("div",nl,[s("div",rl,[s("div",cl,[v.skill.avatarUrl?(a(),l("img",{key:0,class:"sdm-avatar",src:v.skill.avatarUrl,alt:v.skill.owner,loading:"lazy"},null,8,ul)):u("",!0),s("div",dl,[s("div",pl,[s("h3",vl,i(v.skill.displayName||v.skill.name),1),v.skill.installed&&!x.value?(a(),l("span",yl,i(n(U)("Disabled")),1)):u("",!0)]),s("span",hl,i(v.skill.owner),1)])]),s("button",{class:"sdm-close",type:"button","aria-label":n(U)("Close"),onClick:N[0]||(N[0]=j=>_.$emit("close"))},[je(da,{class:"sdm-close-icon"})],8,ml)]),s("div",gl,[r.value?(a(),l("p",fl,i(r.value),1)):u("",!0),F.value?(a(),l("div",kl,i(n(U)("Loading skill contents...")),1)):E.value?(a(),l("div",{key:2,class:"sdm-readme",innerHTML:q.value},null,8,bl)):u("",!0),v.skill.url?(a(),l("a",{key:3,class:"sdm-link",href:v.skill.url,target:"_blank",rel:"noopener noreferrer"},i(n(U)("View on GitHub")),9,_l)):u("",!0)]),s("div",wl,[s("div",Cl,[v.skill.installed?(a(),l("button",{key:0,class:"sdm-btn sdm-btn-danger",type:"button",disabled:V.value,onClick:f},i(g.isUninstalling?n(U)("Uninstalling..."):n(U)("Uninstall")),9,Sl)):(a(),l("button",{key:1,class:"sdm-btn sdm-btn-primary",type:"button",disabled:V.value,onClick:I},i(g.isInstalling?n(U)("Installing..."):n(U)("Install")),9,$l)),v.skill.installed?(a(),l("button",{key:2,class:"sdm-btn sdm-btn-secondary",type:"button",disabled:V.value,onClick:b},i(x.value?n(U)("Disable"):n(U)("Enable")),9,Pl)):u("",!0),v.skill.installed&&x.value?(a(),l("button",{key:3,class:"sdm-btn sdm-btn-primary",type:"button",disabled:V.value||g.isTrying,onClick:m},i(g.isTrying?"Starting...":"Try it!"),9,Al)):u("",!0),v.skill.installed&&B.value?(a(),l("button",{key:4,class:"sdm-btn sdm-btn-secondary",type:"button",onClick:Q},i(n(U)("Browse files")),1)):u("",!0)])])])])):u("",!0)]))}}),Ll=ut(Il,[["__scopeId","data-v-318b9c96"]]),El={apiKey:"AIzaSyAf0CIHBZ-wEQJ8CCUUWo1Wl9P7typ_ZPI",authDomain:"gptcall-416910.firebaseapp.com",projectId:"gptcall-416910",storageBucket:"gptcall-416910.appspot.com",messagingSenderId:"99275526699",appId:"1:99275526699:web:3b623e1e2996108b52106e"};let ft=null;function Tl(){return ft||(ft=Promise.all([os(()=>import("./index.esm-Cxn_LBGD.js"),__vite__mapDeps([0,1])),os(()=>import("./index.esm-DYMAm9mq.js"),__vite__mapDeps([2,1]))])),ft}function Ul(v){const R=d(null),g=d(""),P=d(""),S=d(""),L=d({loggedIn:!1,githubUsername:"",repoOwner:"",repoName:"",configured:!1,startup:{inProgress:!1,mode:"idle",branch:"main",lastAction:"not-started",lastRunAtIso:"",lastSuccessAtIso:"",lastError:""}}),E=w(()=>S.value==="pull"),F=w(()=>S.value==="push"),U=w(()=>S.value==="startup-sync"),x=w(()=>S.value!=="");async function V(){try{const f=await fetch("/codex-api/skills-sync/status");if(!f.ok)return;const b=await f.json();b.data&&(L.value=b.data)}catch{}}async function r(){try{const f=await fetch("/codex-api/skills-sync/github/start-login",{method:"POST"}),b=await f.json();if(!f.ok||!b.data)throw new Error("Failed to start GitHub login");R.value=b.data;const m=30,Q=Math.max((b.data.interval??5)*1e3,3e3);let _=!1;for(let N=0;N<m;N++){await new Promise(te=>setTimeout(te,Q));const j=await fetch("/codex-api/skills-sync/github/complete-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:b.data.device_code})}),Y=await j.json();if(!j.ok)throw new Error(Y.error||"Failed to complete GitHub login");if(Y.ok){_=!0;break}if(!Y.pending)throw new Error(Y.error||"Failed to complete GitHub login")}if(!_)throw new Error("GitHub login timed out. Please retry.");R.value=null,await V(),v.showToast("GitHub login successful")}catch(f){v.showToast(f instanceof Error?f.message:"Failed GitHub login","error")}}async function B(){try{const[f,b]=await Tl(),{getApp:m,getApps:Q,initializeApp:_}=f,{getAuth:N,GithubAuthProvider:j,signInWithPopup:Y}=b,te=Q().length>0?m():_(El),se=N(te),X=new j;X.addScope("repo");const oe=await Y(se,X),ne=j.credentialFromResult(oe),re=(ne==null?void 0:ne.accessToken)??"";if(!re)throw new Error("GitHub access token missing from Firebase login");const ee=await fetch("/codex-api/skills-sync/github/token-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:re})}),J=await ee.json();if(!ee.ok||!J.ok)throw new Error(J.error||"Failed to login with GitHub token");await V(),v.showToast("GitHub login successful")}catch(f){const b=f instanceof Error?f.message:"Failed Firebase GitHub login";v.showToast(b,"error")}}async function q(){P.value="",g.value="pull-started",S.value="pull";try{const f=await fetch("/codex-api/skills-sync/pull",{method:"POST"}),b=await f.json();if(!f.ok||!b.ok)throw new Error(b.error||"Failed to pull synced skills");await v.onPulled(),g.value="pull-success",v.showToast(L.value.loggedIn?"Pulled skills from private sync repo":"Pulled skills from upstream repo")}catch(f){const b=f instanceof Error?f.message:"Failed to pull sync";P.value=b,g.value="pull-failed",v.showToast(b,"error")}finally{S.value=""}}async function W(){P.value="",g.value="push-started",S.value="push";try{const f=await fetch("/codex-api/skills-sync/push",{method:"POST"}),b=await f.json();if(!f.ok||!b.ok)throw new Error(b.error||"Failed to push synced skills");g.value="push-success",v.showToast("Pushed skills to private sync repo")}catch(f){const b=f instanceof Error?f.message:"Failed to push sync";P.value=b,g.value="push-failed",v.showToast(b,"error")}finally{S.value=""}}async function le(){P.value="",g.value="startup-sync-started",S.value="startup-sync";try{const f=await fetch("/codex-api/skills-sync/startup-sync",{method:"POST"}),b=await f.json();if(!f.ok||!b.ok)throw new Error(b.error||"Failed to run startup sync");await v.onPulled(),await V(),g.value="startup-sync-success",v.showToast("Startup sync completed")}catch(f){const b=f instanceof Error?f.message:"Failed startup sync";P.value=b,g.value="startup-sync-failed",v.showToast(b,"error")}finally{S.value=""}}async function I(){try{const f=await fetch("/codex-api/skills-sync/github/logout",{method:"POST"}),b=await f.json();if(!f.ok||!b.ok)throw new Error(b.error||"Failed to logout GitHub");await V(),v.showToast("Logged out from GitHub")}catch(f){v.showToast(f instanceof Error?f.message:"Failed to logout GitHub","error")}}return{deviceLogin:R,isPullInFlight:E,isPushInFlight:F,isStartupSyncInFlight:U,isSyncActionInFlight:x,loadSyncStatus:V,logoutGithub:I,pullSkillsSync:q,pushSkillsSync:W,startupSkillsSync:le,startGithubFirebaseLogin:B,startGithubLogin:r,syncActionError:P,syncActionStatus:g,syncStatus:L}}const Nl={class:"skills-hub"},Ml={class:"skills-hub-header"},Fl={class:"skills-hub-title"},Dl={class:"skills-hub-subtitle"},Ol={class:"skills-sync-panel"},Rl={class:"skills-sync-header"},xl=["href"],Gl={key:1,class:"skills-sync-badge"},Bl={key:2,class:"skills-sync-badge"},jl={class:"skills-sync-meta"},Hl={key:0,class:"skills-sync-error"},zl=["href"],Kl={key:1,class:"skills-sync-meta"},Vl={key:2,class:"skills-sync-error"},ql=["href"],Wl={key:3,class:"skills-sync-device"},Ql=["href"],Yl={class:"skills-sync-actions"},Jl=["disabled"],Zl=["disabled"],Xl=["disabled"],eo=["disabled"],to={class:"skills-search-panel"},so={class:"skills-search-header"},ao={class:"skills-search-copy"},lo={class:"skills-directory-link",href:"https://skills.anyclaw.store/",target:"_blank",rel:"noopener noreferrer"},oo=["placeholder","aria-label"],io=["disabled"],no={key:0,class:"skills-hub-error"},ro=["href"],co={key:1,class:"skills-hub-section"},uo={class:"skills-hub-section-title"},po={key:0,class:"skills-hub-grid"},vo={key:2,class:"skills-hub-section"},yo={class:"skills-hub-section-title"},ho={key:0,class:"skills-hub-grid"},mo={class:"skills-hub-section"},go={key:0,class:"skills-hub-loading"},fo={key:1,class:"skills-hub-error"},ko=["href"],bo={key:2,class:"skills-hub-empty"},_o=rt({__name:"SkillsHub",props:{tryInFlightKey:{}},emits:["skills-changed","try-item"],setup(v,{emit:R}){const g={name:"",owner:"",description:"",url:"",installed:!1},P=d([]),S=d([]),L=d(!1),E=d(!1),F=d(""),U=d(""),x=d(""),V=d(!0),r=d(!0),B=d(!1),q=d(g),W=d(null),le=d(""),I=d(!1),f=d(!1);let b=null;ds(()=>{b&&clearTimeout(b)});const{t:m}=ct(),{buildFeedbackMailto:Q,feedbackMailtoBase:_,recordVisibleFailure:N}=va(),j=_(),Y=v,te=R,se=w(()=>{var y;return((y=W.value)==null?void 0:y.type)==="error"?"skills-hub-toast-error":"skills-hub-toast-success"}),X=w(()=>`${q.value.owner}/${q.value.name}`),oe=w(()=>I.value&&le.value===X.value),ne=w(()=>f.value&&le.value===X.value),re=w(()=>{if(!D.value.configured)return"";const y=D.value.repoOwner.trim(),p=D.value.repoName.trim();return!y||!p?"":`https://github.com/${encodeURIComponent(y)}/${encodeURIComponent(p)}`}),ee=w(()=>P.value);function J(y,p="success"){W.value={text:y,type:p},b&&clearTimeout(b),b=setTimeout(()=>{W.value=null},3e3)}function fe(y,p){N(p);const h=y.currentTarget;h instanceof HTMLAnchorElement&&(h.href=Q())}function de(y){if(P.value=y.installed??[],S.value.length>0){const p=new Map(P.value.map(h=>[h.name,h]));S.value=S.value.map(h=>{const G=p.get(h.name);return G?Ue(h,G):h})}}function Ue(y,p){return{...y,installed:!0,path:p.path,enabled:p.enabled}}function ze(y,p){return{...y,installed:!0,source:p.source,publishedAt:p.publishedAt}}async function pe(){L.value=!0,F.value="";try{const y=await fetch("/codex-api/skills-hub");if(!y.ok)throw new Error(`HTTP ${y.status}`);const p=await y.json();de(p)}catch(y){F.value=y instanceof Error?y.message:m("Failed to load skills")}finally{L.value=!1}}function be(y){const p=y.installed?P.value.find(h=>h.name===y.name):void 0;q.value=p?ze(p,y):y,B.value=!0}async function Ne(){const y=U.value.trim();if(!(y.length<2)){E.value=!0,x.value="";try{const p=new URLSearchParams({q:y}),h=await fetch(`/codex-api/skills-hub/search?${p}`),G=await h.json();if(!h.ok)throw new Error(G.error||`HTTP ${h.status}`);const ce=new Map(P.value.map(ue=>[ue.name,ue]));S.value=(G.results??[]).map(ue=>{const ae=ce.get(ue.name);return ae?Ue(ue,ae):ue}),r.value=!0,S.value.length===0&&J(m("No matching skills found."),"error")}catch(p){x.value=p instanceof Error?p.message:m("Failed to search skills")}finally{E.value=!1}}}async function Me(y){le.value=`${y.owner}/${y.name}`,I.value=!0;try{const h=await(await fetch("/codex-api/skills-hub/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:y.owner,name:y.name,source:y.source})})).json();if(!h.ok)throw new Error(h.error||m("Install failed"));if(!h.path)throw new Error(m("Install completed but no local skill path was returned"));await pe();const G=P.value.find(ce=>ce.name===y.name);if(!(G!=null&&G.path))throw new Error(m("Install completed but the local skill was not found after refresh"));q.value=ze(G,y),J(`${y.displayName||y.name} ${m("skill installed")}`),B.value=!1,te("skills-changed")}catch(p){J(p instanceof Error?p.message:m("Failed to install skill"),"error")}finally{I.value=!1}}async function Fe(y){le.value=`${y.owner}/${y.name}`,f.value=!0;try{const h=await(await fetch("/codex-api/skills-hub/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:y.name,path:y.path})})).json();if(!h.ok)throw new Error(h.error||m("Uninstall failed"));P.value=P.value.filter(G=>G.name!==y.name),J(`${y.displayName||y.name} ${m("skill uninstalled")}`),B.value=!1,te("skills-changed")}catch(p){J(p instanceof Error?p.message:m("Failed to uninstall skill"),"error")}finally{f.value=!1}}async function De(y,p){try{if(!(await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"skills/config/write",params:{path:y.path,enabled:p}})})).ok)throw new Error(m("Failed to update skill"));await fetch("/codex-api/skills-sync/push",{method:"POST"}),J(`${y.displayName||y.name} ${m("skill")} ${m(p?"enabled":"disabled")}`),await pe()}catch(h){J(h instanceof Error?h.message:m("Failed to update skill"),"error")}}function C(y){!y.installed||y.enabled===!1||Y.tryInFlightKey||(te("try-item",{kind:"skill",name:y.name,displayName:y.displayName||y.name,skillPath:y.path}),B.value=!1)}function M(y){return`skill:${y.name}:${y.path??""}`}const{deviceLogin:_e,isPullInFlight:Ke,isPushInFlight:Oe,isStartupSyncInFlight:$,isSyncActionInFlight:ve,loadSyncStatus:Ve,logoutGithub:we,pullSkillsSync:Ce,pushSkillsSync:Se,startupSkillsSync:Z,startGithubFirebaseLogin:Re,startGithubLogin:ye,syncActionError:he,syncActionStatus:$e,syncStatus:D}=Ul({showToast:J,onPulled:async()=>{await pe(),te("skills-changed")}}),Pe=[w(()=>D.value.startup.lastError),he,x,F];return ps(()=>{pe(),Ve()}),Te(Pe,(y,p)=>{y.forEach((h,G)=>{if(h===p[G])return;const ce=h.trim();ce&&N(ce)})}),(y,p)=>(a(),l("div",Nl,[s("div",Ml,[s("h2",Fl,i(n(m)("Skills Hub")),1),s("p",Dl,i(n(m)("Manage installed skills on this machine")),1)]),s("div",Ol,[s("div",Rl,[s("strong",null,i(n(m)("Skills Sync (GitHub)")),1),n(D).configured&&re.value?(a(),l("a",{key:0,class:"skills-sync-badge skills-sync-badge-link",href:re.value,target:"_blank",rel:"noopener noreferrer"},i(n(m)("Connected"))+": "+i(n(D).repoOwner)+"/"+i(n(D).repoName),9,xl)):n(D).loggedIn?(a(),l("span",Gl,i(n(m)("Logged in as"))+" "+i(n(D).githubUsername),1)):(a(),l("span",Bl,i(n(m)("Not connected")),1))]),s("div",jl,[s("span",null,i(n(m)("Startup"))+": "+i(n(D).startup.mode),1),s("span",null,i(n(m)("Branch"))+": "+i(n(D).startup.branch),1),s("span",null,i(n(m)("Action"))+": "+i(n(D).startup.lastAction),1)]),n(D).startup.lastError?(a(),l("div",Hl,[s("span",null,i(n(D).startup.lastError),1),s("a",{class:"skills-error-feedback",href:n(j),onClick:p[0]||(p[0]=h=>fe(h,n(D).startup.lastError))},i(n(m)("Send feedback")),9,zl)])):u("",!0),n($e)?(a(),l("div",Kl,[s("span",null,i(n(m)("Manual sync"))+": "+i(n($e)),1)])):u("",!0),n(he)?(a(),l("div",Vl,[s("span",null,i(n(he)),1),s("a",{class:"skills-error-feedback",href:n(j),onClick:p[1]||(p[1]=h=>fe(h,n(he)))},i(n(m)("Send feedback")),9,ql)])):u("",!0),n(_e)?(a(),l("div",Wl,[s("span",null,[nt(i(n(m)("Open"))+" ",1),s("a",{href:n(_e).verification_uri,target:"_blank",rel:"noreferrer"},i(n(m)("GitHub device login")),9,Ql),nt(" "+i(n(m)("and enter code:")),1)]),s("code",null,i(n(_e).user_code),1)])):u("",!0),s("div",Yl,[n(D).loggedIn?u("",!0):(a(),l("button",{key:0,class:"skills-hub-sort",type:"button",onClick:p[2]||(p[2]=(...h)=>n(Re)&&n(Re)(...h))},i(n(m)("Login with GitHub")),1)),n(D).loggedIn?u("",!0):(a(),l("button",{key:1,class:"skills-hub-sort",type:"button",onClick:p[3]||(p[3]=(...h)=>n(ye)&&n(ye)(...h))},i(n(m)("Device Login")),1)),n(D).loggedIn?(a(),l("button",{key:2,class:"skills-hub-sort",type:"button",onClick:p[4]||(p[4]=(...h)=>n(we)&&n(we)(...h)),disabled:n(ve)},i(n(m)("Logout GitHub")),9,Jl)):u("",!0),s("button",{class:"skills-hub-sort",type:"button",onClick:p[5]||(p[5]=(...h)=>n(Z)&&n(Z)(...h)),disabled:n(ve)},i(n($)?n(m)("Syncing..."):n(m)("Startup Sync")),9,Zl),s("button",{class:"skills-hub-sort",type:"button",onClick:p[6]||(p[6]=(...h)=>n(Ce)&&n(Ce)(...h)),disabled:n(ve)},i(n(Ke)?n(m)("Pulling..."):n(m)("Pull")),9,Xl),n(D).loggedIn?(a(),l("button",{key:3,class:"skills-hub-sort",type:"button",onClick:p[7]||(p[7]=(...h)=>n(Se)&&n(Se)(...h)),disabled:!n(D).configured||n(ve)},i(n(Oe)?n(m)("Pushing..."):n(m)("Push")),9,eo)):u("",!0)])]),W.value?(a(),l("div",{key:0,class:K(["skills-hub-toast",se.value])},i(W.value.text),3)):u("",!0),s("div",to,[s("div",so,[s("div",ao,[s("strong",null,i(n(m)("Find skills")),1),s("span",null,i(n(m)("Search the Skills registry with npx skills find.")),1)]),s("a",lo,i(n(m)("Skills directory")),1)]),s("form",{class:"skills-search-form",onSubmit:Be(Ne,["prevent"])},[Ye(s("input",{"onUpdate:modelValue":p[8]||(p[8]=h=>U.value=h),class:"skills-search-input",type:"search",placeholder:n(m)("Search skills..."),"aria-label":n(m)("Search skills")},null,8,oo),[[Je,U.value]]),s("button",{class:"skills-hub-sort",type:"submit",disabled:E.value||U.value.trim().length<2},i(E.value?n(m)("Searching..."):n(m)("Search")),9,io)],32),x.value?(a(),l("div",no,[s("span",null,i(x.value),1),s("a",{class:"skills-error-feedback",href:n(j),onClick:p[9]||(p[9]=h=>fe(h,x.value))},i(n(m)("Send feedback")),9,ro)])):u("",!0)]),S.value.length>0?(a(),l("div",co,[s("button",{class:"skills-hub-section-toggle",type:"button",onClick:p[10]||(p[10]=h=>r.value=!r.value)},[s("span",uo,i(n(m)("Search results ({count})",{count:S.value.length})),1),je(is,{class:K(["skills-hub-section-chevron",{"is-open":r.value}])},null,8,["class"])]),r.value?(a(),l("div",po,[(a(!0),l(O,null,z(S.value,h=>(a(),He(cs,{key:h.source||`${h.owner}/${h.name}`,skill:h,"show-browse-action":!1,onSelect:G=>be(G)},null,8,["skill","onSelect"]))),128))])):u("",!0)])):u("",!0),pa(y.$slots,"before-installed",{},void 0),ee.value.length>0?(a(),l("div",vo,[s("button",{class:"skills-hub-section-toggle",type:"button",onClick:p[11]||(p[11]=h=>V.value=!V.value)},[s("span",yo,i(n(m)("Installed skills ({count})",{count:ee.value.length})),1),je(is,{class:K(["skills-hub-section-chevron",{"is-open":V.value}])},null,8,["class"])]),V.value?(a(),l("div",ho,[(a(!0),l(O,null,z(ee.value,h=>(a(),He(cs,{key:h.name,skill:h,"show-status-badge":!1,"show-owner":!1,onSelect:G=>be(G)},null,8,["skill","onSelect"]))),128))])):u("",!0)])):u("",!0),s("div",mo,[L.value?(a(),l("div",go,i(n(m)("Loading skills...")),1)):F.value?(a(),l("div",fo,[s("span",null,i(F.value),1),s("a",{class:"skills-error-feedback",href:n(j),onClick:p[12]||(p[12]=h=>fe(h,F.value))},i(n(m)("Send feedback")),9,ko)])):P.value.length===0?(a(),l("div",bo,i(n(m)("No installed skills found.")),1)):u("",!0)]),je(Ll,{skill:q.value,visible:B.value,"is-installing":oe.value,"is-uninstalling":ne.value,"is-trying":Y.tryInFlightKey===M(q.value),onClose:p[13]||(p[13]=h=>B.value=!1),onInstall:Me,onUninstall:Fe,onToggleEnabled:De,onTry:C},null,8,["skill","visible","is-installing","is-uninstalling","is-trying"])]))}}),wo=ut(_o,[["__scopeId","data-v-25bfcbd5"]]),Co={class:"directory-hub"},So={class:"directory-header"},$o={class:"directory-title"},Po={class:"directory-subtitle"},Ao={class:"directory-header-actions"},Io=["disabled"],Lo={class:"directory-tabs",role:"tablist","aria-label":"Directory sections"},Eo=["aria-selected","onClick"],To={key:1,class:"directory-section"},Uo={class:"directory-toolbar"},No={class:"directory-sort-group",role:"group","aria-label":"Sort plugins"},Mo={key:0,class:"directory-marketplace"},Fo={class:"directory-marketplace-header"},Do=["disabled"],Oo={key:0,class:"directory-marketplace-empty"},Ro={key:1,class:"directory-marketplace-list"},xo={class:"directory-marketplace-name"},Go={key:0,class:"directory-marketplace-path"},Bo=["disabled","onClick"],jo={class:"directory-marketplace-add"},Ho=["disabled"],zo={key:1,class:"directory-empty"},Ko={key:2,class:"directory-error"},Vo={key:3,class:"directory-loading"},qo={key:4,class:"directory-empty"},Wo={key:5,class:"directory-grid"},Qo=["onClick"],Yo={class:"directory-card-top"},Jo=["src","alt"],Zo={class:"directory-card-main"},Xo={class:"directory-card-title-row"},ei={class:"directory-card-title"},ti={key:0,class:"directory-badge is-muted"},si={key:1,class:"directory-badge"},ai={class:"directory-card-meta"},li={key:0,class:"directory-card-description"},oi={class:"directory-chip-row"},ii={key:0,class:"directory-chip"},ni={key:2,class:"directory-section"},ri={class:"directory-toolbar"},ci={class:"directory-sort-group",role:"group","aria-label":"Sort apps"},ui={key:0,class:"directory-empty"},di={key:1,class:"directory-error"},pi={key:2,class:"directory-loading"},vi={key:3,class:"directory-empty"},yi={key:4,class:"directory-grid"},hi={class:"directory-card-top"},mi=["src","alt"],gi={key:1,class:"directory-card-fallback"},fi={class:"directory-card-main"},ki={class:"directory-card-title-row"},bi={class:"directory-card-title"},_i={key:0,class:"directory-badge is-muted"},wi={key:1,class:"directory-badge"},Ci={class:"directory-card-meta"},Si={key:0,class:"directory-card-description"},$i={class:"directory-chip-row"},Pi={key:0,class:"directory-chip"},Ai={class:"directory-card-actions"},Ii=["disabled","onClick"],Li=["onClick"],Ei=["disabled","onClick"],Ti={key:3,class:"directory-section"},Ui={class:"directory-toolbar"},Ni={class:"directory-sort-group",role:"group","aria-label":"Sort Composio connectors"},Mi={key:0,class:"directory-error"},Fi={key:1,class:"directory-loading"},Di={key:2,class:"directory-empty"},Oi={class:"directory-empty-copy"},Ri={class:"directory-card-actions"},xi=["disabled"],Gi={key:3,class:"composio-preview"},Bi={class:"composio-preview-hero"},ji={class:"composio-preview-actions"},Hi=["disabled"],zi={class:"composio-preview-grid"},Ki={class:"directory-card-top"},Vi={class:"directory-card-fallback composio-fallback"},qi={class:"directory-card-main"},Wi={class:"directory-card-title-row"},Qi={class:"directory-card-title"},Yi={class:"directory-card-meta"},Ji={class:"directory-card-description"},Zi={class:"directory-chip-row"},Xi={key:4,class:"directory-section composio-section"},en={class:"directory-card directory-card-wide composio-status-card"},tn={class:"directory-card-top"},sn={class:"directory-card-main"},an={class:"directory-card-title-row"},ln={class:"directory-card-title"},on={class:"directory-badge"},nn={class:"directory-card-meta"},rn={class:"directory-card-description"},cn={class:"directory-chip-row"},un={key:0,class:"directory-chip"},dn={key:1,class:"directory-chip"},pn={key:2,class:"directory-chip"},vn={class:"directory-card-actions"},yn={key:0,class:"directory-empty"},hn={key:1,class:"directory-grid"},mn={class:"directory-card-top"},gn=["src","alt"],fn={key:1,class:"directory-card-fallback composio-fallback"},kn={class:"directory-card-main"},bn={class:"directory-card-title-row"},_n={class:"directory-card-title"},wn={key:0,class:"directory-badge"},Cn={key:1,class:"directory-badge"},Sn={class:"directory-card-meta"},$n={key:0,class:"directory-card-description"},Pn={class:"directory-chip-row"},An={class:"directory-chip"},In={key:0,class:"directory-chip"},Ln={key:1,class:"directory-chip"},En={class:"directory-card-actions"},Tn=["onClick"],Un=["disabled","onClick"],Nn=["disabled","onClick"],Mn={key:2,class:"directory-section-actions"},Fn=["disabled"],Dn={key:4,class:"directory-section"},On={class:"skills-embedded-section"},Rn={class:"skills-embedded-title"},xn={key:0,class:"skills-embedded-body"},Gn={key:0,class:"directory-empty"},Bn={key:1,class:"directory-error"},jn={key:2,class:"directory-loading"},Hn={key:3,class:"directory-empty"},zn={key:4,class:"mcp-skill-grid"},Kn=["onClick"],Vn={class:"mcp-skill-card-top"},qn={class:"mcp-skill-avatar-fallback"},Wn={class:"mcp-skill-info"},Qn={class:"mcp-skill-header"},Yn={class:"mcp-skill-name"},Jn={class:"mcp-skill-meta"},Zn={key:0,class:"directory-mcp-detail"},Xn={key:0},er={class:"directory-mini-list"},tr={key:1},sr={class:"directory-mini-list"},ar={class:"directory-modal"},lr={class:"directory-modal-header"},or={class:"directory-card-top"},ir=["src","alt"],nr={key:1,class:"directory-card-fallback"},rr={class:"directory-card-main"},cr={class:"directory-modal-title"},ur={class:"directory-card-meta"},dr=["aria-label"],pr={class:"directory-modal-body"},vr={key:0,class:"directory-error"},yr={key:1,class:"directory-loading"},hr={key:0,class:"directory-detail-description"},mr={key:1,class:"directory-detail-block"},gr={class:"directory-chip-row"},fr={class:"directory-detail-grid"},kr={key:0,class:"directory-detail-block"},br={class:"directory-detail-heading"},_r={key:0,class:"directory-auth-status is-warning"},wr=["onClick"],Cr={key:1,class:"directory-detail-block"},Sr={class:"directory-detail-heading"},$r={class:"directory-mini-list"},Pr={key:2,class:"directory-detail-block"},Ar=["disabled","onClick"],Ir={key:2,class:"directory-screenshots"},Lr=["src"],Er={key:3,class:"directory-auth-panel"},Tr=["onClick"],Ur={class:"directory-modal-footer"},Nr=["disabled"],Mr=["disabled"],Fr={key:2,class:"directory-action",type:"button",disabled:""},Dr=["disabled"],Or=["disabled"],Rr={class:"directory-modal directory-modal--share"},xr={class:"directory-modal-header"},Gr={class:"directory-card-main"},Br={class:"directory-modal-title"},jr={class:"directory-card-meta"},Hr=["aria-label"],zr={class:"directory-modal-body"},Kr={key:0,class:"directory-error"},Vr={key:1,class:"directory-loading"},qr={key:0,class:"directory-empty"},Wr={key:1,class:"directory-share-list"},Qr={class:"directory-share-info"},Yr={class:"directory-share-name"},Jr=["href"],Zr=["disabled","onClick"],Xr=["disabled","onClick"],ec=["disabled"],tc={class:"directory-modal"},sc={class:"directory-modal-header"},ac={class:"directory-card-top"},lc=["src","alt"],oc={key:1,class:"directory-card-fallback composio-fallback"},ic={class:"directory-card-main"},nc={class:"directory-modal-title"},rc={class:"directory-card-meta"},cc=["aria-label"],uc={class:"directory-modal-body"},dc={key:0,class:"directory-error"},pc={key:1,class:"directory-loading"},vc={key:0,class:"directory-detail-description"},yc={class:"directory-detail-grid"},hc={class:"directory-detail-block"},mc={class:"directory-chip-row"},gc={class:"directory-chip"},fc={key:0,class:"directory-chip"},kc={key:1,class:"directory-chip"},bc={key:2,class:"directory-chip"},_c={class:"directory-detail-block"},wc={key:0,class:"directory-mini-list"},Cc={key:1},Sc={class:"directory-card-meta"},$c={key:1,class:"directory-detail-block"},Pc={class:"directory-card-meta"},Ac={class:"directory-modal-footer"},Ic=["disabled"],Lc=["disabled"],Ec="/Users/igor/.codex/skills/shared_skills/composio-cli/SKILL.md",Tc=50,us=100,Uc=rt({__name:"DirectoryHub",props:{cwd:{},threadId:{},tryInFlightKey:{}},emits:["skills-changed","try-item"],setup(v,{expose:R,emit:g}){const P=[[/^gmail$/i,3e4],[/^google calendar$/i,29500],[/^outlook( email| calendar)?$/i,29e3],[/^google drive$/i,28500],[/^google docs$/i,28e3],[/^google sheets$/i,27500],[/^dropbox$/i,27e3],[/^box$/i,26500],[/^slack$/i,26e3],[/^notion$/i,25500],[/^canva$/i,25e3],[/^figma$/i,24500],[/^github$/i,24e3],[/^trello$/i,23500],[/^asana$/i,23e3],[/^basecamp$/i,22500],[/^clickup$/i,22e3],[/^linear$/i,21500],[/^gitlab( issues)?$/i,21e3],[/^jira$/i,20500],[/^zapier$/i,2e4],[/^hubspot$/i,19500],[/^salesforce$/i,19e3],[/^netlify$/i,18500],[/^vercel$/i,18e3],[/^(spotify|youtube|netflix|hulu|disney|booking|expedia|uber|airbnb)$/i,17500]],S=[[/(email|mail|inbox|calendar|event|availability|contact|message|chat)/i,450],[/(drive|document|docs|sheet|slide|file|storage|pdf|note|page)/i,380],[/(image|design|presentation|diagram|video|audio|photo|media|music)/i,320],[/(travel|flight|hotel|restaurant|recipe|food|shopping|delivery|map|weather)/i,260],[/(learn|education|study|language|health|fitness|finance|budget)/i,220],[/(task|project|issue|repository|deploy|database|crm|sales|support)/i,120]],L=[[/(computer use|github|gitlab|linear|slack|notion|browser|web|filesystem|terminal)/i,120],[/(calendar|email|drive|docs|design|deploy|project|issue|search|database)/i,55]],E=[[/(github|gitlab|linear|slack|notion|filesystem|browser|computer|web|postgres|sqlite|database)/i,120],[/(search|drive|docs|calendar|terminal|shell|deploy|cloud|memory)/i,55]],F=v,U=g,x=ya(),V=ha(),{t:r}=ct(),B=w(()=>[{id:"plugins",label:r("Plugins"),subtitle:r("Plugins make Codex work your way.")},{id:"apps",label:r("Apps"),subtitle:r("Connect Codex to external apps and services.")},{id:"composio",label:"Composio",subtitle:r("Browse Composio connectors, auth state, and ready-to-try integrations.")},{id:"skills",label:r("Skills"),subtitle:r("MCPs first, then installed skills and GitHub sync state.")}]),q=[{name:"Gmail",slug:"gmail",initial:"G",meta:"Inbox, drafts, attachments",description:"Find emails, summarize threads, draft replies, and pull attachment context into a chat.",chips:["Email","Search","Drafts"]},{name:"Google Calendar",slug:"google-calendar",initial:"C",meta:"Events and availability",description:"Check what is next, find open time, and turn follow-ups into calendar blocks.",chips:["Events","Availability","Reminders"]},{name:"Reddit",slug:"reddit",initial:"R",meta:"Posts, comments, communities",description:"Search communities, inspect posts, and prepare natural replies before posting.",chips:["Search","Comments","Posts"]},{name:"YouTube",slug:"youtube",initial:"Y",meta:"Videos, channels, comments",description:"Look up channel details, inspect video metadata, and help manage comment workflows.",chips:["Videos","Channels","Comments"]},{name:"Google Drive",slug:"google-drive",initial:"D",meta:"Files, docs, folders",description:"Find files, read shared docs, and bring Drive context into a Codex thread.",chips:["Files","Docs","Search"]},{name:"X",slug:"x",initial:"X",meta:"Posts, replies, profiles",description:"Research public posts, draft replies, and keep social workflows reviewable.",chips:["Posts","Replies","Profiles"]}];function W(e){return e==="plugins"||e==="apps"||e==="composio"||e==="skills"}function le(){return W(x.query.tab)?x.query.tab:"skills"}const I=d(le()),f=d(new Set),b=d(!1),m=d([]),Q=d([]),_=d(null),N=d([]),j=d(null),Y=d(0),te=d([]),se=d("popular"),X=d("popular"),oe=d("popular"),ne=d(""),re=d(""),ee=d(""),J=d(!1),fe=d(!1),de=d(!1),Ue=d(!1),ze=d(!1),pe=d(!1),be=d(!0),Ne=d(""),Me=d(""),Fe=d(""),De=d(""),C=d(null),M=d(null),_e=d(!1),Ke=d(!1),Oe=d(""),$=d(null),ve=d(!1),Ve=d(!1),we=d(""),Ce=d(!1),Se=d(!1),Z=d(!1),Re=d(""),ye=d(""),he=d([]),$e=d(""),D=d(new Set),Pe=d(null),y=d(""),p=d(""),h=d(!1),G=d([]),ce=d(!1),ue=d(!1),ae=d(!1),me=d(""),Ae=d("");let qe=null,We=null;ds(()=>{qe&&clearTimeout(qe),We&&clearTimeout(We)});let dt=!1;const ys=w(()=>B.value.find(e=>e.id===I.value)??B.value[0]),kt=w(()=>!b.value||["plugin/list","plugin/read","plugin/install","plugin/uninstall"].every(e=>f.value.has(e))),Ze=w(()=>!b.value||f.value.has("app/list")),pt=w(()=>!b.value||f.value.has("mcpServerStatus/list")),bt=w(()=>f.value.has("config/mcpServer/reload")),_t=w(()=>f.value.has("mcpServer/oauth/login")),hs=w(()=>!b.value||["marketplace/add","marketplace/remove","marketplace/upgrade"].every(e=>f.value.has(e))),ms=w(()=>!b.value||["plugin/share/save","plugin/share/list","plugin/share/delete"].every(e=>f.value.has(e))),Ie=w(()=>(F.tryInFlightKey??"").length>0),wt=w(()=>{var e,t,c;return((e=M.value)==null?void 0:e.description)||((t=M.value)==null?void 0:t.summary.longDescription)||((c=M.value)==null?void 0:c.summary.description)||""}),Ct=w(()=>{var t;const e=(t=M.value)==null?void 0:t.summary;return e?[...e.screenshotUrls,...e.screenshots.map(tt)].filter(Boolean):[]}),vt=w(()=>{var c;const e=((c=M.value)==null?void 0:c.apps)??[];if(e.length===0)return!1;const t=new Set;for(const k of Q.value)t.add(k.id.trim().toLowerCase()),t.add(Tt(k.name));return e.some(k=>{const H=k.id.trim().toLowerCase(),ke=Tt(k.name),Ee=H.length>0&&t.has(H),ot=ke.length>0&&t.has(ke);return!Ee&&!ot})}),gs=w(()=>{var e,t;return((e=C.value)==null?void 0:e.installPolicy)==="NOT_AVAILABLE"||(((t=M.value)==null?void 0:t.apps.some(c=>Et(c)))??!1)}),St=w(()=>Is(Ns(Es(m.value,ne.value),se.value),se.value,ne.value)),$t=w(()=>{const e=new Map;for(const t of m.value){if(!t.marketplaceName)continue;const c=t.marketplaceName;e.has(c)||e.set(c,{name:t.marketplaceName,displayName:t.marketplaceDisplayName||t.marketplaceName,path:t.marketplacePath})}return[...e.values()].sort((t,c)=>t.displayName.localeCompare(c.displayName))}),Pt=w(()=>Ls(Ms(Ts(Q.value,re.value),X.value),X.value,re.value)),At=w(()=>qa(Us(N.value,ee.value),oe.value,ee.value)),fs=w(()=>{const e=Qe(ee.value);return e?q.filter(t=>Xe([t.name,t.slug,t.meta,t.description,...t.chips],e)):q}),yt=w(()=>Fs(te.value)),It=w(()=>j.value!==null),ks=w(()=>new Map(te.value.map(e=>[e.name,e]))),bs=w(()=>{const e=_.value;return e&&[e.email||e.defaultOrgName,e.defaultOrgId?`org ${e.defaultOrgId}`:"",e.baseUrl||""].filter(Boolean).join(" Β· ")||r("Composio CLI shares the login and connections from this machine.")});function Qe(e){return e.trim().toLowerCase()}function _s(e){return Qe(e).replace(/\s+\((synced|legacy)\)\s*$/iu,"").replace(/\s+\(.*?\)\s*$/u,"").replace(/[-_]+/gu," ").replace(/\s+plugin$/iu,"").replace(/\s+/gu," ").trim()}function Lt(...e){const t=new Set;for(const c of e){const k=_s(c);k&&(t.add(k),t.add(k.replace(/\s+/gu,"")))}return Array.from(t)}function ws(e){return!e.isAccessible&&e.installUrl.trim().length===0}function Cs(e){const t=e.id.trim();if(t){const k=Q.value.find(H=>H.id===t);if(k)return k}const c=Lt(e.name);return Q.value.find(k=>Lt(k.name).some(H=>c.includes(H)))??null}function Et(e){const t=Cs(e);return t?ws(t):e.needsAuth&&e.installUrl.trim().length===0}function Xe(e,t){const c=Qe(t);return c?e.some(k=>k==null?void 0:k.toLowerCase().includes(c)):!0}function et(e,t){return t.reduce((c,[k,H])=>c+(k.test(e)?H:0),0)}function ht(e){return e.replace(/\s+\((synced|legacy)\)\s*$/iu,"").replace(/\s+\(.*?\)\s*$/u,"").trim()}function Tt(e){return ht(e).toLowerCase()}function Ss(e){return e==="DEFAULT_OAI_CATALOG"?r("OpenAI catalog"):e==="ECOSYSTEM_DIRECTORY"?r("Ecosystem directory"):e?e.replace(/_/gu," ").toLowerCase().replace(/\b\w/gu,t=>t.toUpperCase()):""}function $s(e){return e.developer||Ss(e.distributionChannel)||r("App")}function mt(e){var t;return((t=ks.value.get(e))==null?void 0:t.authStatus)??"unknown"}function Ut(e){const t=mt(e);return r(t==="oAuth"?"Logged in":t==="bearerToken"?"Bearer token":t==="notLoggedIn"?"Login required":t==="unsupported"?"Auth unsupported":"Status unknown")}function Ps(e){const t=mt(e);return t==="oAuth"||t==="bearerToken"?"is-ok":t==="notLoggedIn"?"is-warning":"is-muted"}function As(e){return e==="oAuth"||e==="bearerToken"?"mcp-skill-badge-ok":e==="notLoggedIn"?"mcp-skill-badge-warning":"mcp-skill-badge-muted"}function Nt(e){return _t.value&&mt(e)==="notLoggedIn"}function Is(e,t,c){return t==="popular"&&Qe(c).length===0?e.slice(0,us):e}function Ls(e,t,c){if(t!=="popular"||Qe(c).length>0)return e;const k=new Set,H=[];for(const ke of e){const Ee=ht(ke.name).toLowerCase();if(!k.has(Ee)&&(k.add(Ee),H.push(ke),H.length>=us))break}return H}function Es(e,t){return e.filter(c=>Xe([c.displayName,c.name,c.description,c.developerName,c.category,c.marketplaceDisplayName,...c.capabilities],t))}function Ts(e,t){return e.filter(c=>Xe([c.name,c.description,c.developer,c.category,c.distributionChannel,...c.pluginDisplayNames],t))}function Us(e,t){return e.filter(c=>Xe([c.name,c.slug,c.description,...c.authModes,...c.connectionStatuses],t))}function Mt(e){return(e.installed?500:0)+(e.enabled?40:0)+(e.developerName.toLowerCase().includes("openai")?140:0)+(e.sourceType==="local"?80:0)+e.capabilities.length*12+et(`${e.displayName} ${e.name} ${e.description} ${e.category}`,L)}function Ft(e){const t=ht(e.name);return(e.isAccessible?1e4:0)+et(t,P)+(e.pluginDisplayNames.length>0?260:0)+(e.distributionChannel==="DEFAULT_OAI_CATALOG"?120:0)+(e.isEnabled?40:0)+(e.installUrl?20:0)+et(`${e.name} ${e.description} ${e.category} ${e.pluginDisplayNames.join(" ")}`,S)-e.catalogRank*.001}function Dt(e){return(e.authStatus==="oAuth"?180:0)+(e.authStatus==="bearerToken"?140:0)+Math.min(e.tools.length,50)*6+Math.min(e.resources.length+e.resourceTemplates.length,30)*3+et(e.name,E)}function Ns(e,t){return t==="name"?[...e].sort((c,k)=>c.displayName.localeCompare(k.displayName)):t==="date"?[...e]:[...e].sort((c,k)=>Mt(k)-Mt(c)||c.displayName.localeCompare(k.displayName))}function Ms(e,t){return t==="name"?[...e].sort((c,k)=>c.name.localeCompare(k.name)):t==="date"?[...e].sort((c,k)=>c.catalogRank-k.catalogRank):[...e].sort((c,k)=>Ft(k)-Ft(c)||c.name.localeCompare(k.name))}function Fs(e,t){return[...e].sort((c,k)=>Dt(k)-Dt(c)||c.name.localeCompare(k.name))}function T(e,t="success"){Pe.value={text:e,type:t},qe&&clearTimeout(qe),qe=setTimeout(()=>{Pe.value=null},3e3)}function tt(e){return e?e.startsWith("connectors://")?`/codex-api/connector-logo?src=${encodeURIComponent(e)}`:/^https?:\/\//i.test(e)||e.startsWith("data:")?e:e.startsWith("/")?`/codex-local-image?path=${encodeURIComponent(e)}`:"":""}function st(e){return e?e.logoUrl||tt(e.logoPath)||e.composerIconUrl||tt(e.composerIconPath):""}function Ot(e){return tt(e.logoUrlDark||e.logoUrl)}function Rt(e){return e.activeCount>0?`${e.activeCount} ${r("connected")} ${e.activeCount===1?r("account"):r("accounts")}`:e.isNoAuth?r("No auth required"):e.connectionStatuses.length>0?e.connectionStatuses.join(", "):e.authModes.join(", ")||r("Connection required")}function Ds(e){return e.isNoAuth||e.activeCount>0}function at(e){return e.isNoAuth?"":e.activeCount>0?r("Manage"):e.totalConnections>0?r("Reconnect"):r("Connect")}function Os(e){const t=e.trim().toUpperCase();return t==="ACTIVE"?r("Active"):t==="EXPIRED"?r("Expired"):t==="FAILED"?r("Failed"):t==="INITIATED"?r("Pending"):t||r("Unknown")}function Rs(e){const t=e.trim().toUpperCase();return t==="ACTIVE"?"is-ok":t==="INITIATED"?"is-warning":t==="EXPIRED"||t==="FAILED"?"is-error":"is-muted"}function xs(e){return`app:${e.id}:`}function Gs(e){Ie.value||U("try-item",{kind:"app",name:e.id,displayName:e.name})}function Bs(e){return`plugin:${e.name}:`}function xt(e){return`composio:${e}:`}function js(e){Ie.value||U("try-item",{kind:"plugin",name:e.name,displayName:e.displayName})}function Gt(e){return Ds(e)}function Hs(e,t=[]){const c=t.find(H=>H.status==="ACTIVE"&&!H.isDisabled),k=c!=null&&c.wordId?` If there are multiple accounts, prefer \`${c.wordId}\`.`:"";return`Use the Composio CLI skill with the ${e.name} connector (${e.slug}). Start by listing what it can do here, mention the current connection status, and suggest one safe command I can run now.${k}`}function Bt(e,t=[]){Ie.value||U("try-item",{kind:"composio",name:e.slug,displayName:e.name,prompt:Hs(e,t),attachedSkills:[{name:"composio-cli",path:Ec}]})}function ie(e){const t=e.trim();/^https?:\/\//i.test(t)&&window.location.assign(t)}function zs(e){const t=e.find(c=>c.needsAuth&&c.installUrl.trim().length>0);return t?(ie(t.installUrl),!0):!1}function Ks(e){return e.brandColor?{backgroundColor:e.brandColor,color:"#fff"}:{}}async function Vs(){try{f.value=new Set(await ba())}catch{f.value=new Set}finally{b.value=!0}}async function ge(){var e;if(kt.value){J.value=!0,Ne.value="";try{const t=(e=F.cwd)==null?void 0:e.trim(),[c]=await Promise.all([_a(t?[t]:void 0),Ze.value?xe():Promise.resolve()]);m.value=c}catch(t){Ne.value=t instanceof Error?t.message:"Failed to load plugins"}finally{J.value=!1}}}async function jt(){const e=y.value.trim();if(e){h.value=!0,p.value="add";try{await wa(e),y.value="",T("Marketplace added"),await ge()}catch(t){T(t instanceof Error?t.message:"Failed to add marketplace","error")}finally{h.value=!1,p.value=""}}}async function qs(e){h.value=!0,p.value=`remove:${e}`;try{await Ca(e),T("Marketplace removed"),await ge()}catch(t){T(t instanceof Error?t.message:"Failed to remove marketplace","error")}finally{h.value=!1,p.value=""}}async function Ws(){h.value=!0,p.value="upgrade";try{const e=await Sa();e.errors.length>0?T(e.errors.join("; "),"error"):T(`Upgraded ${e.upgradedRoots.length||e.selectedMarketplaces.length||"all"} marketplace${e.upgradedRoots.length+e.selectedMarketplaces.length===1?"":"s"}`),await ge()}catch(e){T(e instanceof Error?e.message:"Failed to upgrade marketplaces","error")}finally{h.value=!1,p.value=""}}async function xe(){var e;if(Ze.value){fe.value=!0,Me.value="";try{Q.value=await $a(((e=F.threadId)==null?void 0:e.trim())||void 0)}catch(t){Me.value=t instanceof Error?t.message:"Failed to load apps"}finally{fe.value=!1}}}async function Le(e=!1){if(de.value){dt=!0;return}de.value=!0,Fe.value="";try{const t=await Pa();if(_.value=t,!t.available||!t.authenticated){N.value=[],j.value=null,Y.value=0;return}const c=e?j.value:null,k=await Aa(ee.value,c,Tc);N.value=e?[...N.value,...k.data]:k.data,j.value=k.nextCursor,Y.value=k.total}catch(t){Fe.value=t instanceof Error?t.message:"Failed to load Composio connectors",N.value=[],j.value=null,Y.value=0}finally{de.value=!1,dt&&(dt=!1,Le())}}async function Qs(){!It.value||de.value||await Le(!0)}async function lt(){if(pt.value){Ue.value=!0,De.value="";try{te.value=await ns()}catch(e){De.value=e instanceof Error?e.message:"Failed to load MCP servers"}finally{Ue.value=!1}}}async function Ht(){var e;if(!(!pt.value||!((e=M.value)!=null&&e.mcpServers.length)))try{te.value=await ns()}catch{}}function zt(e=!1){I.value==="plugins"&&ge(),I.value==="apps"&&xe(),I.value==="composio"&&Le(),I.value==="skills"&&(e&&bt.value?Xt():lt())}function Ys(e){if(e==="app/list/updated"){xe();return}(e==="mcpServer/startupStatus/updated"||e==="mcpServer/oauthLogin/completed")&<()}R({refreshFromNotification:Ys});async function Js(){pe.value=!0;try{I.value==="plugins"?await ge():I.value==="apps"?await xe():I.value==="composio"?await Le():I.value==="skills"&&bt.value?await Xt():I.value==="skills"&&await lt()}finally{pe.value=!1}}async function Kt(e){C.value=e,M.value=null,Oe.value="",he.value=[],_e.value=!0,Ke.value=!0;try{M.value=await Ia(e),C.value=M.value.summary,Ze.value&&Q.value.length===0&&await xe(),await Ht()}catch(t){Oe.value=t instanceof Error?t.message:"Failed to load plugin"}finally{Ke.value=!1}}async function Vt(e){if(!_t.value)return!1;$e.value=e;try{const t=await La(e);return t.authorizationUrl?(ie(t.authorizationUrl),!0):(T(r("No login URL returned for {name}",{name:e}),"error"),!1)}catch(t){return T(t instanceof Error?t.message:r("Failed to start login for {name}",{name:e}),"error"),!1}finally{$e.value=""}}async function Zs(e){await Ht();const t=e.mcpServers.find(c=>Nt(c));t&&await Vt(t)}function gt(){_e.value=!1}function qt(){const e=C.value;return e?e.marketplacePath?`${e.marketplacePath.replace(/[\\/]+$/,"")}/${e.name}`:e.sourceUrl||"":""}async function Wt(){Ae.value="",ce.value=!0,ue.value=!0;try{G.value=await Ea()}catch(e){Ae.value=e instanceof Error?e.message:"Failed to load plugin shares"}finally{ue.value=!1}}async function Xs(){const e=qt();if(e){ae.value=!0,me.value="save";try{const t=await Ta(e);T(t.shareUrl?"Plugin shared":"Plugin shared (no URL returned)"),await Wt()}catch(t){Ae.value=t instanceof Error?t.message:"Failed to share plugin"}finally{ae.value=!1,me.value=""}}}async function ea(e){ae.value=!0,me.value=`delete:${e}`;try{await Ua(e),G.value=G.value.filter(t=>t.remotePluginId!==e),T("Share removed")}catch(t){Ae.value=t instanceof Error?t.message:"Failed to remove share"}finally{ae.value=!1,me.value=""}}async function ta(e){ae.value=!0,me.value=`checkout:${e}`;try{await Na(e),T("Plugin checked out")}catch(t){Ae.value=t instanceof Error?t.message:"Failed to checkout plugin"}finally{ae.value=!1,me.value=""}}function Qt(){ce.value=!1}async function Yt(e){ve.value=!0,Ve.value=!0,we.value="",$.value=null;try{$.value=await Ma(e)}catch(t){we.value=t instanceof Error?t.message:"Failed to load Composio connector"}finally{Ve.value=!1}}function Jt(){ve.value=!1}async function sa(e){var t;ye.value=e.slug;try{const c=await ja(e.slug);if(!c.redirectUrl){T(r("No login URL returned for {name}",{name:e.name}),"error");return}ie(c.redirectUrl),T(r("Opened {name} authorization",{name:e.name})),await Le(),ve.value&&((t=$.value)==null?void 0:t.connector.slug)===e.slug&&await Yt(e.slug)}catch(c){T(c instanceof Error?c.message:r("Failed to connect {name}",{name:e.name}),"error")}finally{ye.value=""}}async function Zt(e){var t;if(e.activeCount>0&&((t=_.value)!=null&&t.webUrl)){ie(_.value.webUrl);return}await sa(e)}async function aa(){Se.value=!0;const e=window.open("about:blank","_blank");e&&(e.opener=null);try{const t=await Fa();t.loginUrl&&e?e.location.href=t.loginUrl:t.loginUrl?ie(t.loginUrl):e==null||e.close(),T("Composio CLI login started")}catch(t){e==null||e.close(),T(t instanceof Error?t.message:"Failed to start Composio login","error")}finally{Se.value=!1}}async function la(){Ce.value=!0;try{await Da(),T("Composio CLI installed"),await Le()}catch(e){T(e instanceof Error?e.message:"Failed to install Composio CLI","error")}finally{Ce.value=!1}}async function oa(){if(C.value&&!vt.value){Z.value=!0;try{const e=await Oa(C.value);he.value=e.appsNeedingAuth,T(`${C.value.displayName} ${r("plugin installed")}`);const t=zs(e.appsNeedingAuth);await ge();const c=m.value.find(k=>{var H;return k.id===((H=C.value)==null?void 0:H.id)});c&&(await Kt(c),!t&&M.value&&await Zs(M.value))}catch(e){T(e instanceof Error?e.message:"Failed to install plugin","error")}finally{Z.value=!1}}}async function ia(){if(C.value){Z.value=!0;try{const e=C.value.displayName;await Ra(C.value.id),T(`${e} ${r("plugin uninstalled")}`),gt(),await ge()}catch(e){T(e instanceof Error?e.message:"Failed to uninstall plugin","error")}finally{Z.value=!1}}}async function na(){if(C.value){Z.value=!0;try{const e=!C.value.enabled;await xa(C.value.id,e),C.value={...C.value,enabled:e},M.value&&(M.value={...M.value,summary:{...M.value.summary,enabled:e}}),T(`${C.value.displayName} ${r("plugin")} ${r(e?"enabled":"disabled")}`),await ge()}catch(e){T(e instanceof Error?e.message:"Failed to update plugin","error")}finally{Z.value=!1}}}async function ra(e){Re.value=e.id;try{const t=!e.isEnabled;await Ga(e.id,t),Q.value=Q.value.map(c=>c.id===e.id?{...c,isEnabled:t}:c),T(`${e.name} ${r("app")} ${r(t?"enabled":"disabled")}`)}catch(t){T(t instanceof Error?t.message:"Failed to update app","error")}finally{Re.value=""}}async function Xt(){ze.value=!0;try{await Ba(),await lt(),T("MCP servers reloaded")}catch(e){T(e instanceof Error?e.message:"Failed to reload MCP servers","error")}finally{ze.value=!1}}function ca(e){const t=new Set(D.value);t.has(e)?t.delete(e):t.add(e),D.value=t}return Te(I,e=>{x.name==="skills"&&x.query.tab!==e&&V.replace({name:"skills",query:{...x.query,tab:e}}),zt()}),Te(()=>x.query.tab,()=>{if(x.name!=="skills")return;const e=le();I.value!==e&&(I.value=e)}),Te(ee,()=>{I.value==="composio"&&(N.value=[],j.value=null,Y.value=0,We&&clearTimeout(We),We=setTimeout(()=>{Le()},250))}),Te(()=>F.cwd,()=>{I.value==="plugins"&&ge()}),Te(()=>F.threadId,()=>{(I.value==="apps"||I.value==="plugins")&&xe()}),ps(async()=>{await Vs(),zt()}),(e,t)=>{var c,k,H,ke,Ee,ot,es,ts,ss,as,ls;return a(),l("div",Co,[s("div",So,[s("div",null,[s("h2",$o,i(n(r)("Skills"))+" & "+i(n(r)("Apps")),1),s("p",Po,i(ys.value.subtitle),1)]),s("div",Ao,[s("button",{class:"directory-refresh",type:"button",disabled:pe.value,onClick:Js},i(pe.value?"Refreshing...":"Refresh"),9,Io)])]),s("div",Lo,[(a(!0),l(O,null,z(B.value,o=>(a(),l("button",{key:o.id,class:K(["directory-tab",{"is-active":I.value===o.id}]),type:"button",role:"tab","aria-selected":I.value===o.id,onClick:A=>I.value=o.id},i(o.label),11,Eo))),128))]),Pe.value?(a(),l("div",{key:0,class:K(["directory-toast",{"is-error":Pe.value.type==="error"}])},i(Pe.value.text),3)):u("",!0),I.value==="plugins"?(a(),l("section",To,[s("div",Uo,[Ye(s("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>ne.value=o),class:"directory-search",type:"search",placeholder:"Search plugins...","aria-label":"Search plugins"},null,512),[[Je,ne.value]]),s("div",No,[s("button",{class:K(["directory-sort-button",{"is-active":se.value==="popular"}]),type:"button",onClick:t[1]||(t[1]=o=>se.value="popular")}," Popular ",2),s("button",{class:K(["directory-sort-button",{"is-active":se.value==="name"}]),type:"button",onClick:t[2]||(t[2]=o=>se.value="name")},i(n(r)("A-Z")),3),s("button",{class:K(["directory-sort-button",{"is-active":se.value==="date"}]),type:"button",onClick:t[3]||(t[3]=o=>se.value="date")}," Date ",2)])]),hs.value?(a(),l("div",Mo,[s("div",Fo,[t[22]||(t[22]=s("span",{class:"directory-marketplace-title"},"Marketplaces",-1)),s("button",{class:"directory-marketplace-upgrade",type:"button",disabled:h.value,onClick:Ws},i(p.value==="upgrade"?"Upgrading...":"Upgrade all"),9,Do)]),$t.value.length===0?(a(),l("div",Oo,"No marketplaces configured.")):(a(),l("div",Ro,[(a(!0),l(O,null,z($t.value,o=>(a(),l("div",{key:o.name,class:"directory-marketplace-row"},[s("span",xo,i(o.displayName),1),o.path?(a(),l("code",Go,i(o.path),1)):u("",!0),s("button",{class:"directory-marketplace-remove",type:"button",disabled:h.value,onClick:A=>qs(o.name)},i(p.value===`remove:${o.name}`?n(r)("Removing..."):n(r)("Remove")),9,Bo)]))),128))])),s("div",jo,[Ye(s("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>y.value=o),class:"directory-marketplace-source",type:"url",placeholder:"Git URL to add a marketplace","aria-label":"Marketplace Git URL",onKeydown:ma(jt,["enter"])},null,544),[[Je,y.value]]),s("button",{class:"directory-marketplace-add-button",type:"button",disabled:h.value||!y.value.trim(),onClick:jt},i(p.value==="add"?"Adding...":"Add"),9,Ho)])])):u("",!0),kt.value?Ne.value?(a(),l("div",Ko,i(Ne.value),1)):J.value?(a(),l("div",Vo,"Loading plugins...")):St.value.length===0?(a(),l("div",qo,"No plugins found.")):(a(),l("div",Wo,[(a(!0),l(O,null,z(St.value,o=>(a(),l("button",{key:o.id,class:K(["directory-card",{"is-disabled":o.installed&&!o.enabled}]),type:"button",onClick:A=>Kt(o)},[s("div",Yo,[st(o)?(a(),l("img",{key:0,class:"directory-card-icon",src:st(o),alt:o.displayName,loading:"lazy"},null,8,Jo)):(a(),l("div",{key:1,class:"directory-card-fallback",style:ga(Ks(o))},i(o.displayName.charAt(0)),5)),s("div",Zo,[s("div",Xo,[s("span",ei,i(o.displayName),1),o.installed&&!o.enabled?(a(),l("span",ti,i(n(r)("Disabled")),1)):o.installed?(a(),l("span",si,i(n(r)("Installed")),1)):u("",!0)]),s("span",ai,i(o.developerName||o.marketplaceDisplayName||o.marketplaceName||n(r)("Plugin")),1)])]),o.description?(a(),l("p",li,i(o.description),1)):u("",!0),s("div",oi,[o.category?(a(),l("span",ii,i(o.category),1)):u("",!0),(a(!0),l(O,null,z(o.capabilities.slice(0,2),A=>(a(),l("span",{key:A,class:"directory-chip"},i(A),1))),128))])],10,Qo))),128))])):(a(),l("div",zo," Plugin APIs unavailable in this Codex CLI. Update Codex CLI to use plugin catalog features. "))])):I.value==="apps"?(a(),l("section",ni,[s("div",ri,[Ye(s("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>re.value=o),class:"directory-search",type:"search",placeholder:"Search apps...","aria-label":"Search apps"},null,512),[[Je,re.value]]),s("div",ci,[s("button",{class:K(["directory-sort-button",{"is-active":X.value==="popular"}]),type:"button",onClick:t[6]||(t[6]=o=>X.value="popular")}," Popular ",2),s("button",{class:K(["directory-sort-button",{"is-active":X.value==="name"}]),type:"button",onClick:t[7]||(t[7]=o=>X.value="name")},i(n(r)("A-Z")),3),s("button",{class:K(["directory-sort-button",{"is-active":X.value==="date"}]),type:"button",onClick:t[8]||(t[8]=o=>X.value="date")}," Date ",2)])]),Ze.value?Me.value?(a(),l("div",di,i(Me.value),1)):fe.value?(a(),l("div",pi,"Loading apps...")):Pt.value.length===0?(a(),l("div",vi,"No apps found.")):(a(),l("div",yi,[(a(!0),l(O,null,z(Pt.value,o=>(a(),l("article",{key:o.id,class:"directory-card"},[s("div",hi,[Ot(o)?(a(),l("img",{key:0,class:"directory-card-icon",src:Ot(o),alt:o.name,loading:"lazy"},null,8,mi)):(a(),l("div",gi,i(o.name.charAt(0)),1)),s("div",fi,[s("div",ki,[s("span",bi,i(o.name),1),o.isEnabled?o.isAccessible?(a(),l("span",wi,i(n(r)("Connected")),1)):u("",!0):(a(),l("span",_i,i(n(r)("Disabled")),1))]),s("span",Ci,i($s(o)),1)])]),o.description?(a(),l("p",Si,i(o.description),1)):u("",!0),s("div",$i,[o.category?(a(),l("span",Pi,i(o.category),1)):u("",!0),(a(!0),l(O,null,z(o.pluginDisplayNames.slice(0,2),A=>(a(),l("span",{key:A,class:"directory-chip"},i(A),1))),128))]),s("div",Ai,[s("button",{class:"directory-action",type:"button",disabled:Re.value===o.id,onClick:A=>ra(o)},i(o.isEnabled?"Disable":"Enable"),9,Ii),o.installUrl?(a(),l("button",{key:0,class:"directory-action-link",type:"button",onClick:A=>ie(o.installUrl)},i(o.isAccessible?"Manage":"Login"),9,Li)):u("",!0),o.isAccessible&&o.isEnabled?(a(),l("button",{key:1,class:"directory-action",type:"button",disabled:Ie.value,onClick:A=>Gs(o)},i(F.tryInFlightKey===xs(o)?"Starting...":"Try it!"),9,Ei)):u("",!0)])]))),128))])):(a(),l("div",ui," Apps APIs unavailable in this Codex CLI. Update Codex CLI to manage apps. "))])):I.value==="composio"?(a(),l("section",Ti,[s("div",Ui,[Ye(s("input",{"onUpdate:modelValue":t[9]||(t[9]=o=>ee.value=o),class:"directory-search",type:"search",placeholder:"Search Composio connectors...","aria-label":"Search Composio connectors"},null,512),[[Je,ee.value]]),s("div",Ni,[s("button",{class:K(["directory-sort-button",{"is-active":oe.value==="popular"}]),type:"button",onClick:t[10]||(t[10]=o=>oe.value="popular")}," Popular ",2),s("button",{class:K(["directory-sort-button",{"is-active":oe.value==="name"}]),type:"button",onClick:t[11]||(t[11]=o=>oe.value="name")},i(n(r)("A-Z")),3),s("button",{class:K(["directory-sort-button",{"is-active":oe.value==="date"}]),type:"button",onClick:t[12]||(t[12]=o=>oe.value="date")}," Date ",2)])]),Fe.value?(a(),l("div",Mi,i(Fe.value),1)):de.value?(a(),l("div",Fi,"Loading Composio connectors...")):(c=_.value)!=null&&c.available?_.value.authenticated?(a(),l("div",Xi,[s("article",en,[s("div",tn,[t[26]||(t[26]=s("div",{class:"directory-card-fallback composio-fallback"},"C",-1)),s("div",sn,[s("div",an,[s("span",ln,i(n(r)("Composio workspace")),1),s("span",on,i(n(r)("Connected")),1)]),s("span",nn,i(_.value.email||_.value.defaultOrgName||n(r)("Authenticated")),1)])]),s("p",rn,i(bs.value),1),s("div",cn,[_.value.defaultOrgName?(a(),l("span",un,i(_.value.defaultOrgName),1)):u("",!0),_.value.cliVersion?(a(),l("span",dn,"CLI "+i(_.value.cliVersion),1)):u("",!0),N.value.length?(a(),l("span",pn," Showing "+i(N.value.length)+i(Y.value?` / ${Y.value}`:"")+" connectors ",1)):u("",!0)]),s("div",vn,[s("button",{class:"directory-action-link",type:"button",onClick:t[14]||(t[14]=o=>ie(_.value.webUrl))}," Open dashboard ")])]),At.value.length===0?(a(),l("div",yn,"No Composio connectors found.")):(a(),l("div",hn,[(a(!0),l(O,null,z(At.value,o=>(a(),l("article",{key:o.slug,class:"directory-card"},[s("div",mn,[o.logoUrl?(a(),l("img",{key:0,class:"directory-card-icon",src:o.logoUrl,alt:o.name,loading:"lazy"},null,8,gn)):(a(),l("div",fn,i(o.name.charAt(0)),1)),s("div",kn,[s("div",bn,[s("span",_n,i(o.name),1),o.activeCount>0?(a(),l("span",wn,i(n(r)("Connected")),1)):o.isNoAuth?(a(),l("span",Cn,i(n(r)("No auth")),1)):u("",!0)]),s("span",Sn,i(Rt(o)),1)])]),o.description?(a(),l("p",$n,i(o.description),1)):u("",!0),s("div",Pn,[s("span",An,i(o.toolsCount)+" tools",1),o.triggersCount>0?(a(),l("span",In,i(o.triggersCount)+" triggers",1)):u("",!0),o.authModes.length>0?(a(),l("span",Ln,i(o.authModes.join(", ")),1)):u("",!0)]),s("div",En,[s("button",{class:"directory-action",type:"button",onClick:A=>Yt(o.slug)}," Details ",8,Tn),at(o)?(a(),l("button",{key:0,class:"directory-action-link",type:"button",disabled:ye.value===o.slug,onClick:A=>Zt(o)},i(ye.value===o.slug?"Opening...":at(o)),9,Un)):u("",!0),Gt(o)?(a(),l("button",{key:1,class:"directory-action primary",type:"button",disabled:Ie.value,onClick:A=>Bt(o)},i(F.tryInFlightKey===xt(o.slug)?"Starting...":"Try it!"),9,Nn)):u("",!0)])]))),128))])),It.value?(a(),l("div",Mn,[s("button",{class:"directory-action",type:"button",disabled:de.value,onClick:Qs},i(de.value?"Loading...":"Load more"),9,Fn)])):u("",!0)])):(a(),l("div",Gi,[s("article",Bi,[t[24]||(t[24]=fa('<div class="composio-preview-copy" data-v-6aff237a><div class="directory-card-fallback composio-fallback" data-v-6aff237a>C</div><div data-v-6aff237a><p class="composio-preview-kicker" data-v-6aff237a>Connector catalog preview</p><h3 class="composio-preview-title" data-v-6aff237a>Connect everyday apps like Gmail, Calendar, Reddit, YouTube, and Drive.</h3><p class="composio-preview-text" data-v-6aff237a> Composio is installed locally. Login to browse the live catalog, connect your accounts, and try simple actions from this machine. </p></div></div>',1)),s("div",ji,[s("button",{class:"directory-action primary",type:"button",disabled:Se.value,onClick:aa},i(Se.value?"Opening...":"Login to Composio"),9,Hi),s("button",{class:"directory-action-link",type:"button",onClick:t[13]||(t[13]=o=>ie(_.value.webUrl||"https://dashboard.composio.dev/"))}," Open dashboard ")])]),s("div",zi,[(a(!0),l(O,null,z(fs.value,o=>(a(),l("article",{key:o.slug,class:"directory-card composio-preview-card"},[s("div",Ki,[s("div",Vi,i(o.initial),1),s("div",qi,[s("div",Wi,[s("span",Qi,i(o.name),1),t[25]||(t[25]=s("span",{class:"directory-badge is-muted"},"Preview",-1))]),s("span",Yi,i(o.meta),1)])]),s("p",Ji,i(o.description),1),s("div",Zi,[(a(!0),l(O,null,z(o.chips,A=>(a(),l("span",{key:A,class:"directory-chip"},i(A),1))),128))])]))),128))])])):(a(),l("div",Di,[s("div",Oi,[t[23]||(t[23]=s("p",{class:"directory-empty-text"},"Composio CLI is not installed in this environment.",-1)),s("div",Ri,[s("button",{class:"directory-action primary",type:"button",disabled:Ce.value,onClick:la},i(Ce.value?"Installing...":"Install Composio"),9,xi)])])]))])):I.value==="skills"?(a(),l("section",Dn,[je(wo,{"try-in-flight-key":F.tryInFlightKey,onSkillsChanged:t[16]||(t[16]=o=>U("skills-changed")),onTryItem:t[17]||(t[17]=o=>U("try-item",o))},{"before-installed":ka(()=>[s("div",On,[s("button",{class:"skills-embedded-toggle",type:"button",onClick:t[15]||(t[15]=o=>be.value=!be.value)},[s("span",Rn,"MCPs("+i(yt.value.length)+")",1),s("span",{class:K(["skills-embedded-chevron",{"is-open":be.value}])},"βΊ",2)]),be.value?(a(),l("div",xn,[pt.value?De.value?(a(),l("div",Bn,i(De.value),1)):Ue.value?(a(),l("div",jn,"Loading MCP servers...")):yt.value.length===0?(a(),l("div",Hn,"No MCP servers configured.")):(a(),l("div",zn,[(a(!0),l(O,null,z(yt.value,o=>(a(),l("article",{key:o.name},[s("button",{class:"mcp-skill-card skill-card",type:"button",onClick:A=>ca(o.name)},[s("div",Vn,[s("div",qn,i(o.name.charAt(0)),1),s("div",Wn,[s("div",Qn,[s("span",Yn,i(o.name),1),s("span",{class:K(["mcp-skill-badge",As(o.authStatus)])},i(Ut(o.name)),3)]),t[27]||(t[27]=s("span",{class:"mcp-skill-owner"},"mcp",-1))]),s("span",{class:K(["mcp-skill-chevron",{"is-open":D.value.has(o.name)}])},"βΊ",2)]),s("p",Jn,i(o.tools.length)+" tools Β· "+i(o.resources.length+o.resourceTemplates.length)+" resources",1),D.value.has(o.name)?(a(),l("div",Zn,[o.tools.length>0?(a(),l("div",Xn,[t[28]||(t[28]=s("h3",{class:"directory-mini-heading"},"Tools",-1)),s("p",er,i(o.tools.map(A=>A.title||A.name).join(", ")),1)])):u("",!0),o.resources.length>0||o.resourceTemplates.length>0?(a(),l("div",tr,[t[29]||(t[29]=s("h3",{class:"directory-mini-heading"},"Resources",-1)),s("p",sr,i([...o.resources.map(A=>A.title||A.name||A.uri),...o.resourceTemplates.map(A=>A.title||A.name||A.uriTemplate)].join(", ")),1)])):u("",!0)])):u("",!0)],8,Kn)]))),128))])):(a(),l("div",Gn," MCP status APIs unavailable in this Codex CLI. Update Codex CLI to inspect MCP servers. "))])):u("",!0)])]),_:1},8,["try-in-flight-key"])])):u("",!0),(a(),He(it,{to:"body"},[_e.value?(a(),l("div",{key:0,class:"directory-modal-overlay",onClick:Be(gt,["self"])},[s("article",ar,[s("div",lr,[s("div",or,[C.value&&st(C.value)?(a(),l("img",{key:0,class:"directory-card-icon",src:st(C.value),alt:C.value.displayName,loading:"lazy"},null,8,ir)):(a(),l("div",nr,i((k=C.value)==null?void 0:k.displayName.charAt(0)),1)),s("div",rr,[s("h3",cr,i(((H=C.value)==null?void 0:H.displayName)||n(r)("Plugin")),1),s("span",ur,i(((ke=C.value)==null?void 0:ke.developerName)||((Ee=C.value)==null?void 0:Ee.marketplaceDisplayName)||((ot=C.value)==null?void 0:ot.marketplaceName)),1)])]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close plugin detail"),onClick:gt},i(n(r)("Close")),9,dr)]),s("div",pr,[Oe.value?(a(),l("div",vr,i(Oe.value),1)):Ke.value?(a(),l("div",yr,"Loading plugin...")):M.value?(a(),l(O,{key:2},[wt.value?(a(),l("p",hr,i(wt.value),1)):u("",!0),M.value.summary.capabilities.length>0?(a(),l("div",mr,[t[30]||(t[30]=s("h4",{class:"directory-detail-heading"},"Capabilities",-1)),s("div",gr,[(a(!0),l(O,null,z(M.value.summary.capabilities,o=>(a(),l("span",{key:o,class:"directory-chip"},i(o),1))),128))])])):u("",!0),s("div",fr,[M.value.apps.length>0?(a(),l("div",kr,[s("h4",br,i(n(r)("Apps")),1),(a(!0),l(O,null,z(M.value.apps,o=>(a(),l("div",{key:o.id,class:"directory-include-row"},[s("span",null,i(o.name),1),Et(o)?(a(),l("span",_r,"GPT Plus account required")):o.installUrl?(a(),l("button",{key:1,type:"button",onClick:A=>ie(o.installUrl)},i(o.needsAuth?"Login":"Manage"),9,wr)):u("",!0)]))),128))])):u("",!0),M.value.skills.length>0?(a(),l("div",Cr,[s("h4",Sr,i(n(r)("Skills")),1),s("p",$r,i(M.value.skills.map(o=>o.displayName||o.name).join(", ")),1)])):u("",!0),M.value.mcpServers.length>0?(a(),l("div",Pr,[t[31]||(t[31]=s("h4",{class:"directory-detail-heading"},"MCP servers",-1)),(a(!0),l(O,null,z(M.value.mcpServers,o=>(a(),l("div",{key:o,class:"directory-include-row"},[s("span",null,[nt(i(o)+" ",1),s("span",{class:K(["directory-auth-status",Ps(o)])},i(Ut(o)),3)]),Nt(o)?(a(),l("button",{key:0,type:"button",disabled:$e.value===o,onClick:A=>Vt(o)},i($e.value===o?"Opening...":"Authenticate"),9,Ar)):u("",!0)]))),128))])):u("",!0)]),Ct.value.length>0?(a(),l("div",Ir,[(a(!0),l(O,null,z(Ct.value,o=>(a(),l("img",{key:o,src:o,alt:"",loading:"lazy"},null,8,Lr))),128))])):u("",!0),he.value.length>0?(a(),l("div",Er,[s("strong",null,i(n(r)("Apps needing auth")),1),(a(!0),l(O,null,z(he.value,o=>(a(),l("div",{key:o.id,class:"directory-include-row"},[s("span",null,i(o.name),1),o.installUrl?(a(),l("button",{key:0,type:"button",onClick:A=>ie(o.installUrl)},i(n(r)("Login")),9,Tr)):u("",!0)]))),128))])):u("",!0)],64)):u("",!0)]),s("div",Ur,[C.value&&C.value.installed?(a(),l("button",{key:0,class:"directory-action danger",type:"button",disabled:Z.value,onClick:ia},i(Z.value?"Uninstalling...":"Uninstall"),9,Nr)):C.value&&!gs.value?(a(),l("button",{key:1,class:"directory-action primary",type:"button",disabled:Z.value||C.value.installPolicy==="NOT_AVAILABLE"||vt.value,onClick:oa},i(vt.value?"ChatGPT Plus":Z.value?"Installing...":"Install"),9,Mr)):C.value?(a(),l("button",Fr," GPT Plus account required ")):u("",!0),C.value&&C.value.installed?(a(),l("button",{key:3,class:"directory-action",type:"button",disabled:Z.value,onClick:na},i(C.value.enabled?"Disable":"Enable"),9,Dr)):u("",!0),C.value&&C.value.installed&&C.value.enabled?(a(),l("button",{key:4,class:"directory-action primary",type:"button",disabled:Z.value||Ie.value,onClick:t[18]||(t[18]=o=>js(C.value))},i(F.tryInFlightKey===Bs(C.value)?"Starting...":"Try it!"),9,Or)):u("",!0),ms.value&&C.value&&C.value.installed?(a(),l("button",{key:5,class:"directory-action",type:"button",onClick:Wt},i(n(r)("Share")),1)):u("",!0)])])])):u("",!0)])),(a(),He(it,{to:"body"},[ce.value?(a(),l("div",{key:0,class:"directory-modal-overlay",onClick:Be(Qt,["self"])},[s("article",Rr,[s("div",xr,[s("div",Gr,[s("h3",Br,i(n(r)("Plugin shares")),1),s("span",jr,i(((es=C.value)==null?void 0:es.displayName)||n(r)("Plugin")),1)]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close plugin shares"),onClick:Qt},i(n(r)("Close")),9,Hr)]),s("div",zr,[Ae.value?(a(),l("div",Kr,i(Ae.value),1)):ue.value?(a(),l("div",Vr,"Loading shares...")):(a(),l(O,{key:2},[G.value.length===0?(a(),l("p",qr,"No shares yet. Share this plugin to make it available on other devices.")):(a(),l("div",Wr,[(a(!0),l(O,null,z(G.value,o=>(a(),l("div",{key:o.remotePluginId,class:"directory-share-row"},[s("div",Qr,[s("span",Yr,i(o.pluginName),1),o.shareUrl?(a(),l("a",{key:0,class:"directory-share-link",href:o.shareUrl,target:"_blank",rel:"noreferrer"},i(o.shareUrl),9,Jr)):u("",!0)]),s("button",{class:"directory-share-checkout",type:"button",disabled:ae.value,onClick:A=>ta(o.remotePluginId)},i(me.value===`checkout:${o.remotePluginId}`?n(r)("Checking out..."):n(r)("Checkout")),9,Zr),s("button",{class:"directory-share-delete",type:"button",disabled:ae.value,onClick:A=>ea(o.remotePluginId)},i(me.value===`delete:${o.remotePluginId}`?n(r)("Removing..."):n(r)("Remove")),9,Xr)]))),128))])),s("button",{class:"directory-action primary",type:"button",disabled:ae.value||!qt(),onClick:Xs},i(me.value==="save"?n(r)("Sharing..."):n(r)("Share this plugin")),9,ec)],64))])])])):u("",!0)])),(a(),He(it,{to:"body"},[ve.value?(a(),l("div",{key:0,class:"directory-modal-overlay",onClick:Be(Jt,["self"])},[s("article",tc,[s("div",sc,[s("div",ac,[(ts=$.value)!=null&&ts.connector.logoUrl?(a(),l("img",{key:0,class:"directory-card-icon",src:$.value.connector.logoUrl,alt:$.value.connector.name,loading:"lazy"},null,8,lc)):(a(),l("div",oc,i((ss=$.value)==null?void 0:ss.connector.name.charAt(0)),1)),s("div",ic,[s("h3",nc,i(((as=$.value)==null?void 0:as.connector.name)||"Composio"),1),s("span",rc,i($.value?Rt($.value.connector):n(r)("Connector")),1)])]),s("button",{class:"directory-modal-close",type:"button","aria-label":n(r)("Close Composio detail"),onClick:Jt},i(n(r)("Close")),9,cc)]),s("div",uc,[we.value?(a(),l("div",dc,i(we.value),1)):Ve.value?(a(),l("div",pc,"Loading connector...")):$.value?(a(),l(O,{key:2},[$.value.connector.description?(a(),l("p",vc,i($.value.connector.description),1)):u("",!0),s("div",yc,[s("div",hc,[t[32]||(t[32]=s("h4",{class:"directory-detail-heading"},"Overview",-1)),s("div",mc,[s("span",gc,i($.value.connector.toolsCount)+" tools",1),$.value.connector.triggersCount>0?(a(),l("span",fc,i($.value.connector.triggersCount)+" triggers",1)):u("",!0),$.value.connector.latestVersion?(a(),l("span",kc,"v"+i($.value.connector.latestVersion),1)):u("",!0),$.value.connector.authModes.length>0?(a(),l("span",bc,i($.value.connector.authModes.join(", ")),1)):u("",!0)])]),s("div",_c,[t[33]||(t[33]=s("h4",{class:"directory-detail-heading"},"Connections",-1)),$.value.connections.length===0?(a(),l("div",wc," No linked accounts yet. ")):(a(),l("div",Cc,[(a(!0),l(O,null,z($.value.connections,o=>(a(),l("div",{key:o.id,class:"directory-include-row"},[s("span",null,[nt(i(o.alias||o.wordId||o.id)+" ",1),s("span",{class:K(["directory-auth-status",Rs(o.status)])},i(Os(o.status)),3)]),s("span",Sc,i(o.authScheme||"Auth"),1)]))),128))]))])]),$.value.tools.length>0?(a(),l("div",$c,[t[34]||(t[34]=s("h4",{class:"directory-detail-heading"},"Useful tools",-1)),(a(!0),l(O,null,z($.value.tools.slice(0,8),o=>(a(),l("div",{key:o.slug,class:"directory-include-row"},[s("span",null,i(o.name||o.slug),1),s("span",Pc,i(o.slug),1)]))),128))])):u("",!0)],64)):u("",!0)]),s("div",Ac,[$.value?(a(),l("button",{key:0,class:"directory-action-link",type:"button",onClick:t[19]||(t[19]=o=>ie($.value.dashboardUrl))}," Open dashboard ")):u("",!0),$.value&&at($.value.connector)?(a(),l("button",{key:1,class:"directory-action",type:"button",disabled:ye.value===$.value.connector.slug,onClick:t[20]||(t[20]=o=>Zt($.value.connector))},i(ye.value===((ls=$.value)==null?void 0:ls.connector.slug)?"Opening...":at($.value.connector)),9,Ic)):u("",!0),$.value&&Gt($.value.connector)?(a(),l("button",{key:2,class:"directory-action primary",type:"button",disabled:Ie.value,onClick:t[21]||(t[21]=o=>Bt($.value.connector,$.value.connections))},i(F.tryInFlightKey===xt($.value.connector.slug)?"Starting...":"Try it!"),9,Lc)):u("",!0)])])])):u("",!0)]))])}}}),Fc=ut(Uc,[["__scopeId","data-v-6aff237a"]]);export{Fc as default};
|