@stigmer/server-slim 3.18.0 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/console/404.html +1 -1
- package/console/__next.__PAGE__.txt +2 -2
- package/console/__next._full.txt +24 -23
- package/console/__next._head.txt +4 -4
- package/console/__next._index.txt +13 -15
- package/console/__next._tree.txt +2 -2
- package/console/_next/static/chunks/0.k18aw8l68rs.js +1 -0
- package/console/_next/static/chunks/0.wpyf_drhv8x.css +1 -0
- package/console/_next/static/chunks/0028ryyk-zcrk.js +1 -0
- package/console/_next/static/chunks/{0x.4919xjicc5.js → 004w~8qxculo~.js} +1 -1
- package/console/_next/static/chunks/05121lnteh0k4.js +1 -0
- package/console/_next/static/chunks/05hsc2apcu-66.js +1 -0
- package/console/_next/static/chunks/0625f_sg_08~p.js +1 -0
- package/console/_next/static/chunks/06rm9q_8qy6o9.js +1 -0
- package/console/_next/static/chunks/0a9_yomn052wg.js +1 -0
- package/console/_next/static/chunks/0af9vacgizdg..js +1 -0
- package/console/_next/static/chunks/0ala3mcyjvwvv.js +1 -0
- package/console/_next/static/chunks/0b8nbfovx36l5.js +1 -0
- package/console/_next/static/chunks/0dozqag.y8cvd.js +1 -0
- package/console/_next/static/chunks/{0.cr0e7bzkpoi.js → 0hjw5613u.jem.js} +3 -3
- package/console/_next/static/chunks/0id2oe7r5dozz.js +1 -0
- package/console/_next/static/chunks/0l9~uyr.vjf0t.js +2 -0
- package/console/_next/static/chunks/0mg-64_rqe3v9.js +1 -0
- package/console/_next/static/chunks/0rihzw4w1wzg3.js +1 -0
- package/console/_next/static/chunks/0s.hd0_eyzhc..js +1 -0
- package/console/_next/static/chunks/0ta6paxih8wwd.js +1 -0
- package/console/_next/static/chunks/0u9~d-cnb0w01.js +1 -0
- package/console/_next/static/chunks/0zc3nm7n~zcnb.js +3 -0
- package/console/_next/static/chunks/{0ij17mw0v0qd-.js → 0zfzrf3u6eg~~.js} +1 -1
- package/console/_next/static/chunks/12wm5jicnl6m8.js +1 -0
- package/console/_not-found/__next._full.txt +27 -26
- package/console/_not-found/__next._head.txt +4 -4
- package/console/_not-found/__next._index.txt +13 -15
- package/console/_not-found/__next._not-found.__PAGE__.txt +3 -3
- package/console/_not-found/__next._not-found.txt +3 -3
- package/console/_not-found/__next._tree.txt +2 -2
- package/console/_not-found.html +1 -1
- package/console/_not-found.txt +27 -26
- package/console/auth/callback/__next._full.txt +32 -31
- package/console/auth/callback/__next._head.txt +4 -4
- package/console/auth/callback/__next._index.txt +13 -15
- package/console/auth/callback/__next._tree.txt +2 -2
- package/console/auth/callback/__next.auth.callback.__PAGE__.txt +4 -4
- package/console/auth/callback/__next.auth.callback.txt +3 -3
- package/console/auth/callback/__next.auth.txt +3 -3
- package/console/auth/callback.html +1 -1
- package/console/auth/callback.txt +32 -31
- package/console/auth/github/callback/__next._full.txt +35 -34
- package/console/auth/github/callback/__next._head.txt +4 -4
- package/console/auth/github/callback/__next._index.txt +13 -15
- package/console/auth/github/callback/__next._tree.txt +2 -2
- package/console/auth/github/callback/__next.auth.github.callback.__PAGE__.txt +4 -4
- package/console/auth/github/callback/__next.auth.github.callback.txt +3 -3
- package/console/auth/github/callback/__next.auth.github.txt +3 -3
- package/console/auth/github/callback/__next.auth.txt +3 -3
- package/console/auth/github/callback.html +1 -1
- package/console/auth/github/callback.txt +35 -34
- package/console/auth/oauth/callback/__next._full.txt +35 -34
- package/console/auth/oauth/callback/__next._head.txt +4 -4
- package/console/auth/oauth/callback/__next._index.txt +13 -15
- package/console/auth/oauth/callback/__next._tree.txt +2 -2
- package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +4 -4
- package/console/auth/oauth/callback/__next.auth.oauth.callback.txt +3 -3
- package/console/auth/oauth/callback/__next.auth.oauth.txt +3 -3
- package/console/auth/oauth/callback/__next.auth.txt +3 -3
- package/console/auth/oauth/callback.html +1 -1
- package/console/auth/oauth/callback.txt +35 -34
- package/console/chat/__placeholder__/__placeholder__/__next._full.txt +30 -32
- package/console/chat/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/chat/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/chat/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.txt +3 -3
- package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.txt +3 -3
- package/console/chat/__placeholder__/__placeholder__/__next.chat.txt +3 -3
- package/console/chat/__placeholder__/__placeholder__.html +1 -1
- package/console/chat/__placeholder__/__placeholder__.txt +30 -32
- package/console/conversations/__next._full.txt +28 -27
- package/console/conversations/__next._head.txt +4 -4
- package/console/conversations/__next._index.txt +13 -15
- package/console/conversations/__next._tree.txt +2 -2
- package/console/conversations/__next.conversations.__PAGE__.txt +3 -3
- package/console/conversations/__next.conversations.txt +3 -3
- package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +30 -32
- package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +3 -3
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.txt +3 -3
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.txt +3 -3
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.txt +3 -3
- package/console/conversations/__placeholder__/__placeholder__.html +1 -1
- package/console/conversations/__placeholder__/__placeholder__.txt +30 -32
- package/console/conversations.html +1 -1
- package/console/conversations.txt +28 -27
- package/console/dashboard/__next._full.txt +28 -27
- package/console/dashboard/__next._head.txt +4 -4
- package/console/dashboard/__next._index.txt +13 -15
- package/console/dashboard/__next._tree.txt +2 -2
- package/console/dashboard/__next.dashboard.__PAGE__.txt +3 -3
- package/console/dashboard/__next.dashboard.txt +3 -3
- package/console/dashboard.html +1 -1
- package/console/dashboard.txt +28 -27
- package/console/executions/__placeholder__/__next._full.txt +30 -29
- package/console/executions/__placeholder__/__next._head.txt +4 -4
- package/console/executions/__placeholder__/__next._index.txt +13 -15
- package/console/executions/__placeholder__/__next._tree.txt +2 -2
- package/console/executions/__placeholder__/__next.executions.$d$id.__PAGE__.txt +2 -2
- package/console/executions/__placeholder__/__next.executions.$d$id.txt +3 -3
- package/console/executions/__placeholder__/__next.executions.txt +3 -3
- package/console/executions/__placeholder__.html +1 -1
- package/console/executions/__placeholder__.txt +30 -29
- package/console/index.html +1 -1
- package/console/index.txt +24 -23
- package/console/invite/__placeholder__/__next._full.txt +31 -30
- package/console/invite/__placeholder__/__next._head.txt +4 -4
- package/console/invite/__placeholder__/__next._index.txt +13 -15
- package/console/invite/__placeholder__/__next._tree.txt +2 -2
- package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +3 -3
- package/console/invite/__placeholder__/__next.invite.$d$token.txt +3 -3
- package/console/invite/__placeholder__/__next.invite.txt +3 -3
- package/console/invite/__placeholder__.html +1 -1
- package/console/invite/__placeholder__.txt +31 -30
- package/console/library/__next._full.txt +29 -28
- package/console/library/__next._head.txt +4 -4
- package/console/library/__next._index.txt +13 -15
- package/console/library/__next._tree.txt +2 -2
- package/console/library/__next.library.__PAGE__.txt +3 -3
- package/console/library/__next.library.txt +5 -5
- package/console/library/agents/__next._full.txt +34 -33
- package/console/library/agents/__next._head.txt +4 -4
- package/console/library/agents/__next._index.txt +13 -15
- package/console/library/agents/__next._tree.txt +2 -2
- package/console/library/agents/__next.library.agents.__PAGE__.txt +3 -3
- package/console/library/agents/__next.library.agents.txt +3 -3
- package/console/library/agents/__next.library.txt +5 -5
- package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +34 -36
- package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.txt +3 -3
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.txt +3 -3
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.txt +3 -3
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.txt +5 -5
- package/console/library/agents/__placeholder__/__placeholder__.html +1 -1
- package/console/library/agents/__placeholder__/__placeholder__.txt +34 -36
- package/console/library/agents/new/__next._full.txt +38 -37
- package/console/library/agents/new/__next._head.txt +4 -4
- package/console/library/agents/new/__next._index.txt +13 -15
- package/console/library/agents/new/__next._tree.txt +2 -2
- package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +4 -4
- package/console/library/agents/new/__next.library.agents.new.txt +3 -3
- package/console/library/agents/new/__next.library.agents.txt +3 -3
- package/console/library/agents/new/__next.library.txt +5 -5
- package/console/library/agents/new.html +1 -1
- package/console/library/agents/new.txt +38 -37
- package/console/library/agents.html +1 -1
- package/console/library/agents.txt +34 -33
- package/console/library/mcp-servers/__next._full.txt +34 -33
- package/console/library/mcp-servers/__next._head.txt +4 -4
- package/console/library/mcp-servers/__next._index.txt +13 -15
- package/console/library/mcp-servers/__next._tree.txt +2 -2
- package/console/library/mcp-servers/__next.library.mcp-servers.__PAGE__.txt +3 -3
- package/console/library/mcp-servers/__next.library.mcp-servers.txt +3 -3
- package/console/library/mcp-servers/__next.library.txt +5 -5
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._full.txt +34 -36
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.txt +3 -3
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.txt +3 -3
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.txt +3 -3
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.txt +5 -5
- package/console/library/mcp-servers/__placeholder__/__placeholder__.html +1 -1
- package/console/library/mcp-servers/__placeholder__/__placeholder__.txt +34 -36
- package/console/library/mcp-servers/new/__next._full.txt +38 -37
- package/console/library/mcp-servers/new/__next._head.txt +4 -4
- package/console/library/mcp-servers/new/__next._index.txt +13 -15
- package/console/library/mcp-servers/new/__next._tree.txt +2 -2
- package/console/library/mcp-servers/new/__next.library.mcp-servers.new.__PAGE__.txt +4 -4
- package/console/library/mcp-servers/new/__next.library.mcp-servers.new.txt +3 -3
- package/console/library/mcp-servers/new/__next.library.mcp-servers.txt +3 -3
- package/console/library/mcp-servers/new/__next.library.txt +5 -5
- package/console/library/mcp-servers/new.html +1 -1
- package/console/library/mcp-servers/new.txt +38 -37
- package/console/library/mcp-servers.html +1 -1
- package/console/library/mcp-servers.txt +34 -33
- package/console/library/plugins/__next._full.txt +34 -33
- package/console/library/plugins/__next._head.txt +4 -4
- package/console/library/plugins/__next._index.txt +13 -15
- package/console/library/plugins/__next._tree.txt +2 -2
- package/console/library/plugins/__next.library.plugins.__PAGE__.txt +3 -3
- package/console/library/plugins/__next.library.plugins.txt +3 -3
- package/console/library/plugins/__next.library.txt +5 -5
- package/console/library/plugins/__placeholder__/__placeholder__/__next._full.txt +34 -36
- package/console/library/plugins/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/plugins/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/library/plugins/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.txt +3 -3
- package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.txt +3 -3
- package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.txt +3 -3
- package/console/library/plugins/__placeholder__/__placeholder__/__next.library.txt +5 -5
- package/console/library/plugins/__placeholder__/__placeholder__.html +1 -1
- package/console/library/plugins/__placeholder__/__placeholder__.txt +34 -36
- package/console/library/plugins/upload/__next._full.txt +38 -37
- package/console/library/plugins/upload/__next._head.txt +4 -4
- package/console/library/plugins/upload/__next._index.txt +13 -15
- package/console/library/plugins/upload/__next._tree.txt +2 -2
- package/console/library/plugins/upload/__next.library.plugins.txt +3 -3
- package/console/library/plugins/upload/__next.library.plugins.upload.__PAGE__.txt +4 -4
- package/console/library/plugins/upload/__next.library.plugins.upload.txt +3 -3
- package/console/library/plugins/upload/__next.library.txt +5 -5
- package/console/library/plugins/upload.html +1 -1
- package/console/library/plugins/upload.txt +38 -37
- package/console/library/plugins.html +1 -1
- package/console/library/plugins.txt +34 -33
- package/console/library/schedules/__next._full.txt +34 -33
- package/console/library/schedules/__next._head.txt +4 -4
- package/console/library/schedules/__next._index.txt +13 -15
- package/console/library/schedules/__next._tree.txt +2 -2
- package/console/library/schedules/__next.library.schedules.__PAGE__.txt +3 -3
- package/console/library/schedules/__next.library.schedules.txt +3 -3
- package/console/library/schedules/__next.library.txt +5 -5
- package/console/library/schedules/__placeholder__/__placeholder__/__next._full.txt +34 -36
- package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/library/schedules/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.txt +3 -3
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.txt +3 -3
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.txt +3 -3
- package/console/library/schedules/__placeholder__/__placeholder__/__next.library.txt +5 -5
- package/console/library/schedules/__placeholder__/__placeholder__.html +1 -1
- package/console/library/schedules/__placeholder__/__placeholder__.txt +34 -36
- package/console/library/schedules/new/__next._full.txt +38 -37
- package/console/library/schedules/new/__next._head.txt +4 -4
- package/console/library/schedules/new/__next._index.txt +13 -15
- package/console/library/schedules/new/__next._tree.txt +2 -2
- package/console/library/schedules/new/__next.library.schedules.new.__PAGE__.txt +4 -4
- package/console/library/schedules/new/__next.library.schedules.new.txt +3 -3
- package/console/library/schedules/new/__next.library.schedules.txt +3 -3
- package/console/library/schedules/new/__next.library.txt +5 -5
- package/console/library/schedules/new.html +1 -1
- package/console/library/schedules/new.txt +38 -37
- package/console/library/schedules.html +1 -1
- package/console/library/schedules.txt +34 -33
- package/console/library/skills/__next._full.txt +34 -33
- package/console/library/skills/__next._head.txt +4 -4
- package/console/library/skills/__next._index.txt +13 -15
- package/console/library/skills/__next._tree.txt +2 -2
- package/console/library/skills/__next.library.skills.__PAGE__.txt +3 -3
- package/console/library/skills/__next.library.skills.txt +3 -3
- package/console/library/skills/__next.library.txt +5 -5
- package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +34 -36
- package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.txt +3 -3
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.txt +3 -3
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.txt +3 -3
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.txt +5 -5
- package/console/library/skills/__placeholder__/__placeholder__.html +1 -1
- package/console/library/skills/__placeholder__/__placeholder__.txt +34 -36
- package/console/library/skills/new/__next._full.txt +38 -37
- package/console/library/skills/new/__next._head.txt +4 -4
- package/console/library/skills/new/__next._index.txt +13 -15
- package/console/library/skills/new/__next._tree.txt +2 -2
- package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +4 -4
- package/console/library/skills/new/__next.library.skills.new.txt +3 -3
- package/console/library/skills/new/__next.library.skills.txt +3 -3
- package/console/library/skills/new/__next.library.txt +5 -5
- package/console/library/skills/new.html +1 -1
- package/console/library/skills/new.txt +38 -37
- package/console/library/skills.html +1 -1
- package/console/library/skills.txt +34 -33
- package/console/library/workflows/__next._full.txt +34 -33
- package/console/library/workflows/__next._head.txt +4 -4
- package/console/library/workflows/__next._index.txt +13 -15
- package/console/library/workflows/__next._tree.txt +2 -2
- package/console/library/workflows/__next.library.txt +5 -5
- package/console/library/workflows/__next.library.workflows.__PAGE__.txt +3 -3
- package/console/library/workflows/__next.library.workflows.txt +3 -3
- package/console/library/workflows/__placeholder__/__placeholder__/__next._full.txt +34 -36
- package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/library/workflows/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.txt +5 -5
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.txt +3 -3
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.txt +3 -3
- package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.txt +3 -3
- package/console/library/workflows/__placeholder__/__placeholder__.html +1 -1
- package/console/library/workflows/__placeholder__/__placeholder__.txt +34 -36
- package/console/library/workflows/executions/__next._full.txt +35 -34
- package/console/library/workflows/executions/__next._head.txt +4 -4
- package/console/library/workflows/executions/__next._index.txt +13 -15
- package/console/library/workflows/executions/__next._tree.txt +2 -2
- package/console/library/workflows/executions/__next.library.txt +5 -5
- package/console/library/workflows/executions/__next.library.workflows.executions.__PAGE__.txt +3 -3
- package/console/library/workflows/executions/__next.library.workflows.executions.txt +3 -3
- package/console/library/workflows/executions/__next.library.workflows.txt +3 -3
- package/console/library/workflows/executions.html +1 -1
- package/console/library/workflows/executions.txt +35 -34
- package/console/library/workflows/new/__next._full.txt +38 -37
- package/console/library/workflows/new/__next._head.txt +4 -4
- package/console/library/workflows/new/__next._index.txt +13 -15
- package/console/library/workflows/new/__next._tree.txt +2 -2
- package/console/library/workflows/new/__next.library.txt +5 -5
- package/console/library/workflows/new/__next.library.workflows.new.__PAGE__.txt +4 -4
- package/console/library/workflows/new/__next.library.workflows.new.txt +3 -3
- package/console/library/workflows/new/__next.library.workflows.txt +3 -3
- package/console/library/workflows/new.html +1 -1
- package/console/library/workflows/new.txt +38 -37
- package/console/library/workflows.html +1 -1
- package/console/library/workflows.txt +34 -33
- package/console/library.html +1 -1
- package/console/library.txt +29 -28
- package/console/login/__next._full.txt +31 -30
- package/console/login/__next._head.txt +4 -4
- package/console/login/__next._index.txt +13 -15
- package/console/login/__next._tree.txt +2 -2
- package/console/login/__next.login.__PAGE__.txt +4 -4
- package/console/login/__next.login.txt +3 -3
- package/console/login.html +1 -1
- package/console/login.txt +31 -30
- package/console/marketplace/__next._full.txt +28 -27
- package/console/marketplace/__next._head.txt +4 -4
- package/console/marketplace/__next._index.txt +13 -15
- package/console/marketplace/__next._tree.txt +2 -2
- package/console/marketplace/__next.marketplace.__PAGE__.txt +3 -3
- package/console/marketplace/__next.marketplace.txt +3 -3
- package/console/marketplace.html +1 -1
- package/console/marketplace.txt +28 -27
- package/console/oauth/slack/callback/__next._full.txt +35 -34
- package/console/oauth/slack/callback/__next._head.txt +4 -4
- package/console/oauth/slack/callback/__next._index.txt +13 -15
- package/console/oauth/slack/callback/__next._tree.txt +2 -2
- package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +4 -4
- package/console/oauth/slack/callback/__next.oauth.slack.callback.txt +3 -3
- package/console/oauth/slack/callback/__next.oauth.slack.txt +3 -3
- package/console/oauth/slack/callback/__next.oauth.txt +3 -3
- package/console/oauth/slack/callback.html +1 -1
- package/console/oauth/slack/callback.txt +35 -34
- package/console/sessions/__placeholder__/__next._full.txt +30 -29
- package/console/sessions/__placeholder__/__next._head.txt +4 -4
- package/console/sessions/__placeholder__/__next._index.txt +13 -15
- package/console/sessions/__placeholder__/__next._tree.txt +2 -2
- package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +2 -2
- package/console/sessions/__placeholder__/__next.sessions.$d$id.txt +3 -3
- package/console/sessions/__placeholder__/__next.sessions.txt +3 -3
- package/console/sessions/__placeholder__.html +1 -1
- package/console/sessions/__placeholder__.txt +30 -29
- package/console/settings/__next._full.txt +31 -30
- package/console/settings/__next._head.txt +4 -4
- package/console/settings/__next._index.txt +13 -15
- package/console/settings/__next._tree.txt +2 -2
- package/console/settings/__next.settings.__PAGE__.txt +4 -4
- package/console/settings/__next.settings.txt +5 -5
- package/console/settings/account-preferences/__next._full.txt +33 -32
- package/console/settings/account-preferences/__next._head.txt +4 -4
- package/console/settings/account-preferences/__next._index.txt +13 -15
- package/console/settings/account-preferences/__next._tree.txt +2 -2
- package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +3 -3
- package/console/settings/account-preferences/__next.settings.account-preferences.txt +3 -3
- package/console/settings/account-preferences/__next.settings.txt +5 -5
- package/console/settings/account-preferences.html +1 -1
- package/console/settings/account-preferences.txt +33 -32
- package/console/settings/api-keys/__next._full.txt +33 -32
- package/console/settings/api-keys/__next._head.txt +4 -4
- package/console/settings/api-keys/__next._index.txt +13 -15
- package/console/settings/api-keys/__next._tree.txt +2 -2
- package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +3 -3
- package/console/settings/api-keys/__next.settings.api-keys.txt +3 -3
- package/console/settings/api-keys/__next.settings.txt +5 -5
- package/console/settings/api-keys.html +1 -1
- package/console/settings/api-keys.txt +33 -32
- package/console/settings/billing/__next._full.txt +36 -35
- package/console/settings/billing/__next._head.txt +4 -4
- package/console/settings/billing/__next._index.txt +13 -15
- package/console/settings/billing/__next._tree.txt +2 -2
- package/console/settings/billing/__next.settings.billing.__PAGE__.txt +4 -4
- package/console/settings/billing/__next.settings.billing.txt +3 -3
- package/console/settings/billing/__next.settings.txt +5 -5
- package/console/settings/billing.html +1 -1
- package/console/settings/billing.txt +36 -35
- package/console/settings/channel-apps/__next._full.txt +33 -32
- package/console/settings/channel-apps/__next._head.txt +4 -4
- package/console/settings/channel-apps/__next._index.txt +13 -15
- package/console/settings/channel-apps/__next._tree.txt +2 -2
- package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +3 -3
- package/console/settings/channel-apps/__next.settings.channel-apps.txt +3 -3
- package/console/settings/channel-apps/__next.settings.txt +5 -5
- package/console/settings/channel-apps.html +1 -1
- package/console/settings/channel-apps.txt +33 -32
- package/console/settings/cursor-accounts/__next._full.txt +36 -35
- package/console/settings/cursor-accounts/__next._head.txt +4 -4
- package/console/settings/cursor-accounts/__next._index.txt +13 -15
- package/console/settings/cursor-accounts/__next._tree.txt +2 -2
- package/console/settings/cursor-accounts/__next.settings.cursor-accounts.__PAGE__.txt +4 -4
- package/console/settings/cursor-accounts/__next.settings.cursor-accounts.txt +3 -3
- package/console/settings/cursor-accounts/__next.settings.txt +5 -5
- package/console/settings/cursor-accounts.html +1 -1
- package/console/settings/cursor-accounts.txt +36 -35
- package/console/settings/environments/__next._full.txt +33 -32
- package/console/settings/environments/__next._head.txt +4 -4
- package/console/settings/environments/__next._index.txt +13 -15
- package/console/settings/environments/__next._tree.txt +2 -2
- package/console/settings/environments/__next.settings.environments.__PAGE__.txt +3 -3
- package/console/settings/environments/__next.settings.environments.txt +3 -3
- package/console/settings/environments/__next.settings.txt +5 -5
- package/console/settings/environments.html +1 -1
- package/console/settings/environments.txt +33 -32
- package/console/settings/identity-providers/__next._full.txt +33 -32
- package/console/settings/identity-providers/__next._head.txt +4 -4
- package/console/settings/identity-providers/__next._index.txt +13 -15
- package/console/settings/identity-providers/__next._tree.txt +2 -2
- package/console/settings/identity-providers/__next.settings.identity-providers.__PAGE__.txt +3 -3
- package/console/settings/identity-providers/__next.settings.identity-providers.txt +3 -3
- package/console/settings/identity-providers/__next.settings.txt +5 -5
- package/console/settings/identity-providers.html +1 -1
- package/console/settings/identity-providers.txt +33 -32
- package/console/settings/invitations/__next._full.txt +33 -32
- package/console/settings/invitations/__next._head.txt +4 -4
- package/console/settings/invitations/__next._index.txt +13 -15
- package/console/settings/invitations/__next._tree.txt +2 -2
- package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +3 -3
- package/console/settings/invitations/__next.settings.invitations.txt +3 -3
- package/console/settings/invitations/__next.settings.txt +5 -5
- package/console/settings/invitations.html +1 -1
- package/console/settings/invitations.txt +33 -32
- package/console/settings/members/__next._full.txt +33 -32
- package/console/settings/members/__next._head.txt +4 -4
- package/console/settings/members/__next._index.txt +13 -15
- package/console/settings/members/__next._tree.txt +2 -2
- package/console/settings/members/__next.settings.members.__PAGE__.txt +3 -3
- package/console/settings/members/__next.settings.members.txt +3 -3
- package/console/settings/members/__next.settings.txt +5 -5
- package/console/settings/members.html +1 -1
- package/console/settings/members.txt +33 -32
- package/console/settings/memory/__next._full.txt +33 -32
- package/console/settings/memory/__next._head.txt +4 -4
- package/console/settings/memory/__next._index.txt +13 -15
- package/console/settings/memory/__next._tree.txt +2 -2
- package/console/settings/memory/__next.settings.memory.__PAGE__.txt +3 -3
- package/console/settings/memory/__next.settings.memory.txt +3 -3
- package/console/settings/memory/__next.settings.txt +5 -5
- package/console/settings/memory.html +1 -1
- package/console/settings/memory.txt +33 -32
- package/console/settings/oauth-apps/__next._full.txt +33 -32
- package/console/settings/oauth-apps/__next._head.txt +4 -4
- package/console/settings/oauth-apps/__next._index.txt +13 -15
- package/console/settings/oauth-apps/__next._tree.txt +2 -2
- package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +3 -3
- package/console/settings/oauth-apps/__next.settings.oauth-apps.txt +3 -3
- package/console/settings/oauth-apps/__next.settings.txt +5 -5
- package/console/settings/oauth-apps.html +1 -1
- package/console/settings/oauth-apps.txt +33 -32
- package/console/settings/org-preferences/__next._full.txt +33 -32
- package/console/settings/org-preferences/__next._head.txt +4 -4
- package/console/settings/org-preferences/__next._index.txt +13 -15
- package/console/settings/org-preferences/__next._tree.txt +2 -2
- package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +3 -3
- package/console/settings/org-preferences/__next.settings.org-preferences.txt +3 -3
- package/console/settings/org-preferences/__next.settings.txt +5 -5
- package/console/settings/org-preferences.html +1 -1
- package/console/settings/org-preferences.txt +33 -32
- package/console/settings/org-profile/__next._full.txt +33 -32
- package/console/settings/org-profile/__next._head.txt +4 -4
- package/console/settings/org-profile/__next._index.txt +13 -15
- package/console/settings/org-profile/__next._tree.txt +2 -2
- package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +3 -3
- package/console/settings/org-profile/__next.settings.org-profile.txt +3 -3
- package/console/settings/org-profile/__next.settings.txt +5 -5
- package/console/settings/org-profile.html +1 -1
- package/console/settings/org-profile.txt +33 -32
- package/console/settings/platform-clients/__next._full.txt +33 -32
- package/console/settings/platform-clients/__next._head.txt +4 -4
- package/console/settings/platform-clients/__next._index.txt +13 -15
- package/console/settings/platform-clients/__next._tree.txt +2 -2
- package/console/settings/platform-clients/__next.settings.platform-clients.__PAGE__.txt +3 -3
- package/console/settings/platform-clients/__next.settings.platform-clients.txt +3 -3
- package/console/settings/platform-clients/__next.settings.txt +5 -5
- package/console/settings/platform-clients.html +1 -1
- package/console/settings/platform-clients.txt +33 -32
- package/console/settings/pricing-governance/__next._full.txt +36 -35
- package/console/settings/pricing-governance/__next._head.txt +4 -4
- package/console/settings/pricing-governance/__next._index.txt +13 -15
- package/console/settings/pricing-governance/__next._tree.txt +2 -2
- package/console/settings/pricing-governance/__next.settings.pricing-governance.__PAGE__.txt +4 -4
- package/console/settings/pricing-governance/__next.settings.pricing-governance.txt +3 -3
- package/console/settings/pricing-governance/__next.settings.txt +5 -5
- package/console/settings/pricing-governance.html +1 -1
- package/console/settings/pricing-governance.txt +36 -35
- package/console/settings/provider-standing/__next._full.txt +36 -35
- package/console/settings/provider-standing/__next._head.txt +4 -4
- package/console/settings/provider-standing/__next._index.txt +13 -15
- package/console/settings/provider-standing/__next._tree.txt +2 -2
- package/console/settings/provider-standing/__next.settings.provider-standing.__PAGE__.txt +4 -4
- package/console/settings/provider-standing/__next.settings.provider-standing.txt +3 -3
- package/console/settings/provider-standing/__next.settings.txt +5 -5
- package/console/settings/provider-standing.html +1 -1
- package/console/settings/provider-standing.txt +36 -35
- package/console/settings/usage/__next._full.txt +33 -32
- package/console/settings/usage/__next._head.txt +4 -4
- package/console/settings/usage/__next._index.txt +13 -15
- package/console/settings/usage/__next._tree.txt +2 -2
- package/console/settings/usage/__next.settings.txt +5 -5
- package/console/settings/usage/__next.settings.usage.__PAGE__.txt +3 -3
- package/console/settings/usage/__next.settings.usage.txt +3 -3
- package/console/settings/usage.html +1 -1
- package/console/settings/usage.txt +33 -32
- package/console/settings.html +1 -1
- package/console/settings.txt +31 -30
- package/console/workflows/__next._full.txt +28 -27
- package/console/workflows/__next._head.txt +4 -4
- package/console/workflows/__next._index.txt +13 -15
- package/console/workflows/__next._tree.txt +2 -2
- package/console/workflows/__next.workflows.__PAGE__.txt +2 -2
- package/console/workflows/__next.workflows.txt +3 -3
- package/console/workflows/__placeholder__/__placeholder__/__next._full.txt +30 -32
- package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +13 -15
- package/console/workflows/__placeholder__/__placeholder__/__next._tree.txt +2 -2
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.txt +3 -3
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.txt +3 -3
- package/console/workflows/__placeholder__/__placeholder__/__next.workflows.txt +3 -3
- package/console/workflows/__placeholder__/__placeholder__.html +1 -1
- package/console/workflows/__placeholder__/__placeholder__.txt +30 -32
- package/console/workflows/executions/__next._full.txt +31 -30
- package/console/workflows/executions/__next._head.txt +4 -4
- package/console/workflows/executions/__next._index.txt +13 -15
- package/console/workflows/executions/__next._tree.txt +2 -2
- package/console/workflows/executions/__next.workflows.executions.__PAGE__.txt +2 -2
- package/console/workflows/executions/__next.workflows.executions.txt +3 -3
- package/console/workflows/executions/__next.workflows.txt +3 -3
- package/console/workflows/executions/__placeholder__/__next._full.txt +30 -31
- package/console/workflows/executions/__placeholder__/__next._head.txt +4 -4
- package/console/workflows/executions/__placeholder__/__next._index.txt +13 -15
- package/console/workflows/executions/__placeholder__/__next._tree.txt +2 -2
- package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.__PAGE__.txt +3 -3
- package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.txt +3 -3
- package/console/workflows/executions/__placeholder__/__next.workflows.executions.txt +3 -3
- package/console/workflows/executions/__placeholder__/__next.workflows.txt +3 -3
- package/console/workflows/executions/__placeholder__.html +1 -1
- package/console/workflows/executions/__placeholder__.txt +30 -31
- package/console/workflows/executions.html +1 -1
- package/console/workflows/executions.txt +31 -30
- package/console/workflows.html +1 -1
- package/console/workflows.txt +28 -27
- package/main.js +21 -21
- package/package.json +6 -6
- package/console/_next/static/chunks/0-3vl848v~x7_.js +0 -1
- package/console/_next/static/chunks/0.ocu5b3uajbn.js +0 -1
- package/console/_next/static/chunks/00609po93aecc.js +0 -1
- package/console/_next/static/chunks/00o8ud2dmna2j.js +0 -1
- package/console/_next/static/chunks/02fsq8lsaeu8j.js +0 -1
- package/console/_next/static/chunks/071fdr3kvata1.js +0 -1
- package/console/_next/static/chunks/0_3utrn1at0vi.js +0 -1
- package/console/_next/static/chunks/0_j8~rfb.1ufy.js +0 -1
- package/console/_next/static/chunks/0amugang-25bm.js +0 -1
- package/console/_next/static/chunks/0c7llz2igr3w7.js +0 -1
- package/console/_next/static/chunks/0dtrm.qvfku1r.js +0 -3
- package/console/_next/static/chunks/0e7jd8wufwnu2.js +0 -1
- package/console/_next/static/chunks/0fgcvnc-b_oz_.js +0 -1
- package/console/_next/static/chunks/0g4-6iy.9p8sl.js +0 -1
- package/console/_next/static/chunks/0gz8yljnjzsmu.js +0 -1
- package/console/_next/static/chunks/0j~6628v9z3k-.js +0 -1
- package/console/_next/static/chunks/0og40-yo-nth-.js +0 -1
- package/console/_next/static/chunks/0rob~86j~8vge.js +0 -1
- package/console/_next/static/chunks/0s6bm1sujua~8.css +0 -1
- package/console/_next/static/chunks/0xq42ojv80jqz.js +0 -1
- package/console/_next/static/chunks/0xs_3fux3hsk3.js +0 -2
- package/console/_next/static/chunks/12329wyw7127c.js +0 -1
- /package/console/_next/static/{0d4BawxHa-jMy4WgCDP1P → -SJovNiHfwazArKzyL7X6}/_buildManifest.js +0 -0
- /package/console/_next/static/{0d4BawxHa-jMy4WgCDP1P → -SJovNiHfwazArKzyL7X6}/_clientMiddlewareManifest.js +0 -0
- /package/console/_next/static/{0d4BawxHa-jMy4WgCDP1P → -SJovNiHfwazArKzyL7X6}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57330,t=>{"use strict";t.s(["DIALECT_LABELS",0,{"agent-plugins":"Agent Plugins 1.0",claude:"Claude Code plugin",cursor:"Cursor plugin",codex:"Codex plugin"}])},818424,t=>{"use strict";var e=t.i(843476),s=t.i(893976);let n=(0,s.cn)("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium stg:text-muted-foreground stg:transition-colors","stg:hover:bg-accent stg:hover:text-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-40");t.s(["Pagination",0,function({pageNum:t,totalPages:o,onPageChange:i,ariaLabel:u,className:l}){return(0,e.jsxs)("div",{className:(0,s.cn)("stg:flex stg:items-center stg:justify-between",l),role:"navigation","aria-label":u,children:[(0,e.jsx)("button",{type:"button",disabled:t<=1,onClick:()=>i(t-1),className:n,children:"Previous"}),(0,e.jsxs)("span",{className:"stg:text-xs stg:tabular-nums stg:text-muted-foreground",children:["Page ",t," of ",o]}),(0,e.jsx)("button",{type:"button",disabled:t>=o,onClick:()=>i(t+1),className:n,children:"Next"})]})}])},758301,t=>{"use strict";var e=t.i(843476);t.s(["UploadIcon",0,function({className:t}){return(0,e.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,e.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,e.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]})}])},524728,248747,t=>{"use strict";var e=t.i(271645),s=t.i(586108),n=t.i(583093);function o(t,e,s){let o=s?.query,i=s?.scope??"org",u=s?.refetchToken,{data:l,isLoading:r,isRefetching:a,error:c,refetch:g}=(0,n.useFetch)(e?async()=>(await t({org:e,query:o||void 0,excludePublic:!1,crossOrgPublic:"all"===i,page:{num:1,size:1}})).totalCount:null,[t,e,o,i,u],void 0);return{count:l,isLoading:r,isRefetching:a,error:c,refetch:g}}t.s(["useResourceCount",0,o],248747);let i={entries:[],totalCount:0,totalPages:0};t.s(["usePluginCount",0,function(t,n){let i=(0,s.useStigmer)();return o((0,e.useCallback)(t=>i.plugin.list(t),[i]),t,n)},"usePluginList",0,function(t,o){let u=(0,s.useStigmer)(),{entries:l,totalCount:r,totalPages:a,currentPage:c,isLoading:g,error:d,refetch:p}=function(t,e,s){let o=s?.pageSize??20,u=s?.page??1,l=s?.query,r=s?.scope??"org",{data:a,isLoading:c,isRefetching:g,error:d,refetch:p}=(0,n.useFetch)(e?async()=>{let s=await t({org:e,query:l||void 0,excludePublic:!1,crossOrgPublic:"all"===r,page:{num:u,size:o}});return{entries:[...s.entries],totalCount:s.totalCount,totalPages:s.totalPages}}:null,[t,e,l,r,u,o],i);return{entries:a.entries,totalCount:a.totalCount,totalPages:a.totalPages,currentPage:u,isLoading:c,isRefetching:g,error:d,refetch:p}}((0,e.useCallback)(t=>u.plugin.list(t),[u]),t,o);return{plugins:l,totalCount:r,totalPages:a,currentPage:c,isLoading:g,error:d,refetch:p}}],524728)}]);
|
|
@@ -72,4 +72,4 @@ When editing existing content, preserve the author's voice while improving clari
|
|
|
72
72
|
- **Never execute destructive operations** (delete, force-push, scale-to-zero) without explicit human confirmation.
|
|
73
73
|
- **Always verify the target environment** (staging vs production) before any operation.
|
|
74
74
|
- **Prefer read-only operations** when gathering information. Only suggest write operations when the user requests a change.
|
|
75
|
-
- **Escalate uncertainty:** If you are not confident in a diagnosis or action, say so and recommend involving a human operator.`}}];var D=e.i(297629),M=e.i(310057);e.s(["AgentNewPage",0,function(){let e=(0,D.useActiveOrgSlug)(),n=(0,r.useRouter)(),{setLabel:
|
|
75
|
+
- **Escalate uncertainty:** If you are not confident in a diagnosis or action, say so and recommend involving a human operator.`}}];var D=e.i(297629),M=e.i(310057);e.s(["AgentNewPage",0,function(){let e=(0,D.useActiveOrgSlug)(),n=(0,r.useRouter)(),i=(0,r.useSearchParams)(),{setLabel:a}=(0,M.useBreadcrumbOverride)(),[o]=(0,s.useState)(()=>{var e;return(e=i.get("mcp"))?e.split(",").filter(e=>""!==e):[]}),[l,g]=(0,s.useState)(()=>o.length>0?{phase:"wizard"}:{phase:"picking"}),[c,d]=(0,s.useState)(!1);(0,s.useEffect)(()=>{a("New agent")},[a]);let u=(0,s.useCallback)(e=>{switch(e.kind){case"scratch":g({phase:"wizard"});break;case"template":g({phase:"wizard",initialData:e.data});break;case"import":d(!0)}},[]),p=(0,s.useCallback)(e=>{n.push(`/library/agents/${e.org}/${e.slug}`)},[n]),m=(0,s.useCallback)(()=>{"wizard"===l.phase?g({phase:"picking"}):n.push("/library/agents")},[l.phase,n]);return e?(0,t.jsxs)(t.Fragment,{children:["picking"===l.phase?(0,t.jsx)(T.CreationPicker,{resourceLabel:"agent",templates:I,onSelect:u}):(0,t.jsx)(L,{org:e,initialData:l.initialData??(o.length>0?{mcpServerUsages:o.map(t=>({mcpServerRef:{org:e,slug:t}}))}:void 0),onComplete:p,onCancel:m,className:"min-h-[480px]"}),(0,t.jsx)(R.ApplyManifestDialog,{open:c,onOpenChange:d,org:e,onApplied:()=>n.push("/library/agents")})]}):null}],155732)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,758301,e=>{"use strict";var r=e.i(843476);e.s(["UploadIcon",0,function({className:e}){return(0,r.jsxs)("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,r.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,r.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]})}])},461439,e=>{"use strict";var r=e.i(843476),o=e.i(271645),s=e.i(618566),l=e.i(563212),n=e.i(297629),i=e.i(310057);e.s(["PluginUploadPage",0,function(){let e=(0,n.useActiveOrgSlug)(),t=(0,s.useRouter)(),{setLabel:a}=(0,i.useBreadcrumbOverride)();return((0,o.useEffect)(()=>{a("Upload plugin")},[a]),e)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-foreground text-xl font-semibold",children:"Upload a plugin"}),(0,r.jsxs)("p",{className:"text-muted-foreground mt-1 text-sm",children:["A plugin folder from your computer, or a .zip of one, installed into ",e,". A Cursor, Claude Code, Codex or Agent Plugins folder installs unchanged."]})]}),(0,r.jsx)(l.PluginUploader,{org:e,onComplete:({plugin:e})=>t.push(`/library/plugins/${e.metadata?.org}/${e.metadata?.slug}`),onCancel:()=>t.push("/library/plugins")})]}):null}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,298021,e=>{"use strict";var t=e.i(843476),s=e.i(618566),r=e.i(271645),a=e.i(893976),n=e.i(65642),o=e.i(476007),l=e.i(468806),i=e.i(869803),c=e.i(933221),u=e.i(818424),g=e.i(379410);let d=/^https?:\/\/(?:www\.)?github\.com\/([^/\s]+)\/([^/\s#?]+?)(?:\.git)?(?:\/tree\/([^\s#?]+))?\/?$/;function m(e){let t=d.exec(e);if(null!==t){let s=`${t[1]??""}/${t[2]??""}`;if(!p(s))return{ok:!1,message:`'${e}' does not name a GitHub repository`};let r=t[3];return{ok:!0,source:{type:"github",repo:s,...void 0!==r&&""!==r&&{ref:r}}}}let s=e.indexOf("@"),r=-1===s?e:e.slice(0,s),a=-1===s?void 0:e.slice(s+1);return p(r)&&(void 0===a||""!==a)?{ok:!0,source:{type:"github",repo:r,...void 0!==a&&{ref:a}}}:{ok:!1,message:`'${e}' is not a GitHub 'owner/repo'`}}function h(e){return void 0===e.ref?`github.com/${e.repo}`:`github.com/${e.repo}@${e.ref}`}let f=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function p(e){let t=e.split("/");return 2===t.length&&t.every(e=>f.test(e)&&"."!==e&&".."!==e)}var x=e.i(321252);let b="HEAD",y=new Map;function w(e,t,s){return`https://raw.githubusercontent.com/${e}/${t}/${s.split("/").map(encodeURIComponent).join("/")}`}async function j(e,t){let s=await k(e,t);if(s.truncated)throw new x.MarketplaceSourceError(`${h(e)} lists more files than GitHub returns in one tree, so it cannot be read as a marketplace`,"too-large");let r=s.tree.filter(e=>"blob"===e.type).map(e=>({path:e.path,size:e.size??0}));if(r.length>x.MARKETPLACE_TREE_LIMITS.entries)throw new x.MarketplaceSourceError(`${h(e)} holds ${r.length} files, over the ${x.MARKETPLACE_TREE_LIMITS.entries} a marketplace may carry`,"too-large");let a=s.sha,n=new Map(r.map(e=>[e.path,e.size]));return{describe:`${h(e)} (${a.slice(0,7)})`,files:r,fetchFile:s=>v(e.repo,a,s,n.get(s),t),fileUrl:t=>w(e.repo,a,t)}}async function k(e,t){let s,r=`${e.repo}@${e.ref??b}`,a=y.get(r),n={accept:"application/vnd.github+json"};a?.etag&&(n["if-none-match"]=a.etag);try{s=await t(`https://api.github.com/repos/${e.repo}/git/trees/${encodeURIComponent(e.ref??b)}?recursive=1`,{headers:n})}catch(t){throw new x.MarketplaceSourceError(`could not reach GitHub for ${h(e)}: ${t instanceof Error?t.message:String(t)}`,"unreachable")}if(304===s.status&&void 0!==a)return a.listing;if(404===s.status)throw new x.MarketplaceSourceError(`GitHub has no public repository ${h(e)}; private repositories are not marketplaces`,"not-found");if(403===s.status||429===s.status)throw new x.MarketplaceSourceError(`GitHub is rate-limiting this browser (${s.status}); try again in a while, or install with the CLI`,"unreachable");if(!s.ok)throw new x.MarketplaceSourceError(`GitHub answered ${s.status} for ${h(e)}`,"unreachable");let o=await s.json();return y.set(r,{etag:s.headers.get("etag"),listing:o}),o}async function v(e,t,s,r,a){let n;try{n=await a(w(e,t,s))}catch(e){throw new x.MarketplaceSourceError(`could not read '${s}' from GitHub: ${e instanceof Error?e.message:String(e)}`,"unreachable")}if(!n.ok)throw new x.MarketplaceSourceError(`GitHub answered ${n.status} for '${s}'`,"unreachable");let o=new Uint8Array(await n.arrayBuffer());if(void 0!==r&&o.length!==r)throw new x.MarketplaceSourceError(`'${s}' came back ${o.length} bytes where the tree listed ${r}; the repository changed under the read`,"refused");return o}let N=/^\d+\.\d+\.\d+(?:-(?!dev(?:[.-]|$))[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,S="@stigmer/plugins";function $(e,t){return`https://cdn.jsdelivr.net/npm/${S}@${e}/${t.split("/").map(encodeURIComponent).join("/")}`}async function C(e,t){let s;if(!N.test(e))throw new x.MarketplaceSourceError(`the official marketplace is published with each release, and this server runs a development build (${e}); add a GitHub marketplace to install from, or use the CLI`,"unavailable-on-dev-server");try{s=await t(`https://data.jsdelivr.com/v1/package/npm/${S}@${e}/flat`)}catch(t){throw new x.MarketplaceSourceError(`could not reach the npm CDN for ${S}@${e}: ${t instanceof Error?t.message:String(t)}`,"unreachable")}if(404===s.status)throw new x.MarketplaceSourceError(`${S}@${e} is not published; the catalogue for this server's release is not available yet`,"not-found");if(!s.ok)throw new x.MarketplaceSourceError(`the npm CDN answered ${s.status} for ${S}@${e}`,"unreachable");let r=(await s.json()).files.map(e=>({path:e.name.replace(/^\//,""),size:e.size}));if(r.length>x.MARKETPLACE_TREE_LIMITS.entries)throw new x.MarketplaceSourceError(`${S}@${e} holds ${r.length} files, over the ${x.MARKETPLACE_TREE_LIMITS.entries} a marketplace may carry`,"too-large");let a=new Map(r.map(e=>[e.path,e.size]));return{describe:`${S}@${e}`,files:r,fetchFile:async s=>{let r;try{r=await t($(e,s))}catch(e){throw new x.MarketplaceSourceError(`could not read '${s}' from the npm CDN: ${e instanceof Error?e.message:String(e)}`,"unreachable")}if(!r.ok)throw new x.MarketplaceSourceError(`the npm CDN answered ${r.status} for '${s}'`,"unreachable");let n=new Uint8Array(await r.arrayBuffer()),o=a.get(s);if(void 0!==o&&n.length!==o)throw new x.MarketplaceSourceError(`'${s}' came back ${n.length} bytes where the listing said ${o}`,"refused");return n},fileUrl:t=>$(e,t)}}let E={sm:"stg:size-4",md:"stg:size-6"},M={sm:32,md:48};function I({source:e,size:s="sm",className:n}){let[o,l]=(0,r.useState)(!1);return o?null:(0,t.jsx)("img",{src:function(e,t=64){return`https://github.com/${encodeURIComponent(e)}.png?size=${t}`}(function(e){switch(e.type){case"official":return"stigmer";case"github":var t;let s;return -1===(s=(t=e.repo).indexOf("/"))?t:t.slice(0,s);default:return e}}(e),M[s]),alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>l(!0),className:(0,a.cn)("stg:shrink-0 stg:rounded-sm stg:bg-muted stg:object-cover",E[s],n)})}let A=[];function T({open:e,onClose:s,reads:a=A,marketplaces:o,unreadable:i,isBuiltIn:c,add:u,remove:g}){let d=(0,r.useId)();return(0,t.jsx)(l.DialogShell,{open:e,onOpenChange:e=>{e||s()},width:"lg",className:"stg:max-h-[85vh] stg:bg-card stg:text-foreground","aria-labelledby":d,children:e&&(0,t.jsxs)("div",{className:"stg:flex stg:max-h-[85vh] stg:flex-col stg:gap-4 stg:overflow-y-auto stg:p-6",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{id:d,className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Sources"}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:"What the Marketplace shows comes from Stigmer's catalogue, published with each release, and from any catalogue you add. Added sources are remembered in this browser, as the CLI remembers its own."})]}),(0,t.jsx)(L,{reads:a,marketplaces:o,unreadable:i,isBuiltIn:c,remove:g}),(0,t.jsxs)("details",{className:"stg:rounded-md stg:border stg:border-border stg:p-3",children:[(0,t.jsx)("summary",{className:"stg:cursor-pointer stg:text-sm stg:font-medium stg:text-foreground",children:"Add your own catalogue"}),(0,t.jsx)("p",{className:"stg:mt-1 stg:mb-3 stg:text-xs stg:text-muted-foreground",children:"A repository you or your company publish with a marketplace file, read from GitHub."}),(0,t.jsx)(U,{add:u})]}),(0,t.jsx)("footer",{className:"stg:flex stg:justify-end stg:pt-1",children:(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:s,children:"Close"})})]})})}function L({reads:e,marketplaces:s,unreadable:o,isBuiltIn:l,remove:c}){let[u,g]=(0,r.useState)(null);return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2",children:[(0,t.jsxs)("ul",{className:(0,a.cn)(i.UNSTYLED_LIST,"stg:divide-y stg:divide-border stg:rounded-md stg:border stg:border-border"),"aria-label":"Known sources",children:[s.map(s=>(0,t.jsxs)("li",{className:"stg:flex stg:flex-col stg:gap-2 stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-4",children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-3",children:[(0,t.jsx)(I,{source:s.source,size:"md"}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:text-foreground",children:s.name}),(0,t.jsxs)("p",{className:"stg:font-mono stg:text-xs stg:text-muted-foreground",children:[function(e){switch(e.type){case"official":return"built in";case"github":return h(e);default:return e}}(s.source),l(s.name)&&"official"!==s.source.type?" (built in)":""]})]})]}),!l(s.name)&&(0,t.jsx)(n.Button,{variant:"ghost",size:"sm",onClick:()=>g(c(s.name)),"aria-label":`Remove source ${s.name}`,children:"Remove"})]}),(0,t.jsx)(z,{read:e.find(e=>e.marketplace.name===s.name)})]},s.name)),o.map(e=>(0,t.jsxs)("li",{className:"stg:flex stg:items-center stg:justify-between stg:gap-4 stg:px-3 stg:py-2",role:"alert",children:[(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:text-foreground",children:e.name}),(0,t.jsxs)("p",{className:"stg:text-xs stg:text-destructive",children:["cannot be read: ",e.reason]})]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"sm",onClick:()=>g(c(e.name)),"aria-label":`Forget source ${e.name}`,children:"Forget"})]},e.name))]}),u&&(0,t.jsx)("p",{role:"alert",className:"stg:text-xs stg:text-destructive",children:u})]})}function z({read:e}){if(void 0===e)return null;let{state:s}=e;switch(s.kind){case"reading":return(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"Reading…"});case"failed":return(0,t.jsxs)("p",{className:"stg:text-xs stg:text-destructive",children:["cannot be read: ",s.error.message]});case"ready":{let e=s.opened.marketplace.plugins.length,r=s.opened.warnings,a=1===e?"Offers 1 plugin":`Offers ${e} plugins`;if(0===r.length)return(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",children:[a,"."]});return(0,t.jsxs)("details",{className:"stg:text-xs stg:text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"stg:cursor-pointer",children:[a,"; ",1===r.length?"1 entry it lists":`${r.length} entries it lists`," cannot be installed from here."]}),(0,t.jsx)("ul",{className:"stg:mt-1 stg:list-disc stg:space-y-1 stg:pl-5",children:r.map((e,s)=>(0,t.jsx)("li",{children:e.message},`${e.kind}:${s}`))})]})}default:return s}}function U({add:e}){let[s,o]=(0,r.useState)(""),[l,i]=(0,r.useState)(""),[u,g]=(0,r.useState)(!1),[d,m]=(0,r.useState)(null),h=`${(0,r.useId)()}-source-hint`;return(0,t.jsxs)("form",{className:"stg:flex stg:flex-col stg:gap-2","aria-label":"Add a source",onSubmit:t=>{t.preventDefault(),g(!0),m(null),e(s,l).then(e=>{g(!1),e.ok?(o(""),i(""),m({kind:"added",text:`Added source '${e.name}'.`})):m({kind:"refusal",text:e.message})})},children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2 stg:sm:flex-row stg:sm:items-end",children:[(0,t.jsx)(c.Field,{label:"GitHub repository",className:"stg:flex-1",children:(0,t.jsx)("input",{className:c.INPUT_CLASSES,value:s,onChange:e=>o(e.target.value),placeholder:"owner/repo or https://github.com/owner/repo","aria-describedby":h})}),(0,t.jsx)(c.Field,{label:"Name (optional)",className:"stg:sm:w-48",children:(0,t.jsx)("input",{className:c.INPUT_CLASSES,value:l,onChange:e=>i(e.target.value),placeholder:"the catalogue's own name"})}),(0,t.jsx)(n.Button,{type:"submit",variant:"outline",size:"sm",disabled:u||""===s.trim(),children:u?"Reading…":"Add source"})]}),(0,t.jsxs)("p",{id:h,className:"stg:text-xs stg:text-muted-foreground",children:["A source is ","a GitHub repository as 'owner/repo' or 'owner/repo@ref', or that repository's URL (https://github.com/owner/repo)",". It is read before it is added, and takes the name its marketplace file gives itself unless you choose one."]}),d&&(0,t.jsx)("p",{role:"refusal"===d.kind?"alert":"status",className:(0,a.cn)("stg:text-xs","refusal"===d.kind?"stg:text-destructive":"stg:text-muted-foreground"),children:d.text})]})}var P=e.i(758301);let O=["stg:border-chart-1","stg:border-chart-2","stg:border-chart-3","stg:border-chart-4","stg:border-chart-5"],R="stg:flex stg:size-10 stg:shrink-0 stg:items-center stg:justify-center stg:overflow-hidden stg:rounded-lg";function _({name:e,displayName:s,logoUrl:n,className:o}){let[l,i]=(0,r.useState)(!1);if(null!==n&&!l)return(0,t.jsx)("span",{className:(0,a.cn)(R,"stg:bg-muted",o),children:(0,t.jsx)("img",{src:n,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>i(!0),className:"stg:size-full stg:object-contain"})});let c=(s.trim()||e).charAt(0).toUpperCase();return(0,t.jsx)("span",{"aria-hidden":"true","data-monogram":c,className:(0,a.cn)(R,"stg:border-2 stg:bg-muted stg:text-base stg:font-semibold stg:text-foreground",function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)|0;return O[Math.abs(t)%O.length]??O[0]}(e),o),children:c})}var D=e.i(466531),B=e.i(75786),G=e.i(782130),H=e.i(378486),F=e.i(833811);let K=new Set(["png","svg","jpg","jpeg","webp","gif"]);function J(e,t){let s=function(e,t){if("string"!=typeof e)return;let s=e.startsWith("./")?e.slice(2):e;if(!(0,D.isContainedPath)(s))return;let r=s.lastIndexOf(".");if(-1===r||!K.has(s.slice(r+1).toLowerCase()))return;let a=t.entry(s);if(void 0!==a&&!(a.size>D.PLUGIN_DOCUMENT_LIMITS.logo))return s}(e.logo,t);return{...Z("displayName",e.displayName),...Z("category",e.category),...void 0!==s&&{logo:s}}}function Z(e,t){return"string"==typeof t&&""!==t?{[e]:t}:{}}let W=new Set(Object.values(B.MANIFEST_LOCATIONS));async function Y(e){let t=new Map;await Promise.all(e.filter(e=>W.has(e.path)).map(async e=>{try{t.set(e.path,await e.read())}catch{}}));var s={entries:e.map(({path:e,size:t})=>({path:e,size:t})).sort((e,t)=>(0,D.comparePaths)(e.path,t.path)),read:e=>{let s=t.get(e);if(void 0===s)throw Error(`plugin file '${e}' was not fetched for presentation`);return s}};let r=new D.PluginFileIndex(s),a={};for(let e of G.MANIFEST_PRECEDENCE){let t=function(e,t){let s,r,a=e.entry(t);if(void 0!==a&&!(a.size>D.PLUGIN_DOCUMENT_LIMITS.manifest)){try{s=e.files.read(t)}catch{return}if(!(s.length>D.PLUGIN_DOCUMENT_LIMITS.manifest)){try{r=JSON.parse((0,D.decodeUtf8)(s))}catch{return}return(0,F.isJsonObject)(r)?r:void 0}}}(r,B.MANIFEST_LOCATIONS[e]);if(void 0===t)continue;let s=function(e,t,s){let r=function(e){let t=function(e){if(!(0,F.isJsonObject)(e))return;let t={...Z("name",e.name),...Z("email",e.email),...Z("url",e.url)};return 0===Object.keys(t).length?void 0:t}(e.author);return{...Z("version",e.version),...Z("description",e.description),...void 0!==t&&{author:t}}}(t);switch(e){case"cursor":return{...r,...J(t,s)};case"codex":{let e=t.interface;return(0,F.isJsonObject)(e)?{...r,...J(e,s)}:r}case"agent-plugins":{let e=(0,H.stigmerExtensionOf)(t);return void 0===e?r:{...r,...J(e,s)}}case"claude":return r;default:return e}}(e,t,r);for(let e of Object.keys(s))void 0===a[e]&&Object.assign(a,{[e]:s[e]})}return a}var V=e.i(583093),q=e.i(961378);let Q={},X="stg:flex stg:flex-col stg:gap-3 stg:rounded-lg stg:border stg:border-border stg:bg-card stg:p-4";function ee({entry:e,installed:s,onInstall:o,className:l}){let{presentation:i,logoUrl:c}=function(e,t){let s=e&&t?`${e.tree.describe}:${t.dir}`:null,{data:a,isLoading:n}=(0,V.useFetch)(e&&t?()=>Y((0,q.entryCandidates)(e,t)):null,[s],Q,null===s?{}:{cacheKey:`plugin-presentation:${s}`}),o=(0,r.useMemo)(()=>e&&t&&void 0!==a.logo?e.tree.fileUrl(""===t.dir?a.logo:`${t.dir}/${a.logo}`):null,[e,t,a.logo]);return(0,r.useMemo)(()=>({presentation:a,logoUrl:o,isLoading:n}),[a,o,n])}(e.opened,e.entry),u=e.entry.name,g=i.displayName??u,d=e.entry.description??i.description,m=i.author?.name,h=m?`by ${m}`:g!==u?u:null;return(0,t.jsxs)("li",{className:(0,a.cn)(X,l),children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:[(0,t.jsx)(_,{name:u,displayName:g,logoUrl:c}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-2",children:[(0,t.jsx)("h3",{className:"stg:truncate stg:text-sm stg:font-medium stg:text-foreground",children:g}),s&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded-full stg:border stg:border-border stg:bg-muted stg:px-2 stg:py-0.5 stg:text-xs stg:text-muted-foreground",children:"Installed"})]}),h&&(0,t.jsx)("p",{className:"stg:truncate stg:text-xs stg:text-muted-foreground",children:h})]})]}),d&&(0,t.jsx)("p",{className:"stg:line-clamp-2 stg:flex-1 stg:text-xs stg:text-muted-foreground",children:d}),(0,t.jsxs)("div",{className:"stg:mt-auto stg:flex stg:items-center stg:justify-between stg:gap-2 stg:pt-1",children:[(0,t.jsxs)("span",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-1.5 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsx)(I,{source:e.source.source}),(0,t.jsx)("span",{className:"stg:truncate",children:e.source.name})]}),(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:()=>o(e),"aria-label":`Install ${u}`,children:s?"Install again":"Install"})]})]})}function et({onUpload:e,className:s}){return(0,t.jsx)("li",{className:(0,a.cn)(X,"stg:border-dashed stg:bg-transparent",s),children:(0,t.jsxs)("button",{type:"button",onClick:e,className:(0,a.cn)("stg:flex stg:h-full stg:w-full stg:cursor-pointer stg:flex-col stg:items-start stg:gap-3 stg:rounded-md stg:text-left","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[(0,t.jsx)("span",{className:"stg:flex stg:size-10 stg:items-center stg:justify-center stg:rounded-lg stg:border stg:border-dashed stg:border-border stg:text-muted-foreground",children:(0,t.jsx)(P.UploadIcon,{className:"stg:size-5"})}),(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:"Upload a plugin"}),(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:"A Cursor, Claude Code, Codex or Agent Plugins folder from your computer, or a .zip of one."})]})})}var es=e.i(830419),er=e.i(563212),ea=e.i(188482);let en=(0,a.cn)("stg:inline-flex stg:cursor-pointer stg:items-center stg:gap-1.5 stg:rounded-full stg:border stg:px-3 stg:py-1 stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring");function eo({reads:e,selected:s,onSelect:o,onManage:l,className:i}){let c=(0,r.useRef)([]),u=["",...e.map(e=>e.marketplace.name)],g=s??"",d=(0,r.useCallback)(e=>{o(""===e?null:e)},[o]),m=(0,r.useCallback)((e,t)=>{let s=null;if("ArrowRight"===e.key||"ArrowDown"===e.key?s=(t+1)%u.length:"ArrowLeft"===e.key||"ArrowUp"===e.key?s=(t-1+u.length)%u.length:"Home"===e.key?s=0:"End"===e.key&&(s=u.length-1),null===s)return;e.preventDefault(),c.current[s]?.focus();let r=u[s];void 0!==r&&d(r)},[u,d]),h=e.reduce((e,t)=>e+("ready"===t.state.kind?t.state.opened.marketplace.plugins.length:0),0),f=e.some(e=>"reading"===e.state.kind);return(0,t.jsxs)("div",{className:(0,a.cn)("stg:flex stg:flex-wrap stg:items-center stg:gap-2",i),children:[(0,t.jsxs)("div",{role:"radiogroup","aria-label":"Sources",className:"stg:flex stg:flex-wrap stg:items-center stg:gap-2",children:[(0,t.jsxs)(ei,{ref:e=>{c.current[0]=e},selected:""===g,label:"All sources",onClick:()=>d(""),onKeyDown:e=>m(e,0),children:[(0,t.jsx)("span",{children:"All sources"}),(0,t.jsx)(ec,{count:h,reading:f})]}),e.map((e,s)=>(0,t.jsx)(el,{ref:e=>{c.current[s+1]=e},read:e,selected:g===e.marketplace.name,onClick:()=>d(e.marketplace.name),onKeyDown:e=>m(e,s+1)},e.marketplace.name))]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"xs",onClick:l,className:"stg:text-muted-foreground",children:"Manage sources"})]})}function el({ref:e,read:s,selected:r,onClick:a,onKeyDown:n}){let{marketplace:o,state:l}=s,i=(0,t.jsxs)(ei,{ref:e,selected:r,label:o.name,onClick:a,onKeyDown:n,children:[(0,t.jsx)(I,{source:o.source}),(0,t.jsx)("span",{children:o.name}),"ready"===l.kind&&(0,t.jsx)(ec,{count:l.opened.marketplace.plugins.length,reading:!1}),"reading"===l.kind&&(0,t.jsx)(g.SpinnerIcon,{className:"stg:size-3"}),"failed"===l.kind&&(0,t.jsx)(eu,{className:"stg:size-3"})]});return"failed"!==l.kind?i:(0,t.jsxs)(ea.Tooltip,{children:[(0,t.jsx)(ea.TooltipTrigger,{render:i}),(0,t.jsx)(ea.TooltipContent,{side:"bottom",children:l.error.message})]})}function ei({ref:e,selected:s,label:r,onClick:n,onKeyDown:o,children:l}){return(0,t.jsx)("button",{ref:e,type:"button",role:"radio","aria-checked":s,"aria-label":r,tabIndex:s?0:-1,onClick:n,onKeyDown:o,className:(0,a.cn)(en,s?"stg:border-primary stg:bg-primary stg:text-primary-foreground":"stg:border-border stg:bg-card stg:text-muted-foreground stg:hover:bg-accent-hover stg:hover:text-foreground"),children:l})}function ec({count:e,reading:s}){return s&&0===e?(0,t.jsx)(g.SpinnerIcon,{className:"stg:size-3"}):(0,t.jsx)("span",{className:"stg:tabular-nums",children:e})}function eu({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 2.5 14 13H2L8 2.5Z"}),(0,t.jsx)("path",{d:"M8 6.5v3M8 11.5h.01"})]})}var eg=e.i(586108),ed=e.i(326283);let em={kind:"reading"};class eh{reads=new Map;keys=new Map;generations=new Map;order=[];snapshot=[];listeners=new Set;open=null;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.snapshot;sync(e,t){this.open=t;let s=new Set(e.map(e=>e.name));for(let e of[...this.reads.keys()])s.has(e)||this.forget(e);for(let t of e){let e=function(e){switch(e.type){case"official":return"official";case"github":return`github:${e.repo}@${e.ref??""}`;default:return e}}(t.source);this.keys.get(t.name)!==e&&(this.keys.set(t.name,e),this.start(t))}this.order=e.map(e=>e.name),this.publish()}refetch(e){let t=this.reads.get(e);void 0!==t&&(this.start(t.marketplace),this.publish())}start(e){let t=this.open;if(null===t)throw Error("MarketplaceCatalogStore.sync must run before a read starts");let s=(this.generations.get(e.name)??0)+1;this.generations.set(e.name,s),this.reads.set(e.name,{marketplace:e,state:em});let r=t=>{this.generations.get(e.name)===s&&(this.reads.set(e.name,{marketplace:e,state:t}),this.publish())};t(e.source).then(e=>r({kind:"ready",opened:e}),e=>r({kind:"failed",error:(0,ed.toError)(e)}))}forget(e){this.reads.delete(e),this.keys.delete(e),this.generations.set(e,(this.generations.get(e)??0)+1)}publish(){let e=[];for(let t of this.order){let s=this.reads.get(t);void 0!==s&&e.push(s)}if(!(e.length===this.snapshot.length&&e.every((e,t)=>e===this.snapshot[t])))for(let t of(this.snapshot=e,this.listeners))t()}}async function ef(e,t,s={}){let r=s.fetchImpl??globalThis.fetch.bind(globalThis);switch(e.type){case"official":{let e=await t.platform.getServerInfo();return(0,q.openMarketplace)(await C(e.version,r))}case"github":return(0,q.openMarketplace)(await j(e,r));default:throw Error(`unknown marketplace source ${JSON.stringify(e)}`)}}let ep=[],ex=[{name:"stigmer",source:{type:"official"}}],eb=new Set(ex.map(e=>e.name));function ey(e){return eb.has(e)}function ew(e,t){switch(t){case"add":return`'${e}' is a built-in source and cannot be added or replaced; choose another name`;case"remove":return`'${e}' is a built-in source and cannot be removed`;default:return t}}let ej="stigmer:plugins:marketplaces:v1",ek=ex.map(e=>({name:e.name,source:e.source}));ek[0];let ev=new Set;function eN(e){ev.add(e);let t=t=>{t.key===ej&&e()};return window.addEventListener("storage",t),()=>{ev.delete(e),window.removeEventListener("storage",t)}}function eS(){try{return window.localStorage.getItem(ej)??""}catch{return""}}function e$(e){try{0===Object.keys(e).length?window.localStorage.removeItem(ej):window.localStorage.setItem(ej,JSON.stringify(e))}catch{}for(let e of ev)e()}function eC(e){if(""===e)return{};try{let t=JSON.parse(e);return"object"!=typeof t||null===t||Array.isArray(t)?{}:t}catch{return{}}}async function eE(e,t){try{let s=await (0,q.openMarketplace)(await j(e,t));return{ok:!0,name:s.marketplace.name}}catch(e){if(e instanceof q.PluginReadRefusal)return{ok:!1,message:`${e.subject}: ${e.errors.map(e=>e.message).join("; ")}`};return{ok:!1,message:e instanceof Error?e.message:String(e)}}}var eM=e.i(524728);function eI({org:e,onInstalled:s,fetchImpl:n,className:o}){let l=function(e={}){let t=(0,r.useSyncExternalStore)(eN,eS,()=>""),s=e.fetchImpl??globalThis.fetch,{marketplaces:a,unreadable:n}=(0,r.useMemo)(()=>{let e=[...ek],s=[];for(let[r,a]of Object.entries(eC(t))){if(ey(r))continue;let t=function(e){if("object"!=typeof e||null===e)return{ok:!1,reason:"not an object"};switch(e.type){case"github":{let t=e.repo;if("string"!=typeof t||!p(t))return{ok:!1,reason:"type 'github' needs 'repo: owner/repo'"};let s=e.ref;if(void 0!==s&&("string"!=typeof s||""===s))return{ok:!1,reason:"'ref' must be a non-empty branch, tag or commit"};return{ok:!0,source:{type:"github",repo:t,..."string"==typeof s&&{ref:s}}}}case void 0:return{ok:!1,reason:"no 'type' (expected 'github')"};default:return{ok:!1,reason:`unknown type '${String(e.type)}' (expected 'github')`}}}(a);t.ok?e.push({name:r,source:t.source}):s.push({name:r,reason:t.reason})}return{marketplaces:e,unreadable:s}},[t]),o=(0,r.useCallback)(async(e,t)=>{let r=m(e.trim());if(!r.ok)return{ok:!1,message:r.message};let a=await eE(r.source,s);if(!a.ok)return a;let n=void 0===t||""===t.trim()?a.name:t.trim();if(ey(n))return{ok:!1,message:ew(n,"add")};if(!(0,G.isValidPluginName)(n))return{ok:!1,message:`'${n}' is not a source name; use lowercase letters, digits, '.' and '-'`};let o=eC(eS());return void 0!==o[n]?{ok:!1,message:`a source named '${n}' is already added; remove it first or choose another name`}:(e$({...o,[n]:r.source}),{ok:!0,name:n})},[s]),l=(0,r.useCallback)(e=>{if(ey(e))return ew(e,"remove");let t=eC(eS());if(void 0===t[e])return`no source named '${e}' is added`;let{[e]:s,...r}=t;return e$(r),null},[]),i=(0,r.useCallback)(e=>m(e.trim()),[]);return(0,r.useMemo)(()=>({marketplaces:a,unreadable:n,add:o,remove:l,parseSource:i,isBuiltIn:ey}),[a,n,o,l,i])}(n?{fetchImpl:n}:{}),{reads:d,refetch:h}=function(e,t={}){let s=(0,eg.useStigmer)(),{fetchImpl:a}=t,n=(0,r.useRef)(null);null===n.current&&(n.current=new eh);let o=n.current,l=(0,r.useCallback)(e=>ef(e,s,a?{fetchImpl:a}:{}),[s,a]);(0,r.useEffect)(()=>{o.sync(e,l)},[o,e,l]);let i=(0,r.useSyncExternalStore)(o.subscribe,o.getSnapshot,()=>ep),c=(0,r.useCallback)(e=>o.refetch(e),[o]);return(0,r.useMemo)(()=>({reads:i,refetch:c}),[i,c])}(l.marketplaces,n?{fetchImpl:n}:{}),f=(0,eM.usePluginList)(e,{pageSize:200}),x=(0,r.useMemo)(()=>new Set(f.plugins.map(e=>e.slug)),[f.plugins]),[b,y]=(0,r.useState)(null),[w,j]=(0,r.useState)(""),[k,v]=(0,r.useState)(1),[N,S]=(0,r.useState)(null),[$,C]=(0,r.useState)(!1),[E,M]=(0,r.useState)(!1),I=(0,r.useId)(),A=(0,r.useCallback)(e=>{y(e),v(1)},[]),L=(0,r.useCallback)(e=>{j(e),v(1)},[]),z=null!==b&&d.some(e=>e.marketplace.name===b)?b:null,U=(0,r.useMemo)(()=>null===z?d:d.filter(e=>e.marketplace.name===z),[d,z]),P=(0,r.useMemo)(()=>(function(e){let t=[];for(let s of e){if("ready"!==s.state.kind)continue;let{opened:e}=s.state;for(let r of e.marketplace.plugins)t.push({source:s.marketplace,opened:e,entry:r})}return t})(U),[U]),O=(0,r.useMemo)(()=>P.filter(e=>{var t;let s;return t=e.entry,""===(s=w.trim().toLowerCase())||t.name.toLowerCase().includes(s)||(t.description?.toLowerCase().includes(s)??!1)}),[P,w]),R=""!==w.trim(),_=!R,D=Math.max(1,Math.ceil((O.length+ +!!_)/24)),B=Math.min(k,D),H=(B-1)*24,F=+!!_,K=O.slice(Math.max(0,H-F),H-F+24),J=U.some(e=>"reading"===e.state.kind),Z=U.filter(e=>"failed"===e.state.kind);return(0,t.jsxs)("div",{className:(0,a.cn)("stg:flex stg:flex-col stg:gap-6",o),children:[(0,t.jsx)(eo,{reads:d,selected:z,onSelect:A,onManage:()=>M(!0)}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1.5",children:[(0,t.jsx)("label",{htmlFor:I,className:"stg:text-sm stg:font-medium stg:text-foreground",children:"Search plugins"}),(0,t.jsx)("input",{id:I,type:"search",className:c.INPUT_CLASSES,value:w,onChange:e=>L(e.target.value),placeholder:null===z?"Search every source by name or description…":`Search ${z} by name or description…`})]}),Z.length>0&&(0,t.jsx)(eA,{failed:Z,refetch:h,whole:null!==z}),J&&0===P.length&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-sm stg:text-muted-foreground",role:"status",children:[(0,t.jsx)(g.SpinnerIcon,{className:"stg:size-4"}),"Reading ",z??"the sources","…"]}),P.length>0&&0===O.length&&R&&(0,t.jsxs)("p",{className:"stg:text-sm stg:text-muted-foreground",children:["Nothing here matches '",w.trim(),"'."]}),!J&&0===Z.length&&0===P.length&&(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:null===z?"No source offers a plugin this console can install.":`${z} offers no plugins this console can install.`}),(K.length>0||_&&1===B)&&(0,t.jsxs)("ul",{className:(0,a.cn)(i.UNSTYLED_LIST,"stg:grid stg:gap-3 stg:sm:grid-cols-2 stg:lg:grid-cols-3"),"aria-label":"Plugins",children:[_&&1===B&&(0,t.jsx)(et,{onUpload:()=>C(!0)}),K.map(e=>(0,t.jsx)(ee,{entry:e,installed:x.has(e.entry.name),onInstall:S},`${e.source.name}/${e.entry.name}`))]}),D>1&&(0,t.jsx)(u.Pagination,{pageNum:B,totalPages:D,onPageChange:v,ariaLabel:"Plugins pagination"}),(0,t.jsx)(es.PluginInstallDialog,{opened:N?.opened??null,entryName:N?.entry.name??null,sourceName:N?.source.name??"",org:e,open:null!==N,onClose:()=>S(null),onInstalled:e=>{S(null),s?.(e)}}),(0,t.jsx)(eT,{open:$,org:e,onClose:()=>C(!1),onInstalled:e=>{C(!1),s?.(e)}}),(0,t.jsx)(T,{open:E,onClose:()=>M(!1),reads:d,marketplaces:l.marketplaces,unreadable:l.unreadable,isBuiltIn:l.isBuiltIn,add:l.add,remove:l.remove})]})}function eA({failed:e,refetch:s,whole:r}){if(r){let[r]=e;return void 0===r||"failed"!==r.state.kind?null:(0,t.jsx)(o.ErrorMessage,{error:r.state.error,retry:()=>s(r.marketplace.name),title:`${r.marketplace.name} cannot be read right now`})}return(0,t.jsx)("ul",{className:(0,a.cn)(i.UNSTYLED_LIST,"stg:flex stg:flex-col stg:gap-1"),"aria-label":"Sources that cannot be read",children:e.map(e=>"failed"===e.state.kind?(0,t.jsxs)("li",{className:"stg:flex stg:flex-wrap stg:items-baseline stg:gap-x-2 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:e.marketplace.name}),(0,t.jsxs)("span",{children:["cannot be read right now: ",e.state.error.message]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"xs",onClick:()=>s(e.marketplace.name),"aria-label":`Retry ${e.marketplace.name}`,children:"Retry"})]},e.marketplace.name):null)})}function eT({open:e,org:s,onClose:a,onInstalled:n}){let o=(0,r.useId)();return(0,t.jsx)(l.DialogShell,{open:e,onOpenChange:e=>{e||a()},width:"lg",className:"stg:max-h-[85vh] stg:bg-card stg:text-foreground","aria-labelledby":o,children:e&&(0,t.jsxs)("div",{className:"stg:flex stg:max-h-[85vh] stg:flex-col stg:gap-4 stg:overflow-y-auto stg:p-6",children:[(0,t.jsx)("h2",{id:o,className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Upload a plugin"}),(0,t.jsx)(er.PluginUploader,{org:s,onComplete:n,onCancel:a})]})})}var eL=e.i(297629);e.s(["MarketplacePage",0,function(){let e=(0,eL.useActiveOrgSlug)(),r=(0,s.useRouter)();return e?(0,t.jsxs)("div",{className:"mx-auto w-full max-w-5xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h1",{className:"text-foreground text-xl font-semibold",children:"Marketplace"}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-1 text-sm",children:["Plugins you can install into ",e,": from Stigmer's catalogue, from your computer, or from a catalogue you add. A plugin installs as an agent, as tools for your agents, or both."]})]}),(0,t.jsx)(eI,{org:e,onInstalled:({plugin:e})=>r.push(`/library/plugins/${e.metadata?.org}/${e.metadata?.slug}`)})]}):null}],298021)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,321252,e=>{"use strict";e.s(["MARKETPLACE_TREE_LIMITS",0,{entries:2e4,pluginBytes:0x6400000},"MarketplaceSourceError",0,class extends Error{reason;constructor(e,t){super(e),this.reason=t,this.name="MarketplaceSourceError"}},"formatMib",0,function(e){return`${(e/1048576).toFixed(1)} MiB`}])},466531,e=>{"use strict";let t=new TextEncoder,r=new TextDecoder("utf-8",{fatal:!1});function n(e,t){return e<t?-1:+(e>t)}function s(e){return!(""===e||e.startsWith("/")||e.includes("\\"))&&e.split("/").every(e=>""!==e&&"."!==e&&".."!==e)}let i=/[*?[\]{}]/;e.s(["PLUGIN_DOCUMENT_LIMITS",0,{manifest:262144,mcpConfig:262144,skillMd:1048576,subAgent:1048576,overlay:1048576,logo:1048576,marketplace:1048576},"PluginFileIndex",0,class{files;byPath;constructor(e){this.files=e,this.byPath=new Map(e.entries.map(e=>[e.path,e]))}has(e){return this.byPath.has(e)}entry(e){return this.byPath.get(e)}filesUnder(e){if(""===e)return this.files.entries.map(e=>e.path);let t=`${e}/`;return this.files.entries.filter(e=>e.path.startsWith(t)).map(e=>e.path)}isDirectory(e){if(""===e)return this.files.entries.length>0;let t=`${e}/`;return this.files.entries.some(e=>e.path.startsWith(t))}childDirectories(e){let t=""===e?"":`${e}/`,r=new Set;for(let e of this.files.entries){if(!e.path.startsWith(t))continue;let n=e.path.slice(t.length),s=n.indexOf("/");-1!==s&&r.add(n.slice(0,s))}return[...r].sort(n)}childFiles(e){let t=""===e?"":`${e}/`,r=[];for(let e of this.files.entries){if(!e.path.startsWith(t))continue;let n=e.path.slice(t.length);n.includes("/")||r.push(n)}return r.sort(n)}},"basename",0,function(e){let t=e.lastIndexOf("/");return -1===t?e:e.slice(t+1)},"comparePaths",0,n,"decodeUtf8",0,function(e){let t=r.decode(e);return 65279===t.charCodeAt(0)?t.slice(1):t},"dirname",0,function(e){let t=e.lastIndexOf("/");return -1===t?"":e.slice(0,t)},"inMemoryPluginFiles",0,function(e){let r=new Map;for(let[n,s]of e)r.set(n,"string"==typeof s?t.encode(s):s);return{entries:[...r.entries()].map(([e,t])=>({path:e,size:t.length})).sort((e,t)=>n(e.path,t.path)),read(e){let t=r.get(e);if(void 0===t)throw Error(`plugin file '${e}' is not listed`);return t}}},"isContainedPath",0,s,"joinPath",0,function(e,t){return""===e?t:`${e}/${t}`},"resolveDeclaredPath",0,function(e){if(i.test(e))return{ok:!1,kind:"path-glob-unsupported"};if("."===e||"./"===e)return{ok:!0,path:""};if(!e.startsWith("./"))return{ok:!1,kind:"path-not-relative"};let t=e.slice(2).replace(/\/+$/,"");return""===t?{ok:!0,path:""}:s(t)?{ok:!0,path:t}:{ok:!1,kind:"path-escapes-root"}}])},75786,e=>{"use strict";let t="https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",r="https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",n={"agent-plugins":"plugin.json",claude:".claude-plugin/plugin.json",cursor:".cursor-plugin/plugin.json",codex:".codex-plugin/plugin.json"},s=e=>`'${e??""}'`,i=e=>void 0===e?"":` in ${s(e)}`,a={"no-manifest":()=>`no plugin manifest found: expected one of ${Object.values(n).map(e=>s(e)).join(", ")}`,"manifest-unreadable":e=>`manifest ${s(e.path)} is not valid JSON: ${e.detail??"parse error"}`,"manifest-schema-missing":e=>`manifest ${s(e.path)} is missing the required '$schema' field; an Agent Plugins manifest declares ${s(t)}`,"manifest-schema-unsupported":e=>`manifest ${s(e.path)} declares an unsupported '$schema' ${s(e.detail)}; this reader supports ${s(t)}`,"manifest-name-missing":e=>`manifest ${s(e.path)} is missing the required 'name' field`,"manifest-name-invalid":e=>`plugin name ${s(e.subject)}${i(e.path)} is invalid: 1 to 64 characters of lowercase letters, digits, hyphens and periods, starting and ending alphanumeric, with no '--' or '..'`,"manifest-name-conflict":e=>`manifests disagree on the plugin name: ${s(e.subject)} in ${s(e.path)} versus ${e.detail??"another manifest"}`,"manifest-field-type":e=>`field ${s(e.subject)}${i(e.path)} has the wrong type: expected ${e.detail??"a different type"}`,"path-not-relative":e=>`path ${s(e.subject)}${i(e.path)} must be plugin-relative and begin with './'`,"path-escapes-root":e=>`path ${s(e.subject)}${i(e.path)} escapes the plugin root`,"path-glob-unsupported":e=>`path ${s(e.subject)}${i(e.path)} is a glob pattern; declare directories and files by path`,"path-uncontained":e=>`the reader listed a path outside the plugin root: ${s(e.path)}`,"document-too-large":e=>`${s(e.path)} is ${e.subject??"too many"} bytes, over the ${e.detail??""}-byte limit for this kind of document`,"skill-frontmatter-missing":e=>`${s(e.path)} must start with YAML frontmatter ('---')`,"skill-frontmatter-unclosed":e=>`${s(e.path)} frontmatter is not closed (missing the closing '---')`,"skill-frontmatter-unreadable":e=>`${s(e.path)} frontmatter is not valid YAML: ${e.detail??"parse error"}`,"skill-name-invalid":e=>`skill name ${s(e.subject)}${i(e.path)} is invalid: lowercase letters, digits and hyphens, optionally dot-scoped, with every segment alphanumeric`,"skill-name-duplicate":e=>`skill name ${s(e.subject)} appears more than once (again${i(e.path)})`,"mcp-config-unreadable":e=>`MCP configuration ${s(e.path)} is not valid JSON: ${e.detail??"parse error"}`,"mcp-config-shape":e=>`MCP configuration ${s(e.path)} must be an object with an 'mcpServers' object`,"mcp-config-schema-missing":e=>`MCP configuration ${s(e.path)} is missing the required '$schema' field; an Agent Plugins configuration declares ${s(r)}`,"mcp-config-schema-unsupported":e=>`MCP configuration ${s(e.path)} declares an unsupported '$schema' ${s(e.detail)}; this reader supports ${s(r)}`,"mcp-config-field-unknown":e=>`MCP configuration ${s(e.path)} has an unexpected top-level field ${s(e.subject)}; only '$schema' and 'mcpServers' are allowed`,"mcp-server-shape":e=>`MCP server ${s(e.subject)}${i(e.path)} must be an object`,"mcp-server-type-missing":e=>`MCP server ${s(e.subject)}${i(e.path)} is missing the 'type' field the Agent Plugins format requires ('stdio', 'streamable-http' or 'sse')`,"mcp-server-transport-unknown":e=>`MCP server ${s(e.subject)}${i(e.path)} has no 'type' and neither a 'command' nor a 'url' to infer it from`,"mcp-server-type-ambiguous":e=>`MCP server ${s(e.subject)}${i(e.path)} declares both 'command' and 'url'; a server is either stdio or HTTP`,"mcp-server-type-unknown":e=>`MCP server ${s(e.subject)}${i(e.path)} has an unknown 'type' ${s(e.detail)}; expected 'stdio', 'http', 'streamable-http' or 'sse'`,"mcp-server-field-unknown":e=>`MCP server ${s(e.subject)}${i(e.path)} has a field ${s(e.detail)} that its transport does not define`,"mcp-server-field-type":e=>`MCP server ${s(e.subject)}${i(e.path)} field ${s(e.detail)} has the wrong type`,"mcp-server-url-missing":e=>`MCP server ${s(e.subject)}${i(e.path)} is missing the 'url' its HTTP transport requires`,"mcp-server-url-invalid":e=>`MCP server ${s(e.subject)}${i(e.path)} has an invalid 'url' ${s(e.detail)}: expected an absolute HTTPS URL (HTTP only for localhost) with no user information or fragment`,"mcp-server-url-variable":e=>`MCP server ${s(e.subject)}${i(e.path)} has a variable in its 'url'; Stigmer sends the URL as written, so write the URL out and put variables in 'headers'`,"mcp-server-command-missing":e=>`MCP server ${s(e.subject)}${i(e.path)} is missing the 'command' its stdio transport requires`,"mcp-server-command-invalid":e=>`MCP server ${s(e.subject)}${i(e.path)} has a 'command' that is not a single executable name; put arguments in 'args'`,"mcp-server-command-relative":e=>`MCP server ${s(e.subject)}${i(e.path)} runs a command bundled in the plugin ${s(e.detail)}; Stigmer runs only commands on the runner's PATH (for example 'npx' or 'uvx')`,"mcp-server-plugin-root-reference":e=>`MCP server ${s(e.subject)}${i(e.path)} references the plugin's own files through ${s(e.detail)}; Stigmer does not mount plugin files into the runner`,"mcp-server-cwd-unsupported":e=>`MCP server ${s(e.subject)}${i(e.path)} sets a working directory; Stigmer does not mount plugin files, so a bundled directory cannot be reached`,"mcp-server-env-literal":e=>`MCP server ${s(e.subject)}${i(e.path)} sets environment variable ${s(e.detail)} to a literal value; Stigmer passes declared variables by name, so write ${s(`${e.detail??"KEY"}: "\${${e.detail??"KEY"}}"`)} and declare the variable`,"mcp-server-env-rename":e=>`MCP server ${s(e.subject)}${i(e.path)} maps environment variable ${s(e.detail)} to a differently named variable; Stigmer passes declared variables by name, so use the same name on both sides`,"mcp-server-name-duplicate":e=>`MCP server name ${s(e.subject)} appears more than once (again${i(e.path)})`,"mcp-server-header-duplicate":e=>`MCP server ${s(e.subject)}${i(e.path)} declares header ${s(e.detail)} more than once (header names are case-insensitive)`,"mcp-server-header-invalid":e=>`MCP server ${s(e.subject)}${i(e.path)} has an invalid header name ${s(e.detail)}`,"sub-agent-frontmatter-unreadable":e=>`${s(e.path)} frontmatter is not valid YAML: ${e.detail??"parse error"}`,"sub-agent-instructions-short":e=>`sub-agent ${s(e.subject)}${i(e.path)} has instructions under ${e.detail??""} characters; the body of the file is the sub-agent's prompt`,"sub-agent-name-duplicate":e=>`sub-agent name ${s(e.subject)} appears more than once (again${i(e.path)})`,"variable-name-invalid":e=>`variable name ${s(e.subject)}${i(e.path)} is invalid: an environment variable name is letters, digits and underscores, not starting with a digit`,"overlay-server-unknown":e=>`${s(e.path)} overlays MCP server ${s(e.subject)}, which the plugin does not declare`,"overlay-document-unknown":e=>`${s(e.path)} is not a document Stigmer reads; the 'ai.stigmer/' folder holds 'agent.yaml', 'workflows/<name>.yaml' and 'mcp-servers/<server>.yaml'`},o={"manifest-field-unknown":e=>`manifest ${s(e.path)} has an unknown field ${s(e.subject)}, ignored`,"manifest-extensions-invalid":e=>`manifest ${s(e.path)} has an 'extensions' field that is not an object, ignored`,"path-missing":e=>`path ${s(e.subject)} declared${i(e.path)} does not exist in the plugin`,"skill-name-defaulted":e=>`${s(e.path)} has no 'name' in its frontmatter; the skill is named after its directory, ${s(e.subject)}`,"skill-name-differs-from-directory":e=>`skill ${s(e.subject)}${i(e.path)} is named differently from its directory ${s(e.detail)}`,"skill-description-missing":e=>`skill ${s(e.subject)}${i(e.path)} has no 'description'`,"mcp-config-field-ignored":e=>`MCP configuration ${s(e.path)} has a top-level field ${s(e.subject)} Stigmer does not read, ignored`,"mcp-server-sse-mapped":e=>`MCP server ${s(e.subject)}${i(e.path)} declares the legacy 'sse' transport; Stigmer connects over Streamable HTTP and falls back to SSE only when the server rejects it`,"mcp-server-field-ignored":e=>`MCP server ${s(e.subject)}${i(e.path)} has a field ${s(e.detail)} Stigmer does not read, ignored`,"mcp-server-auth-ignored":e=>`MCP server ${s(e.subject)}${i(e.path)} has an 'auth' block Stigmer does not read; OAuth for a server is declared in 'ai.stigmer/mcp-servers/${e.subject??"<server>"}.yaml'`,"variable-inferred":e=>`variable ${s(e.subject)} is referenced by MCP server ${s(e.detail)} but not declared; it is declared as a required secret`,"variable-unreferenced":e=>`variable ${s(e.subject)}${i(e.path)} is declared but no MCP server references it`,"variable-default-dropped":e=>`variable ${s(e.subject)}${i(e.path)} has a default value, which Stigmer does not carry; the user supplies the value`,"variable-type-narrowed":e=>`variable ${s(e.subject)}${i(e.path)} is typed ${s(e.detail)}; Stigmer variables are strings`,"variable-option-dropped":e=>`variable ${s(e.subject)}${i(e.path)} has a ${s(e.detail)} constraint, which Stigmer does not carry`,"sub-agent-name-defaulted":e=>`${s(e.path)} has no 'name' in its frontmatter; the sub-agent is named after the file, ${s(e.subject)}`,"sub-agent-skill-unknown":e=>`sub-agent ${s(e.subject)}${i(e.path)} asks for skill ${s(e.detail)}, which the plugin does not ship`,"sub-agent-model-unknown":e=>`sub-agent ${s(e.subject)}${i(e.path)} names model ${s(e.detail)}, which Stigmer cannot map; the sub-agent runs on the session's model`,"sub-agent-field-ignored":e=>`sub-agent ${s(e.subject)}${i(e.path)} has a field ${s(e.detail)} Stigmer does not read, ignored`};class l{errorSentences;warningSentences;errors=[];warnings=[];constructor(e,t){this.errorSentences=e,this.warningSentences=t}error(e,t={}){this.errors.push(d(e,t,this.errorSentences[e](t)))}warn(e,t={}){this.warnings.push(d(e,t,this.warningSentences[e](t)))}}function d(e,t,r){return{kind:e,...void 0!==t.path&&{path:t.path},...void 0!==t.subject&&{subject:t.subject},...void 0!==t.detail&&{detail:t.detail},message:r}}e.s(["AGENT_PLUGINS_MANIFEST_SCHEMA",0,t,"AGENT_PLUGINS_MCP_SCHEMA",0,r,"FindingCollector",0,l,"Findings",0,class extends l{constructor(){super(a,o)}},"MANIFEST_LOCATIONS",0,n,"at",0,i,"q",0,s])},782130,833811,378486,e=>{"use strict";var t=e.i(466531);function r(e,r,s,i){let a=n(e,r,s,i);return void 0===a?void 0:(0,t.decodeUtf8)(a)}function n(e,r,n,s){let i=t.PLUGIN_DOCUMENT_LIMITS[n],a=e.entry(r);if(void 0===a)throw Error(`plugin file '${r}' is not listed`);if(a.size>i)return void s.error("document-too-large",{path:r,subject:String(a.size),detail:String(i)});let o=e.files.read(r);return o.length>i?void s.error("document-too-large",{path:r,subject:String(o.length),detail:String(i)}):o}function s(e,t,r,n){let s;try{s=JSON.parse(e)}catch(e){n.error(r,{path:t,detail:e instanceof Error?e.message:String(e)});return}return i(s)?s:void n.error(r,{path:t,detail:"the document is not a JSON object"})}function i(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function a(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)}function o(e){return"string"==typeof e?e:JSON.stringify(e)}function l(e){return Object.entries(e)}function d(e,t,r,n){let s=e[t];if(void 0!==s)return"string"!=typeof s?void n.error("manifest-field-type",{path:r,subject:t,detail:"a string"}):s}function c(e,t,r,n){let s=e[t];if(void 0!==s)return a(s)?s:void n.error("manifest-field-type",{path:r,subject:t,detail:"an array of strings"})}function u(e,t,r,n){let s=e[t];if(void 0!==s){if("string"==typeof s)return[s];if(a(s))return s;n.error("manifest-field-type",{path:r,subject:t,detail:"a string or an array of strings"})}}function p(e,t,r,n){for(let[s]of l(e))t.has(s)||n.warn("manifest-field-unknown",{path:r,subject:s})}function f(e,t,r){let n={},s=d(e,"name",t,r);void 0!==s&&(n.name=s);let a=d(e,"version",t,r);void 0!==a&&(n.version=a);let o=d(e,"description",t,r);void 0!==o&&(n.description=o);let l=d(e,"homepage",t,r);void 0!==l&&(n.homepage=l);let u=d(e,"repository",t,r);void 0!==u&&(n.repository=u);let p=d(e,"license",t,r);void 0!==p&&(n.license=p);let f=c(e,"keywords",t,r);void 0!==f&&(n.keywords=f);let h=function(e,t,r){let n=e.author;if(void 0===n)return;if(!i(n))return void r.error("manifest-field-type",{path:t,subject:"author",detail:"an object"});let s={},a=d(n,"name",t,r);void 0!==a&&(s.name=a);let o=d(n,"email",t,r);void 0!==o&&(s.email=o);let l=d(n,"url",t,r);return void 0!==l&&(s.url=l),s}(e,t,r);return void 0!==h&&(n.author=h),n}function h(e,r,n,s){let i=u(e,r,n,s);if(void 0===i)return;let a=[];for(let e of i){let r=(0,t.resolveDeclaredPath)(e);if(!r.ok){s.error(r.kind,{path:n,subject:e});continue}a.push({path:r.path,manifest:n})}return a}function m(e,r,n,s,a){let o=e[r];if(void 0===o)return[];let l=Array.isArray(o)?o:[o],d=[];for(let e of l)if("string"==typeof e){let r=(0,t.resolveDeclaredPath)(e);if(!r.ok){a.error(r.kind,{path:n,subject:e});continue}d.push({kind:"file",path:r.path,dialect:s,manifest:n})}else i(e)?d.push({kind:"inline",manifest:n,servers:e,dialect:s}):a.error("manifest-field-type",{path:n,subject:r,detail:"a path, an object, or an array of either"});return d}e.s(["describeValue",0,o,"fields",0,l,"isJsonObject",0,i,"isStringArray",0,a,"isStringRecord",0,function(e){return i(e)&&Object.values(e).every(e=>"string"==typeof e)},"optionalString",0,d,"optionalStringArray",0,c,"parseJsonObject",0,s,"readBytes",0,n,"readText",0,r,"stringOrStringArray",0,u],833811);let g={hooks:"hooks",rules:"rules",commands:"commands",workflows:"workflows",outputStyles:"output-styles",lspServers:"lsp-servers",channels:"channels",dependencies:"dependencies",defaultEnabled:"default-enabled",minClientVersions:"min-client-versions",logo:"logo",apps:"apps"};function v(e,t){let r=[];for(let[n,s]of l(e)){let e=g[n];if(void 0!==e&&r.push({kind:e,path:`${t}#${n}`}),"experimental"===n&&i(s))for(let[e]of l(s)){let n=b[e];void 0!==n&&r.push({kind:n,path:`${t}#experimental.${e}`})}}return r}let b={themes:"themes",monitors:"monitors",evals:"evals"},y="ai.stigmer",w=new Set(["displayName","logo","category"]);function $(e,t,r){let n=e.extensions;if(void 0===n)return[];if(!i(n))return r.warn("manifest-extensions-invalid",{path:t}),[];let s=[];for(let[e,r]of l(n)){if(i(r)&&0===l(r).length)continue;let n=`${t}#extensions.${e}`;if(e===y&&i(r)){void 0!==r.logo&&s.push({kind:"logo",path:`${n}.logo`}),l(r).some(([e])=>!w.has(e))&&s.push({kind:"extension",path:n});continue}s.push({kind:"extension",path:n})}return s}e.s(["extensionComponents",0,$,"ignoredFieldComponents",0,v,"readDeclaredPaths",0,h,"readIdentity",0,f,"readMcpSources",0,m,"stigmerExtensionOf",0,function(e){let t=e.extensions;if(!i(t))return;let r=t[y];return i(r)?r:void 0},"warnUnknownFields",0,p],378486);let j=new Set(["name","version","description","author","homepage","repository","license","keywords","skills","commands","agents","workflows","hooks","mcpServers","outputStyles","lspServers","experimental","userConfig","channels","dependencies","defaultEnabled"]),k=".mcp.json";function x(e,t,r,n,s){p(e,n,t,s);let i=f(e,t,s),a=h(e,"skills",t,s)??[],o=h(e,"agents",t,s),l=m(e,"mcpServers",t,r,s),d={dialect:r,path:t,identity:i,skillPaths:a,mcpConfigs:l,ignored:v(e,t)};return void 0!==o&&(d.agentPaths=o),void 0!==e.userConfig&&(d.variables={dialect:"claude",value:e.userConfig,manifest:t}),d}let S=new Set([...j,"apps","interface"]),P=new Set(["name","displayName","description","version","minClientVersions","author","publisher","homepage","repository","license","logo","keywords","category","tags","commands","agents","skills","rules","hooks","variables","mcpServers"]);var M=e.i(75786);let C=new Set(["$schema","name","version","description","author","homepage","repository","license","keywords","extensions"]),N="mcp.json",E=["claude","cursor","codex"],A=["agent-plugins",...E],T=/^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$/;function I(e){return e.length<=64&&T.test(e)&&!e.includes("--")&&!e.includes("..")}e.s(["MANIFEST_PRECEDENCE",0,A,"detectManifests",0,function(e,t){let n=[],i=i=>{var a,l,d;let c,u=M.MANIFEST_LOCATIONS[i];if(!e.has(u))return;let g=void 0===(c=r(e,a=u,"manifest",l=t))?void 0:s(c,a,"manifest-unreadable",l),b=void 0===g?(d=i,{dialect:d,path:u,identity:{},skillPaths:[],mcpConfigs:[],ignored:[]}):function(e,t,r,n){switch(e){case"agent-plugins":let s;return void 0===(s=t.$schema)?n.error("manifest-schema-missing",{path:r}):s!==M.AGENT_PLUGINS_MANIFEST_SCHEMA&&n.error("manifest-schema-unsupported",{path:r,detail:o(s)}),p(t,C,r,n),{dialect:"agent-plugins",path:r,identity:f(t,r,n),skillPaths:[],mcpConfigs:[],ignored:$(t,r,n)};case"claude":return x(t,r,"claude",j,n);case"cursor":let i,a,l,d;return p(t,P,r,n),i=f(t,r,n),a=h(t,"skills",r,n)??[],l=h(t,"agents",r,n),d={dialect:"cursor",path:r,identity:i,skillPaths:a,mcpConfigs:m(t,"mcpServers",r,"cursor",n),ignored:v(t,r)},void 0!==l&&(d.agentPaths=l),void 0!==t.variables&&(d.variables={dialect:"cursor",value:t.variables,manifest:r}),d;case"codex":return x(t,r,"codex",S,n);default:throw Error(`unknown dialect ${String(e)}`)}}(i,g,u,t);return n.push(b),b},a=i("agent-plugins"),l=E.map(i).filter(e=>void 0!==e);if(0===n.length)return void t.error("no-manifest");let d=a??l[0];if(void 0===d)throw Error("manifest set without an identity manifest");let c=[d,...n.filter(e=>e!==d)],u=function(e,t,r){let n=e.identity.name;if(void 0===n){if(r.errors.some(t=>"manifest-unreadable"===t.kind&&t.path===e.path))return;r.error("manifest-name-missing",{path:e.path});return}let s=!0;for(let i of(I(n)||(r.error("manifest-name-invalid",{path:e.path,subject:n}),s=!1),t)){if(i===e)continue;let t=i.identity.name;void 0!==t&&t!==n&&(r.error("manifest-name-conflict",{path:e.path,subject:n,detail:`'${t}' in '${i.path}'`}),s=!1)}return s?n:void 0}(d,c,t);return{dialect:d.dialect,manifests:c,name:u,readsAgents:l.length>0,mcpSources:function(e,t,r){let n=[];for(let s of(void 0!==t&&e.has(N)&&n.push({kind:"file",path:N,dialect:"agent-plugins",manifest:t.path}),r))s.mcpConfigs.length>0?n.push(...s.mcpConfigs):"cursor"!==s.dialect&&e.has(k)&&n.push({kind:"file",path:k,dialect:s.dialect,manifest:s.path});let s=new Set;return n.filter(e=>"inline"===e.kind||!s.has(e.path)&&(s.add(e.path),!0))}(e,a,l)}},"hasPluginManifest",0,function(e){let t=new Set(Object.values(M.MANIFEST_LOCATIONS));for(let r of e)if(t.has(r))return!0;return!1},"isValidPluginName",0,I],782130)},35167,e=>{"use strict";var t=e.i(75786);let r={stigmer:"marketplace.json",claude:".claude-plugin/marketplace.json",cursor:".cursor-plugin/marketplace.json",codex:".agents/plugins/marketplace.json"},n=Object.values(r).map(e=>(0,t.q)(e)).join(", "),s={"marketplace-not-found":()=>`no marketplace file found: expected one of ${n}`,"marketplace-too-large":e=>`${(0,t.q)(e.path)} is ${e.subject??""} bytes, above the ${e.detail??""} byte cap for a marketplace file`,"marketplace-unreadable":e=>`${(0,t.q)(e.path)} is not a readable marketplace file: ${e.detail??"parse error"}`,"marketplace-field-type":e=>`${(0,t.q)(e.path)} field ${(0,t.q)(e.subject)} must be ${e.detail??"of another type"}`,"marketplace-name-missing":e=>`${(0,t.q)(e.path)} has no 'name'; a marketplace needs one so its plugins can be addressed as '<marketplace>/<plugin>'`,"marketplace-name-invalid":e=>`${(0,t.q)(e.path)} name ${(0,t.q)(e.subject)} is invalid: 1 to 64 characters of a-z, 0-9, '-' and '.', starting and ending alphanumeric, no '--' or '..'`,"marketplace-plugins-missing":e=>`${(0,t.q)(e.path)} has no 'plugins' list`,"entry-shape":e=>`${(0,t.q)(e.path)} plugins[${e.subject??""}] must be an object with 'name' and 'source'`,"entry-name-missing":e=>`${(0,t.q)(e.path)} plugins[${e.subject??""}] has no 'name'`,"entry-name-invalid":e=>`${(0,t.q)(e.path)} plugin ${(0,t.q)(e.subject)} has an invalid name: 1 to 64 characters of a-z, 0-9, '-' and '.', starting and ending alphanumeric, no '--' or '..'`,"entry-name-duplicate":e=>`${(0,t.q)(e.path)} lists plugin ${(0,t.q)(e.subject)} more than once; 'install ${e.subject??""}' would be ambiguous`,"entry-source-missing":e=>`${(0,t.q)(e.path)} plugin ${(0,t.q)(e.subject)} has no 'source'`,"entry-source-escapes-root":e=>`${(0,t.q)(e.path)} plugin ${(0,t.q)(e.subject)} has source ${(0,t.q)(e.detail)} outside the marketplace root; a source is a directory inside the marketplace`,"default-unknown":e=>`${(0,t.q)(e.path)} names ${(0,t.q)(e.subject)} as a default but lists no plugin of that name`},i={"entry-source-unsupported":e=>`plugin ${(0,t.q)(e.subject)}${(0,t.at)(e.path)} has source ${(0,t.q)(e.detail)}, a form Stigmer does not fetch (only a directory inside the marketplace); not offered`,"entry-directory-missing":e=>`plugin ${(0,t.q)(e.subject)}${(0,t.at)(e.path)} names directory ${(0,t.q)(e.detail)}, which the marketplace does not contain; not offered`,"entry-not-a-plugin":e=>`plugin ${(0,t.q)(e.subject)}${(0,t.at)(e.path)} names directory ${(0,t.q)(e.detail)}, which holds no plugin manifest; not offered`};class a extends t.FindingCollector{constructor(){super(s,i)}}e.s(["MARKETPLACE_LOCATIONS",0,r,"MarketplaceFindings",0,a])},708162,802087,e=>{"use strict";var t,r,n,s,i=e.i(782130),a=e.i(833811),o=e.i(466531),l=e.i(35167);let d=["stigmer","claude","cursor","codex"];function c(e){return{ok:!1,errors:e.errors,warnings:e.warnings}}function u(e,t){let r=e[t];return"string"==typeof r?r:void 0}function p(e){let t=e;return"."===t||"./"===t||(t.startsWith("./")&&(t=t.slice(2)),""===(t=t.replace(/\/+$/,"")))?{ok:!0,dir:""}:(0,o.isContainedPath)(t)?{ok:!0,dir:t}:{ok:!1}}e.s(["readMarketplace",0,function(e){return function(e,t){var r,n,s;let f,h=new l.MarketplaceFindings,m=new o.PluginFileIndex(e),g=function(e){for(let t of d){let r=l.MARKETPLACE_LOCATIONS[t];if(e.has(r))return{dialect:t,path:r}}}(m);if(void 0===g)return h.error("marketplace-not-found"),c(h);let{dialect:v,path:b}=g,y=function(e,t,r){let n,s=o.PLUGIN_DOCUMENT_LIMITS.marketplace,i=e.entry(t);if(void 0===i)throw Error(`marketplace file '${t}' is not listed`);if(i.size>s)return void r.error("marketplace-too-large",{path:t,subject:String(i.size),detail:String(s)});let l=e.files.read(t);if(l.length>s)return void r.error("marketplace-too-large",{path:t,subject:String(l.length),detail:String(s)});try{n=JSON.parse((0,o.decodeUtf8)(l))}catch(e){r.error("marketplace-unreadable",{path:t,detail:e instanceof Error?e.message:String(e)});return}return(0,a.isJsonObject)(n)?n:void r.error("marketplace-unreadable",{path:t,detail:"the document is not a JSON object"})}(m,b,h);if(void 0===y)return c(h);let w=(r=y,n=b,s=h,void 0===(f=r.name)?void s.error("marketplace-name-missing",{path:n}):"string"!=typeof f?void s.error("marketplace-field-type",{path:n,subject:"name",detail:"a string"}):(0,i.isValidPluginName)(f)?f:void s.error("marketplace-name-invalid",{path:n,subject:f})),$=function(e,t,r,n){let s=e.plugins;if(void 0===s)return n.error("marketplace-plugins-missing",{path:r}),[];if(!Array.isArray(s))return n.error("marketplace-field-type",{path:r,subject:"plugins",detail:"an array"}),[];let o="claude"===t?function(e){let t=e.metadata;if(!(0,a.isJsonObject)(t))return"";let r=u(t,"pluginRoot");if(void 0===r)return"";let n=p(r);return n.ok?n.dir:""}(e):"",l=[],d=new Set;return s.forEach((e,s)=>{let c;if(!(0,a.isJsonObject)(e))return void n.error("entry-shape",{path:r,subject:String(s)});let f=e.name;if(void 0===f)return void n.error("entry-name-missing",{path:r,subject:String(s)});if("string"!=typeof f||!(0,i.isValidPluginName)(f))return void n.error("entry-name-invalid",{path:r,subject:(0,a.describeValue)(f)});if(d.has(f))return void n.error("entry-name-duplicate",{path:r,subject:f});d.add(f);let h=u(e,"description");l.push({name:f,dir:function(e,t,r,n,s){var i,o,l,d;let c;if(void 0===e)return void s.error("entry-source-missing",{path:n,subject:t});if("string"==typeof e){if(i=e,/^[a-z][a-z0-9+.-]*:\/\//i.test(i))return void s.warn("entry-source-unsupported",{path:n,subject:t,detail:e});c=e}else{if(!(0,a.isJsonObject)(e)||"local"!==e.source||"string"!=typeof e.path){return void s.warn("entry-source-unsupported",{path:n,subject:t,detail:(o=e,(0,a.isJsonObject)(o)&&"string"==typeof o.source?o.source:(0,a.describeValue)(o))})}c=e.path}let u=p(c);return u.ok?(l=r,d=u.dir,""===l?d:""===d?l:`${l}/${d}`):void s.error("entry-source-escapes-root",{path:n,subject:t,detail:c})}(e.source,f,o,r,n),...void 0!==h&&{description:h},installedByDefault:"codex"===t&&(c=e.policy,(0,a.isJsonObject)(c)&&"INSTALLED_BY_DEFAULT"===c.installation)})}),l}(y,v,b,h),j="tree"===t?function(e,t,r,n){let s=[];for(let a of e)if(void 0!==a.dir){if(!t.isDirectory(a.dir)){n.warn("entry-directory-missing",{path:r,subject:a.name,detail:""===a.dir?".":a.dir});continue}if(!(0,i.hasPluginManifest)(function(e,t){let r=""===t?"":`${t}/`;return e.filesUnder(t).map(e=>e.slice(r.length))}(t,a.dir))){n.warn("entry-not-a-plugin",{path:r,subject:a.name,detail:""===a.dir?".":a.dir});continue}s.push({name:a.name,dir:a.dir,...void 0!==a.description&&{description:a.description}})}return s}($,m,b,h):function(e){let t=[];for(let r of e)void 0!==r.dir&&t.push({name:r.name,dir:r.dir,...void 0!==r.description&&{description:r.description}});return t}($),k=function(e,t,r,n,s,i){let o,l=new Set(t.map(e=>e.name)),d=new Set(r.map(e=>e.name));if("stigmer"===n){let t=e.defaults;void 0===t?o=[]:(0,a.isStringArray)(t)?o=t:(i.error("marketplace-field-type",{path:s,subject:"defaults",detail:"an array of strings"}),o=[])}else o="codex"===n?t.filter(e=>e.installedByDefault).map(e=>e.name):[];let c=[];for(let e of o){if(!l.has(e)){i.error("default-unknown",{path:s,subject:e});continue}d.has(e)&&!c.includes(e)&&c.push(e)}return c}(y,$,j,v,b,h);if(h.errors.length>0||void 0===w)return c(h);let x=function(e,t){switch(t){case"stigmer":return u(e,"description");case"claude":case"cursor":{let t=e.metadata;return(0,a.isJsonObject)(t)?u(t,"description"):void 0}case"codex":return;default:return t}}(y,v),S=function(e){let t=e.owner;if(!(0,a.isJsonObject)(t))return;let r=u(t,"name"),n=u(t,"email"),s=u(t,"url");if(void 0!==r||void 0!==n||void 0!==s)return{...void 0!==r&&{name:r},...void 0!==n&&{email:n},...void 0!==s&&{url:s}}}(y);return{ok:!0,marketplace:{name:w,...void 0!==x&&{description:x},...void 0!==S&&{owner:S},dialect:v,path:b,plugins:j,defaults:k},warnings:h.warnings}}(e,"tree")}],708162);var f=e.i(75786);let h={rules:"rules",hooks:"hooks",commands:"commands",canvases:"canvases",workflows:"workflows","output-styles":"output-styles",themes:"themes",monitors:"monitors",bin:"bin",assets:"assets",evals:"evals"},m={".lsp.json":"lsp-servers","settings.json":"settings",".app.json":"apps"},g=/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g,v=/^[A-Za-z_][A-Za-z0-9_]*$/,b=/\$\{user_config\.([A-Za-z_][A-Za-z0-9_]*)\}/g,y=new Set(["${PLUGIN_ROOT}","${PLUGIN_DATA}","${CLAUDE_PLUGIN_ROOT}","${CLAUDE_PLUGIN_DATA}","${CLAUDE_PROJECT_DIR}","${CURSOR_PLUGIN_ROOT}"]),w=new Set(["PLUGIN_ROOT","PLUGIN_DATA"]);function $(e){return e.replace(b,(e,t)=>`\${${t}}`)}function j(e){for(let t of y)if(e.includes(t))return t}function k(e){let t=[];for(let r of e.matchAll(g)){let e=r[1];void 0===e||t.includes(e)||t.push(e)}return t}let x=new Set(["$schema","mcpServers"]),S=new Set(["type","command","args","env","cwd"]),P=new Set(["type","url","headers"]),M=new Set(["type","command","args","env","cwd"]),C=new Set(["type","url","headers"]),N=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function E(e,t){for(let r of k(e))t.add(r)}let A="ai.stigmer",T=`${A}/agent.yaml`,I=`${A}/workflows`,O=`${A}/mcp-servers`;e.i(222258);var _=e.i(967785);let z=/^[a-z0-9]+([.-][a-z0-9]+)*$/;function L(e){let t=e.split(/\r?\n/);if(0===t.length||t[0]?.trim()!=="---")return{ok:!1,reason:"missing"};for(let e=1;e<t.length;e++)if(t[e]?.trim()==="---")return{ok:!0,yaml:t.slice(1,e).join("\n"),body:t.slice(e+1).join("\n")};return{ok:!1,reason:"unclosed"}}function D(e){let t;try{t=(0,_.parse)(e)}catch(e){return{ok:!1,detail:e instanceof Error?e.message:String(e)}}return null==t?{ok:!0,fields:{}}:(0,a.isJsonObject)(t)?{ok:!0,fields:t}:{ok:!1,detail:"the frontmatter is not a mapping"}}let R="SKILL.md",U="skills",F=new Set(["name","description","model","skills"]);function q(e){let t=[e.title,e.description].filter(e=>"string"==typeof e&&""!==e);return 0===t.length?void 0:t.join(": ")}var B=e.i(229969);let J=new Date(1980,0,1);async function G(e){return Array.from(new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",e)),e=>e.toString(16).padStart(2,"0")).join("")}let W=[".git/",".svn/",".hg/",".bzr/",".env",".env.*","!.env.example","!.env.template","!.env.sample","*.pem","*.key","*.p12","*.pfx","*.keystore","*.jks","id_rsa","id_rsa.*","id_ed25519","id_ed25519.*","id_dsa","id_dsa.*","credentials.json","service-account*.json","gcp-credentials*.json","aws-credentials",".aws/credentials",".aws/config",".secrets",".secrets/","*.secret",".credentials/","secrets.yaml","secrets.yml","secrets.json",".npmrc",".pypirc",".gem/credentials",".docker/config.json",".idea/",".vscode/","*.swp","*.swo","*.swn","*~",".project",".classpath",".settings/","*.sublime-workspace","*.sublime-project",".vs/",".DS_Store",".DS_Store?","._*",".Spotlight-V100",".Trashes","Thumbs.db","Thumbs.db:encryptable","desktop.ini","ehthumbs.db","ehthumbs_vista.db","node_modules/","npm-debug.log*","yarn-debug.log*","yarn-error.log*",".npm/",".yarn/cache/",".yarn/unplugged/",".pnp.*","__pycache__/","*.py[cod]","*$py.class",".Python","*.so",".venv/","venv/","env/","ENV/",".pytest_cache/",".mypy_cache/",".ruff_cache/",".tox/",".nox/","*.egg-info/",".eggs/","dist/","build/","develop-eggs/",".installed.cfg","*.manifest","*.spec","pip-log.txt","pip-delete-this-directory.txt","target/","*.class","*.jar","*.war","*.ear",".gradle/","gradle-app.setting",".gradletasknamecache","vendor/","target/","Cargo.lock","coverage/",".coverage","htmlcov/",".nyc_output/","coverage.xml","*.cover",".hypothesis/","*.log","logs/","tmp/","temp/","*.tmp","*.temp","*.bak","*.backup"];class V extends Error{}function K(e,t){try{var r=e,n=t;e:for(;r.length>0;){let[e,t,s]=function(e){let t=!1;for(;e.length>0&&"*"===e[0];)e=e.slice(1),t=!0;let r=!1,n=0;t:for(n=0;n<e.length;n++)switch(e[n]){case"\\":n+1<e.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break t}return[t,e.slice(0,n),e.slice(n)]}(r);if(r=s,e&&""===t)return!n.includes("/");let[i,a]=H(t,n);if(a&&(0===i.length||r.length>0)){n=i;continue}if(e)for(let e=0;e<n.length&&"/"!==n[e];e++){let[s,i]=H(t,n.slice(e+1));if(i){if(0===r.length&&s.length>0)continue;n=s;continue e}}return!1}return 0===n.length}catch(e){if(e instanceof V)return!1;throw e}}function H(e,t){let r=!1;for(;e.length>0;){r||0!==t.length||(r=!0);let n=e[0];if("["===n){let n="";r||(n=t[0]??"",t=t.slice(1));let s=!1;(e=e.slice(1)).length>0&&"^"===e[0]&&(s=!0,e=e.slice(1));let i=!1,a=0;for(;;){let t;if(e.length>0&&"]"===e[0]&&a>0){e=e.slice(1);break}[t,e]=Z(e);let r=t;"-"===e[0]&&([r,e]=Z(e.slice(1))),t<=n&&n<=r&&(i=!0),a++}i===s&&(r=!0)}else if("?"===n)r||("/"===t[0]&&(r=!0),t=t.slice(1)),e=e.slice(1);else if("\\"===n){if(0===(e=e.slice(1)).length)throw new V("bad pattern");r||(e[0]!==t[0]&&(r=!0),t=t.slice(1)),e=e.slice(1)}else r||(e[0]!==t[0]&&(r=!0),t=t.slice(1)),e=e.slice(1)}return r?["",!1]:[t,!0]}function Z(e){if(0===e.length||"-"===e[0]||"]"===e[0]||"\\"===e[0]&&0===(e=e.slice(1)).length)throw new V("bad pattern");let t=e[0]??"",r=e.slice(1);if(0===r.length)throw new V("bad pattern");return[t,r]}(t=n||(n={}))[t.NoMatch=0]="NoMatch",t[t.Exclude=1]="Exclude",t[t.Include=2]="Include";class Y{inclusion;domain;parts;dirOnly;isGlob;constructor(e,t,r,n,s){this.domain=e,this.parts=t,this.inclusion=r,this.dirOnly=n,this.isGlob=s}match(e,t){let r=this.inclusion?n.Include:n.Exclude;if(e.length<=this.domain.length)return n.NoMatch;for(let t=0;t<this.domain.length;t++)if(e[t]!==this.domain[t])return n.NoMatch;let s=e.slice(this.domain.length);return(this.isGlob?this.globMatch(s,t):this.simpleNameMatch(s,t))?r:n.NoMatch}simpleNameMatch(e,t){for(let r=0;r<e.length;r++)if(K(this.parts[0]??"",e[r]??"")){if(this.dirOnly&&!t&&r===e.length-1)return!1;return!0}return!1}globMatch(e,t){let r=!1,n=!1,s=e;for(let e=0;e<this.parts.length;e++){let t=this.parts[e]??"";if(""===t){n=!1;continue}if("**"===t){if(e===this.parts.length-1)break;n=!0;continue}if(t.includes("**")||0===s.length)return!1;if(n)for(n=!1;;){if(0===s.length){r=!1;break}let e=s[0]??"";if(s=s.slice(1),K(t,e)){r=!0;break}}else{if(!K(t,s[0]??""))return!1;r=!0,s=s.slice(1)}}return r&&this.dirOnly&&!t&&0===s.length&&(r=!1),r}}let X="defaults",Q=".gitignore",ee=".stigmerignore";(r=s||(s={}))[r.NoMatch=0]="NoMatch",r[r.Excluded=1]="Excluded",r[r.Included=2]="Included",r[r.DefaultDeny=3]="DefaultDeny",s.NoMatch,s.Excluded,s.Included,s.DefaultDeny;class et{entries;constructor(e){this.entries=e}matchWithReason(e,t){let r,i,a=""===(r=e.replace(/\\/g,"/").replace(/^\.\//,""))||"."===r?[]:r.split("/");if(0===a.length)return{ignored:!1,reason:s.NoMatch,source:"",pattern:""};let o=n.NoMatch;for(let e of this.entries){let r=e.pattern.match(a,t);r!==n.NoMatch&&(i=e,o=r)}return void 0===i?{ignored:!1,reason:s.NoMatch,source:"",pattern:""}:o===n.Exclude?{ignored:!0,reason:i.source===X?s.DefaultDeny:s.Excluded,source:i.source,pattern:i.raw}:{ignored:!1,reason:s.Included,source:i.source,pattern:i.raw}}match(e,t){return this.matchWithReason(e,t).ignored}patterns(){return this.entries.map(e=>`[${e.source}] ${e.raw}`)}}function er(e,t){let r=[];for(let n of e){let e=n.trim();""===e||e.startsWith("#")||r.push({pattern:function(e,t){let r=e,n=!1;r.startsWith("!")&&(n=!0,r=r.slice(1)),r.endsWith("\\ ")||(r=r.replace(/ +$/,""));let s=!1;r.endsWith("/")&&(s=!0,r=r.slice(0,-1));let i=r.includes("/");return new Y(t,r.split("/"),n,s,i)}(e,[]),source:t,raw:e})}return r}let en=new TextDecoder;async function es(e){let t=function(e){let t=new f.Findings;for(let r of e.entries)(0,o.isContainedPath)(r.path)||t.error("path-uncontained",{path:r.path});let r=new o.PluginFileIndex(e),n=(0,i.detectManifests)(r,t);if(void 0===n)return{ok:!1,errors:t.errors,warnings:t.warnings};let s=function(e,t,r){let n=[],s=new Map;for(let i of function(e,t,r){let n=new Set,s=t=>{for(let r of e.childDirectories(t)){let s=(0,o.joinPath)(t,r);e.has((0,o.joinPath)(s,R))&&n.add(s)}};s(U);let i=t.manifests.flatMap(e=>e.skillPaths);for(let{path:t,manifest:a}of i)e.has((0,o.joinPath)(t,R))?n.add(t):e.isDirectory(t)?s(t):r.warn("path-missing",{path:a,subject:""===t?".":`./${t}`});return 0===i.length&&!e.isDirectory(U)&&e.has(R)&&n.add(""),[...n].sort(o.comparePaths)}(e,t,r)){let l=function(e,t,r,n){let s,i=(0,o.joinPath)(t,R),l=(0,a.readText)(e,i,"skillMd",n);if(void 0===l)return;let d=L(l);if(!d.ok)return void n.error("missing"===d.reason?"skill-frontmatter-missing":"skill-frontmatter-unclosed",{path:i});let c=D(d.yaml);if(!c.ok)return void n.error("skill-frontmatter-unreadable",{path:i,detail:c.detail});let u=""===t?r.name??"skill":(0,o.basename)(t);if("string"==typeof c.fields.name&&""!==c.fields.name?s=c.fields.name:(s=u,n.warn("skill-name-defaulted",{path:i,subject:s})),!z.test(s))return void n.error("skill-name-invalid",{path:i,subject:s});""!==t&&s!==u&&n.warn("skill-name-differs-from-directory",{path:i,subject:s,detail:u});let p=c.fields.description;return("string"!=typeof p||""===p)&&n.warn("skill-description-missing",{path:i,subject:s}),{name:s,..."string"==typeof p&&""!==p&&{description:p},dir:t,files:e.filesUnder(t)}}(e,i,t,r);if(void 0!==l){if(void 0!==s.get(l.name)){r.error("skill-name-duplicate",{subject:l.name,path:(0,o.joinPath)(i,R)});continue}s.set(l.name,i),n.push(l)}}return n}(r,n,t),l=function(e,t,r){let n=[],s=new Set,i=0;for(let o of t){let t=function(e,t,r){let n="agent-plugins"===t.dialect;if("inline"===t.kind){let e=(0,a.isJsonObject)(t.servers)?t.servers.mcpServers:void 0,n=(0,a.isJsonObject)(e)?e:t.servers;return(0,a.isJsonObject)(n)?{path:t.manifest,servers:n}:void r.error("mcp-config-shape",{path:t.manifest})}if(!e.has(t.path))return void r.warn("path-missing",{path:t.manifest,subject:`./${t.path}`});let s=(0,a.readText)(e,t.path,"mcpConfig",r);if(void 0===s)return;let i=(0,a.parseJsonObject)(s,t.path,"mcp-config-unreadable",r);if(void 0===i)return;if(n){let e=i.$schema;void 0===e?r.error("mcp-config-schema-missing",{path:t.path}):e!==f.AGENT_PLUGINS_MCP_SCHEMA&&r.error("mcp-config-schema-unsupported",{path:t.path,detail:(0,a.describeValue)(e)})}for(let[e]of(0,a.fields)(i))x.has(e)||(n?r.error("mcp-config-field-unknown",{path:t.path,subject:e}):r.warn("mcp-config-field-ignored",{path:t.path,subject:e}));let o=i.mcpServers;return(0,a.isJsonObject)(o)?{path:t.path,servers:o}:void r.error("mcp-config-shape",{path:t.path})}(e,o,r);if(void 0===t){i++;continue}for(let[e,l]of(0,a.fields)(t.servers)){if(s.has(e)){r.error("mcp-server-name-duplicate",{subject:e,path:t.path}),i++;continue}s.add(e);let d=function(e,t,r,n,s){let i={subject:e,path:r};if(!(0,a.isJsonObject)(t))return void s.error("mcp-server-shape",i);let o=function(e,t,r,n){let s=e.type;if(void 0!==s&&"string"!=typeof s)return void n.error("mcp-server-field-type",{...t,detail:"type"});if(void 0===s){if(r)return void n.error("mcp-server-type-missing",t);let s=void 0!==e.command,i=void 0!==e.url;return s&&i?void n.error("mcp-server-type-ambiguous",t):s?"stdio":i?"http":void n.error("mcp-server-transport-unknown",t)}switch(s){case"stdio":return"stdio";case"streamable-http":return"http";case"http":if(r)return void n.error("mcp-server-type-unknown",{...t,detail:s});return"http";case"sse":return n.warn("mcp-server-sse-mapped",t),"http";default:n.error("mcp-server-type-unknown",{...t,detail:s});return}}(t,i,n,s);if(void 0===o)return;let l="stdio"===o?n?S:M:n?P:C,d=new Set,c=!0;for(let[e,r]of(0,a.fields)(t))if(!l.has(e))if(n)s.error("mcp-server-field-unknown",{...i,detail:e}),c=!1;else if("auth"===e)for(let e of(s.warn("mcp-server-auth-ignored",i),function e(t){return"string"==typeof t?[$(t)]:Array.isArray(t)?t.flatMap(e):(0,a.isJsonObject)(t)?Object.values(t).flatMap(e):[]}(r)))E(e,d);else s.warn("mcp-server-field-ignored",{...i,detail:e});if(c)return"stdio"===o?function(e,t,r,n,s){let i=!0,o=()=>{i=!1},l=t.command;if(void 0===l)s.error("mcp-server-command-missing",r),o();else if("string"!=typeof l)s.error("mcp-server-field-type",{...r,detail:"command"}),o();else{let e=j(l);void 0!==e?(s.error("mcp-server-plugin-root-reference",{...r,detail:e}),o()):l.startsWith("./")?(s.error("mcp-server-command-relative",{...r,detail:l}),o()):(""===l||/\s/.test(l)||l.includes("/"))&&(s.error("mcp-server-command-invalid",r),o())}let d=[],c=t.args;if(void 0!==c)if((0,a.isStringArray)(c))for(let e of c){let t=$(e),i=j(t);if(void 0!==i){s.error("mcp-server-plugin-root-reference",{...r,detail:i}),o();continue}E(t,n),d.push(t)}else s.error("mcp-server-field-type",{...r,detail:"args"}),o();let u=t.env;if(void 0!==u)if((0,a.isStringRecord)(u))for(let[e,t]of Object.entries(u)){if(w.has(e)){s.error("mcp-server-plugin-root-reference",{...r,detail:e}),o();continue}if(!v.test(e)){s.error("variable-name-invalid",{subject:e,path:r.path}),o();continue}let i=$(t),a=j(i);if(void 0!==a){s.error("mcp-server-plugin-root-reference",{...r,detail:a}),o();continue}let l=function(e){let t=/^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/.exec(e);return t?.[1]}(i);void 0===l?(s.error("mcp-server-env-literal",{...r,detail:e}),o()):l!==e?(s.error("mcp-server-env-rename",{...r,detail:e}),o()):n.add(e)}else s.error("mcp-server-field-type",{...r,detail:"env"}),o();if(void 0!==t.cwd&&(s.error("mcp-server-cwd-unsupported",r),o()),i&&"string"==typeof l)return{name:e,transport:"stdio",command:l,args:d,env:[...n].sort()}}(e,t,i,d,s):function(e,t,r,n,s){let i,o=!0,l=()=>{o=!1},d=t.url;if(void 0===d)s.error("mcp-server-url-missing",r),l();else if("string"!=typeof d)s.error("mcp-server-field-type",{...r,detail:"url"}),l();else{let e=j(i=$(d));void 0!==e?(s.error("mcp-server-plugin-root-reference",{...r,detail:e}),l()):k(i).length>0?(s.error("mcp-server-url-variable",r),l()):!function(e){var t;let r;try{r=new URL(e)}catch{return!1}return""===r.username&&""===r.password&&""===r.hash&&("https:"===r.protocol||"http:"===r.protocol&&("localhost"===(t=r.hostname)||"[::1]"===t||"::1"===t||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(t)))}(i)&&(s.error("mcp-server-url-invalid",{...r,detail:i}),l())}let c=[],u=t.headers;if(void 0!==u)if((0,a.isStringRecord)(u)){let e=new Set;for(let[t,i]of Object.entries(u)){if(!N.test(t)){s.error("mcp-server-header-invalid",{...r,detail:t}),l();continue}let a=t.toLowerCase();if(e.has(a)){s.error("mcp-server-header-duplicate",{...r,detail:t}),l();continue}e.add(a);let o=$(i),d=j(o);if(void 0!==d){s.error("mcp-server-plugin-root-reference",{...r,detail:d}),l();continue}E(o,n),c.push([t,o])}}else s.error("mcp-server-field-type",{...r,detail:"headers"}),l();if(o&&void 0!==i)return{name:e,transport:"http",url:i,headers:Object.fromEntries(c),env:[...n].sort()}}(e,t,i,d,s)}(e,l,t.path,"agent-plugins"===o.dialect,r);void 0!==d?n.push(d):i++}}return{servers:n,refused:i,declaredNames:s}}(r,n.mcpSources,t),d=l.servers,c=function(e,t,r){let n=new Map,s=new Map;for(let t of e.manifests){let e=t.variables;if(void 0!==e)for(let t of"cursor"===e.dialect?function(e,t,r){if(!(0,a.isJsonObject)(e)||"object"!==e.type)return r.error("manifest-field-type",{path:t,subject:"variables",detail:"a JSON Schema object with type 'object'"}),[];let n=e.properties??{};if(!(0,a.isJsonObject)(n))return r.error("manifest-field-type",{path:t,subject:"variables.properties",detail:"an object"}),[];let s=e.required??[];if(!(0,a.isStringArray)(s))return r.error("manifest-field-type",{path:t,subject:"variables.required",detail:"an array of strings"}),[];let i=[];for(let[e,o]of(0,a.fields)(n)){if(!v.test(e)){r.error("variable-name-invalid",{subject:e,path:t});continue}let n=(0,a.isJsonObject)(o)?o:{},l=n.type;void 0!==l&&"string"!==l&&r.warn("variable-type-narrowed",{subject:e,path:t,detail:(0,a.describeValue)(l)}),void 0!==n.default&&r.warn("variable-default-dropped",{subject:e,path:t}),void 0!==n.enum&&r.warn("variable-option-dropped",{subject:e,path:t,detail:"enum"});let d=q(n);i.push({name:e,...void 0!==d&&{description:d},isSecret:!0,optional:!s.includes(e),declaredBy:"cursor"})}return i}(e.value,e.manifest,r):function(e,t,r){if(!(0,a.isJsonObject)(e))return r.error("manifest-field-type",{path:t,subject:"userConfig",detail:"an object"}),[];let n=[];for(let[s,i]of(0,a.fields)(e)){if(!v.test(s)){r.error("variable-name-invalid",{subject:s,path:t});continue}if(!(0,a.isJsonObject)(i)){r.error("manifest-field-type",{path:t,subject:`userConfig.${s}`,detail:"an object"});continue}let e=i.type;for(let n of(void 0!==e&&"string"!==e&&r.warn("variable-type-narrowed",{subject:s,path:t,detail:(0,a.describeValue)(e)}),void 0!==i.default&&r.warn("variable-default-dropped",{subject:s,path:t}),["options","multiple","min","max"]))void 0!==i[n]&&r.warn("variable-option-dropped",{subject:s,path:t,detail:n});let o=q(i);n.push({name:s,...void 0!==o&&{description:o},isSecret:!0===i.sensitive,optional:!0!==i.required,declaredBy:"claude"})}return n}(e.value,e.manifest,r))n.has(t.name)||(n.set(t.name,t),s.set(t.name,e.manifest))}let i=new Map;for(let e of t.servers)for(let t of e.env)i.has(t)||i.set(t,e.name);if(0===t.refused)for(let[e,t]of n)i.has(e)||r.warn("variable-unreferenced",{subject:t.name,path:s.get(e)});let o=[];for(let[e,t]of[...i].sort(([e],[t])=>e<t?-1:+(e>t)))n.has(e)||(r.warn("variable-inferred",{subject:e,detail:t}),o.push({name:e,isSecret:!0,optional:!1,declaredBy:"inferred"}));return[...n.values(),...o]}(n,l,t),u=function(e,t,r,n){if(!t.readsAgents)return[];let s=new Set(r.map(e=>e.name)),i=[],l=new Set;for(let r of function(e,t,r){let n=new Set,s=t=>{for(let r of e.childFiles(t))r.endsWith(".md")&&n.add((0,o.joinPath)(t,r))},i=t.manifests.flatMap(e=>e.agentPaths??[]);for(let{path:a,manifest:o}of(t.manifests.every(e=>void 0===e.agentPaths)&&s("agents"),i))""!==a&&e.has(a)&&a.endsWith(".md")?n.add(a):e.isDirectory(a)?s(a):r.warn("path-missing",{path:o,subject:""===a?".":`./${a}`});return[...n].sort(o.comparePaths)}(e,t,n)){let t=function(e,t,r,n){let s,i,l=(0,a.readText)(e,t,"subAgent",n);if(void 0===l)return;let d=L(l),c={},u=l;if(d.ok){let e=D(d.yaml);if(!e.ok)return void n.error("sub-agent-frontmatter-unreadable",{path:t,detail:e.detail});c=e.fields,u=d.body}else if("unclosed"===d.reason)return void n.error("sub-agent-frontmatter-unreadable",{path:t,detail:"the frontmatter is not closed (missing the closing '---')"});let p=(0,o.basename)(t).replace(/\.md$/,"");"string"==typeof c.name&&""!==c.name?s=c.name:(s=p,n.warn("sub-agent-name-defaulted",{path:t,subject:s}));let f=u.trim();if(f.length<10)return void n.error("sub-agent-instructions-short",{path:t,subject:s,detail:String(10)});let h=c.description,m=c.skills,g=[];if(Array.isArray(m))for(let e of m)"string"==typeof e&&(r.has(e)?g.push(e):n.warn("sub-agent-skill-unknown",{path:t,subject:s,detail:e}));let v=c.model;for(let e of("string"==typeof v&&""!==v.trim()&&"unknown"===(i=function(e){let t=e.trim().toLowerCase();return{raw:e,alias:"inherit"===t?"inherit":"fast"===t?"fast":t.includes("haiku")?"haiku":t.includes("sonnet")?"sonnet":t.includes("opus")?"opus":"unknown"}}(v)).alias&&n.warn("sub-agent-model-unknown",{path:t,subject:s,detail:v}),Object.keys(c)))F.has(e)||n.warn("sub-agent-field-ignored",{path:t,subject:s,detail:e});return{name:s,..."string"==typeof h&&""!==h&&{description:h},instructions:f,skillNames:g,...void 0!==i&&{modelHint:i},path:t}}(e,r,s,n);if(void 0!==t){if(l.has(t.name)){n.error("sub-agent-name-duplicate",{subject:t.name,path:r});continue}l.add(t.name),i.push(t)}}return i}(r,n,s,t),p=function(e,t,r){let n={workflows:[],mcpServers:[]},s=[],i=[];for(let l of e.filesUnder(A)){if(l===T){let t=(0,a.readBytes)(e,l,"overlay",r);void 0!==t&&(n.agent={path:l,bytes:t});continue}let d=function(e){let t=(0,o.basename)(e);return t.endsWith(".yaml")&&t.length>5?t.slice(0,-5):void 0}(l);if(void 0!==d&&(0,o.dirname)(l)===I){let t=(0,a.readBytes)(e,l,"overlay",r);void 0!==t&&s.push({path:l,bytes:t,name:d});continue}if(void 0!==d&&(0,o.dirname)(l)===O){if(!t.has(d)){r.error("overlay-server-unknown",{path:l,subject:d});continue}let n=(0,a.readBytes)(e,l,"overlay",r);void 0!==n&&i.push({path:l,bytes:n,server:d});continue}r.error("overlay-document-unknown",{path:l})}return n.workflows=s,n.mcpServers=i,n}(r,l.declaredNames,t),g=function(e){let t=new Set,r=[];for(let n of e)for(let e of n){let n=`${e.kind}\u0000${e.path}`;t.has(n)||(t.add(n),r.push(e))}return r}([function(e,t){let r=[];for(let n of e.childDirectories("")){let e=h[n];void 0!==e&&r.push({kind:e,path:`${n}/`}),"agents"!==n||t||r.push({kind:"agents",path:`${n}/`})}for(let t of e.childFiles("")){let e=m[t];void 0!==e&&r.push({kind:e,path:t})}return r}(r,n.readsAgents),...n.manifests.map(e=>e.ignored)]);if(t.errors.length>0||void 0===n.name)return{ok:!1,errors:t.errors,warnings:t.warnings};let b=n.manifests[0]?.identity??{};return{ok:!0,plugin:{name:n.name,...void 0!==b.version&&{version:b.version},...void 0!==b.description&&{description:b.description},...void 0!==b.author&&{author:b.author},...void 0!==b.homepage&&{homepage:b.homepage},...void 0!==b.repository&&{repository:b.repository},...void 0!==b.license&&{license:b.license},keywords:b.keywords??[],dialect:n.dialect,manifestsFound:n.manifests.map(e=>e.path),skills:s,mcpServers:d,subAgents:u,variables:c,overlay:p,ignored:g},warnings:t.warnings}}(e.files);if(!t.ok)return{ok:!1,kind:"refused",errors:t.errors,warnings:t.warnings};let r=function(e){let t={};for(let r of e.entries)t[r.path]=e.read(r.path);return(0,B.zipSync)(t,{level:6,mtime:J})}(e.files);return{ok:!0,prepared:{plugin:t.plugin,warnings:t.warnings,files:e.files,stats:e.stats,archive:r,digest:await G(r)}}}async function ei(e,t){let r=new Map(e.map(e=>[e.path,e])),n=new Map,s=async e=>{let t=r.get(e);if(void 0===t)throw Error(`plugin file '${e}' is not listed`);n.set(e,await t.read())};await Promise.all([Q,ee].filter(e=>r.has(e)).map(e=>s(e)));let{maxBytes:i,...a}=t,o=function(e,t,r){var n,s,i;let a,o,l,d=new Map(e.map(e=>[e.path,e])),c=(a=[],(n={includeDefaults:!0,...r.respectGitignore&&d.has(Q)&&{gitignore:(s=t(Q),en.decode(s))},...d.has(ee)&&{stigmerignore:(i=t(ee),en.decode(i))},...void 0!==r.extraIgnore&&{extraIgnore:r.extraIgnore},...void 0!==r.extraInclude&&{extraInclude:r.extraInclude}}).includeDefaults&&a.push(...er(W,X)),void 0!==n.gitignore&&a.push(...er(n.gitignore.split(/\r?\n/),Q)),void 0!==n.stigmerignore&&a.push(...er(n.stigmerignore.split(/\r?\n/),ee)),o=n.extraIgnore??[],l=n.extraInclude??[],(o.length>0||l.length>0)&&a.push(...function(e,t){let r=er(e,"cli"),n=[];for(let e of t){let t=e.trim();""!==t&&n.push(t.startsWith("!")?t:`!${t}`)}return r.push(...er(n,"cli")),r}(o,l)),new et(a)),u={filesIncluded:0,filesIgnored:0,dirsSkipped:0,totalSize:0},p=new Set,f=[];for(let t of[...e].sort((e,t)=>(function(e,t){let r=e.split("/"),n=t.split("/"),s=Math.min(r.length,n.length);for(let e=0;e<s;e++){let t=r[e]??"",s=n[e]??"";if(t!==s)return t<s?-1:1}return r.length-n.length})(e.path,t.path)))if(!function(e,t,r,n){let s=e.split("/"),i="";for(let e=0;e<s.length-1;e++){if(i=""===i?s[e]??"":`${i}/${s[e]??""}`,r.has(i))return!0;if(t.matchWithReason(i,!0).ignored)return r.add(i),n.dirsSkipped++,!0}return!1}(t.path,c,p,u)){if(c.matchWithReason(t.path,!1).ignored){u.filesIgnored++;continue}f.push({path:t.path,size:t.size}),u.filesIncluded++,u.totalSize+=t.size}return{files:{entries:f,read(e){if(!d.has(e))throw Error(`plugin file '${e}' is not listed`);return t(e)}},stats:u,matcher:c}}(e,e=>{let t=n.get(e);if(void 0===t)throw Error(`plugin file '${e}' was not read before selection asked for it`);return t},a);return void 0!==i&&o.stats.totalSize>i?{ok:!1,kind:"too-large",selectedBytes:o.stats.totalSize,maxBytes:i}:(await Promise.all(o.files.entries.filter(e=>!n.has(e.path)).map(e=>s(e.path))),es(o))}e.s(["preparePluginFromTree",0,ei],802087)},563212,961378,830419,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(893976),s=e.i(65642),i=e.i(476007),a=e.i(379410),o=e.i(758301),l=e.i(57330),d=e.i(869803),c=e.i(35167);e.i(466531);var u=e.i(708162),p=e.i(802087),f=e.i(321252);class h extends Error{subject;errors;warnings;constructor(e,t,r){super(`${e}: ${1===t.length?"1 problem":`${t.length} problems`} found`),this.subject=e,this.errors=t,this.warnings=r,this.name="PluginReadRefusal"}}async function m(e){let t=new Set(Object.values(c.MARKETPLACE_LOCATIONS)),r=e.files.filter(e=>t.has(e.path)),n=new Map;await Promise.all(r.map(async t=>{n.set(t.path,await e.fetchFile(t.path))}));let s=(0,u.readMarketplace)({entries:[...e.files].sort((e,t)=>e.path<t.path?-1:+(e.path>t.path)),read(e){let t=n.get(e);if(void 0===t)throw Error(`marketplace read asked for '${e}', which is not a marketplace file`);return t}});if(!s.ok)throw new h(`${e.describe} is not a marketplace this console can read`,s.errors,s.warnings);return{tree:e,marketplace:s.marketplace,warnings:s.warnings}}function g(e,t){return e.plugins.find(e=>e.name===t)}function v(e,t){let r=""===t.dir?"":`${t.dir}/`;return e.tree.files.filter(e=>e.path.startsWith(r)).map(t=>({path:t.path.slice(r.length),size:t.size,read:()=>e.tree.fetchFile(t.path)}))}async function b(e,t){let r=v(e,t),n=r.reduce((e,t)=>e+t.size,0);if(n>f.MARKETPLACE_TREE_LIMITS.pluginBytes)throw y(t.name,n);let s=await (0,p.preparePluginFromTree)(r,{respectGitignore:!0,maxBytes:f.MARKETPLACE_TREE_LIMITS.pluginBytes});if(!s.ok)switch(s.kind){case"refused":throw new h(`'${t.name}' cannot be installed`,s.errors,s.warnings);case"too-large":throw y(t.name,s.selectedBytes);default:return s}let{plugin:i,warnings:a,stats:o,archive:l,digest:d}=s.prepared;return{origin:{kind:"source",entry:t,tree:e.tree.describe},plugin:i,warnings:a,stats:o,archive:l,digest:d}}function y(e,t){return new f.MarketplaceSourceError(`'${e}' is ${(0,f.formatMib)(t)} of files, over the ${(0,f.formatMib)(f.MARKETPLACE_TREE_LIMITS.pluginBytes)} a plugin archive may carry`,"too-large")}function w({prepared:e,relation:r,className:s}){let{plugin:i}=e;return(0,t.jsxs)("div",{className:(0,n.cn)("stg:flex stg:flex-col stg:gap-5",s),children:[(0,t.jsx)(x,{title:"Plugin",children:(0,t.jsx)(S,{rows:[["Name",i.name],["Version",i.version??""],["Format",l.DIALECT_LABELS[i.dialect]],["Files",`${e.stats.filesIncluded} read`]]})}),(0,t.jsxs)(x,{title:"Installs",children:[(0,t.jsx)(S,{rows:[["Skills",P(i.skills.map(e=>e.name))],["MCP servers",P(i.mcpServers.map(e=>`${e.name} (${e.transport})`))],["Sub-agents",P(i.subAgents.map(e=>e.name))],["Variables",P(i.variables.map(e=>`${e.name}${e.optional?" (optional)":""}${"inferred"===e.declaredBy?" (inferred)":""}`))]]}),i.variables.length>0&&(0,t.jsx)("p",{className:"stg:mt-2 stg:text-xs stg:text-muted-foreground",children:"The agent asks for these the first time you start a session on it, and saves them to your personal environment."})]}),e.warnings.length>0&&(0,t.jsx)(x,{title:"Warnings",children:(0,t.jsx)("ul",{className:"stg:list-disc stg:space-y-1 stg:pl-5 stg:text-sm stg:text-foreground",children:e.warnings.map((e,r)=>(0,t.jsx)("li",{children:e.message},`${e.kind}:${r}`))})}),i.ignored.length>0&&(0,t.jsx)(x,{title:"Not installed",children:(0,t.jsx)("ul",{className:(0,n.cn)(d.UNSTYLED_LIST,"stg:space-y-0.5 stg:text-sm stg:text-muted-foreground"),children:i.ignored.map(e=>(0,t.jsxs)("li",{children:[e.kind," ",(0,t.jsxs)("span",{className:"stg:font-mono stg:text-xs",children:["(",e.path,")"]})]},e.path))})}),r&&(0,t.jsx)(j,{relation:r,name:i.name})]})}function $(e){switch(e.kind){case"source":return e.tree;case"upload":return"zip"===e.pick?`${e.name}${void 0===e.rerooted?"":` (read from its '${e.rerooted}/' folder)`}`:`the folder '${e.name}'`;default:return e}}function j({relation:e,name:r}){switch(e){case"installed":return(0,t.jsxs)("p",{role:"status",className:"stg:text-sm stg:text-muted-foreground",children:["This exact version of '",r,"' is already installed; there is nothing to do."]});case"upgrade":return(0,t.jsxs)("p",{role:"status",className:"stg:text-sm stg:text-foreground",children:["'",r,"' is already installed at another version. Installing replaces its skills, servers and agent with this version's, whichever source it came from; the agent is re-created, so a session bound to the previous one does not follow."]});case"not-installed":return null;default:return e}}function k({error:e,retry:r,hint:n}){return e instanceof h?(0,t.jsxs)("div",{role:"alert",className:"stg:rounded-md stg:border stg:border-destructive stg:p-3 stg:text-sm",children:[(0,t.jsxs)("p",{className:"stg:font-medium stg:text-foreground",children:[e.subject,":"]}),(0,t.jsx)("ul",{className:"stg:mt-1 stg:list-disc stg:space-y-0.5 stg:pl-5 stg:text-foreground",children:e.errors.map((e,r)=>(0,t.jsx)("li",{children:e.message},`e${r}`))}),e.warnings.length>0&&(0,t.jsx)("ul",{className:"stg:mt-2 stg:list-disc stg:space-y-0.5 stg:pl-5 stg:text-muted-foreground",children:e.warnings.map((e,r)=>(0,t.jsx)("li",{children:e.message},`w${r}`))}),n&&(0,t.jsx)("p",{className:"stg:mt-2 stg:text-muted-foreground",children:n})]}):(0,t.jsx)(i.ErrorMessage,{error:e,...r&&{retry:r},title:"The plugin could not be read"})}function x({title:e,children:r}){return(0,t.jsxs)("section",{children:[(0,t.jsx)("h3",{className:"stg:mb-1.5 stg:text-xs stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-border stg:p-3",children:r})]})}function S({rows:e}){return(0,t.jsx)("dl",{className:"stg:grid stg:grid-cols-[auto_1fr] stg:gap-x-4 stg:gap-y-1 stg:text-sm",children:e.filter(([,e])=>""!==e).map(([e,r])=>(0,t.jsxs)("div",{className:"stg:contents",children:[(0,t.jsx)("dt",{className:"stg:text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"stg:min-w-0 stg:break-words stg:text-foreground",children:r})]},e))})}function P(e){return 0===e.length?"none":`${e.length}: ${e.join(", ")}`}e.s(["PluginReadRefusal",0,h,"entryCandidates",0,v,"findEntry",0,g,"openMarketplace",0,m,"prepareEntry",0,b],961378);var M=e.i(468806),C=e.i(891287),N=e.i(44454),E=e.i(586108),A=e.i(326283);function T(){let e=(0,E.useStigmer)(),[t,n]=(0,r.useState)(!1),[s,i]=(0,r.useState)(null),a=(0,r.useCallback)(async(t,r)=>{n(!0),i(null);try{let n=await e.plugin.push((0,C.create)(N.PushPluginRequestSchema,{org:r.org,artifact:t.archive,message:void 0===r.installedFrom?"upload"===t.origin.kind?"uploaded from the console":"installed from the console":`installed from marketplace '${r.installedFrom}'`,...void 0!==r.visibility&&{visibility:r.visibility}})),s=(await e.plugin.listMembers(n.metadata?.id??"")).members;return{plugin:n,members:s}}catch(t){let e=(0,A.toError)(t);throw i(e),e}finally{n(!1)}},[e]),o=(0,r.useCallback)(()=>i(null),[]);return(0,r.useMemo)(()=>({install:a,isInstalling:t,error:s,clearError:o}),[a,t,s,o])}var I=e.i(583093),O=e.i(203941),_=e.i(910304);function z(e,t){let n=(0,E.useStigmer)(),s=e?.plugin.name??null,i=e?.digest??null,{data:a,isLoading:o,error:l,refetch:d}=(0,I.useFetch)(s&&t?()=>n.plugin.getByReference({org:t,slug:s}).catch(e=>{if((0,_.isNotFound)(e))return null;throw e}):null,[s,t,n],void 0),c=(0,r.useMemo)(()=>{if(void 0===a||null===i)return null;if(null===a)return"not-installed";let e=a.status;return e?.digest===i&&e.state===O.PluginState.READY?"installed":"upgrade"},[a,i]);return(0,r.useMemo)(()=>({installed:a??null,relation:c,isLoading:o,error:l,refetch:d}),[a,c,o,l,d])}function L({opened:e,entryName:n,sourceName:o,org:l,onClose:d,onInstalled:c}){let u,p,f,{prepared:h,relation:m,isPreparing:v,error:y,refetch:j}=(u=e&&n?g(e.marketplace,n):void 0,f=z((p=(0,I.useFetch)(e&&u?()=>b(e,u):null,[e,u],null)).data,l),(0,r.useMemo)(()=>({prepared:p.data,installed:f.installed,relation:f.relation,isPreparing:p.isLoading||f.isLoading,error:p.error??f.error,refetch:p.refetch}),[p.data,p.isLoading,p.error,p.refetch,f])),{install:x,isInstalling:S,error:P,clearError:M}=T(),[C,N]=(0,r.useState)(null);(0,r.useEffect)(()=>{M(),N(null)},[n,M]);let E=(0,r.useCallback)(async()=>{if(h)try{let e=await x(h,{org:l,installedFrom:o});N(e),c?.(e)}catch{}},[h,x,l,o,c]),A="upgrade"===m?`Upgrade ${n}`:`Install ${n}`;return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-5",children:[(0,t.jsx)("header",{className:"stg:flex stg:items-start stg:justify-between stg:gap-4",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:A}),(0,t.jsxs)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:["From ",o," (",h?$(h.origin):e.tree.describe,") into ",l]})]})}),v&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-sm stg:text-muted-foreground",role:"status",children:[(0,t.jsx)(a.SpinnerIcon,{className:"stg:size-4"}),"Reading the plugin's files…"]}),y&&(0,t.jsx)(k,{error:y,retry:j}),h&&!v&&(0,t.jsx)(w,{prepared:h,relation:m}),P&&(0,t.jsx)(i.ErrorMessage,{error:P,title:"The server refused the install"}),C&&(0,t.jsxs)("div",{role:"status",className:"stg:rounded-md stg:border stg:border-border stg:bg-muted stg:p-3 stg:text-sm stg:text-foreground",children:["Installed plugin '",C.plugin.metadata?.slug,"' (",D(C),")."]}),(0,t.jsxs)("footer",{className:"stg:flex stg:justify-end stg:gap-2 stg:pt-1",children:[(0,t.jsx)(s.Button,{variant:"outline",size:"sm",onClick:d,children:C?"Close":"Cancel"}),!C&&(0,t.jsx)(s.Button,{variant:"primary",size:"sm",onClick:E,disabled:!h||v||S||"installed"===m,children:S?"Installing…":"upgrade"===m?"Upgrade":"Install"})]})]})}function D(e){let t=e.plugin.status?.materialized,r=[[t?.skills??0,"skill"],[t?.mcpServers??0,"MCP server"],[t?.agents??0,"agent"],[t?.workflows??0,"workflow"]].filter(([e])=>e>0).map(([e,t])=>{var r,n;return r=e,n=t,`${r} ${n}${1===r?"":"s"}`});return 0===r.length?"nothing installed":r.join(", ")}e.s(["PluginInstallDialog",0,function({opened:e,entryName:r,sourceName:s,org:i,open:a,onClose:o,onInstalled:l,className:d}){return a&&null!==e&&null!==r?(0,t.jsx)(M.DialogShell,{open:!0,onOpenChange:e=>{e||o()},width:"lg",className:(0,n.cn)("stg:max-h-[85vh] stg:bg-card stg:text-foreground",d),"aria-label":`Install ${r}`,children:(0,t.jsx)("div",{className:"stg:flex stg:max-h-[85vh] stg:flex-col stg:overflow-y-auto stg:p-6",children:(0,t.jsx)(L,{opened:e,entryName:r,sourceName:s,org:i,onClose:o,onInstalled:l})})}):null},"summariseInstall",0,D],830419);var R=e.i(229969);function U(e){let t=null;for(let r of e){let e=r.indexOf("/");if(e<=0)return null;let n=r.slice(0,e);if(null===t)t=n;else if(t!==n)return null}return t}class F extends Error{reason;constructor(e,t){super(e),this.reason=t,this.name="LocalPluginError"}}let q=[80,75,3,4];function B(e,t){if(0===t.length)throw new F(`'${e}' holds no files`,"empty");return{kind:"folder",name:e,candidates:t.map(({path:e,file:t})=>({path:e,size:t.size,read:async()=>new Uint8Array(await t.arrayBuffer())}))}}async function J(e){let t=new Uint8Array(await e.arrayBuffer());if(!q.every((e,r)=>t[r]===e))throw new F(`'${e.name}' is not a zip archive`,"not-a-zip");let r=Object.entries((0,R.unzipSync)(t)).filter(([e])=>!e.endsWith("/")&&!e.startsWith("__MACOSX/"));if(0===r.length)throw new F(`'${e.name}' holds no files`,"empty");let n=U(r.map(([e])=>e)),s=null===n?0:n.length+1;return{kind:"zip",name:e.name,candidates:r.map(([e,t])=>({path:e.slice(s),size:t.length,read:async()=>t})),...null!==n&&{rerooted:n}}}async function G(e){let t=await (0,p.preparePluginFromTree)(e.candidates,{respectGitignore:!0,maxBytes:f.MARKETPLACE_TREE_LIMITS.pluginBytes});if(!t.ok)switch(t.kind){case"refused":throw new h(`'${e.name}' cannot be installed`,t.errors,t.warnings);case"too-large":throw new F(`'${e.name}' is ${(0,f.formatMib)(t.selectedBytes)} of files after ignores, over the ${(0,f.formatMib)(t.maxBytes)} a plugin archive may carry`,"too-large");default:return t}let{plugin:r,warnings:n,stats:s,archive:i,digest:a}=t.prepared;return{origin:{kind:"upload",pick:e.kind,name:e.name,...void 0!==e.rerooted&&{rerooted:e.rerooted}},plugin:r,warnings:n,stats:s,archive:i,digest:a}}let W=/\.zip$/i;async function V(e,t){let r=[],n=e.createReader();for(;;){let e=await new Promise((e,t)=>n.readEntries(e,t));if(0===e.length)break;for(let n of e){let e=""===t?n.name:`${t}/${n.name}`;if(n.isDirectory)r.push(...await V(n,e));else if(n.isFile){let t=await new Promise((e,t)=>n.file(e,t));r.push({path:e,file:t})}}}return r}function K({upload:e,onCancel:i}){let[l,d]=(0,r.useState)(!1),c=(0,r.useRef)(null),u=(0,r.useRef)(null),{phase:p}=e,f="preparing"===p.kind,m=(0,r.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),d(!1),e.fromDrop(t.dataTransfer.items,t.dataTransfer.files)},[e]);return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-3",children:[(0,t.jsxs)("div",{onDragOver:e=>{e.preventDefault(),e.stopPropagation(),d(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),d(!1)},onDrop:m,"aria-label":"Upload a plugin",className:(0,n.cn)("stg:flex stg:flex-col stg:items-center stg:justify-center stg:gap-3 stg:rounded-lg stg:border-2 stg:border-dashed stg:p-12 stg:transition-colors",l?"stg:border-primary stg:bg-muted-subtle":"stg:border-border",f&&"stg:pointer-events-none stg:opacity-60"),children:[(0,t.jsx)(o.UploadIcon,{className:(0,n.cn)("stg:size-10 stg:text-muted-foreground",l&&"stg:text-primary")}),f?(0,t.jsxs)("p",{className:"stg:flex stg:items-center stg:gap-2 stg:text-sm stg:font-medium stg:text-foreground",role:"status",children:[(0,t.jsx)(a.SpinnerIcon,{className:"stg:size-4"}),"Reading ",p.name,"…"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:"Drop a plugin folder or a .zip of one here"}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(s.Button,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),children:"Choose a folder"}),(0,t.jsx)(s.Button,{variant:"outline",size:"sm",onClick:()=>u.current?.click(),children:"Choose a .zip"})]})]}),(0,t.jsx)("p",{className:"stg:mt-2 stg:text-[10px] stg:text-muted-foreground-subtle",children:"A Cursor, Claude Code, Codex or Agent Plugins folder installs unchanged."}),(0,t.jsx)("input",{ref:e=>{c.current=e,e?.setAttribute("webkitdirectory","")},type:"file",multiple:!0,onChange:t=>{let{files:r}=t.target;r&&r.length>0&&e.fromFolderInput(r),t.target.value=""},className:"stg:hidden","aria-hidden":"true","data-testid":"plugin-folder-input"}),(0,t.jsx)("input",{ref:u,type:"file",accept:".zip",onChange:t=>{let r=t.target.files?.[0];r&&e.fromZip(r),t.target.value=""},className:"stg:hidden","aria-hidden":"true","data-testid":"plugin-zip-input"})]}),"refused"===p.kind&&(0,t.jsx)(k,{error:p.error,..."refused"===p.kind&&"folder"===p.pick&&p.error instanceof h&&p.error.errors.some(e=>"no-manifest"===e.kind)&&{hint:"No manifest was found in the folder. Some browsers leave out files and folders whose names begin with a dot when a folder is picked, and a Cursor or Claude Code plugin keeps its manifest in one; zip the folder and upload the .zip instead."}}),i&&(0,t.jsx)("div",{className:"stg:flex stg:justify-end",children:(0,t.jsx)(s.Button,{variant:"outline",size:"sm",onClick:i,children:"Cancel"})})]})}function H({prepared:e,org:n,onBack:a,onComplete:o}){let l=z(e,n),{install:d,isInstalling:c,error:u}=T(),[p,f]=(0,r.useState)(null),h=(0,r.useCallback)(async()=>{try{let t=await d(e,{org:n});f(t),o?.(t)}catch{}},[d,e,n,o]),m="upgrade"===l.relation?"Upgrade":"Install";return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-5",children:[(0,t.jsxs)("header",{children:[(0,t.jsxs)("h2",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:[m," ",e.plugin.name]}),(0,t.jsxs)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:["From ",$(e.origin)," into ",n,". The archive is rebuilt from the selected files, so its digest is the one `stigmer push plugin` prints for this folder."]})]}),(0,t.jsx)(w,{prepared:e,relation:l.relation}),l.error&&(0,t.jsx)(i.ErrorMessage,{error:l.error,title:"The organization could not be asked what it holds"}),u&&(0,t.jsx)(i.ErrorMessage,{error:u,title:"The server refused the install"}),p&&(0,t.jsxs)("div",{role:"status",className:"stg:rounded-md stg:border stg:border-border stg:bg-muted stg:p-3 stg:text-sm stg:text-foreground",children:["Installed plugin '",p.plugin.metadata?.slug,"' (",D(p),")."]}),(0,t.jsxs)("footer",{className:"stg:flex stg:justify-end stg:gap-2 stg:pt-1",children:[(0,t.jsx)(s.Button,{variant:"outline",size:"sm",onClick:a,disabled:c,children:p?"Upload another":"Choose a different plugin"}),!p&&(0,t.jsx)(s.Button,{variant:"primary",size:"sm",onClick:h,disabled:c||l.isLoading||"installed"===l.relation,children:c?"Installing…":m})]})]})}e.s(["PluginUploader",0,function({org:e,onComplete:s,onCancel:i,className:a}){let o=function(){let[e,t]=(0,r.useState)({kind:"idle"}),n=(0,r.useCallback)(async(e,r,n)=>{t({kind:"preparing",name:r});try{let r=await G(await e());t({kind:"prepared",prepared:r})}catch(e){t({kind:"refused",error:e instanceof Error?e:Error(String(e)),pick:n})}},[]),s=(0,r.useCallback)(e=>{let t=e[0];return n(async()=>(function(e){let t=Array.from(e);if(0===t.length)throw new F("no files were picked","empty");let r=t.map(e=>({path:e.webkitRelativePath||e.name,file:e})),n=U(r.map(e=>e.path)),s=null===n?r:r.map(({path:e,file:t})=>({path:e.slice(n.length+1),file:t}));return B(n??"folder",s)})(e),t?.webkitRelativePath.split("/")[0]||"folder","folder")},[n]),i=(0,r.useCallback)(e=>n(()=>J(e),e.name,"zip"),[n]),a=(0,r.useCallback)(async(e,r)=>{let s=e[0]?.webkitGetAsEntry?.()??null;if(null!==s&&s.isDirectory)return n(async()=>B(s.name,await V(s,"")),s.name,"folder");let a=r[0];if(void 0!==a&&W.test(a.name))return i(a);t({kind:"refused",error:new F("drop a plugin folder or a .zip of one","empty"),pick:null})},[n,i]),o=(0,r.useCallback)(()=>t({kind:"idle"}),[]);return(0,r.useMemo)(()=>({phase:e,fromFolderInput:s,fromZip:i,fromDrop:a,reset:o}),[e,s,i,a,o])}();return(0,t.jsx)("div",{className:(0,n.cn)("stg:flex stg:flex-col stg:gap-4",a),children:"prepared"===o.phase.kind?(0,t.jsx)(H,{prepared:o.phase.prepared,org:e,onBack:o.reset,onComplete:s}):(0,t.jsx)(K,{upload:o,onCancel:i})})}],563212)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,356965,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);function n(t){let e=t.owner;return{id:t.id,fullName:t.full_name,name:t.name,owner:e.login,ownerType:"Organization"===e.type?"Organization":"User",htmlUrl:t.html_url,cloneUrl:t.clone_url,defaultBranch:t.default_branch,isPrivate:t.private,updatedAt:t.updated_at}}async function o(t,e){let s=`https://api.github.com/user/repos?sort=pushed&direction=desc&per_page=100&page=${e}`,r=await fetch(s,{headers:{Authorization:`Bearer ${t}`}});if(!r.ok)throw Error(`GitHub API error: ${r.status}`);let o=(await r.json()).map(n);return{repos:o,hasMore:100===o.length}}function i(t){let e=t.owner;return{id:t.id,fullName:t.full_name,name:t.name,owner:e.login,ownerType:"Organization"===e.type?"Organization":"User",htmlUrl:t.html_url,cloneUrl:t.clone_url,defaultBranch:t.default_branch,isPrivate:t.private,updatedAt:t.updated_at}}async function l(t,e,s){let r=new URLSearchParams({q:t,sort:"stars",order:"desc",per_page:String(30),page:String(e)}),n={Accept:"application/vnd.github+json"};s&&(n.Authorization=`Bearer ${s}`);let o=await fetch(`https://api.github.com/search/repositories?${r}`,{headers:n});if(!o.ok){if(403===o.status)throw Error("GitHub search rate limit exceeded. Try again shortly.");throw Error(`GitHub search error: ${o.status}`)}let l=await o.json(),a=l.items.map(i),g=l.total_count;return{repos:a,totalCount:g,hasMore:30*e<g}}let a="stigmer:github:recent-repos";function g(){try{let t=localStorage.getItem(a);return t?JSON.parse(t):[]}catch{return[]}}function c({text:t,query:s}){if(!s)return(0,e.jsx)(e.Fragment,{children:t});let r=t.toLowerCase().indexOf(s.toLowerCase());return -1===r?(0,e.jsx)(e.Fragment,{children:t}):(0,e.jsxs)(e.Fragment,{children:[t.slice(0,r),(0,e.jsx)("span",{className:"stg:text-foreground stg:font-medium",children:t.slice(r,r+s.length)}),t.slice(r+s.length)]})}let u="stgm-repo-list";function d({token:t,onSelect:r,onCancel:n,className:i}){let[c,m]=(0,s.useState)("my-repos"),[f,b]=(0,s.useState)(!1),v=function(t){let[e,r]=(0,s.useState)([]),[n,i]=(0,s.useState)(!1),[l,a]=(0,s.useState)(!1),[g,c]=(0,s.useState)(null),[u,d]=(0,s.useState)(""),[p,x]=(0,s.useState)(!0);(0,s.useEffect)(()=>{if(!t){r([]),i(!1),a(!1),x(!1);return}let e={current:!1};return async function(){i(!0),c(null),r([]),x(!0);try{let s=await o(t,1);if(e.current)return;if(r(s.repos),i(!1),!s.hasMore)return void x(!1);a(!0);let n=2,l=!0;for(;l&&!e.current;){let s=await o(t,n);if(e.current)return;r(t=>[...t,...s.repos]),l=s.hasMore,n++}e.current||(x(!1),a(!1))}catch(t){if(e.current)return;c(t instanceof Error?t.message:"Failed to fetch repos"),i(!1),a(!1)}}(),()=>{e.current=!0}},[t]);let m=(0,s.useCallback)(()=>{},[]);return{repos:u?e.filter(t=>t.fullName.toLowerCase().includes(u.toLowerCase())):e,isLoading:n,isBackgroundLoading:l,error:g,search:u,setSearch:d,hasMore:p,loadMore:m,fetchBranches:(0,s.useCallback)(async(e,s)=>{if(!t)return[];try{let r=await fetch(`https://api.github.com/repos/${e}/${s}/branches?per_page=100`,{headers:{Authorization:`Bearer ${t}`}});if(!r.ok)return[];return(await r.json()).map(t=>({name:t.name}))}catch{return[]}},[t])}}(t),y=function(t){let[e,r]=(0,s.useState)(""),[n,o]=(0,s.useState)(""),[i,a]=(0,s.useState)([]),[g,c]=(0,s.useState)(!1),[u,d]=(0,s.useState)(null),[p,x]=(0,s.useState)(0),[m,f]=(0,s.useState)(!1),[h,b]=(0,s.useState)(1),v=(0,s.useRef)(void 0);(0,s.useEffect)(()=>{if(clearTimeout(v.current),!e.trim()){o(""),a([]),x(0),f(!1),d(null);return}return v.current=setTimeout(()=>{o(e.trim()),b(1)},350),()=>clearTimeout(v.current)},[e]),(0,s.useEffect)(()=>{if(!n)return;let e={current:!1};return async function(){c(!0),d(null);try{let s=await l(n,h,t);if(e.current)return;a(t=>1===h?s.repos:[...t,...s.repos]),x(s.totalCount),f(s.hasMore)}catch(t){if(e.current)return;d(t instanceof Error?t.message:"Search failed")}finally{e.current||c(!1)}}(),()=>{e.current=!0}},[n,h,t]);let y=(0,s.useCallback)(()=>{m&&!g&&b(t=>t+1)},[m,g]);return{results:i,isSearching:g,error:u,query:e,setQuery:r,totalCount:p,hasMore:m,loadMore:y}}(t),[j,k]=(0,s.useState)(null),[N,w]=(0,s.useState)([]),[C,S]=(0,s.useState)(""),[L,B]=(0,s.useState)(!1),[$,T]=(0,s.useState)(""),[U,E]=(0,s.useState)(""),[M,R]=(0,s.useState)(-1),D=(0,s.useRef)(null),A=(0,s.useRef)(null),[H,G]=(0,s.useState)(!1),[_,P]=(0,s.useState)(!1),[z,F]=(0,s.useState)(g),I="my-repos"===c?v.search:y.query,O="my-repos"===c?v.setSearch:y.setQuery,q="my-repos"===c?v.repos:y.results,K="my-repos"===c?v.error:y.error;"my-repos"===c?v.isLoading:y.isSearching;let W=(0,s.useMemo)(()=>"my-repos"===c?function(t,e){let s=[],r=new Map(t.map(t=>[`${t.owner}/${t.name}`,t])),n=e.map(t=>r.get(`${t.owner}/${t.name}`)).filter(t=>void 0!==t);n.length>0&&s.push({key:"recent",label:"Recent",isRecent:!0,repos:n});let o=new Map;for(let e of t){let t=o.get(e.owner);t?t.repos.push(e):o.set(e.owner,{ownerType:e.ownerType,repos:[e]})}for(let[t,{repos:e}]of[...o.entries()].sort(([,t],[,e])=>t.ownerType!==e.ownerType?"User"===t.ownerType?-1:1:e.repos.length-t.repos.length))s.push({key:t,label:t,isRecent:!1,repos:e});return s}(q,z):[],[c,q,z]),V=(0,s.useMemo)(()=>{if("all-github"===c)return[...q];let t=[];for(let e of W)for(let s of e.repos)t.push(s);return t},[c,q,W]);(0,s.useEffect)(()=>{R(-1)},[I,c]),(0,s.useEffect)(()=>{if(M>=0){let t=D.current?.querySelector(`[data-idx="${M}"]`);t?.scrollIntoView({block:"nearest"})}},[M]);let J=(0,s.useCallback)(()=>{let t=D.current;t&&(G(t.scrollTop>0),P(t.scrollTop+t.clientHeight<t.scrollHeight-1))},[]);(0,s.useEffect)(()=>{let t=D.current;if(t)return t.addEventListener("scroll",J,{passive:!0}),J(),()=>t.removeEventListener("scroll",J)},[J]),(0,s.useEffect)(()=>{J()},[q,J]);let Q=(0,s.useCallback)(t=>{t!==c&&(m(t),R(-1),"my-repos"===t?y.setQuery(""):v.setSearch(""),setTimeout(()=>A.current?.focus(),0))},[c,y,v]),X=(0,s.useCallback)(async t=>{k({owner:t.owner,name:t.name,cloneUrl:t.cloneUrl,defaultBranch:t.defaultBranch}),S(t.defaultBranch),B(!0),w(await v.fetchBranches(t.owner,t.name)),B(!1)},[v]),Y=(0,s.useCallback)(()=>{if(j&&C){var t;let e,s;t={owner:j.owner,name:j.name,cloneUrl:j.cloneUrl,defaultBranch:j.defaultBranch},e=g().filter(e=>e.owner!==t.owner||e.name!==t.name),s=[t,...e].slice(0,3),localStorage.setItem(a,JSON.stringify(s)),F(g()),r(j.cloneUrl,C),k(null),w([]),S("")}},[j,C,r]),Z=(0,s.useCallback)(()=>{let t=$.trim();t&&(r(t,U.trim()||"main"),T(""),E(""),b(!1))},[$,U,r]),tt=(0,s.useCallback)(t=>{"ArrowDown"===t.key?(t.preventDefault(),R(t=>t<V.length-1?t+1:t)):"ArrowUp"===t.key?(t.preventDefault(),R(t=>t>0?t-1:-1)):"Enter"===t.key&&M>=0&&M<V.length?(t.preventDefault(),X(V[M])):"Enter"===t.key?t.preventDefault():"Escape"===t.key&&(t.preventDefault(),I?(O(""),R(-1)):n?.())},[V,M,X,n,I,O]),te=(0,s.useCallback)(t=>{"Enter"===t.key?(t.preventDefault(),Z()):"Escape"===t.key&&(t.preventDefault(),b(!1),setTimeout(()=>A.current?.focus(),0))},[Z]);if(j)return(0,e.jsxs)("div",{className:["stg:space-y-2",i].filter(Boolean).join(" "),children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-foreground",children:[(0,e.jsx)("button",{type:"button",onClick:()=>{k(null),w([]),setTimeout(()=>A.current?.focus(),0)},className:"stg:text-muted-foreground stg:hover:text-foreground stg:transition-colors","aria-label":"Back to repo list",children:(0,e.jsx)(h,{})}),(0,e.jsxs)("span",{className:"stg:font-medium stg:truncate",children:[j.owner,"/",j.name]})]}),(0,e.jsxs)("div",{className:"stg:space-y-1.5",children:[(0,e.jsx)("label",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Branch"}),L?(0,e.jsx)("div",{className:"stg:text-xs stg:text-muted-foreground",children:"Loading branches..."}):(0,e.jsx)("select",{value:C,onChange:t=>S(t.target.value),className:"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:N.map(t=>(0,e.jsx)("option",{value:t.name,children:t.name},t.name))})]}),(0,e.jsx)("div",{className:"stg:flex stg:justify-end",children:(0,e.jsx)("button",{type:"button",onClick:Y,disabled:!C,className:"stg:rounded-md stg:bg-primary stg:px-2.5 stg:py-1 stg:text-xs stg:text-primary-foreground stg:hover:bg-primary-hover stg:transition-colors stg:disabled:opacity-40",children:"Add"})})]});if(f)return(0,e.jsxs)("div",{className:["stg:space-y-2",i].filter(Boolean).join(" "),children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-foreground",children:[(0,e.jsx)("button",{type:"button",onClick:()=>{b(!1),setTimeout(()=>A.current?.focus(),0)},className:"stg:text-muted-foreground stg:hover:text-foreground stg:transition-colors","aria-label":"Back to repo list",children:(0,e.jsx)(h,{})}),(0,e.jsx)("span",{className:"stg:font-medium",children:"Paste a repository URL"})]}),(0,e.jsx)("input",{type:"url",placeholder:"https://github.com/org/repo",value:$,onChange:t=>T(t.target.value),onKeyDown:te,className:"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",autoFocus:!0}),(0,e.jsx)("input",{type:"text",placeholder:"Branch (optional, defaults to main)",value:U,onChange:t=>E(t.target.value),onKeyDown:te,className:"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"}),(0,e.jsx)("div",{className:"stg:flex stg:justify-end",children:(0,e.jsx)("button",{type:"button",onClick:Z,disabled:!$.trim(),className:"stg:rounded-md stg:bg-primary stg:px-2.5 stg:py-1 stg:text-xs stg:text-primary-foreground stg:hover:bg-primary-hover stg:transition-colors stg:disabled:opacity-40",children:"Add"})})]});let ts=0,tr=W.map(t=>{let e=ts;return ts+=t.repos.length,e});return(0,e.jsxs)("div",{className:["stg:space-y-1.5",i].filter(Boolean).join(" "),children:[(0,e.jsxs)("div",{className:"stg:flex stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:p-0.5",children:[(0,e.jsx)("button",{type:"button",onClick:()=>Q("my-repos"),className:["stg:flex-1 stg:rounded stg:px-2 stg:py-1 stg:text-[0.65rem] stg:font-medium stg:transition-colors","my-repos"===c?"stg:bg-background stg:text-foreground stg:shadow-sm":"stg:text-muted-foreground stg:hover:text-foreground"].join(" "),children:"My Repos"}),(0,e.jsx)("button",{type:"button",onClick:()=>Q("all-github"),className:["stg:flex-1 stg:rounded stg:px-2 stg:py-1 stg:text-[0.65rem] stg:font-medium stg:transition-colors","all-github"===c?"stg:bg-background stg:text-foreground stg:shadow-sm":"stg:text-muted-foreground stg:hover:text-foreground"].join(" "),children:"All GitHub"})]}),(0,e.jsx)("input",{ref:A,type:"text",role:"combobox","aria-expanded":!0,"aria-controls":u,"aria-activedescendant":M>=0?`stgm-repo-${M}`:void 0,placeholder:"my-repos"===c?"Search repositories...":"Search all of GitHub...",value:I,onChange:t=>O(t.target.value),onKeyDown:tt,className:"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",autoFocus:!0}),K&&(0,e.jsx)("p",{className:"stg:text-xs stg:text-destructive",children:K}),(0,e.jsxs)("div",{className:"stg:relative",children:[H&&(0,e.jsx)("div",{className:"stg:absolute stg:inset-x-0 stg:top-0 stg:h-3 stg:z-10 stg:pointer-events-none",style:{background:"linear-gradient(to bottom, var(--color-card, hsl(0 0% 9%)), transparent)"}}),(0,e.jsx)("div",{ref:D,id:u,role:"listbox","aria-label":"Repositories",className:"stg:max-h-64 stg:overflow-y-auto",children:"my-repos"===c?(0,e.jsx)(p,{groups:W,groupOffsets:tr,flatItems:V,focusIndex:M,isLoading:v.isLoading,isBackgroundLoading:v.isBackgroundLoading,search:v.search,onRepoClick:X}):(0,e.jsx)(x,{results:y.results,focusIndex:M,isSearching:y.isSearching,query:y.query,totalCount:y.totalCount,hasMore:y.hasMore,onRepoClick:X,onLoadMore:y.loadMore})}),_&&(0,e.jsx)("div",{className:"stg:absolute stg:inset-x-0 stg:bottom-0 stg:h-3 stg:z-10 stg:pointer-events-none",style:{background:"linear-gradient(to top, var(--color-card, hsl(0 0% 9%)), transparent)"}})]}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3 stg:border-t stg:border-border stg:pt-1.5 stg:text-[0.65rem] stg:text-muted-foreground",children:[(0,e.jsx)("button",{type:"button",onClick:()=>b(!0),className:"stg:hover:text-foreground stg:transition-colors",children:"Paste a URL"}),(0,e.jsx)("span",{className:"stg:opacity-30",children:"·"}),(0,e.jsx)("a",{href:"https://github.com/settings/installations",target:"_blank",rel:"noopener noreferrer",className:"stg:hover:text-foreground stg:transition-colors",children:"Manage access"})]})]})}function p({groups:t,groupOffsets:s,flatItems:r,focusIndex:n,isLoading:o,isBackgroundLoading:i,search:l,onRepoClick:a}){return o?(0,e.jsx)(f,{}):0===r.length?(0,e.jsx)("div",{className:"stg:py-4 stg:text-center stg:text-xs stg:text-muted-foreground",children:l?"No repos match your search":"No repositories found"}):(0,e.jsxs)(e.Fragment,{children:[t.map((t,r)=>(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"stg:sticky stg:top-0 stg:z-[1] stg:bg-card stg:px-2 stg:py-1 stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground stg:backdrop-blur-sm",children:[t.label,!t.isRecent&&(0,e.jsxs)("span",{className:"stg:ml-1 stg:opacity-50",children:["(",t.repos.length,")"]})]}),t.repos.map((o,i)=>{let g=s[r]+i;return(0,e.jsx)(m,{repo:o,flatIdx:g,focusIndex:n,displayName:t.isRecent?o.fullName:o.name,query:l,onClick:a},`${t.key}-${o.id}`)})]},t.key)),i&&(0,e.jsx)("div",{className:"stg:py-1 stg:text-center stg:text-[0.6rem] stg:text-muted-foreground",children:"Loading more..."})]})}function x({results:t,focusIndex:s,isSearching:r,query:n,totalCount:o,hasMore:i,onRepoClick:l,onLoadMore:a}){return n?r&&0===t.length?(0,e.jsx)(f,{}):0===t.length?(0,e.jsx)("div",{className:"stg:py-4 stg:text-center stg:text-xs stg:text-muted-foreground",children:"No repositories found"}):(0,e.jsxs)(e.Fragment,{children:[o>0&&(0,e.jsxs)("div",{className:"stg:px-2 stg:py-1 stg:text-[0.6rem] stg:text-muted-foreground",children:[o.toLocaleString()," ",1===o?"result":"results"]}),t.map((t,r)=>(0,e.jsx)(m,{repo:t,flatIdx:r,focusIndex:s,displayName:t.fullName,query:n,onClick:l},t.id)),r&&(0,e.jsx)("div",{className:"stg:py-1 stg:text-center stg:text-[0.6rem] stg:text-muted-foreground",children:"Searching..."}),i&&!r&&(0,e.jsx)("button",{type:"button",onClick:a,className:"stg:w-full stg:py-1.5 stg:text-center stg:text-[0.65rem] stg:text-muted-foreground stg:hover:text-foreground stg:transition-colors",children:"Load more results"})]}):(0,e.jsx)("div",{className:"stg:py-6 stg:text-center stg:text-xs stg:text-muted-foreground",children:"Type to search all of GitHub"})}function m({repo:t,flatIdx:s,focusIndex:r,displayName:n,query:o,onClick:i}){return(0,e.jsxs)("button",{id:`stgm-repo-${s}`,type:"button","data-idx":s,onClick:()=>i(t),className:["stg:flex stg:w-full stg:items-center stg:gap-2 stg:rounded-md stg:px-2 stg:py-1.5 stg:text-left stg:text-xs stg:transition-colors",s===r?"stg:bg-accent stg:text-foreground":"stg:text-foreground stg:hover:bg-accent-hover"].join(" "),role:"option","aria-selected":s===r,children:[(0,e.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate",children:(0,e.jsx)(c,{text:n,query:o})}),(0,e.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:px-1 stg:py-0.5 stg:text-[0.6rem] stg:bg-muted stg:text-muted-foreground",children:t.isPrivate?"private":"public"})]})}function f(){return(0,e.jsxs)("div",{className:"stg:space-y-1 stg:py-1",children:[(0,e.jsx)("div",{className:"stg:px-2 stg:py-1",children:(0,e.jsx)("div",{className:"stg:h-2.5 stg:w-16 stg:rounded stg:bg-muted stg:animate-pulse"})}),[55,70,40,62].map((t,s)=>(0,e.jsx)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-2 stg:py-1.5",children:(0,e.jsx)("div",{className:"stg:h-3 stg:rounded stg:bg-muted stg:animate-pulse",style:{width:`${t}%`}})},s)),(0,e.jsx)("div",{className:"stg:px-2 stg:py-1",children:(0,e.jsx)("div",{className:"stg:h-2.5 stg:w-20 stg:rounded stg:bg-muted stg:animate-pulse"})}),[48,65,53].map((t,s)=>(0,e.jsx)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-2 stg:py-1.5",children:(0,e.jsx)("div",{className:"stg:h-3 stg:rounded stg:bg-muted stg:animate-pulse",style:{width:`${t}%`}})},s+4))]})}function h(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M9 3L5 7L9 11"})})}var b=t.i(230849),v=t.i(4144),y=t.i(188482);let j={git:"GitHub"};function k({connection:t,onSelect:s,onClose:r}){if(t.isLoading)return(0,e.jsx)("div",{className:"stg:py-4 stg:text-center stg:text-xs stg:text-muted-foreground",children:"Checking GitHub connection..."});if(!t.isConnected){if(t.isConnecting)return(0,e.jsx)(w,{onCancel:t.disconnect});let s=`${window.location.origin}/auth/github/callback`;return(0,e.jsxs)("div",{className:"stg:space-y-3 stg:text-center",children:[(0,e.jsxs)("div",{className:"stg:space-y-1",children:[(0,e.jsx)("p",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Choose a GitHub repo to add to workspace"}),(0,e.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Connect your GitHub account so the agent can access your repos"})]}),t.popupBlocked?(0,e.jsxs)("div",{className:"stg:space-y-2",children:[(0,e.jsx)("p",{className:"stg:text-[0.65rem] stg:text-destructive",children:"Popup was blocked by your browser."}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-center stg:gap-2",children:[(0,e.jsx)("button",{type:"button",onClick:()=>t.connect(s,{popup:!0}),className:"stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Try again"}),(0,e.jsxs)("button",{type:"button",onClick:()=>t.connect(s),className:"stg:inline-flex stg:items-center stg:gap-2 stg:rounded-md stg:bg-foreground stg:px-3 stg:py-1.5 stg:text-xs stg:text-background stg:transition-colors stg:hover:bg-foreground-hover stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:[(0,e.jsx)(B,{}),(0,e.jsx)("span",{children:"Continue with redirect"})]})]})]}):(0,e.jsxs)("button",{type:"button",onClick:()=>t.connect(s,{popup:!0}),className:"stg:inline-flex stg:items-center stg:gap-2 stg:rounded-md stg:bg-foreground stg:px-3 stg:py-1.5 stg:text-xs stg:text-background stg:transition-colors stg:hover:bg-foreground-hover stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:[(0,e.jsx)(B,{}),(0,e.jsx)("span",{children:"Connect GitHub"})]})]})}return(0,e.jsxs)("div",{className:"stg:space-y-2",children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between",children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs",children:[t.user?.avatarUrl&&(0,e.jsx)("img",{src:t.user.avatarUrl,alt:"",className:"stg:h-4 stg:w-4 stg:rounded-full"}),(0,e.jsx)("span",{className:"stg:text-muted-foreground",children:t.user?.login??"Connected"})]}),(0,e.jsx)("button",{type:"button",onClick:t.disconnect,className:"stg:rounded-sm stg:text-[0.6rem] stg:text-muted-foreground stg:transition-colors stg:hover:text-destructive stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Disconnect"})]}),(0,e.jsx)(d,{token:t.token,onSelect:s,onCancel:r})]})}function N({url:t,branch:s,onUrlChange:r,onBranchChange:n,onAdd:o,onCancel:i,onKeyDown:l}){return(0,e.jsxs)("div",{className:"stg:space-y-2",children:[(0,e.jsx)("input",{type:"url","aria-label":"Git repository URL",placeholder:"https://github.com/org/repo.git",value:t,onChange:t=>r(t.target.value),onKeyDown:l,className:"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",autoFocus:!0}),(0,e.jsx)("input",{type:"text","aria-label":"Branch (optional)",placeholder:"Branch (optional)",value:s,onChange:t=>n(t.target.value),onKeyDown:l,className:"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"}),(0,e.jsxs)("div",{className:"stg:flex stg:justify-end stg:gap-2",children:[(0,e.jsx)("button",{type:"button",onClick:i,className:"stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Cancel"}),(0,e.jsx)("button",{type:"button",onClick:o,disabled:!t.trim(),className:"stg:rounded-md stg:bg-primary stg:px-2.5 stg:py-1 stg:text-xs stg:text-primary-foreground stg:transition-colors stg:hover:bg-primary-hover stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:disabled:opacity-40",children:"Add"})]})]})}function w({onCancel:t}){let[r,n]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let t=setTimeout(()=>n(!0),3e4);return()=>clearTimeout(t)},[]),(0,e.jsxs)("div",{className:"stg:space-y-3 stg:py-4 stg:text-center",children:[(0,e.jsx)("div",{className:"stg:mx-auto stg:h-5 stg:w-5 stg:animate-spin stg:rounded-full stg:border-2 stg:border-muted-foreground stg:border-t-foreground"}),(0,e.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:r?"Taking longer than expected...":"Connecting to GitHub..."}),(0,e.jsx)("button",{type:"button",onClick:t,className:"stg:rounded-sm stg:text-[0.65rem] stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Cancel"})]})}function C(){return(0,e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M7.5 2.5L4 6L7.5 9.5"})})}function S(){return(0,e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:text-muted-foreground",children:(0,e.jsx)("path",{d:"M4.5 2.5L8 6L4.5 9.5"})})}function L(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M4 4L10 10M10 4L4 10"})})}function B(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:(0,e.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}function $(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M1.5 3.5V11a1 1 0 001 1h9a1 1 0 001-1V5.5a1 1 0 00-1-1H7L5.5 3H2.5a1 1 0 00-1 .5z"})})}t.s(["WorkspaceEditor",0,function({workspace:t,className:n,disabled:o,gitHubConnection:i,enableGitHub:l=!0,enableLocal:a=!1,onBrowseLocalFolder:g,initialPanel:c}){let u=c&&0===t.entries.length?c:null,[d,p]=(0,s.useState)(u),[x,m]=(0,s.useState)(""),[f,h]=(0,s.useState)(""),w=(0,b.useScrollShadows)();(0,s.useEffect)(()=>{c&&0===t.entries.length?p(c):t.entries.length>0&&p(null)},[c,t.entries.length]);let T=(0,s.useCallback)((e,s)=>{t.addGitRepo(e,s)},[t]),U=(0,s.useCallback)(()=>{x.trim()&&(t.addGitRepo(x.trim(),f.trim()||void 0),m(""),h(""))},[x,f,t]),E=(0,s.useCallback)(t=>e=>{"Enter"===e.key&&(e.preventDefault(),t())},[]),M=(0,s.useCallback)(()=>p(null),[]);return"github"===d&&l?(0,e.jsxs)("div",{className:(0,r.cn)("stg:space-y-2",n),children:[(0,e.jsxs)("button",{type:"button",onClick:M,className:"stg:inline-flex stg:items-center stg:gap-1 stg:rounded-sm stg:text-[0.65rem] stg:text-muted-foreground stg:transition-colors stg:hover:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:[(0,e.jsx)(C,{}),"Back"]}),i?(0,e.jsx)(k,{connection:i,onSelect:(t,e)=>{T(t,e),p(null)},onClose:M}):(0,e.jsx)(N,{url:x,branch:f,onUrlChange:m,onBranchChange:h,onAdd:()=>{U(),p(null)},onCancel:M,onKeyDown:E(()=>{U(),p(null)})})]}):(0,e.jsxs)("div",{className:(0,r.cn)("stg:space-y-2",n),children:[t.entries.length>0&&(0,e.jsxs)("div",{className:"stg:relative",children:[w.canScrollUp&&(0,e.jsx)(v.ScrollFade,{position:"top"}),(0,e.jsx)("div",{ref:w.scrollRef,className:"stg:max-h-28 stg:space-y-1 stg:overflow-y-auto",children:t.entries.map(s=>(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:px-2.5 stg:py-1.5 stg:text-xs",children:[j[s.type]?(0,e.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[0.65rem] stg:text-muted-foreground",children:j[s.type]}):(0,e.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground",children:(0,e.jsx)($,{})}),(0,e.jsxs)(y.Tooltip,{children:[(0,e.jsx)(y.TooltipTrigger,{render:(0,e.jsx)("span",{className:(0,r.cn)("stg:min-w-0 stg:flex-1 stg:truncate stg:text-foreground","local"===s.type&&"stg:[direction:rtl] stg:text-left")}),children:(0,e.jsx)("bdi",{children:s.name})}),(0,e.jsx)(y.TooltipContent,{side:"top",className:"stg:break-all",children:s.name})]}),(0,e.jsx)("button",{type:"button",onClick:()=>t.remove(s.id),disabled:o,className:"stg:shrink-0 stg:rounded-sm stg:text-muted-foreground stg:transition-colors stg:hover:text-destructive stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:disabled:pointer-events-none","aria-label":`Remove ${s.name}`,children:(0,e.jsx)(L,{})})]},s.id))}),w.canScrollDown&&(0,e.jsx)(v.ScrollFade,{position:"bottom"})]}),(0,e.jsxs)("div",{className:"stg:space-y-0.5",children:[a&&g&&(0,e.jsxs)("button",{type:"button",onClick:async()=>{let e=await g();e&&t.addLocalPath(e)},disabled:o,className:"stg:flex stg:w-full stg:items-center stg:gap-2 stg:rounded-md stg:px-2.5 stg:py-2 stg:text-xs stg:text-foreground stg:transition-colors stg:hover:bg-accent-hover stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring stg:disabled:pointer-events-none stg:disabled:opacity-40",children:[(0,e.jsx)($,{}),(0,e.jsx)("span",{className:"stg:flex-1 stg:text-left",children:"Browse Folder"})]}),l&&(0,e.jsxs)("button",{type:"button",onClick:()=>p("github"),disabled:o,className:"stg:flex stg:w-full stg:items-center stg:gap-2 stg:rounded-md stg:px-2.5 stg:py-2 stg:text-xs stg:text-foreground stg:transition-colors stg:hover:bg-accent-hover stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring stg:disabled:pointer-events-none stg:disabled:opacity-40",children:[(0,e.jsx)(B,{}),(0,e.jsx)("span",{className:"stg:flex-1 stg:text-left",children:"Connect GitHub"}),(0,e.jsx)(S,{})]})]})]})}],356965)},577660,t=>{"use strict";var e=t.i(271645);let s=0;function r(){return`ws-${++s}-${Date.now()}`}t.s(["useWorkspaceEntries",0,function(){let[t,s]=(0,e.useState)([]),n=(0,e.useCallback)((t,e)=>{let n,o=(n=t.replace(/\/+$/,"").replace(/\.git$/,"").split("/")).length>=2?`${n[n.length-2]}/${n[n.length-1]}`:n[n.length-1]??t;s(s=>[...s,{id:r(),name:o,type:"git",gitUrl:t,gitBranch:e}])},[]),o=(0,e.useCallback)(t=>{let e=function(t){let e=t.replace(/[/\\]+$/,"");if(!e)return t;let s=e.split(/[/\\]/),r=s[s.length-1];if(s.length>=2){let t=s[s.length-2];return`${t}/${r}`}return r||t}(t);s(s=>[...s,{id:r(),name:e,type:"local",localPath:t}])},[]),i=(0,e.useCallback)(t=>{s(e=>e.filter(e=>e.id!==t))},[]),l=(0,e.useCallback)(()=>{s([])},[]),a=(0,e.useCallback)(()=>{s(t=>t.filter(t=>"local"!==t.type))},[]),g=(0,e.useCallback)(()=>t.map(t=>{let e="git"===t.type?{gitRepo:{url:t.gitUrl,branch:t.gitBranch}}:{localPath:{path:t.localPath}};return{name:t.name,source:e}}),[t]),c=t.length>0;return(0,e.useMemo)(()=>({entries:t,addGitRepo:n,addLocalPath:o,remove:i,clear:l,clearLocal:a,toInput:g,hasEntries:c}),[t,n,o,i,l,a,g,c])}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,311015,e=>{"use strict";var t=e.i(843476),s=e.i(893976),a=e.i(65642),r=e.i(271645),i=e.i(475254);let l=(0,i.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),n=(0,i.default)("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),c=(0,i.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var u=e.i(63209);let o="stg:h-10 stg:w-10";e.s(["EmptyState",0,function({variant:e,resourceLabel:i,icon:d,title:h,description:p,errorMessage:m,action:g,children:f,className:y}){let x=function(e){let{variant:t,resourceLabel:s="resources",title:a,description:i,errorMessage:d}=e;return(0,r.useMemo)(()=>{let e=function(e,t){switch(e){case"first-use":return{title:`No ${t} yet`,description:`Create ${"agents"===t?"an agent":`a ${t.replace(/s$/,"")}`} to get started.`};case"zero-results":return{title:"No results found",description:"Try adjusting your search or filters."};case"permission":return{title:`No access to ${t}`,description:"You don't have permission to view these resources. Contact your organization admin."};case"error":return{title:"Something went wrong",description:"We couldn't load this content. Please try again."}}}(t,s);return{title:a??e.title,description:"error"===t&&d?d:i??e.description,defaultIcon:function(e){switch(e){case"first-use":return(0,r.createElement)(l,{className:o});case"zero-results":return(0,r.createElement)(n,{className:o});case"permission":return(0,r.createElement)(c,{className:o});case"error":return(0,r.createElement)(u.AlertCircle,{className:o})}}(t),role:"error"===t?"alert":"status"}},[t,s,a,i,d])}({variant:e,resourceLabel:i,title:h,description:p,errorMessage:m});return(0,t.jsxs)("div",{role:x.role,className:(0,s.cn)("stg:flex stg:flex-col stg:items-center stg:gap-3 stg:py-12 stg:text-center",y),children:[(0,t.jsx)("div",{className:"stg:text-muted-foreground-faint",children:d??x.defaultIcon}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-muted-foreground",children:x.title}),(0,t.jsx)("p",{className:"stg:max-w-sm stg:text-xs stg:text-muted-foreground-subtle",children:x.description})]}),f?(0,t.jsx)("div",{className:"stg:mt-1",children:f}):g&&(0,t.jsx)(a.Button,{variant:"error"===e?"outline":"primary",icon:g.icon,onClick:g.onClick,className:"stg:mt-1",children:g.label})]})}],311015)},582458,e=>{"use strict";let t=(0,e.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},531245,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],531245)},543727,914118,582688,e=>{"use strict";var t=e.i(843476);function s({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M5.04 15.17a2.52 2.52 0 1 1-2.52-2.52h2.52v2.52zM6.31 15.17a2.52 2.52 0 0 1 5.04 0v6.31a2.52 2.52 0 1 1-5.04 0v-6.31zM8.83 5.04a2.52 2.52 0 1 1 2.52-2.52v2.52H8.83zM8.83 6.31a2.52 2.52 0 0 1 0 5.04H2.52a2.52 2.52 0 1 1 0-5.04h6.31zM18.96 8.83a2.52 2.52 0 1 1 2.52 2.52h-2.52V8.83zM17.69 8.83a2.52 2.52 0 0 1-5.04 0V2.52a2.52 2.52 0 1 1 5.04 0v6.31zM15.17 18.96a2.52 2.52 0 1 1-2.52 2.52v-2.52h2.52zM15.17 17.69a2.52 2.52 0 0 1 0-5.04h6.31a2.52 2.52 0 1 1 0 5.04h-6.31z"})})}function a({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z"})})}e.s(["SlackMarkIcon",0,s],914118),e.s(["WhatsAppMarkIcon",0,a],582688);let r=[{id:"slack",label:"Slack",Icon:s,installStyle:"redirect",supportsMessageTemplates:!1,supportsStaffReplies:!1,timelineIncludesCustomerMessages:!1},{id:"whatsapp",label:"WhatsApp",Icon:a,installStyle:"direct",supportsMessageTemplates:!0,supportsStaffReplies:!0,timelineIncludesCustomerMessages:!0}];e.s(["CHANNEL_PROVIDERS",0,r,"channelProviderOf",0,function(e){return r.find(t=>t.id===e)??null}],543727)},815907,e=>{"use strict";var t=e.i(891287),s=e.i(476487),a=e.i(586108),r=e.i(583093);e.s(["useOrgAgentChannelList",0,function(e){let i=(0,a.useStigmer)(),l=e?async()=>(await i.agentChannel.list((0,t.create)(s.ListAgentChannelsRequestSchema,{org:e}))).items:null,{data:n,isLoading:c,isRefetching:u,error:o,refetch:d}=(0,r.useFetch)(l,[e,i],[]);return{channels:n,isLoading:c,isRefetching:u,error:o,refetch:d}}])},385663,928240,182990,e=>{"use strict";let t=(0,e.i(475254).default)("layout-template",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);e.s(["LayoutTemplate",0,t],385663);let s=/\{\{\s*[A-Za-z0-9_]+\s*\}\}/g;e.s(["splitTemplateBody",0,function(e){let t=[],a=0;for(let r of e.matchAll(s))r.index>a&&t.push({kind:"text",value:e.slice(a,r.index)}),t.push({kind:"placeholder",value:r[0]}),a=r.index+r[0].length;return a<e.length&&t.push({kind:"text",value:e.slice(a)}),t},"templateStatusPhase",0,function(e){switch(e){case"APPROVED":return"ready";case"PENDING":case"IN_APPEAL":return"pending";case"PAUSED":case"LIMIT_EXCEEDED":return"degraded";case"REJECTED":case"DISABLED":return"failed";case"PENDING_DELETION":case"DELETED":return"disabled";default:return"draft"}}],928240);var a=e.i(271645),r=e.i(891287),i=e.i(730938),l=e.i(586108),n=e.i(583093);e.s(["useChannelTemplateList",0,function(e,t,s){let c=(0,l.useStigmer)(),u=s?.approvedOnly??!1,[o,d]=(0,a.useState)(!1),h=e&&t?async()=>(await c.agentChannel.listTemplates((0,r.create)(i.ListChannelTemplatesInputSchema,{channel:e,org:t,approvedOnly:u}))).entries:null,{data:p,isLoading:m,isRefetching:g,error:f,refetch:y}=(0,n.useFetch)(h,[e,t,u,c],[],{refetchInterval:o}),x=p.some(e=>"PENDING"===e.status);return(0,a.useEffect)(()=>{d(!!x&&6e4)},[x]),{templates:p,isLoading:m,isRefetching:g,error:f,refetch:y}}],182990)}]);
|