@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,541071,727612,e=>{"use strict";var t=e.i(475254);let s=(0,t.default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["MoreHorizontal",0,s],541071);let a=(0,t.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,a],727612)},431343,e=>{"use strict";let t=(0,e.i(475254).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],431343)},495242,e=>{"use strict";let t=(0,e.i(475254).default)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);e.s(["Pause",0,t],495242)},424089,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(893976),n=e.i(869803),r=e.i(610595),o=e.i(910304),l=e.i(65642);function i({tone:e,label:s}){return(0,t.jsx)("span",{className:(0,a.cn)("stg:inline-block stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium","ok"===e&&"stg:bg-accent stg:text-primary","warn"===e&&"stg:bg-muted-subtle stg:text-destructive","muted"===e&&"stg:bg-muted-subtle stg:text-muted-foreground"),children:s})}var c=e.i(891287),d=e.i(988467),u=e.i(933221);function g({initial:e,isSubmitting:n,submitError:o,onSubmit:i,onCancel:m,className:h}){let x=null===e,[p,b]=(0,s.useState)(e?.displayName??""),[y,f]=(0,s.useState)(x?"":"***REDACTED***"),[j,v]=(0,s.useState)(e?.enabled??!0),[k,N]=(0,s.useState)(!e?.onDemandUsageDisabled),[C,w]=(0,s.useState)((e?.orgIds??[]).join("\n")),[S,A]=(0,s.useState)(e?.teamInviteLink??""),I=""!==p.trim()&&""!==y.trim()&&!n;return(0,t.jsxs)("form",{className:(0,a.cn)("stg:max-w-xl stg:space-y-3",h),onSubmit:t=>{t.preventDefault(),I&&i((0,c.create)(d.CursorAccountSchema,{accountId:e?.accountId??"",displayName:p.trim(),adminApiKey:y.trim(),enabled:j,onDemandUsageDisabled:!k,teamInviteLink:S.trim(),orgIds:C.split(/[\s,]+/).map(e=>e.trim()).filter(e=>""!==e)}))},children:[(0,t.jsx)("h3",{className:"stg:text-sm stg:font-semibold stg:text-foreground",children:x?"Add Cursor account":`Edit ${e.displayName}`}),(0,t.jsx)(u.Field,{label:"Display name",required:!0,children:(0,t.jsx)("input",{className:u.INPUT_CLASSES,value:p,onChange:e=>b(e.target.value),placeholder:"e.g. scenar.ai team",disabled:n})}),(0,t.jsx)(u.Field,{label:"Team Admin API key",required:!0,children:(0,t.jsx)("input",{className:u.INPUT_CLASSES,type:"password",value:y,onChange:e=>f(e.target.value),placeholder:"key from Cursor dashboard → API → Team tab",disabled:n,autoComplete:"off"})}),!x&&(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:"Leave the masked value untouched to keep the stored key; typing a new key rotates it (validated against Cursor before saving)."}),(0,t.jsx)(u.Field,{label:"Team invite link",children:(0,t.jsx)("input",{className:u.INPUT_CLASSES,type:"url",value:S,onChange:e=>A(e.target.value),placeholder:"https://… (Cursor dashboard → Invite Members → Copy Invite Link)",disabled:n,autoComplete:"off",spellCheck:!1})}),(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:'Optional. Powers one-click "Copy invite" on coverage rows whose key owner is not on the team. The link is long-lived and joinable by anyone holding it (each join consumes a paid seat) — share it deliberately, and revoke or rotate it from the Cursor dashboard. Leave empty to clear.'}),(0,t.jsx)(u.Field,{label:"Dedicated organization ids",children:(0,t.jsx)("textarea",{className:(0,a.cn)(u.INPUT_CLASSES,"stg:min-h-16 stg:font-mono"),value:C,onChange:e=>w(e.target.value),placeholder:"one org id per line\n(leave empty for a shared-pool account)",disabled:n})}),(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:"Listing org ids DEDICATES this account to them: their sessions use only this account's keys and fail with a clear message when it runs dry. Leaving this empty makes the account part of the shared pool that serves every other org — pool sessions may move between pool accounts when one is depleted. Each org may appear in at most one account."}),(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",checked:j,onChange:e=>v(e.target.checked),disabled:n}),"Enabled for key selection"]}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:pl-[1.375rem] stg:text-[11px] stg:text-muted-foreground",children:"Leave checked for accounts that should serve traffic. Unchecking drains the account: new sessions stop routing here immediately, but sessions already pinned to one of its keys keep working."})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",checked:k,onChange:e=>N(e.target.checked),disabled:n}),"On-demand usage enabled (as configured in the Cursor dashboard)"]}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:pl-[1.375rem] stg:text-[11px] stg:text-muted-foreground",children:"Declared here because Cursor's Admin API cannot report the team's on-demand setting. Uncheck only when the dashboard has on-demand usage OFF: new sessions then avoid member keys whose included third-party (API) pool is nearly spent, since such keys can no longer serve third-party models at all."})]})]}),o&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,r.getUserMessage)(o)}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:!I,children:n?"Saving…":x?"Create account":"Save changes"}),(0,t.jsx)(l.Button,{type:"button",size:"sm",variant:"outline",onClick:m,disabled:n,children:"Cancel"})]})]})}function m({className:e}){return(0,t.jsxs)("div",{className:(0,a.cn)("stg:rounded-lg stg:border stg:border-border stg:bg-card stg:px-4 stg:py-6 stg:text-center",e),role:"status",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:font-semibold stg:text-foreground",children:"Platform operator access required"}),(0,t.jsx)("p",{className:"stg:mx-auto stg:mt-1 stg:max-w-md stg:text-xs stg:text-muted-foreground",children:"Cursor account management is a Stigmer-internal surface holding provider credentials and team spend. It needs the platform operator role — organization roles do not grant it. If you believe you should have access, contact a platform operator."})]})}var h=e.i(40253);let x=BigInt(0);function p(e){let t=Number(e)/1e6;return`$${t.toFixed(2)}`}function b(e){return e&&e.seconds!==x?new Date(1e3*Number(e.seconds)).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"never"}function y(e){return`${Math.round(e)}%`}var f=e.i(326283),j=e.i(541071),v=e.i(495242),k=e.i(431343),N=e.i(727612),C=e.i(193799),w=e.i(845132),S=e.i(364802);let A="stg:grid stg:grid-cols-[minmax(0,1fr)_4rem_4rem_4.5rem_4.5rem_6rem_2.25rem] stg:items-center stg:gap-2 stg:px-3 stg:py-2";function I({accountId:e,coverage:s,inviteLink:n,actions:r,onChanged:o}){return(0,t.jsx)("div",{className:"stg:overflow-x-auto stg:rounded-lg stg:border stg:border-border stg:bg-card",children:(0,t.jsxs)("div",{role:"table","aria-label":"Team coverage",className:"stg:min-w-[40rem]",children:[(0,t.jsxs)("div",{role:"row",className:(0,a.cn)(A,"stg:border-b stg:border-border stg:text-[11px] stg:font-medium stg:text-muted-foreground"),children:[(0,t.jsx)("span",{role:"columnheader",children:"Member"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"First-party"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"API"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"Included"}),(0,t.jsx)("span",{role:"columnheader",className:"stg:text-right",children:"On-demand"}),(0,t.jsx)("span",{role:"columnheader",children:"Status"}),(0,t.jsx)("span",{role:"columnheader",children:(0,t.jsx)("span",{className:"stg:sr-only",children:"Actions"})})]}),!s.hasRoster&&(0,t.jsx)(T,{title:"Execution keys — not yet classified",description:'No roster sync has run for this account. Run "Sync now" to load the team roster and classify these keys.',count:s.unclassified.length,children:s.unclassified.map(s=>(0,t.jsx)(E,{accountId:e,keyView:s,hasRoster:!1,actions:r,onChanged:o},s.key?.keyId))}),s.onTeamWithKey.length>0&&(0,t.jsx)(T,{title:"On the team — key held",count:s.onTeamWithKey.length,children:s.onTeamWithKey.map(s=>(0,t.jsx)(E,{accountId:e,keyView:s,hasRoster:!0,actions:r,onChanged:o},s.key?.keyId))}),s.hasRoster&&(0,t.jsx)(T,{title:"On the team — no execution key",description:s.onTeamWithoutKey.length>0?"Sessions can never run under these members' identity or included quota. Add their user-scoped keys below to close the gap.":"Every active roster member holds an execution key — the roster is fully covered.",count:s.onTeamWithoutKey.length,children:s.onTeamWithoutKey.map(e=>(0,t.jsx)(_,{memberView:e},e.member?.email))}),s.offTeamWithKey.length>0&&(0,t.jsx)(T,{title:"Key held — not on the team",description:""!==n?"These key owners must join the Cursor team before their usage counts against its quota — copy the invite link, send it out-of-band, then “Sync now” reclassifies once they join.":"These key owners must join the Cursor team before their usage counts against its quota. Invites are sent from the Cursor dashboard (cursor.com → Invite Members); paste the team's invite link into the account editor to enable one-click copying here.",count:s.offTeamWithKey.length,action:""!==n?(0,t.jsx)(L,{inviteLink:n}):void 0,children:s.offTeamWithKey.map(s=>(0,t.jsx)(E,{accountId:e,keyView:s,hasRoster:!0,actions:r,onChanged:o},s.key?.keyId))})]})})}function T({title:e,description:s,count:a,action:n,children:r}){return(0,t.jsxs)("div",{role:"rowgroup",className:"stg:border-b stg:border-border stg:last:border-b-0",children:[(0,t.jsx)("div",{role:"row",className:"stg:bg-muted-subtle stg:px-3 stg:py-1.5",children:(0,t.jsxs)("div",{role:"cell","aria-colspan":7,className:"stg:flex stg:items-start stg:justify-between stg:gap-2",children:[(0,t.jsxs)("span",{className:"stg:min-w-0",children:[(0,t.jsxs)("span",{className:"stg:text-[11px] stg:font-semibold stg:text-foreground",children:[e,(0,t.jsx)("span",{className:"stg:ml-1.5 stg:font-normal stg:text-muted-foreground",children:a})]}),s&&(0,t.jsx)("span",{className:"stg:block stg:text-[11px] stg:text-muted-foreground",children:s})]}),n&&(0,t.jsx)("span",{className:"stg:shrink-0",children:n})]})}),r]})}function K({email:e,secondary:s}){return(0,t.jsxs)("span",{role:"cell",className:"stg:min-w-0",children:[(0,t.jsx)(S.TruncatedText,{text:e,className:"stg:font-medium stg:text-foreground"}),s&&(0,t.jsx)(S.TruncatedText,{text:s,className:"stg:text-[11px] stg:text-muted-foreground"})]})}function E({accountId:e,keyView:s,hasRoster:n,actions:r,onChanged:o}){let l=s.key;if(!l)return null;let c=[l.cursorKeyName||"unnamed key",l.label].filter(e=>""!==e).join(" · ");return(0,t.jsxs)("div",{role:"row",className:(0,a.cn)(A,"stg:border-t stg:border-border-muted stg:text-xs"),children:[(0,t.jsx)(K,{email:l.boundEmail,secondary:c}),(0,t.jsx)(M,{spend:s.spend}),(0,t.jsxs)("span",{role:"cell",className:"stg:flex stg:flex-wrap stg:items-center stg:gap-1",children:[s.usageGuardTripped&&(0,t.jsx)(i,{tone:"warn",label:"Usage guard"}),(0,t.jsx)(P,{keyView:s,hasRoster:n})]}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right",children:(0,t.jsxs)(w.ActionMenu,{children:[(0,t.jsx)(w.ActionMenu.Trigger,{"aria-label":`Actions for ${l.boundEmail}`,children:(0,t.jsx)(j.MoreHorizontal,{className:"stg:size-4"})}),(0,t.jsxs)(w.ActionMenu.Content,{children:[(0,t.jsx)(w.ActionMenu.Item,{icon:l.enabled?(0,t.jsx)(v.Pause,{}):(0,t.jsx)(k.Play,{}),disabled:r.isSubmitting,onSelect:()=>{r.setKeyEnabled(e,l.keyId,!l.enabled).then(o,()=>{})},children:l.enabled?"Disable":"Enable"}),(0,t.jsx)(w.ActionMenu.Separator,{}),(0,t.jsx)(w.ActionMenu.Item,{icon:(0,t.jsx)(N.Trash2,{}),variant:"destructive",disabled:r.isSubmitting,onSelect:()=>{r.removeKey({accountId:e,keyId:l.keyId}).then(o,()=>{})},children:"Remove"})]})]})})]})}function _({memberView:e}){let s=e.member;return s?(0,t.jsxs)("div",{role:"row",className:(0,a.cn)(A,"stg:border-t stg:border-border-muted stg:text-xs"),children:[(0,t.jsx)(K,{email:s.email,secondary:s.name||void 0}),(0,t.jsx)(M,{spend:e.spend}),(0,t.jsx)("span",{role:"cell",children:(0,t.jsx)(i,{tone:"muted",label:"No key"})}),(0,t.jsx)("span",{role:"cell"})]}):null}function M({spend:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?y(e.autoPercentUsed):"—"}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?y(e.apiPercentUsed):"—"}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?p(e.includedSpendUsdMicros):"—"}),(0,t.jsx)("span",{role:"cell",className:"stg:text-right stg:tabular-nums stg:text-muted-foreground",children:e?p(e.overageSpendUsdMicros):"—"})]})}function P({keyView:e,hasRoster:s}){return s?e.state===h.CursorMemberKeyState.member_key_owner_removed?(0,t.jsx)(i,{tone:"warn",label:"Left team"}):e.state===h.CursorMemberKeyState.member_key_owner_unknown?(0,t.jsx)(i,{tone:"muted",label:"Not on team"}):e.key?.enabled?(0,t.jsx)(i,{tone:"ok",label:"Active"}):(0,t.jsx)(i,{tone:"muted",label:"Disabled"}):(0,t.jsx)(i,{tone:"muted",label:"Awaiting sync"})}function L({inviteLink:e}){let{copy:s,copied:a}=(0,C.useCopyFeedback)();return(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:()=>void s(e),children:a?"Copied":"Copy invite"})}function U(e){return[...new Set(e.split(/\r?\n/).map(e=>e.trim()).filter(e=>""!==e))]}function D(e,t){return e.length>=8?`key ${t+1} (…${e.slice(-4)})`:`key ${t+1}`}function $({accountId:e,view:o,coverage:i,actions:c,onChanged:d,onImported:g}){let[m,h]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),[b,y]=(0,s.useState)(!1),[j,v]=(0,s.useState)(""),[k,N]=(0,s.useState)(!1),[C,w]=(0,s.useState)(null),[S,A]=(0,s.useState)(null),T=o.keyViews,K=i.unclassified.length>0||i.onTeamWithKey.length>0||i.onTeamWithoutKey.length>0||i.offTeamWithKey.length>0,E=U(j).length,_=async t=>{t.preventDefault();let s=U(j);if(0===s.length||k)return;N(!0),A(null);let a=new Set(T.map(e=>e.key?.keyId).filter(e=>!!e)),n=[],o=[];for(let[t,l]of s.entries()){w({done:t,total:s.length});try{let s=(await c.addKey({accountId:e,apiKey:l})).memberKeys.find(e=>!a.has(e.keyId));s&&a.add(s.keyId),n.push({keyPreview:D(l,t),ok:!0,message:s?.boundEmail?`added — bound to ${s.boundEmail}`:"added"})}catch(e){c.clearError(),o.push(l),n.push({keyPreview:D(l,t),ok:!1,message:(0,r.getUserMessage)((0,f.toError)(e))})}}w(null),A(n),v(o.join("\n")),N(!1),o.length<s.length&&g()};return(0,t.jsxs)("section",{className:"stg:space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"stg:text-xs stg:font-semibold stg:text-foreground",children:"Team coverage"}),i.hasRoster&&(0,t.jsxs)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:[i.onTeamWithKey.length," covered"," · ",(0,t.jsxs)("span",{className:(0,a.cn)(i.onTeamWithoutKey.length>0&&"stg:font-medium stg:text-destructive"),children:[i.onTeamWithoutKey.length," without keys"]}),i.offTeamWithKey.length>0?` \xb7 ${i.offTeamWithKey.length} off-team`:""]})]}),0===T.length&&(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:["No execution keys — this account is ",(0,t.jsx)("strong",{children:"not routable"}),". Add a member's user-scoped API key below."]}),K&&(0,t.jsx)(I,{accountId:e,coverage:i,inviteLink:o.account?.teamInviteLink??"",actions:c,onChanged:d}),c.error&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,r.getUserMessage)(c.error)}),(0,t.jsxs)("form",{className:"stg:flex stg:flex-wrap stg:items-end stg:gap-2",onSubmit:t=>{t.preventDefault(),""===m.trim()||c.isSubmitting||c.addKey({accountId:e,apiKey:m.trim(),label:x.trim()||void 0}).then(()=>{h(""),p(""),d()},()=>{})},children:[(0,t.jsxs)("label",{className:"stg:block stg:min-w-56 stg:flex-1 stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:"User-scoped API key"}),(0,t.jsx)("input",{className:u.INPUT_CLASSES,type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"the member's personal Cursor API key",disabled:c.isSubmitting,autoComplete:"off"})]}),(0,t.jsxs)("label",{className:"stg:block stg:min-w-40 stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:"Label (optional)"}),(0,t.jsx)("input",{className:u.INPUT_CLASSES,value:x,onChange:e=>p(e.target.value),placeholder:"e.g. zane — prod",disabled:c.isSubmitting})]}),(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:""===m.trim()||c.isSubmitting,children:c.isSubmitting?"Verifying…":"Add key"}),(0,t.jsx)(l.Button,{type:"button",size:"sm",variant:"outline",disabled:k,onClick:()=>{y(e=>!e),A(null)},children:b?"Hide import":"Import keys"})]}),b&&(0,t.jsxs)("form",{className:"stg:space-y-2 stg:rounded-md stg:border stg:border-border stg:bg-card stg:p-3",onSubmit:_,children:[(0,t.jsxs)("label",{className:"stg:block stg:space-y-1",children:[(0,t.jsx)("span",{className:"stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:"Bulk import — one user-scoped API key per line"}),(0,t.jsx)("textarea",{className:(0,a.cn)(u.INPUT_CLASSES,"stg:min-h-24 stg:font-mono"),value:j,onChange:e=>v(e.target.value),placeholder:"key_...\nkey_...\nkey_...",disabled:k,autoComplete:"off",spellCheck:!1})]}),(0,t.jsx)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:"Each key is verified against Cursor and bound to its owning team member, one at a time. Lines that fail stay in the box so you can fix and retry them. A roster sync runs automatically afterwards, so the coverage table reflects current team membership."}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:0===E||k,children:k&&C?`Importing ${C.done+1} of ${C.total}…`:E>0?`Import ${E} ${1===E?"key":"keys"}`:"Import keys"}),(0,t.jsx)(l.Button,{type:"button",size:"sm",variant:"outline",disabled:k,onClick:()=>{y(!1),v(""),A(null)},children:"Close"})]}),S&&(0,t.jsx)("ul",{role:"list","aria-label":"Import results",className:(0,a.cn)(n.UNSTYLED_LIST,"stg:space-y-0.5 stg:text-[11px]"),children:S.map(e=>(0,t.jsxs)("li",{className:e.ok?"stg:text-muted-foreground":"stg:text-destructive",children:[e.keyPreview,": ",e.message]},e.keyPreview))})]})]})}var W=e.i(586108),z=e.i(583093);function B(){let e=(0,W.useStigmer)(),[t,a]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null);return{upsert:(0,s.useCallback)(async t=>{a(!0),r(null);try{return await e.cursorAccounts.upsertAccount({account:t})}catch(t){let e=(0,f.toError)(t);throw r(e),e}finally{a(!1)}},[e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>r(null),[])}}function R({className:e}){let[i,c]=(0,s.useState)({phase:"list"}),d=function(){let e=(0,W.useStigmer)(),t=(void 0)??!0,{data:s,isLoading:a,isRefetching:n,error:r,refetch:o}=(0,z.useFetch)(t?()=>e.cursorAccounts.listAccounts():null,[t,e],null);return{accounts:s,isLoading:a,isRefetching:n,error:r,refetch:o}}(),u=(0,s.useCallback)(()=>c({phase:"list"}),[]);if(d.isLoading)return(0,t.jsxs)("div",{className:(0,a.cn)("stg:space-y-2",e),"aria-busy":"true",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-40 stg:animate-pulse stg:rounded stg:bg-muted-subtle"}),Array.from({length:3},(e,s)=>(0,t.jsx)("div",{className:"stg:h-10 stg:animate-pulse stg:rounded-lg stg:bg-muted-subtle"},s))]});if(d.error)return(0,o.isPermissionDenied)(d.error)?(0,t.jsx)(m,{className:e}):(0,t.jsx)("p",{className:(0,a.cn)("stg:text-destructive stg:text-xs",e),role:"alert",children:(0,r.getUserMessage)(d.error)});if("create"===i.phase)return(0,t.jsx)(F,{className:e,onSaved:()=>{d.refetch(),u()},onCancel:u});if("detail"===i.phase)return(0,t.jsx)(O,{className:e,accountId:i.accountId,editing:i.editing,onEditingChange:e=>c({phase:"detail",accountId:i.accountId,editing:e}),onDeleted:()=>{d.refetch(),u()},onChanged:d.refetch,onBack:u});let g=d.accounts?.accounts??[],h=function(e){let t=0,s=0,a=0;for(let n of e)t+=n.routableKeyCount,a+=n.guardTrippedKeyCount,n.account?.enabled===!0&&n.enabledKeyCount>0&&0===n.routableKeyCount&&(s+=1);return{totalAccounts:e.length,totalRoutableKeys:t,drainedAccounts:s,guardTrippedKeys:a}}(g);return(0,t.jsxs)("div",{className:(0,a.cn)("stg:space-y-3",e),children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"stg:text-sm stg:font-semibold stg:text-foreground",children:"Cursor accounts"}),g.length>0&&(0,t.jsxs)("p",{className:(0,a.cn)("stg:text-[11px]",0===h.totalRoutableKeys?"stg:text-destructive":"stg:text-muted-foreground"),role:0===h.totalRoutableKeys?"alert":void 0,children:[0===h.totalRoutableKeys?"No routable execution key anywhere - executions on API-pool models are failing":`${h.totalRoutableKeys} routable ${1===h.totalRoutableKeys?"key":"keys"} across ${h.totalAccounts} ${1===h.totalAccounts?"account":"accounts"}`,h.drainedAccounts>0?` \xb7 ${h.drainedAccounts} ${1===h.drainedAccounts?"account":"accounts"} drained`:"",h.guardTrippedKeys>0?` \xb7 ${h.guardTrippedKeys} ${1===h.guardTrippedKeys?"key":"keys"} usage-drained`:""]})]}),(0,t.jsx)(l.Button,{size:"sm",onClick:()=>c({phase:"create"}),children:"Add account"})]}),(0,t.jsxs)("div",{className:"stg:rounded-lg stg:border stg:border-border stg:bg-card",children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"stg:grid stg:grid-cols-[2fr_1fr_1fr_1fr_1fr] stg:gap-2 stg:border-b stg:border-border stg:px-3 stg:py-2 stg:text-[11px] stg:font-medium stg:text-muted-foreground",children:[(0,t.jsx)("span",{children:"Account"}),(0,t.jsx)("span",{children:"Orgs"}),(0,t.jsx)("span",{children:"Status"}),(0,t.jsx)("span",{children:"Routable keys"}),(0,t.jsx)("span",{className:"stg:text-right",children:"Last synced"})]}),0===g.length?(0,t.jsx)("p",{className:"stg:px-3 stg:py-2 stg:text-xs stg:text-muted-foreground",children:"No Cursor accounts yet. Add one with its team Admin API key, then add member execution keys to make it routable."}):(0,t.jsx)("ul",{role:"list","aria-label":"Cursor accounts",className:n.UNSTYLED_LIST,children:g.map(e=>(0,t.jsx)(V,{summary:e,onOpen:()=>c({phase:"detail",accountId:e.account?.accountId??"",editing:!1})},e.account?.accountId))})]})]})}function V({summary:e,onOpen:s}){let n=e.account;return n?(0,t.jsx)("li",{className:"stg:border-b stg:border-border stg:last:border-b-0",children:(0,t.jsxs)("button",{type:"button",onClick:s,className:(0,a.cn)("stg:grid stg:w-full stg:grid-cols-[2fr_1fr_1fr_1fr_1fr] stg:items-center stg:gap-2 stg:px-3 stg:py-2 stg:text-left stg:text-xs","stg:transition-colors stg:hover:bg-accent","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring"),children:[(0,t.jsxs)("span",{className:"stg:min-w-0",children:[(0,t.jsx)("span",{className:"stg:block stg:truncate stg:font-medium stg:text-foreground",children:n.displayName}),0===n.orgIds.length&&(0,t.jsx)("span",{className:"stg:block stg:text-[11px] stg:text-muted-foreground",children:"shared pool"})]}),(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:n.orgIds.length>0?n.orgIds.length:"—"}),(0,t.jsx)("span",{children:(0,t.jsx)(i,{tone:n.enabled?"ok":"muted",label:n.enabled?"Enabled":"Disabled"})}),(0,t.jsx)("span",{children:e.routableKeyCount>0?(0,t.jsxs)("span",{className:"stg:text-muted-foreground",children:[e.routableKeyCount," of ",e.enabledKeyCount]}):e.guardTrippedKeyCount>0?(0,t.jsx)(i,{tone:"warn",label:"Drained"}):(0,t.jsx)(i,{tone:"warn",label:"Not routable"})}),(0,t.jsx)("span",{className:"stg:text-right stg:text-muted-foreground",children:b(e.lastSyncedAt)})]})}):null}function F({className:e,onSaved:s,onCancel:a}){let{upsert:n,isSubmitting:r,error:o}=B();return(0,t.jsx)("div",{className:e,children:(0,t.jsx)(g,{initial:null,isSubmitting:r,submitError:o,onSubmit:e=>{n(e).then(s,()=>{})},onCancel:a})})}function O({className:e,accountId:n,editing:o,onEditingChange:i,onDeleted:c,onChanged:d,onBack:u}){let m,x=function(e){let t=(0,W.useStigmer)(),{data:s,isLoading:a,isRefetching:n,error:r,refetch:o}=(0,z.useFetch)(e?()=>t.cursorAccounts.getAccountView(e):null,[e,t],null);return{view:s,isLoading:a,isRefetching:n,error:r,refetch:o}}(n),{upsert:p,isSubmitting:y,error:j,clearError:v}=B(),{remove:k,isSubmitting:N,error:C}=function(){let e=(0,W.useStigmer)(),[t,a]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null);return{remove:(0,s.useCallback)(async t=>{a(!0),r(null);try{return await e.cursorAccounts.deleteAccount(t)}catch(t){let e=(0,f.toError)(t);throw r(e),e}finally{a(!1)}},[e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>r(null),[])}}(),{sync:w,isSyncing:S,error:A}=function(){let e=(0,W.useStigmer)(),[t,a]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null);return{sync:(0,s.useCallback)(async t=>{a(!0),r(null);try{return await e.cursorAccounts.syncAccount(t)}catch(t){let e=(0,f.toError)(t);throw r(e),e}finally{a(!1)}},[e.cursorAccounts]),isSyncing:t,error:n,clearError:(0,s.useCallback)(()=>r(null),[])}}(),I=function(){let e=(0,W.useStigmer)(),[t,a]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null),o=(0,s.useCallback)(async e=>{a(!0),r(null);try{return await e()}catch(t){let e=(0,f.toError)(t);throw r(e),e}finally{a(!1)}},[]),l=(0,s.useCallback)(t=>o(()=>e.cursorAccounts.addMemberKey(t)),[o,e.cursorAccounts]),i=(0,s.useCallback)(t=>o(()=>e.cursorAccounts.removeMemberKey(t)),[o,e.cursorAccounts]);return{addKey:l,removeKey:i,setKeyEnabled:(0,s.useCallback)((t,s,a)=>o(()=>e.cursorAccounts.setMemberKeyEnabled({accountId:t,keyId:s,enabled:a})),[o,e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>r(null),[])}}(),T=(0,s.useCallback)(()=>{x.refetch(),d()},[x.refetch,d]),K=(0,s.useCallback)(()=>{w(n).then(T,T)},[w,n,T]);if(x.isLoading)return(0,t.jsxs)("div",{className:(0,a.cn)("stg:space-y-2",e),"aria-busy":"true",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-40 stg:animate-pulse stg:rounded stg:bg-muted-subtle"}),(0,t.jsx)("div",{className:"stg:h-24 stg:animate-pulse stg:rounded-lg stg:bg-muted-subtle"})]});if(x.error||!x.view?.account)return(0,t.jsxs)("div",{className:(0,a.cn)("stg:space-y-2",e),children:[(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:x.error?(0,r.getUserMessage)(x.error):"Account not found."}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:u,children:"Back to accounts"})]});let E=x.view,_=E.account,M=(m=void 0!==E.snapshot)?{hasRoster:m,onTeamWithKey:E.keyViews.filter(e=>e.state===h.CursorMemberKeyState.member_key_active),onTeamWithoutKey:E.membersWithoutKeysViews,offTeamWithKey:E.keyViews.filter(e=>e.state!==h.CursorMemberKeyState.member_key_active),unclassified:[]}:{hasRoster:m,onTeamWithKey:[],onTeamWithoutKey:[],offTeamWithKey:[],unclassified:E.keyViews},P=M.onTeamWithKey.length+M.onTeamWithoutKey.length,L=(E.snapshot?.members.length??0)-P;return o?(0,t.jsx)("div",{className:e,children:(0,t.jsx)(g,{initial:_,isSubmitting:y,submitError:j,onSubmit:e=>{p(e).then(()=>{T(),i(!1)},()=>{})},onCancel:()=>{v(),i(!1)}})}):(0,t.jsxs)("div",{className:(0,a.cn)("stg:space-y-4",e),children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"stg:text-sm stg:font-semibold stg:text-foreground",children:_.displayName}),(0,t.jsxs)("p",{className:"stg:text-[11px] stg:text-muted-foreground",children:[_.orgIds.length>0?`Dedicated to ${_.orgIds.length} org(s): ${_.orgIds.join(", ")}`:"Shared pool — serves every org with no dedicated account"," · ",_.enabled?"enabled":"disabled",_.onDemandUsageDisabled?" · on-demand usage off (usage guard active)":""," · synced ",b(E.snapshot?.syncedAt),M.hasRoster?` \xb7 ${P} ${1===P?"member":"members"}`:"",M.hasRoster&&L>0?` \xb7 ${L} removed ${1===L?"seat":"seats"}`:""]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:u,children:"Back"}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",disabled:S,onClick:()=>{w(n).then(T,()=>{})},children:S?"Syncing…":"Sync now"}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:()=>i(!0),children:"Edit"}),(0,t.jsx)(l.Button,{size:"sm",variant:"destructive",disabled:N,onClick:()=>{k({accountId:n}).then(c,()=>{})},children:N?"Deleting…":"Delete"})]})]}),A&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,r.getUserMessage)(A)}),C&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,r.getUserMessage)(C)}),E.snapshot?.syncError&&(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",role:"status",children:["Last sync was partial: ",E.snapshot.syncError]}),(0,t.jsx)($,{accountId:n,view:E,coverage:M,actions:I,onChanged:T,onImported:K})]})}e.s(["default",0,function(){return(0,t.jsx)(R,{})}],424089)}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,630983,e=>{"use strict";var t=e.i(843476),s=e.i(893976);function r({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6.25"}),(0,t.jsx)("path",{d:"M8 7v4"}),(0,t.jsx)("circle",{cx:"8",cy:"5",r:"0.5",fill:"currentColor",stroke:"none"})]})}e.s(["CloudFeatureNotice",0,function({children:e,className:n}){return(0,t.jsxs)("div",{role:"status",className:(0,s.cn)("stg:bg-muted-subtle stg:text-muted-foreground stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-transparent stg:px-4 stg:py-3",n),children:[(0,t.jsx)(r,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,t.jsx)("p",{className:"stg:text-xs stg:leading-relaxed",children:e})]})}])},858677,e=>{e.q("/_next/static/media/elk-worker.min.13hrbirt7_.ef.js")},451241,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(618566);let n=(0,s.createContext)(null),i=RegExp("^/library/(agents|skills|mcp-servers|workflows|schedules|plugins)/([^/]+)/([^/]+)/?$");function a(e){let t=e.match(i);return t?{resourceType:t[1],org:t[2],slug:t[3]}:null}function l(e){return"/library"===e||e.startsWith("/library/")}function o(e){return`/library/${e.resourceType}/${e.org}/${e.slug}`}function d(){let e=(0,s.useContext)(n);if(!e)throw Error("useLibraryNavigation must be used within <LibraryNavigationProvider>");return e}e.s(["LibraryNavigationProvider",0,function({children:e}){let[i,d]=(0,s.useState)(()=>a(window.location.pathname)),u=(0,r.usePathname)(),[g,c]=(0,s.useState)(u);u!==g&&(c(u),l(u)&&a(u)||d(null));let m=(0,s.useRef)(i);(0,s.useEffect)(()=>{m.current=i},[i]);let p=(0,s.useCallback)((e,t,s)=>{var r;let n={resourceType:e,org:t,slug:s};(r=m.current)===n||r&&n&&r.resourceType===n.resourceType&&r.org===n.org&&r.slug===n.slug||(d(n),window.history.pushState(null,"",o(n)))},[]),h=(0,s.useCallback)(()=>{if(m.current){let e=`/library/${m.current.resourceType}`;d(null),window.history.pushState(null,"",e)}},[]);(0,s.useEffect)(()=>{function e(){let e=window.location.pathname;l(e)?d(a(e)):d(null)}return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]);let x=i?o(i):u,f=(0,s.useMemo)(()=>({activeDetail:i,currentLibraryPath:x,navigateToDetail:p,clearDetail:h}),[i,x,p,h]);return(0,t.jsx)(n.Provider,{value:f,children:e})},"useLibraryNavigation",0,d,"useRouteDetailYieldsToOverlay",0,function(){let{activeDetail:e}=d();return null!=e}])},311015,e=>{"use strict";var t=e.i(843476),s=e.i(893976),r=e.i(65642),n=e.i(271645),i=e.i(475254);let a=(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"}]]),l=(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"}]]),o=(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 d=e.i(63209);let u="stg:h-10 stg:w-10";e.s(["EmptyState",0,function({variant:e,resourceLabel:i,icon:g,title:c,description:m,errorMessage:p,action:h,children:x,className:f}){let v=function(e){let{variant:t,resourceLabel:s="resources",title:r,description:i,errorMessage:g}=e;return(0,n.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:r??e.title,description:"error"===t&&g?g:i??e.description,defaultIcon:function(e){switch(e){case"first-use":return(0,n.createElement)(a,{className:u});case"zero-results":return(0,n.createElement)(l,{className:u});case"permission":return(0,n.createElement)(o,{className:u});case"error":return(0,n.createElement)(d.AlertCircle,{className:u})}}(t),role:"error"===t?"alert":"status"}},[t,s,r,i,g])}({variant:e,resourceLabel:i,title:c,description:m,errorMessage:p});return(0,t.jsxs)("div",{role:v.role,className:(0,s.cn)("stg:flex stg:flex-col stg:items-center stg:gap-3 stg:py-12 stg:text-center",f),children:[(0,t.jsx)("div",{className:"stg:text-muted-foreground-faint",children:g??v.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:v.title}),(0,t.jsx)("p",{className:"stg:max-w-sm stg:text-xs stg:text-muted-foreground-subtle",children:v.description})]}),x?(0,t.jsx)("div",{className:"stg:mt-1",children:x}):h&&(0,t.jsx)(r.Button,{variant:"error"===e?"outline":"primary",icon:h.icon,onClick:h.onClick,className:"stg:mt-1",children:h.label})]})}],311015)},541071,727612,e=>{"use strict";var t=e.i(475254);let s=(0,t.default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["MoreHorizontal",0,s],541071);let r=(0,t.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,r],727612)},778917,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],778917)},774079,901501,e=>{"use strict";var t=e.i(843476),s=e.i(893976);e.s(["RedactedSecretsNotice",0,function({className:e}){return(0,t.jsxs)("p",{className:(0,s.cn)("stg:rounded-md stg:border stg:border-border stg:bg-muted stg:px-3 stg:py-2 stg:text-xs stg:text-muted-foreground",e),children:["Secret values are shown as ",(0,t.jsx)("code",{className:"stg:font-mono",children:"***REDACTED***"}),". Applying keeps the stored secrets; replace a marker to set a new value."]})}],774079),e.s(["containsRedactedSecrets",0,function(e){return e.includes("***REDACTED***")}],901501)},590745,e=>{"use strict";var t=e.i(414385);e.i(222258);var s=e.i(967785),r=e.i(310713);e.s(["serializeManifest",0,function(e){var n;let i=(0,r.manifestHandlerForTypeName)(e.$typeName);if(void 0===i){let t=(0,r.manifestKinds)().map(e=>e.yamlKind).join(", ");throw Error(`Cannot serialize ${e.$typeName} as a manifest: kind is not in the manifest registry. Supported kinds: ${t}.`)}let a=(0,t.toJson)(i.schema,e,{useProtoFieldName:!0});if(null===a||"object"!=typeof a||Array.isArray(a))throw Error(`Cannot serialize ${i.displayName}: unexpected non-object protojson projection.`);let{api_version:l,kind:o,status:d,metadata:u,...g}=a,c={apiVersion:"string"==typeof l&&""!==l?l:i.apiVersion,kind:"string"==typeof o&&""!==o?o:i.yamlKind,..."object"==typeof(n=u)&&null!==n&&!Array.isArray(n)&&{metadata:function(e){let{version:t,...s}=e;return s}(u)},...g};return(0,s.stringify)(c,{lineWidth:0,blockQuote:"literal"})}])},616629,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(468806),i=e.i(610595),a=e.i(846696),l=e.i(774079),o=e.i(901501),d=e.i(864652),u=e.i(590745),g=e.i(586108),c=e.i(326283);let m=(0,s.lazy)(()=>e.A(573374).then(e=>({default:e.YamlEditor})));function p({label:e="Loading editor…"}){return(0,t.jsx)("div",{className:"stg:flex stg:h-80 stg:items-center stg:justify-center stg:rounded-md stg:border stg:border-border stg:bg-muted stg:text-sm stg:text-muted-foreground",children:e})}e.s(["EditResourceYamlDialog",0,function({open:e,onOpenChange:h,resource:x,onApplied:f}){let v=function({resource:e}){let t=(0,g.useStigmer)(),r=(0,s.useMemo)(()=>e?(0,u.serializeManifest)(e):"",[e]),[n,i]=(0,s.useState)(r),[a,l]=(0,s.useState)(!1),[m,p]=(0,s.useState)(!1),[h,x]=(0,s.useState)(null),[f,v]=(0,s.useState)(null);(0,s.useEffect)(()=>{a||i(r)},[r,a]);let b=(0,s.useCallback)(e=>{i(e),l(e!==r)},[r]),y=(0,s.useCallback)(()=>{i(r),l(!1),x(null)},[r]),j=(0,s.useCallback)(()=>x(null),[]),k=(0,s.useMemo)(()=>e&&r?(0,d.parseManifest)(r)[0].handler.yamlKind:null,[e,r]),N=(0,s.useMemo)(()=>{let e;if(!n.trim())return{status:"empty"};try{e=(0,d.parseManifest)(n)}catch(e){return{status:"invalid",message:(0,c.toError)(e).message}}if(e.length>1)return{status:"invalid",message:"This editor applies a single resource. Remove the extra documents, or use Apply YAML in the Library for multi-document manifests."};let t=e[0];return null!==k&&t.handler.yamlKind!==k?{status:"invalid",message:`The document's kind changed from ${k} to ${t.handler.yamlKind}. To apply a different resource kind, use Apply YAML in the Library instead.`}:{status:"valid",document:t}},[n,k]),w=(0,s.useRef)(0);(0,s.useEffect)(()=>{if("valid"!==N.status)return void v(null);let{document:e}=N,s=++w.current;v(null);let r=setTimeout(async()=>{let r;try{let s=await t.manifest.getByReference(e.handler.yamlKind,e.org,e.slug);r=null!==s?"update":"create"}catch{r="unknown"}w.current===s&&v({action:r,slug:e.slug})},400);return()=>clearTimeout(r)},[N,t]);let C=(0,s.useCallback)(async()=>{if("valid"!==N.status)return null;p(!0),x(null);try{let e=await t.manifest.apply(N.document);return l(!1),e}catch(e){throw x((0,c.toError)(e)),e}finally{p(!1)}},[N,t]),S=(0,s.useMemo)(()=>(0,o.containsRedactedSecrets)(n),[n]);return(0,s.useMemo)(()=>({yaml:n,setYaml:b,isDirty:a,validation:N,target:f,hasRedactedSecrets:S,apply:C,isApplying:m,error:h,clearError:j,reset:y}),[n,b,a,N,f,S,C,m,h,j,y])}({resource:x}),{reset:b}=v;(0,s.useEffect)(()=>{e&&b()},[e,b]);let y=(0,s.useCallback)(async()=>{try{let e=await v.apply();if(!e)return;a.toast.success(`${e.displayName} "${e.name}" applied`),h(!1),f?.(e)}catch{}},[v,h,f]),j="valid"===v.validation.status&&v.isDirty&&!v.isApplying;return(0,t.jsx)(n.DialogShell,{open:e,onOpenChange:h,width:"3xl","aria-label":"Edit YAML",children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4 stg:p-6",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)("h3",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Edit YAML"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"Edit the resource definition and apply. Changes are validated against the resource schema as you type."})]}),x?(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(p,{}),children:(0,t.jsx)(m,{value:v.yaml,onChange:v.setYaml,className:"stg:h-80"})}):(0,t.jsx)(p,{label:"Loading resource…"}),v.hasRedactedSecrets&&(0,t.jsx)(l.RedactedSecretsNotice,{}),"invalid"===v.validation.status&&(0,t.jsx)("div",{role:"alert",className:"stg:rounded-md stg:border stg:border-destructive stg:bg-card stg:px-3 stg:py-2.5 stg:text-sm stg:text-destructive",children:v.validation.message}),v.error&&(0,t.jsxs)("div",{role:"alert",className:"stg:flex stg:items-start stg:gap-3 stg:rounded-md stg:border stg:border-destructive stg:bg-card stg:px-3 stg:py-2.5",children:[(0,t.jsx)("p",{className:"stg:flex-1 stg:text-sm stg:text-destructive",children:(0,i.getUserMessage)(v.error)}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:y,disabled:"valid"!==v.validation.status||v.isApplying,className:(0,r.cn)("stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2 stg:py-1 stg:text-xs stg:font-medium stg:text-foreground","stg:hover:bg-accent stg:hover:text-accent-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Try again"}),(0,t.jsx)("button",{type:"button",onClick:v.clearError,"aria-label":"Dismiss error",className:(0,r.cn)("stg:rounded-md stg:px-2 stg:py-1 stg:text-xs stg:font-medium stg:text-muted-foreground","stg:hover:bg-accent stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring"),children:"Dismiss"})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground","aria-live":"polite",children:function(e,t,s){if("valid"!==e)return"";if(!t)return"No changes yet.";if(null===s)return"Checking what applying will do…";switch(s.action){case"update":return`Applying will update ${s.slug}.`;case"create":return`Applying will create ${s.slug} — the name or slug changed.`;case"unknown":return`Applying will create or update ${s.slug}.`}}(v.validation.status,v.isDirty,v.target)}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>h(!1),disabled:v.isApplying,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:border stg:border-input stg:bg-background stg:text-foreground","stg:hover:bg-accent stg:hover:text-accent-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:y,disabled:!j,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:v.isApplying?"Applying…":"Apply changes"})]})]})]})})}],616629)},367240,e=>{"use strict";let t=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],367240)},57330,e=>{"use strict";e.s(["DIALECT_LABELS",0,{"agent-plugins":"Agent Plugins 1.0",claude:"Claude Code plugin",cursor:"Cursor plugin",codex:"Codex plugin"}])},818424,e=>{"use strict";var t=e.i(843476),s=e.i(893976);let r=(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");e.s(["Pagination",0,function({pageNum:e,totalPages:n,onPageChange:i,ariaLabel:a,className:l}){return(0,t.jsxs)("div",{className:(0,s.cn)("stg:flex stg:items-center stg:justify-between",l),role:"navigation","aria-label":a,children:[(0,t.jsx)("button",{type:"button",disabled:e<=1,onClick:()=>i(e-1),className:r,children:"Previous"}),(0,t.jsxs)("span",{className:"stg:text-xs stg:tabular-nums stg:text-muted-foreground",children:["Page ",e," of ",n]}),(0,t.jsx)("button",{type:"button",disabled:e>=n,onClick:()=>i(e+1),className:r,children:"Next"})]})}])},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 r({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,r],582688);let n=[{id:"slack",label:"Slack",Icon:s,installStyle:"redirect",supportsMessageTemplates:!1,supportsStaffReplies:!1,timelineIncludesCustomerMessages:!1},{id:"whatsapp",label:"WhatsApp",Icon:r,installStyle:"direct",supportsMessageTemplates:!0,supportsStaffReplies:!0,timelineIncludesCustomerMessages:!0}];e.s(["CHANNEL_PROVIDERS",0,n,"channelProviderOf",0,function(e){return n.find(t=>t.id===e)??null}],543727)},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=[],r=0;for(let n of e.matchAll(s))n.index>r&&t.push({kind:"text",value:e.slice(r,n.index)}),t.push({kind:"placeholder",value:n[0]}),r=n.index+n[0].length;return r<e.length&&t.push({kind:"text",value:e.slice(r)}),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 r=e.i(271645),n=e.i(891287),i=e.i(730938),a=e.i(586108),l=e.i(583093);e.s(["useChannelTemplateList",0,function(e,t,s){let o=(0,a.useStigmer)(),d=s?.approvedOnly??!1,[u,g]=(0,r.useState)(!1),c=e&&t?async()=>(await o.agentChannel.listTemplates((0,n.create)(i.ListChannelTemplatesInputSchema,{channel:e,org:t,approvedOnly:d}))).entries:null,{data:m,isLoading:p,isRefetching:h,error:x,refetch:f}=(0,l.useFetch)(c,[e,t,d,o],[],{refetchInterval:u}),v=m.some(e=>"PENDING"===e.status);return(0,r.useEffect)(()=>{g(!!v&&6e4)},[v]),{templates:m,isLoading:p,isRefetching:h,error:x,refetch:f}}],182990)},815907,e=>{"use strict";var t=e.i(891287),s=e.i(476487),r=e.i(586108),n=e.i(583093);e.s(["useOrgAgentChannelList",0,function(e){let i=(0,r.useStigmer)(),a=e?async()=>(await i.agentChannel.list((0,t.create)(s.ListAgentChannelsRequestSchema,{org:e}))).items:null,{data:l,isLoading:o,isRefetching:d,error:u,refetch:g}=(0,n.useFetch)(a,[e,i],[]);return{channels:l,isLoading:o,isRefetching:d,error:u,refetch:g}}])},862749,e=>{"use strict";let t=(0,e.i(475254).default)("file-code-corner",[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]]);e.s(["FileCode2",0,t],862749)},699187,e=>{"use strict";var t=e.i(891287),s=e.i(109623),r=e.i(586108),n=e.i(583093);e.s(["useChannelAppList",0,function(e){let i=(0,r.useStigmer)(),{data:a,isLoading:l,isRefetching:o,error:d,refetch:u}=(0,n.useFetch)(e?()=>i.channelapp.listByOrg((0,t.create)(s.ListChannelAppsByOrgInputSchema,{org:e})).then(e=>[...e.entries]):null,[e,i],[]);return{channelApps:a,isLoading:l,isRefetching:o,error:d,refetch:u}}])},780052,e=>{"use strict";var t=e.i(891287),s=e.i(218766),r=e.i(586108),n=e.i(583093);e.s(["useWorkflowDashboardSummary",0,function(e){let i=(0,r.useStigmer)(),a=e.org??"",l=e.timeWindow??s.SummaryTimeWindow.LAST_7D,o=e.workflowId??"",d=e.refetchInterval??0,u=a?async()=>{let e={org:a,timeWindow:l};return o&&(e.workflowId=o),await i.workflowExecution.getExecutionSummary((0,t.create)(s.GetExecutionSummaryRequestSchema,e))}:null,{data:g,isLoading:c,isRefetching:m,error:p,refetch:h}=(0,n.useFetch)(u,[i,a,l,o],null,{refetchInterval:d||!1});return{summary:g,isLoading:c,isRefetching:m,error:p,refetch:h}}])},431343,e=>{"use strict";let t=(0,e.i(475254).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],431343)},495242,e=>{"use strict";let t=(0,e.i(475254).default)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);e.s(["Pause",0,t],495242)},82765,e=>{"use strict";let t=/^https?:\/\/[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)*(:[0-9]{1,5})?$/;e.s(["LINK_TOKEN_PARAM",0,"k","MAX_ALLOWED_ORIGINS",0,32,"appendLinkToken",0,function(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}k=${encodeURIComponent(t)}`},"buildEmbedSnippet",0,function(e,t,s,r){var n;let i=r?` token="${r}"`:"";return`<script src="${(n=e).endsWith("/")?n.slice(0,-1):n}/embed.js" async></script>
|
|
2
|
+
<stigmer-agent org="${t}" agent="${s}"${i}></stigmer-agent>`},"chatPath",0,function(e,t,s){let r=`/chat/${e}/${t}`;return s?`${r}?k=${encodeURIComponent(s)}`:r},"validateOrigin",0,function(e){let s=e.trim();return s?t.test(s)?null:"Must be an exact web origin like https://example.com — no path, query, or trailing slash":"Enter an origin, like https://example.com"}])},936175,e=>{"use strict";var t=e.i(586108),s=e.i(583093);e.s(["useBillingAccount",0,function(e){let r=(0,t.useStigmer)(),{data:n,isLoading:i,isRefetching:a,error:l,refetch:o}=(0,s.useFetch)(e?()=>r.billing.getOrCreateBillingAccount(e):null,[e,r],null);return{account:n,isLoading:i,isRefetching:a,error:l,refetch:o}}])},982247,e=>{"use strict";var t=e.i(960511);let s={[t.LedgerEntryType.purchase_credit]:"Credit Purchase",[t.LedgerEntryType.promotional_credit]:"Promotional Credit",[t.LedgerEntryType.usage_debit]:"Usage",[t.LedgerEntryType.reservation_hold]:"Reservation Hold",[t.LedgerEntryType.reservation_release]:"Reservation Release",[t.LedgerEntryType.adjustment_credit]:"Admin Credit",[t.LedgerEntryType.adjustment_debit]:"Admin Debit",[t.LedgerEntryType.refund_reversal]:"Refund",[t.LedgerEntryType.dispute_hold]:"Dispute Hold",[t.LedgerEntryType.dispute_release]:"Dispute Release",[t.LedgerEntryType.expiry_debit]:"Credit Expiry",[t.LedgerEntryType.auto_recharge_credit]:"Auto-Recharge"};e.s(["formatCreditBalance",0,function(e){if(void 0===e)return"$0.00";let t=Number(e)/1e4;return`$${(t/100).toFixed(2)}`},"formatLedgerAmount",0,function(e){let t=BigInt(0),s=Number(e<t?-e:e)/1e6,r=`$${s.toFixed(2)}`;return e>t?`+${r}`:e<t?`-${r}`:r},"formatLedgerDate",0,function(e){let t=new Date(1e3*Number(e));return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}).format(t)},"isCredit",0,function(e){return e===t.LedgerEntryType.purchase_credit||e===t.LedgerEntryType.promotional_credit||e===t.LedgerEntryType.adjustment_credit||e===t.LedgerEntryType.reservation_release||e===t.LedgerEntryType.dispute_release||e===t.LedgerEntryType.auto_recharge_credit},"isHold",0,function(e){return e===t.LedgerEntryType.reservation_hold||e===t.LedgerEntryType.dispute_hold},"ledgerEntryLabel",0,function(e){return s[e]??"Unknown"}])},638182,803636,38030,e=>{"use strict";e.s(["deriveScheduleState",0,function(e,t){let s=(t?.pausedReason??"")!=="";return e?.enabled?s?{state:"paused",phase:"degraded",label:"Paused",isPaused:s}:{state:"active",phase:"ready",label:"Active",isPaused:s}:{state:"disabled",phase:"disabled",label:"Disabled",isPaused:s}},"formatNextFire",0,function(e,t){let s=e.getTime()-t.getTime();if(s<6e4)return"now";let r=Math.floor(s/6e4);if(r<60)return`in ${r}m`;let n=Math.floor(r/60);if(n<24)return`in ${n}h`;let i=Math.floor(n/24);if(i<7)return`in ${i}d`;let a=e.getFullYear()===t.getFullYear();return e.toLocaleDateString(void 0,{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}],638182);var t=e.i(271645),s=e.i(610595),r=e.i(586108),n=e.i(846696),i=e.i(326283);e.s(["useResumeSchedule",0,function(){let e=(0,r.useStigmer)(),[a,l]=(0,t.useState)(!1),[o,d]=(0,t.useState)(null),u=(0,t.useCallback)(async t=>{l(!0),d(null);try{let s=await e.schedule.resume(t);return n.toast.success("Schedule resumed"),s}catch(t){let e=(0,i.toError)(t);throw d(e),n.toast.error((0,s.getUserMessage)(t)),e}finally{l(!1)}},[e]);return(0,t.useMemo)(()=>({resumeSchedule:u,isResuming:a,error:o}),[u,a,o])}],803636);var a=e.i(695682);e.s(["useTriggerSchedule",0,function(){let e=(0,r.useStigmer)(),[l,o]=(0,t.useState)(!1),[d,u]=(0,t.useState)(null),g=(0,t.useCallback)(async t=>{o(!0),u(null);try{let s=await e.schedule.trigger(t);return s.outcome===a.ScheduleRunOutcome.STARTED?n.toast.success("Run started"):n.toast.error(s.refusalReason||"The run was refused by a launch gate"),s}catch(t){let e=(0,i.toError)(t);throw u(e),n.toast.error((0,s.getUserMessage)(t)),e}finally{o(!1)}},[e]);return(0,t.useMemo)(()=>({triggerSchedule:g,isTriggering:l,error:d}),[g,l,d])}],38030)},653904,487809,540560,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(188482);let i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function a(e){switch(e.kind){case"hourly":return`${e.minute} * * * *`;case"daily":return`${e.minute} ${e.hour} * * *`;case"weekly":{let t=[...new Set(e.days)].sort((e,t)=>e-t);return`${e.minute} ${e.hour} * * ${t.join(",")}`}case"monthly":return`${e.minute} ${e.hour} ${e.day} * *`;case"custom":return e.cron}}let l=/^(\d{1,2}) \* \* \* \*$/,o=/^(\d{1,2}) (\d{1,2}) \* \* \*$/,d=/^(\d{1,2}) (\d{1,2}) \* \* (\d(?:,\d)*)$/,u=/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/;function g(e){return Number.isInteger(e)&&e>=0&&e<=59}function c(e){return Number.isInteger(e)&&e>=0&&e<=23}function m(e,t){let s=t?` (${t})`:"";switch(e.kind){case"hourly":return`Every hour at minute ${e.minute}${s}`;case"daily":return`Every day at ${p(e.hour,e.minute)}${s}`;case"weekly":{var r;let t=[...new Set(e.days)].sort((e,t)=>e-t),n=7===t.length?"day":1===(r=t.map(e=>i[e])).length?r[0]:`${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`;return`Every ${n} at ${p(e.hour,e.minute)}${s}`}case"monthly":return`On day ${e.day} of every month at ${p(e.hour,e.minute)}${s}`;case"custom":return`Cron “${e.cron.trim()}”${s}`}}function p(e,t){return`${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`}let h=new Set(["@hourly","@daily","@weekly","@monthly","@yearly"]),x=/^[0-9A-Za-z*,/-]+$/;function f(e){if(e.startsWith("CRON_TZ=")||e.startsWith("TZ="))return"spec.cron must not carry a timezone prefix (CRON_TZ=/TZ=) — spec.time_zone is the single timezone authority";if(e.includes("#"))return"spec.cron must not contain a comment (#)";if(e.startsWith("@"))return e.startsWith("@every")?"spec.cron must be a calendar expression — @every intervals are not supported":h.has(e)?null:`spec.cron shorthand "${e}" is not supported — use @hourly, @daily, @weekly, @monthly, or @yearly, or a 5-field cron expression`;let t=e.split(/\s+/).filter(e=>e.length>0);if(5!==t.length)return`spec.cron must have exactly 5 fields (minute hour day-of-month month day-of-week); got ${t.length}`;for(let e of t)if(!x.test(e))return`spec.cron field "${e}" contains unsupported characters — allowed: digits, names, '*', ',', '-', '/'`;return null}e.s(["WEEKDAY_LABELS",0,i,"cadenceToCron",0,a,"cronToCadence",0,function(e){let t=e.trim().replace(/\s+/g," ");switch(t){case"@hourly":return{kind:"hourly",minute:0};case"@daily":return{kind:"daily",hour:0,minute:0};case"@weekly":return{kind:"weekly",days:[0],hour:0,minute:0};case"@monthly":return{kind:"monthly",day:1,hour:0,minute:0}}let s=l.exec(t);if(s){let e=Number(s[1]);if(g(e))return{kind:"hourly",minute:e}}if(s=o.exec(t)){let e=Number(s[1]),t=Number(s[2]);if(g(e)&&c(t))return{kind:"daily",hour:t,minute:e}}if(s=d.exec(t)){let e=Number(s[1]),t=Number(s[2]),r=s[3].split(",").map(Number);if(g(e)&&c(t)&&r.length>0&&r.every(e=>e>=0&&e<=6)&&new Set(r).size===r.length)return{kind:"weekly",days:[...r].sort((e,t)=>e-t),hour:t,minute:e}}if(s=u.exec(t)){let e=Number(s[1]),t=Number(s[2]),r=Number(s[3]);if(g(e)&&c(t)&&r>=1&&r<=31)return{kind:"monthly",day:r,hour:t,minute:e}}return{kind:"custom",cron:e}},"describeCadence",0,m,"formatTime",0,p,"validateCron",0,f],487809);let v=[{kind:"hourly",label:"Hourly"},{kind:"daily",label:"Daily"},{kind:"weekly",label:"Weekly"},{kind:"monthly",label:"Monthly"},{kind:"custom",label:"Custom cron"}],b=(0,r.cn)("stg:w-16 stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2 stg:py-1 stg:text-xs stg:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50");function y({id:e,hour:s,minute:n,disabled:i,onChange:a}){return(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("label",{htmlFor:e,children:"At"}),(0,t.jsx)("input",{id:e,type:"time",value:p(s,n),onChange:e=>{let[t,s]=e.target.value.split(":").map(Number);Number.isInteger(t)&&Number.isInteger(s)&&a(t,s)},disabled:i,className:(0,r.cn)("stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2 stg:py-1 stg:text-xs stg:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")})]})}function j(e,t,s,r){let n=Number(e);return Number.isInteger(n)?Math.min(s,Math.max(t,n)):r}e.s(["CadenceField",0,function({value:e,onChange:l,timeZone:o,disabled:d}){let u=(0,s.useId)(),g=(0,s.useCallback)(t=>{t!==e.kind&&l(function(e,t){let s="hour"in t?t.hour:9,r="minute"in t?t.minute:0;switch(e){case"hourly":return{kind:e,minute:r};case"daily":return{kind:e,hour:s,minute:r};case"weekly":return{kind:e,days:[1],hour:s,minute:r};case"monthly":return{kind:e,day:1,hour:s,minute:r};case"custom":return{kind:e,cron:"custom"===t.kind?t.cron:a(t)}}}(t,e))},[e,l]),c="custom"===e.kind&&""!==e.cron.trim()?f(e.cron.trim()):null;return(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("div",{role:"radiogroup","aria-label":"Cadence","aria-disabled":d||void 0,className:(0,r.cn)("stg:inline-flex stg:flex-wrap stg:rounded-md stg:bg-muted stg:p-0.5",d&&"stg:pointer-events-none stg:opacity-50"),children:v.map(s=>{let n=e.kind===s.kind;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":n,tabIndex:n?0:-1,disabled:d,onClick:()=>g(s.kind),onKeyDown:t=>{if("ArrowRight"===t.key||"ArrowLeft"===t.key){t.preventDefault();let s=v.findIndex(t=>t.kind===e.kind);g(v[(s+("ArrowRight"===t.key?1:-1)+v.length)%v.length].kind)}},className:(0,r.cn)("stg:inline-flex stg:cursor-pointer stg:items-center stg:rounded-sm stg:px-2.5 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",n?"stg:bg-background stg:text-foreground stg:shadow-sm":"stg:text-muted-foreground stg:hover:text-foreground"),children:s.label},s.kind)})}),"hourly"===e.kind&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("label",{htmlFor:`${u}-minute`,children:"At minute"}),(0,t.jsx)("input",{id:`${u}-minute`,type:"number",min:0,max:59,value:e.minute,onChange:t=>l({kind:"hourly",minute:j(t.target.value,0,59,e.minute)}),disabled:d,className:b})]}),"daily"===e.kind&&(0,t.jsx)(y,{id:`${u}-time`,hour:e.hour,minute:e.minute,disabled:d,onChange:(e,t)=>l({kind:"daily",hour:e,minute:t})}),"weekly"===e.kind&&(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("div",{role:"group","aria-label":"Days of week",className:"stg:flex stg:flex-wrap stg:gap-1",children:i.map((s,i)=>{let a=e.days.includes(i),o=a&&1===e.days.length;return(0,t.jsxs)(n.Tooltip,{children:[(0,t.jsx)(n.TooltipTrigger,{render:(0,t.jsx)("span",{className:"stg:inline-flex"}),children:(0,t.jsx)("button",{type:"button","aria-pressed":a,"aria-label":s,disabled:d||o,onClick:()=>l({...e,days:a?e.days.filter(e=>e!==i):[...e.days,i].sort((e,t)=>e-t)}),className:(0,r.cn)("stg:inline-flex stg:h-7 stg:w-9 stg:items-center stg:justify-center stg:rounded-md stg:border stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none",a?"stg:border-primary stg:bg-primary stg:text-primary-foreground":"stg:border-input stg:bg-background stg:text-muted-foreground stg:hover:text-foreground",o&&"stg:opacity-70"),children:s.slice(0,3)})}),(0,t.jsx)(n.TooltipContent,{side:"top",children:o?"A weekly schedule needs at least one day":s})]},s)})}),(0,t.jsx)(y,{id:`${u}-time`,hour:e.hour,minute:e.minute,disabled:d,onChange:(t,s)=>l({...e,hour:t,minute:s})})]}),"monthly"===e.kind&&(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-foreground",children:[(0,t.jsx)("label",{htmlFor:`${u}-day`,children:"On day"}),(0,t.jsx)("input",{id:`${u}-day`,type:"number",min:1,max:31,value:e.day,onChange:t=>l({...e,day:j(t.target.value,1,31,e.day)}),disabled:d,className:b}),(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:"of every month"})]}),e.day>=29&&(0,t.jsxs)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:["Months without day ",e.day," are skipped — February never fires a day-",e.day," schedule",29===e.day?" except in leap years":"","."]}),(0,t.jsx)(y,{id:`${u}-time`,hour:e.hour,minute:e.minute,disabled:d,onChange:(t,s)=>l({...e,hour:t,minute:s})})]}),"custom"===e.kind&&(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("input",{type:"text","aria-label":"Cron expression",placeholder:"e.g. 0 9 * * MON-FRI",value:e.cron,onChange:e=>l({kind:"custom",cron:e.target.value}),disabled:d,className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:font-mono stg:text-xs stg:text-foreground","stg:placeholder:font-sans stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",c&&"stg:border-destructive")}),c?(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-destructive",role:"alert",children:c}):(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"5 fields (minute hour day-of-month month day-of-week) or @hourly, @daily, @weekly, @monthly, @yearly."})]}),!("custom"===e.kind&&(c||""===e.cron.trim()))&&(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground","data-testid":"cadence-summary",children:m(e,o)})]})}],653904);let k="stgm-timezone-list";e.s(["TimeZoneField",0,function({id:e,value:n,onChange:i,disabled:a}){let l=(0,s.useMemo)(()=>(function(){try{return Intl.supportedValuesOf("timeZone")}catch{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&"UTC"!==e?[e,"UTC"]:["UTC"]}})(),[]),[o,d]=(0,s.useState)(null),[u,g]=(0,s.useState)(-1),c=(0,s.useRef)(null),m=null!==o,p=(0,s.useMemo)(()=>{if(null===o)return[];let e=o.trim().toLowerCase().replace(/\s+/g,"_");return(e?l.filter(t=>t.toLowerCase().includes(e)):l).slice(0,100)},[l,o]),h=(0,s.useCallback)(()=>{d(null),g(-1)},[]),x=(0,s.useCallback)(e=>{i(e),h()},[i,h]),f=(0,s.useCallback)(e=>{if("Escape"===e.key){e.preventDefault(),h();return}m&&("ArrowDown"===e.key?(e.preventDefault(),g(e=>e<p.length-1?e+1:e)):"ArrowUp"===e.key?(e.preventDefault(),g(e=>e>0?e-1:-1)):"Enter"===e.key&&(e.preventDefault(),u>=0&&u<p.length?x(p[u]):1===p.length&&x(p[0])))},[m,p,u,x,h]);return(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{id:e,type:"text",role:"combobox","aria-expanded":m,"aria-controls":k,"aria-activedescendant":u>=0?`stgm-timezone-${u}`:void 0,"aria-label":"Time zone",placeholder:"Search time zones…",value:o??n,onChange:e=>{d(e.target.value),g(-1)},onFocus:()=>d(""),onBlur:h,onKeyDown:f,disabled:a,className:(0,r.cn)("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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),m&&(0,t.jsx)("div",{ref:c,id:k,role:"listbox","aria-label":"Time zones",className:(0,r.cn)("stg:absolute stg:z-popover stg:mt-1 stg:max-h-52 stg:w-full stg:overflow-y-auto stg:rounded-md stg:border stg:border-border","stg:bg-popover stg:p-1 stg:text-popover-foreground stg:shadow-md"),children:0===p.length?(0,t.jsx)("div",{className:"stg:py-3 stg:text-center stg:text-xs stg:text-muted-foreground",children:"No time zones match"}):p.map((e,s)=>(0,t.jsx)("button",{id:`stgm-timezone-${s}`,type:"button",role:"option","aria-selected":e===n,onMouseDown:t=>{t.preventDefault(),x(e)},className:(0,r.cn)("stg:flex stg:w-full stg:items-center stg:rounded-sm stg:px-2 stg:py-1.5 stg:text-left stg:text-xs stg:transition-colors",s===u?"stg:bg-accent stg:text-foreground":"stg:text-popover-foreground stg:hover:bg-accent-hover",e===n&&"stg:font-medium"),children:e},e))})]})},"browserTimeZone",0,function(){return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}],540560)},310057,e=>{"use strict";var t=e.i(843476),s=e.i(271645);let r=(0,s.createContext)(null);e.s(["LibraryBreadcrumbProvider",0,function({children:e}){let[n,i]=(0,s.useState)(null),a=(0,s.useCallback)(e=>i(e),[]),l=(0,s.useMemo)(()=>({label:n,setLabel:a}),[n,a]);return(0,t.jsx)(r.Provider,{value:l,children:e})},"useBreadcrumbLabel",0,function(){return(0,s.useContext)(r)?.label??null},"useBreadcrumbOverride",0,function(){let e=(0,s.useContext)(r),t=(0,s.useCallback)(e=>{},[]);return{setLabel:e?.setLabel??t}}])},154752,582321,e=>{"use strict";var t=e.i(271645),s=e.i(846696),r=e.i(193799);e.s(["useCopyResource",0,function(){let{copy:e}=(0,r.useCopyFeedback)(),n=(0,t.useCallback)(async(t,r)=>{await e(t)?s.toast.success(`${r} copied`):s.toast.error(`Couldn't copy ${r}`)},[e]),i=(0,t.useCallback)(e=>n(e,"ID"),[n]),a=(0,t.useCallback)(e=>n(e,"Slug"),[n]),l=(0,t.useCallback)((e,t)=>n(`${e}/${t}`,"Qualified slug"),[n]);return(0,t.useMemo)(()=>({copy:n,copyId:i,copySlug:a,copyQualifiedSlug:l}),[n,i,a,l])}],154752);var n=e.i(586108),i=e.i(326283);function a(e){switch(e){case"agent":return"agent";case"skill":return"skill";case"mcpServer":return"MCP server";case"workflow":return"workflow";case"schedule":return"schedule";case"plugin":return"plugin"}}e.s(["useDeleteResource",0,function(e,r,l){let o=(0,n.useStigmer)(),[d,u]=(0,t.useState)(!1),[g,c]=(0,t.useState)(null),m=(0,t.useCallback)(async()=>{if(r){u(!0),c(null);try{switch(e){case"agent":await o.agent.delete(r);break;case"skill":await o.skill.delete(r);break;case"mcpServer":await o.mcpServer.delete({resourceId:r});break;case"workflow":await o.workflow.delete(r);break;case"schedule":await o.schedule.delete(r);break;case"plugin":await o.plugin.delete(r)}s.toast.success(l?`${l} deleted`:`${a(e)} deleted`)}catch(r){let t=(0,i.toError)(r);throw c(t),s.toast.error(`Failed to delete ${a(e)}`),t}finally{u(!1)}}},[o,e,r,l]);return(0,t.useMemo)(()=>({deleteResource:m,isDeleting:d,error:g}),[m,d,g])}],582321)},267912,e=>{"use strict";var t=e.i(271645);e.s(["useDetailTabs",0,function({builtInTabs:e,additionalTabs:s,activeTab:r,onTabChange:n,defaultTab:i}){let a=void 0!==r&&void 0!==n,l=(0,t.useMemo)(()=>s&&0!==s.length?[...e,...s]:e,[e,s]),o=i??e[0]?.id??"",[d,u]=(0,t.useState)(o),g=a?r:d,c=(0,t.useCallback)(e=>{a?n(e):u(e)},[a,n]),m=l.length>1?l:void 0,p=(0,t.useMemo)(()=>{if(s)return s.find(e=>e.id===g)},[s,g]);return{effectiveTabs:m,effectiveActiveTab:g,effectiveOnTabChange:c,activeAdditionalTab:p}}])},352371,e=>{"use strict";var t=e.i(271645);e.i(222258);var s=e.i(967785),r=e.i(590745),n=e.i(846696),i=e.i(745176),a=e.i(193799),l=e.i(926059);e.s(["useExportResource",0,function({kind:e,resource:o}){let d=(0,t.useMemo)(()=>o?"Workflow"===e?(0,l.serializeWorkflowYaml)(o):(0,r.serializeManifest)(o):null,[e,o]),u=(0,t.useMemo)(()=>d?JSON.stringify((0,s.parse)(d),null,2):null,[d]),g=(0,t.useMemo)(()=>o&&(o.metadata?.slug||o.metadata?.name)||"resource",[o]),{copy:c}=(0,a.useCopyFeedback)(),m=(0,t.useCallback)(async()=>{d&&(await c(d)?n.toast.success("YAML copied to clipboard"):n.toast.error("Couldn't copy YAML"))},[c,d]),p=(0,t.useCallback)(async()=>{u&&(await c(u)?n.toast.success("JSON copied to clipboard"):n.toast.error("Couldn't copy JSON"))},[c,u]),h=(0,t.useCallback)(()=>{d&&(0,i.downloadTextFile)(d,`${g}.yaml`,"text/yaml")},[d,g]),x=(0,t.useCallback)(()=>{u&&(0,i.downloadTextFile)(u,`${g}.json`,"application/json")},[u,g]);return(0,t.useMemo)(()=>({copyYaml:m,copyJson:p,downloadYaml:h,downloadJson:x,yaml:d,json:u}),[m,p,h,x,d,u])}])},373351,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(869803),i=e.i(348990);function a({value:e,disabled:s,resolveEnvName:i,resolveEnvDescription:o,onRemove:d,onMoveUp:g,onMoveDown:c,total:m}){return(0,t.jsx)("ol",{className:(0,r.cn)(n.UNSTYLED_LIST,"stg:space-y-1.5"),"aria-label":"Selected environments (merge order)",children:e.map((e,n)=>(0,t.jsxs)("li",{className:(0,r.cn)("stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:border stg:border-border stg:px-3 stg:py-2","stg:bg-muted/30"),children:[(0,t.jsxs)("span",{className:"stg:shrink-0 stg:w-5 stg:text-xs stg:font-medium stg:text-muted-foreground stg:text-right",children:[n+1,"."]}),(0,t.jsxs)("div",{className:"stg:flex-1 stg:min-w-0",children:[(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground stg:truncate stg:block",children:i(e)}),o(e)&&(0,t.jsx)("span",{className:"stg:text-[0.65rem] stg:text-muted-foreground stg:truncate stg:block",children:o(e)})]}),!s&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-0.5 stg:shrink-0",children:[(0,t.jsx)(l,{direction:"up",disabled:0===n,onClick:()=>g(n),label:`Move ${i(e)} up`}),(0,t.jsx)(l,{direction:"down",disabled:n===m-1,onClick:()=>c(n),label:`Move ${i(e)} down`}),(0,t.jsx)("button",{type:"button",onClick:()=>d(n),"aria-label":`Remove ${i(e)}`,className:(0,r.cn)("stg:rounded stg:p-1 stg:text-muted-foreground","stg:hover:text-destructive stg:hover:bg-destructive/10","stg:focus:outline-none stg:focus:ring-1 stg:focus:ring-ring"),children:(0,t.jsx)(u,{})})]})]},`${e.org}-${e.slug}-${n}`))})}function l({direction:e,disabled:s,onClick:n,label:i}){return(0,t.jsx)("button",{type:"button",disabled:s,onClick:n,"aria-label":i,className:(0,r.cn)("stg:rounded stg:p-1 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:focus:outline-none stg:focus:ring-1 stg:focus:ring-ring","stg:disabled:opacity-30 stg:disabled:cursor-not-allowed stg:disabled:hover:bg-transparent"),children:"up"===e?(0,t.jsx)(o,{}):(0,t.jsx)(d,{})})}function o(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M6 2.5v7M6 2.5L3 5.5M6 2.5l3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function d(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M6 9.5v-7M6 9.5L3 6.5M6 9.5l3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function u(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 3l6 6M9 3l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}e.s(["EnvironmentPicker",0,function({org:e,value:n,onChange:l,disabled:o=!1,filterEnvironment:d,className:u}){let{environments:g,isLoading:c}=(0,i.useEnvironmentList)(e),m=(0,s.useId)(),p=(0,s.useMemo)(()=>new Set(n.map(e=>e.slug)),[n]),h=(0,s.useMemo)(()=>g.filter(e=>!p.has(e.metadata?.slug??"")&&(d?.(e)??!0)),[g,p,d]),x=(0,s.useCallback)(t=>{let s=g.find(e=>e.metadata?.slug===t);s&&l([...n,{org:e,slug:s.metadata.slug}])},[g,l,e,n]),f=(0,s.useCallback)(e=>{let t=[...n];t.splice(e,1),l(t)},[l,n]),v=(0,s.useCallback)(e=>{if(0===e)return;let t=[...n];[t[e-1],t[e]]=[t[e],t[e-1]],l(t)},[l,n]),b=(0,s.useCallback)(e=>{if(e>=n.length-1)return;let t=[...n];[t[e],t[e+1]]=[t[e+1],t[e]],l(t)},[l,n]),y=(0,s.useCallback)(e=>{let t=g.find(t=>t.metadata?.slug===e.slug);return t?.metadata?.name??e.slug},[g]),j=(0,s.useCallback)(e=>{let t=g.find(t=>t.metadata?.slug===e.slug);return t?.spec?.description??""},[g]);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-3",u),role:"group","aria-label":"Environment bindings",children:[n.length>0&&(0,t.jsx)(a,{value:n,disabled:o,resolveEnvName:y,resolveEnvDescription:j,onRemove:f,onMoveUp:v,onMoveDown:b,total:n.length}),n.length>1&&(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Environments are merged in order. Later entries override earlier ones when keys conflict."}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:m,className:"stg:sr-only",children:"Add environment"}),(0,t.jsxs)("select",{id:m,disabled:o||0===h.length,value:"",onChange:e=>{e.target.value&&x(e.target.value)},className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background stg:px-3 stg:py-1.5 stg:text-sm","stg:text-foreground stg:placeholder:text-muted-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring","stg:disabled:cursor-not-allowed stg:disabled:opacity-50"),children:[(0,t.jsx)("option",{value:"",children:c?"Loading environments...":0===h.length?n.length===g.length&&g.length>0?"All environments selected":"No environments available":"+ Add environment"}),h.map(e=>(0,t.jsx)("option",{value:e.metadata?.slug,children:e.metadata?.name??e.metadata?.slug},e.metadata?.slug))]})]})]})}])},330815,e=>{"use strict";var t=e.i(843476),s=e.i(758960),r=e.i(973532),n=e.i(853793);e.s(["InstanceVisibilitySelector",0,function({visibility:e,onVisibilityChange:i,mode:a,isPending:l=!1,disabled:o=!1,className:d}){let u=(0,r.useCanSetPublicVisibility)();return(0,t.jsx)(s.VisibilitySelector,{visibility:e,options:(0,n.instanceVisibilityLevels)({canSetPublicVisibility:u.allowed}),onVisibilityChange:i,mode:a,isPending:l,disabled:o,ariaLabel:"Instance visibility",className:d})}])},789198,e=>{"use strict";var t=e.i(843476),s=e.i(271645);let r=(0,s.createContext)(null);function n(){let e=(0,s.useContext)(r);if(!e)throw Error("useFullViewportLayout must be used within <FullViewportLayoutProvider>");return e}e.s(["FullViewportLayoutProvider",0,function({children:e}){let[n,i]=(0,s.useState)(!1),a=(0,s.useCallback)(e=>{i(e)},[]),l=(0,s.useMemo)(()=>({isFullViewport:n,setFullViewport:a}),[n,a]);return(0,t.jsx)(r.Provider,{value:l,children:e})},"useFullViewportLayout",0,n,"useRequestFullViewport",0,function(e){let{setFullViewport:t}=n();(0,s.useEffect)(()=>(t(e),()=>t(!1)),[e,t])}])},697720,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(618566),n=e.i(616629),i=e.i(674542),a=e.i(727996),l=e.i(297629),o=e.i(154752),d=e.i(966205),u=e.i(582321),g=e.i(352371),c=e.i(10337),m=e.i(310057),p=e.i(451241),h=e.i(107141);function x({org:e,slug:h}){let{navigateToDetail:f}=(0,p.useLibraryNavigation)(),v=(0,r.useRouter)(),{setLabel:b}=(0,m.useBreadcrumbOverride)(),y=(0,l.useActiveOrgSlug)(),[j,k]=(0,s.useState)(null),[N,w]=(0,s.useState)("MCP Server"),{copyId:C,copyQualifiedSlug:S}=(0,o.useCopyResource)(),{confirmState:A,confirm:L,handleConfirm:M,handleCancel:E}=(0,d.useConfirmAction)(),{deleteResource:T,isDeleting:D}=(0,u.useDeleteResource)("mcpServer",j,N),$=(0,a.useMcpServer)(e,h),{mcpServer:R,refetch:P}=$,{copyYaml:I,copyJson:F,downloadYaml:z}=(0,g.useExportResource)({kind:"McpServer",resource:R}),[B,_]=(0,s.useState)(!1);(0,s.useEffect)(()=>()=>b(null),[b]);let O=(0,s.useCallback)(({name:e,id:t})=>{b(e),k(t),w(e)},[b]),U=(0,s.useCallback)(async()=>{if(await L({title:`Delete ${N}?`,description:"This action cannot be undone. The MCP server configuration and all connection data will be permanently removed.",confirmLabel:"Delete",variant:"destructive"}))try{await T(),v.push("/library/mcp-servers")}catch{}},[L,T,v,N]),K=(0,s.useMemo)(()=>[{id:"copy-id",label:"Copy ID",group:"clipboard",onAction:()=>{j&&C(j)},disabled:!j},{id:"copy-slug",label:"Copy slug",group:"clipboard",onAction:()=>S(e,h)},{id:"edit-yaml",label:"Edit YAML",group:"export",onAction:()=>_(!0),disabled:!R},{id:"export-yaml",label:"Export YAML",group:"export",onAction:I,disabled:!R},{id:"export-json",label:"Export JSON",group:"export",onAction:F,disabled:!R},{id:"download-yaml",label:"Download YAML",group:"export",onAction:z,disabled:!R},{id:"delete",label:"Delete",variant:"destructive",group:"danger",onAction:U,disabled:D}],[j,C,S,e,h,I,F,z,R,U,D]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.McpServerDetailView,{org:e,slug:h,mcpServerState:$,activeOrg:y,onResourceLoad:O,onPluginClick:({org:e,slug:t})=>f("plugins",e,t),editable:!0,actions:K}),(0,t.jsx)(n.EditResourceYamlDialog,{open:B,onOpenChange:_,resource:R,onApplied:P}),(0,t.jsx)(c.ConfirmDialog,{state:A,onConfirm:M,onCancel:E})]})}e.s(["McpServerDetailPage",0,function(){let e=(0,p.useRouteDetailYieldsToOverlay)(),s=(0,h.useStaticRouteParam)("org",2),r=(0,h.useStaticRouteParam)("slug");return!e&&s&&r?(0,t.jsx)(x,{org:s,slug:r}):null},"McpServerDetailPageInner",0,x])},784400,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(188482),i=e.i(361353);function a({entry:e,isSelected:s,isCompareSource:o,isLast:d,onSelect:u,trailing:g}){return(0,t.jsxs)("div",{role:"listitem","aria-current":e.isCurrent?"true":void 0,className:"stg:relative stg:flex stg:gap-3",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:items-center stg:pt-1",children:[(0,t.jsx)("div",{className:(0,r.cn)("stg:size-2.5 stg:shrink-0 stg:rounded-full stg:border-2",e.isCurrent?"stg:border-primary stg:bg-primary":o?"stg:border-primary stg:border-dashed stg:bg-background":s?"stg:border-primary stg:bg-background":"stg:border-border stg:bg-background"),"aria-hidden":"true"}),!d&&(0,t.jsx)("div",{className:"stg:mt-1 stg:w-px stg:flex-1 stg:bg-border","aria-hidden":"true"})]}),(0,t.jsxs)("button",{type:"button",onClick:u,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),u?.())},tabIndex:0,"aria-selected":s,className:(0,r.cn)("stg:mb-4 stg:flex stg:min-w-0 stg:flex-1 stg:flex-col stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-2 stg:text-left stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",o?"stg:border stg:border-dashed stg:border-primary stg:bg-primary-subtle":s?"stg:bg-accent-hover":"stg:hover:bg-accent-hover"),children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsxs)(n.Tooltip,{children:[(0,t.jsx)(n.TooltipTrigger,{render:(0,t.jsx)("code",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-[11px] stg:font-medium stg:text-foreground"}),children:e.label}),(0,t.jsx)(n.TooltipContent,{side:"top",className:"stg:break-all",children:e.id})]}),o&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded-full stg:bg-primary stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-primary-foreground",children:"A"}),e.tag&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded-full stg:bg-primary-subtle stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-primary",children:e.tag}),e.isCurrent&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded-full stg:bg-status-ready-subtle stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-status-ready",children:"current"}),g&&(0,t.jsx)("div",{className:"stg:ml-auto stg:shrink-0",children:g})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsxs)(n.Tooltip,{children:[(0,t.jsx)(n.TooltipTrigger,{render:(0,t.jsx)("time",{dateTime:e.timestamp.toISOString()}),children:(0,i.formatRelativeTime)(e.timestamp)}),(0,t.jsx)(n.TooltipContent,{side:"top",children:e.timestamp.toLocaleString()})]}),e.actor&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,t.jsxs)("span",{className:"stg:flex stg:items-center stg:gap-1",children:[e.actor.avatar&&(0,t.jsx)("img",{src:e.actor.avatar,alt:"",className:"stg:size-3.5 stg:rounded-full"}),(0,t.jsx)("span",{children:e.actor.displayName||e.actor.id})]})]})]}),e.sublabel&&(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:e.sublabel}),e.gitProvenance&&(0,t.jsx)(l,{provenance:e.gitProvenance})]})]})}function l({provenance:e}){let s=function(e){if(!e)return null;let t=e.replace(/\.git$/,"");if(t.startsWith("https://")||t.startsWith("http://"))return t;let s=t.match(/^(?:git@|ssh:\/\/)([^:/]+)[:/](.+)$/);return s?`https://${s[1]}/${s[2]}`:null}(e.remoteUrl),r=e.commit.slice(0,7),n=s?`${s}/commit/${e.commit}`:null;return(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:text-[11px] stg:text-muted-foreground",children:[(0,t.jsx)(o,{className:"stg:size-3 stg:shrink-0"}),e.ref&&(0,t.jsx)("span",{className:"stg:font-medium",children:e.ref}),n?(0,t.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"stg:font-mono stg:text-primary stg:underline-offset-2 stg:hover:underline",onClick:e=>e.stopPropagation(),children:r}):(0,t.jsx)("code",{className:"stg:font-mono",children:r})]})}function o({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)("circle",{cx:"8",cy:"4",r:"2"}),(0,t.jsx)("circle",{cx:"8",cy:"12",r:"2"}),(0,t.jsx)("path",{d:"M8 6v4"})]})}function d({selectedLabel:e,onCancel:s}){return(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"stg:mb-3 stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:border stg:border-dashed stg:border-primary stg:bg-primary-subtle stg:px-3 stg:py-2 stg:text-xs",children:[(0,t.jsx)(u,{className:"stg:size-3.5 stg:shrink-0 stg:text-primary"}),(0,t.jsxs)("span",{className:"stg:flex-1 stg:text-foreground",children:["Select another version to compare with"," ",(0,t.jsx)("code",{className:"stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:font-mono stg:text-[10px] stg:font-medium",children:e})]}),(0,t.jsx)("button",{type:"button",onClick:s,className:(0,r.cn)("stg:rounded stg:px-2 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground stg:transition-colors","stg:hover:bg-accent-hover stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:"Cancel"})]})}function u({className:e}){return(0,t.jsx)("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:"M5 12V4M5 4l-3 3M11 4v8M11 12l3-3"})})}function g({className:e}){return(0,t.jsx)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-4 stg:pt-2",e),"aria-busy":"true","aria-label":"Loading version history",children:[1,2,3].map(e=>(0,t.jsxs)("div",{className:"stg:flex stg:gap-3",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:items-center",children:[(0,t.jsx)("div",{className:"stg:size-2.5 stg:animate-pulse stg:rounded-full stg:bg-muted"}),e<3&&(0,t.jsx)("div",{className:"stg:mt-1 stg:w-px stg:flex-1 stg:bg-border"})]}),(0,t.jsxs)("div",{className:"stg:mb-4 stg:flex-1 stg:space-y-2 stg:px-2.5 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-20 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-12 stg:animate-pulse stg:rounded-full stg:bg-muted"})]}),(0,t.jsx)("div",{className:"stg:h-3 stg:w-32 stg:animate-pulse stg:rounded stg:bg-muted"})]})]},e))})}function c({message:e,className:s}){return(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:flex stg:flex-col stg:items-center stg:gap-2 stg:py-8 stg:text-center",s),children:[(0,t.jsx)(m,{className:"stg:size-8 stg:text-muted-foreground-faint"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:e})]})}function m({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 4v4l2.5 1.5"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,t.jsx)("path",{d:"M2 8a6 6 0 0 1 6-6"})]})}e.s(["VersionTimeline",0,function({entries:e,onEntrySelect:n,onCompare:i,selectedId:l,isLoading:o,emptyMessage:u="No version history available",className:m}){let[p,h]=(0,s.useState)(null),x=(0,s.useCallback)(e=>{i&&(null===p?h(e):(p===e||i(p,e),h(null))),n?.(e)},[i,n,p]),f=(0,s.useCallback)(()=>{h(null)},[]);if(o)return(0,t.jsx)(g,{className:m});if(0===e.length)return(0,t.jsx)(c,{message:u,className:m});let v=p?e.find(e=>e.id===p)?.label??p.slice(0,12):null;return(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:pt-2",m),children:[p&&(0,t.jsx)(d,{selectedLabel:v,onCancel:f}),(0,t.jsx)("div",{role:"list","aria-label":"Version history",children:e.map((s,r)=>(0,t.jsx)(a,{entry:s,isSelected:s.id===l,isCompareSource:s.id===p,isLast:r===e.length-1,onSelect:()=>x(s.id)},s.id))})]})}],784400)},373860,336095,e=>{"use strict";var t=e.i(271645),s=e.i(586108),r=e.i(326283);e.s(["useUpdateAgent",0,function(){let e=(0,s.useStigmer)(),[n,i]=(0,t.useState)(!1),[a,l]=(0,t.useState)(null),o=(0,t.useCallback)(()=>l(null),[]);return{update:(0,t.useCallback)(async t=>{i(!0),l(null);try{return await e.agent.update(t)}catch(e){throw l((0,r.toError)(e)),e}finally{i(!1)}},[e]),isUpdating:n,error:a,clearError:o}}],373860),e.s(["getAgentSessionUrl",0,function(e,t,s){let r=`/?agent=${encodeURIComponent(`${e}/${t}`)}`;return s?`${r}&instance=${encodeURIComponent(s)}`:r}],336095)},76470,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(618566),n=e.i(893976),i=e.i(17616),a=e.i(508535),l=e.i(203941),o=e.i(170255),d=e.i(57330),u=e.i(484763),g=e.i(869803),c=e.i(476007),m=e.i(758960),p=e.i(668093),h=e.i(652337),x=e.i(267912),f=e.i(784400),v=e.i(65642),b=e.i(954884),y=e.i(468806),j=e.i(141249),k=e.i(992999),N=e.i(586108),w=e.i(326283),C=e.i(373860),S=e.i(473489);function A(e,t){return`${e}/${t}`}function L({org:e,servers:r,open:i,onClose:a,onAgentClick:l,onCreateAgent:o,className:d}){let u=(0,s.useId)();return(0,t.jsx)(y.DialogShell,{open:i,onOpenChange:e=>{e||a()},width:"md",dismissOnBackdrop:!1,className:(0,n.cn)("stg:max-h-[85vh] stg:bg-card stg:text-foreground",d),"aria-labelledby":u,children:i&&(0,t.jsx)(M,{org:e,servers:r,titleId:u,onClose:a,onAgentClick:l,onCreateAgent:o})})}function M({org:e,servers:r,titleId:i,onClose:a,onAgentClick:l,onCreateAgent:o}){let d=function(e){let t=(0,N.useStigmer)(),{update:r}=(0,C.useUpdateAgent)(),[n,i]=(0,s.useState)({status:"picking"}),[a,l]=(0,s.useState)(null),o=(0,s.useCallback)(s=>{(l(null),null===s)?i({status:"picking"}):(i({status:"reading",ref:s}),t.agent.getByReference(s).then(t=>{if(t.metadata?.labels[S.PLUGIN_LABEL])return void i({status:"managed",agent:t});let s=new Set((t.spec?.mcpServerUsages??[]).map(e=>A(e.mcpServerRef?.org??"",e.mcpServerRef?.slug??"")));i({status:"ready",agent:t,alreadyListed:e.filter(e=>s.has(A(e.ref.org,e.ref.slug))).map(e=>e.name)})}).catch(e=>{l((0,w.toError)(e)),i({status:"picking"})}))},[t,e]),d=(0,s.useCallback)(async()=>{if("ready"!==n.status)return 0;let{agent:t}=n,s=(0,k.toAgentUpdateInput)(t),a=new Set((s.mcpServerUsages??[]).map(e=>A(e.mcpServerRef.org,e.mcpServerRef.slug))),o=e.filter(e=>!a.has(A(e.ref.org,e.ref.slug))).map(e=>({mcpServerRef:{org:e.ref.org,slug:e.ref.slug}}));i({status:"adding",agent:t}),l(null);try{let e=await r({...s,mcpServerUsages:[...s.mcpServerUsages??[],...o]});return i({status:"added",agent:e,addedCount:o.length}),o.length}catch(s){let e=(0,w.toError)(s);throw l(e),i({status:"ready",agent:t,alreadyListed:n.alreadyListed}),e}},[n,e,r]),u=(0,s.useCallback)(()=>l(null),[]),g=(0,s.useCallback)(()=>{l(null),i({status:"picking"})},[]);return(0,s.useMemo)(()=>({phase:n,pick:o,add:d,error:a,clearError:u,reset:g}),[n,o,d,a,u,g])}(r),[u,m]=(0,s.useState)(null),{phase:p}=d,h="agent"in p?p.agent.metadata?.name||p.agent.metadata?.slug||"the agent":"";return(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:i,className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Add to an agent"}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:"The agent gets every tool these servers offer; it asks for a sign-in or a key the first time it needs one."})]}),(0,t.jsx)("ul",{className:(0,n.cn)(g.UNSTYLED_LIST,"stg:flex stg:flex-col stg:gap-1 stg:text-sm stg:text-foreground"),"aria-label":"Servers to add",children:r.map(e=>(0,t.jsxs)("li",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:font-medium",children:e.name}),e.name!==e.ref.slug&&(0,t.jsx)("span",{className:"stg:font-mono stg:text-xs stg:text-muted-foreground",children:e.ref.slug})]},`${e.ref.org}/${e.ref.slug}`))}),"added"===p.status?(0,t.jsx)("p",{role:"status",className:"stg:rounded-md stg:border stg:border-border stg:bg-muted stg:p-3 stg:text-sm stg:text-foreground",children:0===p.addedCount?`${h} already had every one of these servers.`:`Added ${1===p.addedCount?"1 server":`${p.addedCount} servers`} to ${h}.`}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.AgentPicker,{org:e,value:u,onChange:e=>{m(e),d.pick(e)},disabled:"reading"===p.status||"adding"===p.status}),"managed"===p.status&&(0,t.jsxs)("div",{role:"note",className:"stg:flex stg:items-start stg:gap-2 stg:rounded-md stg:border stg:border-border stg:bg-muted stg:px-3 stg:py-2 stg:text-sm stg:text-foreground",children:[(0,t.jsx)(j.PluginIcon,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0 stg:text-muted-foreground"}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"stg:font-medium",children:h})," was installed by a plugin, so its tools change by pushing that plugin again, not here. Pick another agent, or create a new one over these tools."]})]}),"ready"===p.status&&p.alreadyListed.length>0&&(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",children:[h," already lists ",p.alreadyListed.join(", "),"; only the rest are added."]}),d.error&&(0,t.jsx)(c.ErrorMessage,{error:d.error,title:"The agent could not be changed"})]}),(0,t.jsxs)("footer",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2 stg:pt-1",children:[(0,t.jsx)("span",{children:o&&"added"!==p.status&&(0,t.jsx)(v.Button,{variant:"ghost",size:"sm",onClick:()=>o(r.map(e=>({mcpServerRef:{org:e.ref.org,slug:e.ref.slug}}))),children:"Create a new agent with these tools"})}),(0,t.jsxs)("span",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(v.Button,{variant:"outline",size:"sm",onClick:a,children:"added"===p.status?"Close":"Cancel"}),"added"===p.status?l&&(0,t.jsx)(v.Button,{variant:"primary",size:"sm",onClick:()=>l({org:p.agent.metadata?.org??e,slug:p.agent.metadata?.slug??""}),children:"Open agent"}):(0,t.jsx)(v.Button,{variant:"primary",size:"sm",disabled:"ready"!==p.status,onClick:()=>{d.add().catch(()=>void 0)},children:"adding"===p.status?"Adding…":"Add"})]})]})]})}var E=e.i(266584),T=e.i(910304),D=e.i(583093);let $=[];var R=e.i(891287),P=e.i(44454);let I=[];function F(e){return{id:e.digest,timestamp:e.pushedAt?(0,i.timestampDate)(e.pushedAt):new Date(0),actor:e.pushedBy?{id:e.pushedBy.id,avatar:e.pushedBy.avatar||void 0,displayName:void 0}:void 0,label:e.digest.slice(0,12),sublabel:e.message||void 0,isCurrent:e.isCurrent,tag:e.tag||void 0}}let z={id:"overview",label:"Overview"},B={id:"versions",label:"Versions"};function _({org:e,slug:r,onResourceLoad:n,onStartSession:a,onSkillClick:d,onMcpServerClick:g,onAgentClick:h,onWorkflowClick:v,onCreateAgent:b,actions:y,additionalTabs:k,activeTab:w,onTabChange:C,defaultTab:S,className:A}){let L,{plugin:M,isLoading:E,error:U,refetch:K}=function(e,t){let s=(0,N.useStigmer)(),{data:r,isLoading:n,isRefetching:i,error:a,refetch:l}=(0,D.useFetch)(e&&t?async()=>{try{return await s.plugin.getByReference({org:e,slug:t})}catch(e){if((0,T.isNotFound)(e))return null;throw e}}:null,[e,t,s],null);return{plugin:r,isLoading:n,isRefetching:i,error:a,refetch:l}}(e,r),Y=function(e){let t=(0,N.useStigmer)(),{data:r,isLoading:n,error:i,refetch:a}=(0,D.useFetch)(e?async()=>(await t.plugin.listMembers(e)).members:null,[e,t],$),l=(0,s.useMemo)(()=>({skills:r.filter(e=>e.kind===o.ApiResourceKind.skill),mcpServers:r.filter(e=>e.kind===o.ApiResourceKind.mcp_server),agents:r.filter(e=>e.kind===o.ApiResourceKind.agent),workflows:r.filter(e=>e.kind===o.ApiResourceKind.workflow)}),[r]);return(0,s.useMemo)(()=>({members:r,byKind:l,isLoading:n,error:i,refetch:a}),[r,l,n,i,a])}(M?.metadata?.id??null),{versions:H,isEmpty:Z}=function(e,t){let r=(0,N.useStigmer)(),{data:n,isLoading:i,error:a,refetch:l}=(0,D.useFetch)(e&&t?async()=>(await r.plugin.listVersions((0,R.create)(P.ListPluginVersionsInputSchema,{org:e,slug:t}))).versions:null,[e,t,r],I),o=(0,s.useMemo)(()=>n.map(F),[n]),d=0===o.length;return(0,s.useMemo)(()=>({versions:o,isEmpty:d,isLoading:i,error:a,refetch:l}),[o,d,i,a,l])}(e,r),q=(0,s.useMemo)(()=>Z?[z]:[z,B],[Z]),{effectiveTabs:G,effectiveActiveTab:J,effectiveOnTabChange:X,activeAdditionalTab:Q}=(0,x.useDetailTabs)({builtInTabs:q,additionalTabs:k,activeTab:w,onTabChange:C,defaultTab:S}),ee=(0,s.useRef)(n);ee.current=n,(0,s.useEffect)(()=>{M?.metadata?.name&&ee.current?.({name:M.metadata.name,id:M.metadata.id})},[M]);let et=(0,u.useManageAccess)({resource:M?.metadata?{kind:o.ApiResourceKind.plugin,kindString:"plugin",id:M.metadata.id,org:M.metadata.org,name:M.metadata.name}:null,visibility:M?.metadata?{kind:"plugin",current:M.metadata.visibility,org:M.metadata.org,onChanged:K}:void 0}),es=Y.byKind.agents[0],er=(0,s.useMemo)(()=>a&&es?{id:"start-session",label:"Start session",onAction:()=>a({org:e,slug:es.slug})}:void 0,[a,es,e]);if(E)return(0,t.jsx)(W,{className:A});if(U)return(0,t.jsx)(c.ErrorMessage,{error:U,retry:K,className:A});if(!M)return(0,t.jsx)(V,{className:A});let en=M.metadata,ei=M.status,ea=ei?.audit?.specAudit,el={name:en?.name||en?.slug||"Untitled",id:en?.id||"",org:en?.org,slug:en?.slug,description:M.spec?.description||void 0,icon:(0,t.jsx)(j.PluginIcon,{className:"stg:size-6 stg:text-muted-foreground"}),createdAt:ea?.createdAt?(0,i.timestampDate)(ea.createdAt):null,updatedAt:ea?.updatedAt?(0,i.timestampDate)(ea.updatedAt):null,status:ei?function(e){switch(e){case l.PluginState.READY:return"ready";case l.PluginState.FAILED:return"failed";case l.PluginState.INSTALLING:return"pending";case l.PluginState.UNSPECIFIED:return;default:return e}}(ei.state):void 0,statusLabel:ei?function(e){switch(e){case l.PluginState.READY:return"Installed";case l.PluginState.FAILED:return"Failed";case l.PluginState.INSTALLING:return"Installing";case l.PluginState.UNSPECIFIED:return;default:return e}}(ei.state):void 0},eo=en?(0,t.jsx)(m.VisibilityBadge,{visibility:en.visibility,onClick:et.action?et.open:void 0}):void 0,ed=et.action?[...y??[],et.action]:y;return L=Q?Q.content:"versions"===J&&H.length>0?(0,t.jsx)(f.VersionTimeline,{entries:H}):(0,t.jsx)(O,{plugin:M,members:Y.members,membersError:Y.error,onSkillClick:d,onMcpServerClick:g,onAgentClick:h,onWorkflowClick:v,onCreateAgent:b}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.ResourceDetailShell,{header:el,visibilityControl:eo,primaryAction:er,actions:ed,tabs:G,activeTab:G?J:void 0,onTabChange:G?X:void 0,tabsAriaLabel:"Plugin detail sections",className:A,children:L}),et.dialog]})}function O({plugin:e,members:r,membersError:i,onSkillClick:a,onMcpServerClick:d,onAgentClick:u,onWorkflowClick:m,onCreateAgent:p}){let x=e.metadata?.org??"",f=e.spec,b=e.status,y=b?.warnings??[],j=r.some(e=>e.kind===o.ApiResourceKind.agent),k=(0,s.useMemo)(()=>r.filter(e=>e.kind===o.ApiResourceKind.mcp_server).map(e=>({ref:{org:x,slug:e.slug},name:e.name||e.slug})),[r,x]),[N,w]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-6",children:[void 0!==b&&b.state===l.PluginState.FAILED&&""!==b.error&&(0,t.jsx)(c.ErrorMessage,{error:Error(b.error),title:"The last install did not complete"}),(0,t.jsx)(h.Section,{title:"Installed",count:r.length,children:i?(0,t.jsx)("div",{className:"stg:p-3",children:(0,t.jsx)(c.ErrorMessage,{error:i})}):0===r.length?(0,t.jsx)("p",{className:"stg:px-3 stg:py-2.5 stg:text-sm stg:text-muted-foreground",children:"Nothing installed yet."}):(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:r.map(e=>(0,t.jsx)(K,{member:e,onClick:function(e,t){switch(e){case o.ApiResourceKind.skill:return t.onSkillClick;case o.ApiResourceKind.mcp_server:return t.onMcpServerClick;case o.ApiResourceKind.agent:return t.onAgentClick;case o.ApiResourceKind.workflow:return t.onWorkflowClick;default:return}}(e.kind,{onSkillClick:a,onMcpServerClick:d,onAgentClick:u,onWorkflowClick:m}),org:x,keysAskedAt:j?"agent":"connect"},`${e.kind}:${e.id}`))})}),!j&&k.length>0&&(0,t.jsxs)(h.Section,{title:"Use these tools",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-3 stg:px-3 stg:py-2.5",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"This plugin installed tools and no agent. Add them to an agent to use them in a session."}),(0,t.jsx)(v.Button,{variant:"primary",size:"sm",onClick:()=>w(!0),children:"Add to an agent"})]}),(0,t.jsx)(L,{org:x,servers:k,open:N,onClose:()=>w(!1),onAgentClick:u,onCreateAgent:p})]}),f&&(0,t.jsx)(U,{spec:f,status:b}),y.length>0&&(0,t.jsx)(h.Section,{title:"Install warnings",count:y.length,children:(0,t.jsx)("ul",{className:(0,n.cn)(g.UNSTYLED_LIST,"stg:flex stg:flex-col stg:divide-y stg:divide-border"),children:y.map((e,s)=>(0,t.jsxs)("li",{className:"stg:px-3 stg:py-2 stg:text-sm stg:text-foreground",children:[e.message,e.path&&(0,t.jsx)("span",{className:"stg:ml-2 stg:font-mono stg:text-xs stg:text-muted-foreground",children:e.path})]},`${e.kind}:${e.path}:${s}`))})})]})}function U({spec:e,status:s}){let r=[["Version",e.version],["Format",function(e){switch(e){case a.PluginDialect.AGENT_PLUGINS:return d.DIALECT_LABELS["agent-plugins"];case a.PluginDialect.CLAUDE:return d.DIALECT_LABELS.claude;case a.PluginDialect.CURSOR:return d.DIALECT_LABELS.cursor;case a.PluginDialect.CODEX:return d.DIALECT_LABELS.codex;case a.PluginDialect.UNSPECIFIED:return"";default:return String(e)}}(e.dialect)],["Author",[e.author?.name,e.author?.email&&`<${e.author.email}>`].filter(Boolean).join(" ")],["Homepage",e.homepage],["Repository",e.repository],["License",e.license],["Digest",s?.digest?s.digest.slice(0,12):""]].filter(([,e])=>""!==e);return 0===r.length?null:(0,t.jsx)(h.Section,{title:"Manifest",children:(0,t.jsx)("dl",{className:"stg:grid stg:grid-cols-[auto_1fr] stg:gap-x-6 stg:gap-y-1.5 stg:px-3 stg:py-2.5 stg:text-sm",children:r.map(([e,s])=>(0,t.jsxs)("div",{className:"stg:contents",children:[(0,t.jsx)("dt",{className:"stg:text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:(0,n.cn)("stg:min-w-0 stg:break-words stg:text-foreground","Digest"===e&&"stg:font-mono stg:text-xs"),children:s})]},e))})})}function K({member:e,org:s,onClick:r,keysAskedAt:i}){let a=(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3",children:[(0,t.jsx)("span",{className:"stg:w-24 stg:shrink-0 stg:text-xs stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:function(e){switch(e){case o.ApiResourceKind.skill:return"Skill";case o.ApiResourceKind.mcp_server:return"MCP server";case o.ApiResourceKind.agent:return"Agent";case o.ApiResourceKind.workflow:return"Workflow";default:return o.ApiResourceKind[e]??String(e)}}(e.kind)}),(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.name||e.slug}),e.name&&e.name!==e.slug&&(0,t.jsx)("span",{className:"stg:font-mono stg:text-xs stg:text-muted-foreground",children:e.slug})]}),l=r?(0,t.jsx)("button",{type:"button",onClick:()=>r({org:s,slug:e.slug}),className:(0,n.cn)("stg:min-w-0 stg:flex-1 stg:px-3 stg:py-2 stg:text-left 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"),children:a}):(0,t.jsx)("div",{className:"stg:min-w-0 stg:flex-1 stg:px-3 stg:py-2",children:a});return e.kind!==o.ApiResourceKind.mcp_server?l:(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3",children:[l,(0,t.jsx)(E.McpServerReadiness,{org:s,slug:e.slug,keysAskedAt:i,className:"stg:shrink-0 stg:pr-3"})]})}function W({className:e}){return(0,t.jsxs)("div",{className:(0,n.cn)("stg:flex stg:flex-col stg:gap-6",e),"aria-busy":"true","aria-label":"Loading plugin details",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:[(0,t.jsx)("div",{className:"stg:mt-1 stg:size-6 stg:shrink-0 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsxs)("div",{className:"stg:flex-1 stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-5 stg:w-48 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-3 stg:w-64 stg:animate-pulse stg:rounded stg:bg-muted"})]})]}),(0,t.jsx)("div",{className:"stg:h-24 stg:animate-pulse stg:rounded-lg stg:bg-muted"})]})}function V({className:e}){return(0,t.jsxs)("div",{role:"status",className:(0,n.cn)("stg:flex stg:flex-col stg:items-center stg:gap-2 stg:py-12 stg:text-center",e),children:[(0,t.jsx)(j.PluginIcon,{className:"stg:size-10 stg:text-muted-foreground-faint"}),(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-muted-foreground",children:"Plugin not installed"}),(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"No plugin with this name is installed in the organization."})]})}var Y=e.i(154752),H=e.i(966205),Z=e.i(582321),q=e.i(10337),G=e.i(310057),J=e.i(451241),X=e.i(107141),Q=e.i(336095);function ee({org:e,slug:n}){let i=(0,r.useRouter)(),{navigateToDetail:a}=(0,J.useLibraryNavigation)(),{setLabel:l}=(0,G.useBreadcrumbOverride)(),[o,d]=(0,s.useState)(null),[u,g]=(0,s.useState)("Plugin"),{copyId:c,copyQualifiedSlug:m}=(0,Y.useCopyResource)(),{confirmState:p,confirm:h,handleConfirm:x,handleCancel:f}=(0,H.useConfirmAction)(),{deleteResource:v,isDeleting:b}=(0,Z.useDeleteResource)("plugin",o,u);(0,s.useEffect)(()=>()=>l(null),[l]);let y=(0,s.useCallback)(({name:e,id:t})=>{l(e),d(t),g(e)},[l]),j=(0,s.useCallback)(async()=>{if(await h({title:`Remove ${u}?`,description:"Removes the plugin and every skill, MCP server and agent it installed. The server refuses if something outside the plugin still uses one of them.",confirmLabel:"Remove",variant:"destructive"}))try{await v(),i.push("/library/plugins")}catch{}},[h,v,i,u]),k=(0,s.useMemo)(()=>[{id:"copy-id",label:"Copy ID",group:"clipboard",onAction:()=>{o&&c(o)},disabled:!o},{id:"copy-slug",label:"Copy slug",group:"clipboard",onAction:()=>m(e,n)},{id:"remove",label:"Remove",variant:"destructive",group:"danger",onAction:j,disabled:b}],[o,c,m,e,n,j,b]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_,{org:e,slug:n,onResourceLoad:y,onStartSession:({org:e,slug:t})=>i.push((0,Q.getAgentSessionUrl)(e,t)),onSkillClick:({org:e,slug:t})=>a("skills",e,t),onMcpServerClick:({org:e,slug:t})=>a("mcp-servers",e,t),onAgentClick:({org:e,slug:t})=>a("agents",e,t),onWorkflowClick:({org:e,slug:t})=>a("workflows",e,t),onCreateAgent:e=>i.push(`/library/agents/new?mcp=${e.map(e=>encodeURIComponent(e.mcpServerRef.slug)).join(",")}`),actions:k}),(0,t.jsx)(q.ConfirmDialog,{state:p,onConfirm:x,onCancel:f})]})}e.s(["PluginDetailPage",0,function(){let e=(0,J.useRouteDetailYieldsToOverlay)(),s=(0,X.useStaticRouteParam)("org",2),r=(0,X.useStaticRouteParam)("slug");return!e&&s&&r?(0,t.jsx)(ee,{org:s,slug:r}):null},"PluginDetailPageInner",0,ee],76470)},949037,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(618566),n=e.i(918789),i=e.i(893976),a=e.i(17616),l=e.i(579342),o=e.i(170255),d=e.i(910304),u=e.i(586108),g=e.i(583093),c=e.i(869803),m=e.i(61855),p=e.i(469196),h=e.i(536907),x=e.i(326283),f=e.i(891287),v=e.i(217516);async function b(t,s){let r=await y(t,s),{unzipSync:n,strFromU8:i}=await e.A(180067),a=Object.entries(n(r)),l=a.map(([e,t])=>({path:e,size:t.length,isDirectory:0===t.length&&e.endsWith("/")})),o=new Map;for(let[e,t]of a)if(!e.endsWith("/"))try{o.set(e,i(t))}catch{o.set(e,"[Binary content]")}return{files:l,contentMap:o}}async function y(e,t){let s,r=(0,f.create)(v.GetArtifactRequestSchema,{artifactStorageKey:t});try{s=await e.skill.getArtifactDownloadUrl(r)}catch(t){if((0,d.isUnimplemented)(t))return(await e.skill.getArtifact(r)).artifact;throw t}try{let t=e.fetch??globalThis.fetch,r=await t(s.url);if(!r.ok)throw Error(`artifact download failed with HTTP ${r.status}`);return new Uint8Array(await r.arrayBuffer())}catch(t){return console.warn("[stigmer] skill artifact download URL fetch failed (bucket CORS not provisioned for this origin?) — falling back to the unary lane",t),(await e.skill.getArtifact(r)).artifact}}function j({artifactStorageKey:e,className:r}){let{files:n,isLoading:a,error:l,getFileContent:o}=function(e){let t=(0,u.useStigmer)(),[r,n]=(0,s.useState)(null),[i,a]=(0,s.useState)(new Map),[l,o]=(0,s.useState)(!1),[d,g]=(0,s.useState)(null),c=(0,s.useRef)(0),m=(0,s.useCallback)(async()=>{if(!e){n(null),a(new Map),g(null);return}let s=++c.current;o(!0),g(null);try{let r=await b(t,e);if(c.current!==s)return;a(r.contentMap),n(r.files)}catch(e){if(c.current!==s)return;g((0,x.toError)(e)),n(null),a(new Map)}finally{c.current===s&&o(!1)}},[e,t]);(0,s.useEffect)(()=>{m()},[m]);let p=(0,s.useCallback)(e=>i.get(e)??null,[i]),h=(0,s.useCallback)(()=>{m()},[m]);return(0,s.useMemo)(()=>({files:r,isLoading:l,error:d,getFileContent:p,refetch:h}),[r,l,d,p,h])}(e),[d,g]=(0,s.useState)(null),m=(0,s.useMemo)(()=>n?n.filter(e=>!e.isDirectory):[],[n]),f=(0,s.useMemo)(()=>(0,p.buildFileTree)(m),[m]),v=(0,s.useMemo)(()=>{if(m.some(e=>"SKILL.md"===e.path))return"SKILL.md";let e=[...m].sort((e,t)=>e.path.localeCompare(t.path));return e[0]?.path??null},[m]),y=d??v,N=null!==y?o(y):null;return e?a?(0,t.jsxs)("div",{className:(0,i.cn)("stg:rounded-lg stg:border stg:border-border",r),"aria-busy":"true","aria-label":"Loading skill package files",children:[(0,t.jsx)("div",{className:"stg:p-4",children:(0,t.jsx)("div",{className:"stg:h-3 stg:w-32 stg:animate-pulse stg:rounded stg:bg-muted"})}),(0,t.jsxs)("div",{className:"stg:grid stg:grid-cols-1 stg:md:grid-cols-[200px_1fr] stg:border-t stg:border-border",children:[(0,t.jsx)("div",{className:"stg:space-y-2 stg:p-3 stg:border-b stg:md:border-b-0 stg:md:border-r stg:border-border",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:"stg:h-4 stg:w-full stg:animate-pulse stg:rounded stg:bg-muted"},e))}),(0,t.jsx)("div",{className:"stg:p-4",children:(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-3/4 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-1/2 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-2/3 stg:animate-pulse stg:rounded stg:bg-muted"})]})})]})]}):l?(0,t.jsx)("div",{className:(0,i.cn)("stg:rounded-lg stg:border stg:border-border stg:p-4",r),children:(0,t.jsxs)("p",{className:"stg:text-sm stg:text-destructive",children:["Failed to load skill package: ",l.message]})}):n&&0!==n.length?(0,t.jsxs)("div",{className:(0,i.cn)("stg:rounded-lg stg:border stg:border-border stg:overflow-hidden",r),children:[(0,t.jsx)("div",{className:"stg:border-b stg:border-border stg:px-4 stg:py-2",children:(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:"Package Files"})}),(0,t.jsxs)("div",{className:"stg:grid stg:grid-cols-1 stg:md:grid-cols-[220px_1fr]",children:[(0,t.jsx)("nav",{className:"stg:border-b stg:border-border stg:md:border-b-0 stg:md:border-r stg:overflow-y-auto","aria-label":"Skill package file tree",children:(0,t.jsx)("ul",{className:(0,i.cn)(c.UNSTYLED_LIST,"stg:py-1"),role:"tree",children:f.map(e=>(0,t.jsx)(h.FileTreeNode,{node:e,selectedPath:y??"",onSelect:g,depth:0},e.path))})}),(0,t.jsx)("div",{className:"stg:min-h-[200px] stg:max-h-[400px] stg:overflow-y-auto stg:p-4",children:null!==y&&null!==N?(0,t.jsx)(k,{path:y,content:N}):(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground-subtle stg:italic",children:"Select a file to view its contents"})})]})]}):null:null}function k({path:e,content:s}){return e.endsWith(".md")?(0,t.jsx)(n.default,{remarkPlugins:m.REMARK_PLUGINS,components:m.MARKDOWN_COMPONENTS,children:(0,m.stripFrontmatter)(s)}):(0,t.jsx)("pre",{className:"stg:overflow-x-auto stg:font-mono stg:text-xs stg:leading-relaxed stg:text-foreground stg:whitespace-pre-wrap",children:s})}var N=e.i(476007),w=e.i(758960),C=e.i(484763),S=e.i(188482),A=e.i(668093),L=e.i(652337),M=e.i(267912),E=e.i(244990),T=e.i(261722),D=e.i(521557);function $(e){return{id:e.versionHash,timestamp:e.pushedAt?(0,a.timestampDate)(e.pushedAt):new Date(0),actor:e.pushedBy?{id:e.pushedBy.id,avatar:e.pushedBy.avatar||void 0,displayName:void 0}:void 0,label:e.versionHash.slice(0,12),sublabel:e.message||void 0,isCurrent:e.isCurrent,tag:e.tag||void 0,gitProvenance:e.gitProvenance?{remoteUrl:e.gitProvenance.remoteUrl,ref:e.gitProvenance.ref,commit:e.gitProvenance.commit}:void 0}}var R=e.i(784400),P=e.i(468806),I=e.i(321091);function F(e){if(0===e.length)return 0;let t=1;for(let s=0;s<e.length;s++)"\n"===e[s]&&t++;return t}function z(e,t){let s="SKILL.md"===e.path||"skill.md"===e.path,r="SKILL.md"===t.path||"skill.md"===t.path;if(s&&!r)return -1;if(!s&&r)return 1;let n={modified:0,added:1,removed:2},i=(n[e.changeType]??3)-(n[t.changeType]??3);return 0!==i?i:e.path.localeCompare(t.path)}function B(e){let t=0;for(let s of e.values())t+=2*s.length;return t}function _(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}var O=e.i(598529),U=e.i(488479),K=e.i(676951);function W({diff:e,initialSelectedPath:r,className:n}){let[a,l]=(0,s.useState)(r??e.files[0]?.path??null),o=(0,s.useCallback)(e=>{l(e)},[]),d=a?e.getDiff(a):[];return 0===e.files.length?(0,t.jsxs)("div",{role:"status",className:(0,i.cn)("stg:flex stg:flex-col stg:items-center stg:gap-2 stg:py-12 stg:text-center",n),children:[(0,t.jsx)(V,{className:"stg:size-8 stg:text-muted-foreground-faint"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"No differences found"}),(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground-subtle",children:"These two versions have identical content."})]}):(0,t.jsxs)("div",{className:(0,i.cn)("stg:flex stg:flex-col stg:gap-3",n),children:[(0,t.jsx)(K.DiffSummary,{fileCount:e.files.length,additions:e.totalAdditions,deletions:e.totalDeletions}),e.files.length>1&&(0,t.jsx)("div",{className:"stg:overflow-hidden stg:rounded-lg stg:border stg:border-border",children:(0,t.jsx)(U.DiffFileList,{files:e.files,selectedPath:a,onSelect:o})}),(0,t.jsx)(O.DiffViewer,{hunks:d,filePath:a??void 0})]})}function V({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 3v10M3 8h10"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7"})]})}function Y({state:e,onClose:r}){let n=(0,s.useCallback)(e=>{e||r()},[r]),{diff:a,isLoading:l,error:o}=function(e,t){let r=(0,u.useStigmer)(),[n,i]=(0,s.useState)(null),[a,l]=(0,s.useState)(!1),[o,d]=(0,s.useState)(null),g=(0,s.useRef)(0),c=(0,s.useCallback)(async()=>{if(!e||!t){i(null),d(null);return}let s=++g.current;l(!0),d(null);try{let[n,a]=await Promise.all([b(r,e),b(r,t)]);if(g.current!==s)return;let l=B(n.contentMap)+B(a.contentMap);if(l>0xa00000)throw Error(`Combined artifact size (${_(l)}) exceeds the ${_(0xa00000)} limit. Try comparing smaller skill packages.`);let o=function(e,t){let s=new Map,r=[],n=0,i=0;for(let a of new Set([...e.keys(),...t.keys()])){let l=e.get(a),o=t.get(a);if(void 0===l&&void 0!==o){let e=F(o);r.push({path:a,changeType:"added",additions:e,deletions:0}),n+=e;let t=(0,I.computeDiff)("",o);s.set(a,t)}else if(void 0!==l&&void 0===o){let e=F(l);r.push({path:a,changeType:"removed",additions:0,deletions:e}),i+=e;let t=(0,I.computeDiff)(l,"");s.set(a,t)}else if(void 0!==l&&void 0!==o&&l!==o){let e=(0,I.computeDiff)(l,o),t=e.reduce((e,t)=>e+t.lines.filter(e=>"added"===e.type).length,0),d=e.reduce((e,t)=>e+t.lines.filter(e=>"removed"===e.type).length,0);r.push({path:a,changeType:"modified",additions:t,deletions:d}),n+=t,i+=d,s.set(a,e)}}return r.sort(z),{files:r,totalAdditions:n,totalDeletions:i,getDiff:e=>s.get(e)??[]}}(n.contentMap,a.contentMap);if(g.current!==s)return;i(o)}catch(e){if(g.current!==s)return;d((0,x.toError)(e)),i(null)}finally{g.current===s&&l(!1)}},[e,t,r]);return(0,s.useEffect)(()=>{c()},[c]),(0,s.useMemo)(()=>({diff:n,isLoading:a,error:o}),[n,a,o])}(e?.fromArtifactKey??null,e?.toArtifactKey??null);return e?(0,t.jsx)(P.DialogShell,{open:!0,onOpenChange:n,width:"4xl",dismissOnBackdrop:!0,className:"stg:h-[85vh]","aria-label":"Skill version diff",children:(0,t.jsxs)("div",{className:"stg:flex stg:h-full stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:justify-between stg:border-b stg:border-border stg:px-4 stg:py-3",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-sm",children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:"Comparing"}),(0,t.jsx)("code",{className:"stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-[11px] stg:text-muted-foreground",children:e.fromLabel}),(0,t.jsx)(Z,{className:"stg:size-3.5 stg:text-muted-foreground-faint"}),(0,t.jsx)("code",{className:"stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-[11px] stg:text-muted-foreground",children:e.toLabel})]}),(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":"Close diff viewer",className:(0,i.cn)("stg:rounded-md stg:p-1.5 stg:text-muted-foreground stg:transition-colors","stg:hover:bg-accent-hover stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:(0,t.jsx)(q,{className:"stg:size-4"})})]}),(0,t.jsx)("div",{className:"stg:flex-1 stg:overflow-auto stg:p-4",children:l?(0,t.jsx)(H,{}):o?(0,t.jsx)(N.ErrorMessage,{error:o}):a?(0,t.jsx)(W,{diff:a}):null})]})}):null}function H(){return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4","aria-busy":"true","aria-label":"Loading diff",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-36 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-20 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-20 stg:animate-pulse stg:rounded stg:bg-muted"})]}),(0,t.jsx)("div",{className:"stg:h-6 stg:w-full stg:animate-pulse stg:rounded stg:bg-muted"}),[1,2,3,4,5,6].map(e=>(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:h-4 stg:w-10 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-10 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:flex-1 stg:animate-pulse stg:rounded stg:bg-muted"})]},e))]})}function Z({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 8h10M9 4l4 4-4 4"})})}function q({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}var G=e.i(292420),J=e.i(473489);let X={id:"content",label:"Content"},Q={id:"versions",label:"Versions"};function ee({org:e,slug:r,version:n,onResourceLoad:i,primaryAction:c,actions:m,additionalTabs:p,activeTab:h,onTabChange:x,defaultTab:b,onVersionSelect:y,onPluginClick:j,editable:k=!1,onResourceUpdated:S,className:L}){let E,{skill:T,isLoading:P,error:I,refetch:F}=function(e,t,s){let r=(0,u.useStigmer)(),{data:n,isLoading:i,isRefetching:a,error:l,refetch:o}=(0,g.useFetch)(e&&t?async()=>{try{return await r.skill.getByReference({org:e,slug:t,version:s})}catch(e){if((0,d.isNotFound)(e))return null;throw e}}:null,[e,t,s,r],null);return{skill:n,isLoading:i,isRefetching:a,error:l,refetch:o}}(e,r,n),z=(0,J.useManagingPlugin)(T?.metadata?.labels),B=k&&null===z.plugin,{versions:_,isEmpty:O,getArtifactKey:U}=function(e,t){let r=(0,u.useStigmer)(),{data:n,isLoading:i,error:a,refetch:l}=(0,g.useFetch)(e&&t?async()=>{try{let s=(0,f.create)(v.ListSkillVersionsInputSchema,{org:e,slug:t});return(await r.skill.listVersions(s)).versions}catch(e){if((0,D.isUnimplemented)(e))return[];throw e}}:null,[e,t,r],[]),o=(0,s.useMemo)(()=>n.map($),[n]),d=(0,s.useMemo)(()=>{let e=new Map;for(let t of n)t.versionHash&&t.artifactStorageKey&&e.set(t.versionHash,t.artifactStorageKey);return e},[n]),c=(0,s.useCallback)(e=>d.get(e)??null,[d]),m=0===o.length;return(0,s.useMemo)(()=>({versions:o,isEmpty:m,isLoading:i,error:a,refetch:l,getArtifactKey:c}),[o,m,i,a,l,c])}(e,r),[K,W]=(0,s.useState)(null),V=(0,s.useMemo)(()=>O?[X]:[X,Q],[O]),{effectiveTabs:H,effectiveActiveTab:Z,effectiveOnTabChange:q,activeAdditionalTab:es}=(0,M.useDetailTabs)({builtInTabs:V,additionalTabs:p,activeTab:h,onTabChange:x,defaultTab:b}),er=(0,s.useCallback)(e=>y?.(e),[y]),en=(0,s.useCallback)((e,t)=>{let s=U(e),r=U(t);s&&r&&W({fromArtifactKey:s,toArtifactKey:r,fromLabel:e.slice(0,12),toLabel:t.slice(0,12)})},[U]),ei=(0,s.useCallback)(()=>W(null),[]),ea=(0,s.useRef)(i);ea.current=i,(0,s.useEffect)(()=>{T?.metadata?.name&&ea.current?.({name:T.metadata.name,id:T.metadata.id})},[T]);let eu=(0,C.useManageAccess)({resource:T?.metadata?{kind:o.ApiResourceKind.skill,kindString:"skill",id:T.metadata.id,org:T.metadata.org,name:T.metadata.name}:null,visibility:T?.metadata?{kind:"skill",current:T.metadata.visibility,org:T.metadata.org,onChanged:F}:void 0});if(P)return(0,t.jsx)(el,{className:L});if(I)return(0,t.jsx)(N.ErrorMessage,{error:I,retry:F,className:L});if(!T)return(0,t.jsx)(eo,{className:L});let eg=T.metadata,ec=T.spec,em=T.status,ep=em?.audit?.specAudit,eh={name:eg?.name||eg?.slug||"Untitled",id:eg?.id||"",org:eg?.org,slug:eg?.slug,description:void 0,icon:(0,t.jsx)(ed,{className:"stg:size-6 stg:text-muted-foreground"}),createdAt:ep?.createdAt?(0,a.timestampDate)(ep.createdAt):null,updatedAt:ep?.updatedAt?(0,a.timestampDate)(ep.updatedAt):null,status:em?function(e){switch(e){case l.SkillState.READY:return"ready";case l.SkillState.FAILED:return"failed";case l.SkillState.UPLOADING:return"pending";default:return}}(em.state):void 0,statusLabel:em?function(e){switch(e){case l.SkillState.READY:return"Ready";case l.SkillState.FAILED:return"Failed";case l.SkillState.UPLOADING:return"Uploading";default:return}}(em.state):void 0},ex=eg?(0,t.jsx)(w.VisibilityBadge,{visibility:eg.visibility,onClick:eu.action?eu.open:void 0}):void 0,ef=eu.action?[...m??[],eu.action]:m;return E=es?es.content:"versions"===Z&&_.length>0?(0,t.jsx)(R.VersionTimeline,{entries:_,onEntrySelect:er,onCompare:en}):(0,t.jsx)(et,{spec:ec,status:em,editable:B}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.ResourceDetailShell,{header:eh,visibilityControl:ex,headerBanner:(0,t.jsx)(G.ManagedByPluginNotice,{plugin:z.plugin,onPluginClick:j}),primaryAction:c,actions:ef,tabs:H,activeTab:H?Z:void 0,onTabChange:H?q:void 0,tabsAriaLabel:"Skill detail sections",className:L,children:E}),eu.dialog,(0,t.jsx)(Y,{state:K,onClose:ei})]})}function et({spec:e,status:s,editable:r}){return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-6",children:[(r||e?.description)&&(0,t.jsx)(L.Section,{title:"Description",children:r?(0,t.jsx)("div",{className:"stg:max-h-20 stg:overflow-y-auto stg:p-3",children:(0,t.jsx)(T.InlineEditTextarea,{value:e?.description||"",onSave:async()=>!1,isSaving:!1,placeholder:"Add a description",minRows:2,disabled:!0})}):(0,t.jsx)("div",{className:"stg:p-3",children:(0,t.jsx)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:text-sm stg:text-foreground stg:font-sans",children:e?.description})})}),(r||e?.tag)&&(0,t.jsx)(L.Section,{title:"Tag",children:r?(0,t.jsx)("div",{className:"stg:p-3",children:(0,t.jsx)(E.InlineEditText,{value:e?.tag||"",onSave:async()=>!1,isSaving:!1,placeholder:"Add a tag (e.g. stable, latest)",disabled:!0})}):(0,t.jsx)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-3 stg:py-2.5",children:(0,t.jsx)("span",{className:"stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-xs stg:font-medium stg:text-foreground",children:e?.tag})})}),s?.artifactStorageKey?(0,t.jsx)(j,{artifactStorageKey:s.artifactStorageKey}):e?.skillMd?(0,t.jsx)(es,{content:e.skillMd}):null,s&&(s.versionHash||s.gitProvenance)&&(0,t.jsx)(en,{versionHash:s.versionHash,gitProvenance:s.gitProvenance})]})}function es({content:e}){let[r,i]=(0,s.useState)("rendered");return(0,t.jsx)(ea,{title:"Skill Content",trailing:(0,t.jsx)(er,{value:r,onChange:i}),children:"rendered"===r?(0,t.jsx)("div",{className:"stg:p-4",children:(0,t.jsx)(n.default,{remarkPlugins:m.REMARK_PLUGINS,components:m.MARKDOWN_COMPONENTS,children:(0,m.stripFrontmatter)(e)})}):(0,t.jsx)("pre",{className:"stg:overflow-x-auto stg:p-4 stg:font-mono stg:text-sm stg:leading-relaxed stg:text-foreground",children:e})})}function er({value:e,onChange:s}){return(0,t.jsxs)("div",{role:"radiogroup","aria-label":"Content view mode",className:"stg:inline-flex stg:rounded-md stg:border stg:border-input stg:text-[11px]",children:[(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":"rendered"===e,onClick:()=>s("rendered"),className:(0,i.cn)("stg:rounded-l-md stg:px-2 stg:py-0.5 stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","rendered"===e?"stg:bg-muted stg:text-foreground":"stg:text-muted-foreground stg:hover:text-foreground"),children:"Preview"}),(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":"source"===e,onClick:()=>s("source"),className:(0,i.cn)("stg:rounded-r-md stg:border-l stg:border-input stg:px-2 stg:py-0.5 stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","source"===e?"stg:bg-muted stg:text-foreground":"stg:text-muted-foreground stg:hover:text-foreground"),children:"Source"})]})}function en({versionHash:e,gitProvenance:s}){let r=e?e.slice(0,12):null;return(0,t.jsx)(L.Section,{title:"Version",children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-3 stg:p-3",children:[r&&(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Hash"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{render:(0,t.jsx)("code",{className:"stg:font-mono stg:text-xs stg:text-foreground"}),children:r}),(0,t.jsx)(S.TooltipContent,{side:"top",className:"stg:break-all",children:e})]})]}),s&&(0,t.jsx)(ei,{provenance:s})]})})}function ei({provenance:e}){let s=function(e){if(!e)return null;let t=e.replace(/\.git$/,"");if(t.startsWith("https://")||t.startsWith("http://"))return t;let s=t.match(/^(?:git@|ssh:\/\/)([^:/]+)[:/](.+)$/);return s?`https://${s[1]}/${s[2]}`:null}(e.remoteUrl),r=e.commit?e.commit.slice(0,7):null;return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Git"}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:items-baseline stg:gap-x-1.5 stg:text-xs stg:text-foreground",children:[s?(0,t.jsx)("a",{href:s,className:"stg:text-primary stg:underline stg:underline-offset-2 stg:hover:text-primary-muted",target:"_blank",rel:"noopener noreferrer",children:function(e){try{return new URL(e).pathname.replace(/^\//,"").replace(/\.git$/,"")}catch{return e}}(s)}):(0,t.jsx)("span",{className:"stg:font-mono",children:e.remoteUrl}),e.ref&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:"@"}),(0,t.jsx)("span",{children:e.ref})]}),r&&(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{render:(0,t.jsx)("code",{className:"stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:font-mono stg:text-[10px]"}),children:r}),(0,t.jsx)(S.TooltipContent,{side:"top",className:"stg:break-all",children:e.commit})]})]})]}),e.subdir&&(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Path"}),(0,t.jsx)("code",{className:"stg:font-mono stg:text-xs stg:text-foreground",children:e.subdir})]})]})}function ea({title:e,trailing:s,children:r}){return(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"stg:mb-2 stg:flex stg:items-center stg:justify-between",children:[(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:e}),s]}),(0,t.jsx)("div",{className:"stg:overflow-hidden stg:rounded-lg stg:border stg:border-border",children:r})]})}function el({className:e}){return(0,t.jsxs)("div",{className:(0,i.cn)("stg:flex stg:flex-col stg:gap-6",e),"aria-busy":"true","aria-label":"Loading skill details",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:[(0,t.jsx)("div",{className:"stg:mt-1 stg:size-6 stg:shrink-0 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsxs)("div",{className:"stg:flex-1 stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-5 stg:w-48 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-3 stg:w-64 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-full stg:max-w-md stg:animate-pulse stg:rounded stg:bg-muted"})]})]}),(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-3 stg:w-28 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:animate-pulse stg:rounded-lg stg:border stg:border-border stg:bg-muted-faint",style:{height:"240px"}})]}),(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-3 stg:w-20 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:animate-pulse stg:rounded-lg stg:border stg:border-border stg:bg-muted-faint",style:{height:"64px"}})]})]})}function eo({className:e}){return(0,t.jsxs)("div",{role:"status",className:(0,i.cn)("stg:flex stg:flex-col stg:items-center stg:gap-2 stg:py-12 stg:text-center",e),children:[(0,t.jsx)(ed,{className:"stg:size-10 stg:text-muted-foreground-faint"}),(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-muted-foreground",children:"Skill not found"}),(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground-subtle",children:"This skill doesn't exist or you don't have access to it."})]})}function ed({className:e}){return(0,t.jsx)("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:"M9 1.5 4 9h4l-1 5.5L12 7H8l1-5.5Z"})})}var eu=e.i(154752),eg=e.i(966205),ec=e.i(582321),em=e.i(10337),ep=e.i(310057),eh=e.i(451241),ex=e.i(107141);function ef({org:e,slug:n}){let i=(0,r.useRouter)(),{navigateToDetail:a}=(0,eh.useLibraryNavigation)(),{setLabel:l}=(0,ep.useBreadcrumbOverride)(),[o,d]=(0,s.useState)(null),[u,g]=(0,s.useState)("Skill"),{copyId:c,copyQualifiedSlug:m}=(0,eu.useCopyResource)(),{confirmState:p,confirm:h,handleConfirm:x,handleCancel:f}=(0,eg.useConfirmAction)(),{deleteResource:v,isDeleting:b}=(0,ec.useDeleteResource)("skill",o,u);(0,s.useEffect)(()=>()=>l(null),[l]);let y=(0,s.useCallback)(({name:e,id:t})=>{l(e),d(t),g(e)},[l]),j=(0,s.useCallback)(async()=>{if(await h({title:`Delete ${u}?`,description:"This action cannot be undone. The skill and its content will be permanently removed.",confirmLabel:"Delete",variant:"destructive"}))try{await v(),i.push("/library/skills")}catch{}},[h,v,i,u]),k=(0,s.useMemo)(()=>[{id:"copy-id",label:"Copy ID",group:"clipboard",onAction:()=>{o&&c(o)},disabled:!o},{id:"copy-slug",label:"Copy slug",group:"clipboard",onAction:()=>m(e,n)},{id:"delete",label:"Delete",variant:"destructive",group:"danger",onAction:j,disabled:b}],[o,c,m,e,n,j,b]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ee,{org:e,slug:n,editable:!0,onResourceLoad:y,onPluginClick:({org:e,slug:t})=>a("plugins",e,t),actions:k}),(0,t.jsx)(em.ConfirmDialog,{state:p,onConfirm:x,onCancel:f})]})}e.s(["SkillDetailPage",0,function(){let e=(0,eh.useRouteDetailYieldsToOverlay)(),s=(0,ex.useStaticRouteParam)("org",2),r=(0,ex.useStaticRouteParam)("slug");return!e&&s&&r?(0,t.jsx)(ef,{org:s,slug:r}):null},"SkillDetailPageInner",0,ef],949037)},175730,e=>{"use strict";var t=e.i(843476),s=e.i(893976),r=e.i(451241),n=e.i(789198),i=e.i(522016),a=e.i(310057);let l={agents:"Agents",skills:"Skills","mcp-servers":"MCP Servers",workflows:"Workflows",schedules:"Schedules"};function o(){let{currentLibraryPath:e}=(0,r.useLibraryNavigation)(),s=(0,a.useBreadcrumbLabel)(),n=e.replace(/^\/library\/?/,"").split("/").filter(Boolean);return 0===n.length?null:(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"mb-6",children:(0,t.jsxs)("ol",{className:"flex items-center gap-1.5 text-sm",children:[(0,t.jsx)("li",{children:(0,t.jsx)(i.default,{href:"/library",className:"text-muted-foreground transition-colors hover:text-foreground",children:"Library"})}),n.map((e,r)=>{let a=r===n.length-1,o=e in l;if(!a&&!o)return null;let d=a&&!o&&s?s:l[e]??e;return(0,t.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground-subtle","aria-hidden":"true",children:"/"}),a?(0,t.jsx)("span",{className:"text-foreground font-medium","aria-current":"page",children:d}):(0,t.jsx)(i.default,{href:`/library/${n.slice(0,r+1).join("/")}`,className:"text-muted-foreground transition-colors hover:text-foreground",children:d})]},e)})]})})}var d=e.i(63353),u=e.i(949037),g=e.i(697720),c=e.i(284416),m=e.i(470370),p=e.i(76470);function h({children:e}){let{activeDetail:i}=(0,r.useLibraryNavigation)(),{isFullViewport:a}=(0,n.useFullViewportLayout)(),l=null!=i;return(0,t.jsxs)("div",{className:(0,s.cn)(a?"flex h-full flex-col":"mx-auto max-w-4xl px-6 py-8"),children:[!a&&(0,t.jsx)(o,{}),(0,t.jsx)("div",{"data-slot":"library-route-children",className:(0,s.cn)(l&&"hidden",a&&"flex min-h-0 flex-1 flex-col"),"aria-hidden":l,children:e}),null!=i&&(0,t.jsx)(x,{detail:i},`${i.resourceType}/${i.org}/${i.slug}`)]})}function x({detail:e}){switch(e.resourceType){case"agents":return(0,t.jsx)(d.AgentDetailPageInner,{org:e.org,slug:e.slug});case"skills":return(0,t.jsx)(u.SkillDetailPageInner,{org:e.org,slug:e.slug});case"mcp-servers":return(0,t.jsx)(g.McpServerDetailPageInner,{org:e.org,slug:e.slug});case"workflows":return(0,t.jsx)(c.WorkflowDetailPageInner,{org:e.org,slug:e.slug});case"schedules":return(0,t.jsx)(m.ScheduleDetailPageInner,{org:e.org,slug:e.slug});case"plugins":return(0,t.jsx)(p.PluginDetailPageInner,{org:e.org,slug:e.slug})}}e.s(["default",0,function({children:e}){return(0,t.jsx)(r.LibraryNavigationProvider,{children:(0,t.jsx)(a.LibraryBreadcrumbProvider,{children:(0,t.jsx)(n.FullViewportLayoutProvider,{children:(0,t.jsx)(h,{children:e})})})})}],175730)},573374,e=>{e.v(e=>Promise.resolve().then(()=>e(573732)))},180067,e=>{e.v(t=>Promise.all(["static/chunks/13iawjpezwug2.js"].map(t=>e.l(t))).then(()=>t(229969)))},508951,e=>{e.v(t=>Promise.all(["static/chunks/0uz5-~rqk9vr..js"].map(t=>e.l(t))).then(()=>t(393676)))},846022,e=>{e.v(t=>Promise.all(["static/chunks/10ymqudg~95gr.js"].map(t=>e.l(t))).then(()=>t(618006)))},600124,e=>{e.v(t=>Promise.all(["static/chunks/0tj3k0t29gpn7.js"].map(t=>e.l(t))).then(()=>t(531849)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,988646,e=>{"use strict";var a=e.i(424407),i=e.i(14156);let l=(0,a.fileDesc)("Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIHCgVFbXB0eUJ9ChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3RvUAFaLmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2VtcHR5cGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw"),t=(0,i.messageDesc)(l,0);e.s(["EmptySchema",0,t,"file_google_protobuf_empty",0,l])},785767,e=>{"use strict";var a,i,l=e.i(910304),t=e.i(292558),c=e.i(891287),d=e.i(988646),n=e.i(338300),r=e.i(459153),b=e.i(421415),o=e.i(424407),m=e.i(304532),s=e.i(988158);e.i(113024);let u=(0,o.fileDesc)("Ci1haS9zdGlnbWVyL3RlbmFuY3kvb3JnYW5pemF0aW9uL3YxL2VudW0ucHJvdG8SImFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEqWQoOTWFuYWdlbWVudE1vZGUSHwobbWFuYWdlbWVudF9tb2RlX3Vuc3BlY2lmaWVkEAASEAoMc2VsZl9tYW5hZ2VkEAESFAoQcGxhdGZvcm1fbWFuYWdlZBACYgZwcm90bzM");(a=i||(i={}))[a.management_mode_unspecified=0]="management_mode_unspecified",a[a.self_managed=1]="self_managed",a[a.platform_managed=2]="platform_managed";var W=e.i(761867);let p=(0,o.fileDesc)("Ci1haS9zdGlnbWVyL3RlbmFuY3kvb3JnYW5pemF0aW9uL3YxL3NwZWMucHJvdG8SImFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEi7wIKEE9yZ2FuaXphdGlvblNwZWMSHQoLZGVzY3JpcHRpb24YASABKAlCCLpIBXIDGPQDEhoKCGxvZ29fdXJsGAIgASgJQgi6SAVyAxiAEBJLCg9tYW5hZ2VtZW50X21vZGUYAyABKA4yMi5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk1hbmFnZW1lbnRNb2RlElMKFWlkZW50aXR5X3Byb3ZpZGVyX3JlZhgEIAEoCzI0LmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5BcGlSZXNvdXJjZVJlZmVyZW5jZRIXCg9leHRlcm5hbF9vcmdfaWQYBSABKAkSEwoLaXNfcGVyc29uYWwYBiABKAgSUAoLcHJlZmVyZW5jZXMYByABKAsyOy5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvblByZWZlcmVuY2VzIlUKF09yZ2FuaXphdGlvblByZWZlcmVuY2VzEiIKEHN0YW5kaW5nX2NvbnRleHQYASABKAlCCLpIBXIDGNAPEhYKDm1lbW9yeV9lbmFibGVkGAIgASgIYgZwcm90bzM",[r.file_ai_stigmer_commons_apiresource_io,u,W.file_buf_validate_validate]),g=(0,m.messageDesc)(p,0),Z=(0,m.messageDesc)(p,1),A=(0,o.fileDesc)("CixhaS9zdGlnbWVyL3RlbmFuY3kvb3JnYW5pemF0aW9uL3YxL2FwaS5wcm90bxIiYWkuc3RpZ21lci50ZW5hbmN5Lm9yZ2FuaXphdGlvbi52MSK/AgoMT3JnYW5pemF0aW9uEjEKC2FwaV92ZXJzaW9uGAEgASgJQhy6SBlyFwoVdGVuYW5jeS5zdGlnbWVyLmFpL3YxEiEKBGtpbmQYAiABKAlCE7pIEHIOCgxPcmdhbml6YXRpb24STQoIbWV0YWRhdGEYAyABKAsyMy5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VNZXRhZGF0YUIGukgDyAEBEkIKBHNwZWMYBCABKAsyNC5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvblNwZWMSRgoGc3RhdHVzGAUgASgLMjYuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlQXVkaXRTdGF0dXNiBnByb3RvMw",[b.file_ai_stigmer_commons_apiresource_metadata,s.file_ai_stigmer_commons_apiresource_status,p,W.file_buf_validate_validate]),G=(0,m.messageDesc)(A,0);var h=e.i(499328),Y=e.i(819200),y=e.i(693569);let V=(0,o.fileDesc)("CithaS9zdGlnbWVyL3RlbmFuY3kvb3JnYW5pemF0aW9uL3YxL2lvLnByb3RvEiJhaS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxIlIKDU9yZ2FuaXphdGlvbnMSQQoHZW50cmllcxgBIAMoCzIwLmFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEuT3JnYW5pemF0aW9uImoKEE9yZ2FuaXphdGlvbkxpc3QSEwoLdG90YWxfcGFnZXMYASABKAUSQQoHZW50cmllcxgCIAMoCzIwLmFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEuT3JnYW5pemF0aW9uIioKDk9yZ2FuaXphdGlvbklkEhgKBXZhbHVlGAEgASgJQgm6SAZyBBABGEAimwEKGk9yZ2FuaXphdGlvbkV4dGVybmFsTG9va3VwElsKFWlkZW50aXR5X3Byb3ZpZGVyX3JlZhgBIAEoCzI0LmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5BcGlSZXNvdXJjZVJlZmVyZW5jZUIGukgDyAEBEiAKD2V4dGVybmFsX29yZ19pZBgCIAEoCUIHukgEcgIQAWIGcHJvdG8z",[r.file_ai_stigmer_commons_apiresource_io,A,W.file_buf_validate_validate]),v=(0,m.messageDesc)(V,2),R=(0,o.fileDesc)("CjBhaS9zdGlnbWVyL3RlbmFuY3kvb3JnYW5pemF0aW9uL3YxL2NvbW1hbmQucHJvdG8SImFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEy2AQKHU9yZ2FuaXphdGlvbkNvbW1hbmRDb250cm9sbGVyEmsKBWFwcGx5EjAuYWkuc3RpZ21lci50ZW5hbmN5Lm9yZ2FuaXphdGlvbi52MS5Pcmdhbml6YXRpb24aMC5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvbhJyCgZjcmVhdGUSMC5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvbhowLmFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEuT3JnYW5pemF0aW9uIgTQuBgBEqgBCgZ1cGRhdGUSMC5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvbhowLmFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEuT3JnYW5pemF0aW9uIjrCuBg2CAIQHiILbWV0YWRhdGEuaWQqI3VuYXV0aG9yaXplZCB0byB1cGRhdGUgb3JnYW5pemF0aW9uEqQBCgZkZWxldGUSMi5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvbklkGjAuYWkuc3RpZ21lci50ZW5hbmN5Lm9yZ2FuaXphdGlvbi52MS5Pcmdhbml6YXRpb24iNMK4GDAIAxAeIgV2YWx1ZSojdW5hdXRob3JpemVkIHRvIGRlbGV0ZSBvcmdhbml6YXRpb24aBKD/Kx5iBnByb3RvMw",[Y.file_ai_stigmer_commons_apiresource_rpc_service_options,y.file_ai_stigmer_commons_rpc_method_options,A,V]),S=(0,h.serviceDesc)(R,0),I=(0,o.fileDesc)("Ci5haS9zdGlnbWVyL3RlbmFuY3kvb3JnYW5pemF0aW9uL3YxL3F1ZXJ5LnByb3RvEiJhaS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxMrkEChtPcmdhbml6YXRpb25RdWVyeUNvbnRyb2xsZXISnwEKA2dldBIyLmFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEuT3JnYW5pemF0aW9uSWQaMC5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvbiIywrgYLggBEB4iBXZhbHVlKiF1bmF1dGhvcml6ZWQgdG8gdmlldyBvcmdhbml6YXRpb24SewoEZmluZBI3LmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5GaW5kQXBpUmVzb3VyY2VzUmVxdWVzdBo0LmFpLnN0aWdtZXIudGVuYW5jeS5vcmdhbml6YXRpb24udjEuT3JnYW5pemF0aW9uTGlzdCIE0LgYARJmChNmaW5kTXlPcmdhbml6YXRpb25zEhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GjEuYWkuc3RpZ21lci50ZW5hbmN5Lm9yZ2FuaXphdGlvbi52MS5Pcmdhbml6YXRpb25zIgTQuBgBEowBChJnZXRCeUV4dGVybmFsT3JnSWQSPi5haS5zdGlnbWVyLnRlbmFuY3kub3JnYW5pemF0aW9uLnYxLk9yZ2FuaXphdGlvbkV4dGVybmFsTG9va3VwGjAuYWkuc3RpZ21lci50ZW5hbmN5Lm9yZ2FuaXphdGlvbi52MS5Pcmdhbml6YXRpb24iBNC4GAEaBKD/Kx5iBnByb3RvMw",[r.file_ai_stigmer_commons_apiresource_io,Y.file_ai_stigmer_commons_apiresource_rpc_service_options,y.file_ai_stigmer_commons_rpc_method_options,A,V,d.file_google_protobuf_empty]),B=(0,h.serviceDesc)(I,0);function X(e){var a;let i=e.identityProviderRef?.slug||e.identityProviderRef?.org?(0,c.create)(r.ApiResourceReferenceSchema,e.identityProviderRef):void 0,l=e.preferences?(a=e.preferences,Object.assign((0,c.create)(Z),(0,t.stripUndefined)({standingContext:a.standingContext,memoryEnabled:a.memoryEnabled}))):void 0;return Object.assign((0,c.create)(G),{apiVersion:"tenancy.stigmer.ai/v1",kind:"Organization",metadata:Object.assign((0,c.create)(b.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:Object.assign((0,c.create)(g),(0,t.stripUndefined)({description:e.description,logoUrl:e.logoUrl,managementMode:e.managementMode,identityProviderRef:i,externalOrgId:e.externalOrgId,isPersonal:e.isPersonal,preferences:l}))})}e.s(["OrganizationClient",0,class{command;query;constructor(e){this.command=(0,n.createClient)(S,e),this.query=(0,n.createClient)(B,e)}async apply(e){try{return await this.command.apply(X(e))}catch(e){throw(0,l.wrapError)(e)}}async create(e){try{return await this.command.create(X(e))}catch(e){throw(0,l.wrapError)(e)}}async update(e){try{return await this.command.update(X(e))}catch(e){throw(0,l.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,c.create)(v,{value:e}))}catch(e){throw(0,l.wrapError)(e)}}async get(e){try{return await this.query.get((0,c.create)(v,{value:e}))}catch(e){throw(0,l.wrapError)(e)}}async find(e){try{return await this.query.find(e)}catch(e){throw(0,l.wrapError)(e)}}async findMyOrganizations(){try{return await this.query.findMyOrganizations((0,c.create)(d.EmptySchema,{}))}catch(e){throw(0,l.wrapError)(e)}}async getByExternalOrgId(e){try{return await this.query.getByExternalOrgId(e)}catch(e){throw(0,l.wrapError)(e)}}},"toOrganizationUpdateInput",0,function(e){var a;let i=e.metadata,l=e.spec??(0,c.create)(g);return{id:i?.id||void 0,name:i?.name??"",slug:i?.slug||void 0,org:i?.org||i?.slug||"",labels:i?.labels&&Object.keys(i.labels).length>0?{...i.labels}:void 0,visibility:i?.visibility||void 0,description:l.description||void 0,logoUrl:l.logoUrl||void 0,managementMode:l.managementMode||void 0,identityProviderRef:(0,t.toResourceRefInput)(l.identityProviderRef),externalOrgId:l.externalOrgId||void 0,isPersonal:l.isPersonal||void 0,preferences:l.preferences?{standingContext:(a=l.preferences).standingContext||void 0,memoryEnabled:a.memoryEnabled||void 0}:void 0}}],785767)},808139,e=>{"use strict";var a=e.i(910304),i=e.i(292558),l=e.i(891287),t=e.i(988646),c=e.i(338300),d=e.i(459153),n=e.i(421415),r=e.i(424407),b=e.i(304532),o=e.i(988158),m=e.i(267872),s=e.i(761867);let u=(0,r.fileDesc)("CixhaS9zdGlnbWVyL2lhbS9pZGVudGl0eWFjY291bnQvdjEvc3BlYy5wcm90bxIhYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxIpwDChNJZGVudGl0eUFjY291bnRTcGVjEhYKBmlkcF9pZBgBIAEoCUIGukgDyAEBEg0KBWVtYWlsGAIgASgJEhIKCmZpcnN0X25hbWUYAyABKAkSEQoJbGFzdF9uYW1lGAQgASgJEhMKC3BpY3R1cmVfdXJsGAUgASgJEhoKEmlzX21hY2hpbmVfYWNjb3VudBgGIAEoCBJdChFwcm92aXNpb25pbmdfbW9kZRgHIAEoDjJCLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnRQcm92aXNpb25pbmdNb2RlElMKFWlkZW50aXR5X3Byb3ZpZGVyX3JlZhgIIAEoCzI0LmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5BcGlSZXNvdXJjZVJlZmVyZW5jZRJSCgtwcmVmZXJlbmNlcxgJIAEoCzI9LmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnRQcmVmZXJlbmNlcyL3AQoaSWRlbnRpdHlBY2NvdW50UHJlZmVyZW5jZXMSIgoQc3RhbmRpbmdfY29udGV4dBgBIAEoCUIIukgFcgMY0A8SMQoPZGVmYXVsdF9oYXJuZXNzGAIgASgJQhi6SBXYAQFyEFIGbmF0aXZlUgZjdXJzb3ISJQoUZGVmYXVsdF9uYXRpdmVfbW9kZWwYAyABKAlCB7pIBHICGGQSJQoUZGVmYXVsdF9jdXJzb3JfbW9kZWwYBCABKAlCB7pIBHICGGQSFgoObWVtb3J5X2VuYWJsZWQYBSABKAgSHAoUZGVmYXVsdF9hdXRvX2FwcHJvdmUYBiABKAhiBnByb3RvMw",[d.file_ai_stigmer_commons_apiresource_io,m.file_ai_stigmer_iam_identityaccount_v1_enum,s.file_buf_validate_validate]),W=(0,b.messageDesc)(u,0),p=(0,b.messageDesc)(u,1),g=(0,r.fileDesc)("CithaS9zdGlnbWVyL2lhbS9pZGVudGl0eWFjY291bnQvdjEvYXBpLnByb3RvEiFhaS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEiuwIKD0lkZW50aXR5QWNjb3VudBItCgthcGlfdmVyc2lvbhgBIAEoCUIYukgVchMKEWlhbS5zdGlnbWVyLmFpL3YxEiQKBGtpbmQYAiABKAlCFrpIE3IRCg9JZGVudGl0eUFjY291bnQSRQoIbWV0YWRhdGEYAyABKAsyMy5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VNZXRhZGF0YRJECgRzcGVjGAQgASgLMjYuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudFNwZWMSRgoGc3RhdHVzGAUgASgLMjYuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlQXVkaXRTdGF0dXNiBnByb3RvMw",[n.file_ai_stigmer_commons_apiresource_metadata,o.file_ai_stigmer_commons_apiresource_status,u,s.file_buf_validate_validate]),Z=(0,b.messageDesc)(g,0);var A=e.i(499328),G=e.i(819200),h=e.i(693569),Y=e.i(85849);let y=(0,r.fileDesc)("CiphaS9zdGlnbWVyL2lhbS9pZGVudGl0eWFjY291bnQvdjEvaW8ucHJvdG8SIWFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MSJXChBJZGVudGl0eUFjY291bnRzEkMKB2VudHJpZXMYASADKAsyMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50IioKEUlkZW50aXR5QWNjb3VudElkEhUKBXZhbHVlGAEgASgJQga6SAPIAQEiLQoUSWRlbnRpdHlBY2NvdW50RW1haWwSFQoFdmFsdWUYASABKAlCBrpIA8gBASIeCgVJZHBJZBIVCgV2YWx1ZRgBIAEoCUIGukgDyAEBImsKHExpc3RXaXRoSWRlbnRpdHlBY2NvdW50SWRSZXESGwoTaWRlbnRpdHlfYWNjb3VudF9pZBgBIAEoCRIuCgRwYWdlGAIgASgLMiAuYWkuc3RpZ21lci5jb21tb25zLnJwYy5QYWdlSW5mbyJwChRJZGVudGl0eUFjY291bnRzTGlzdBITCgt0b3RhbF9wYWdlcxgBIAEoBRJDCgdlbnRyaWVzGAIgAygLMjIuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudCJSChNMaXN0V2l0aElkZW50aXR5T3JnEgsKA29yZxgBIAEoCRIuCgRwYWdlGAIgASgLMiAuYWkuc3RpZ21lci5jb21tb25zLnJwYy5QYWdlSW5mbyKbAQoRRXh0ZXJuYWxTdWJMb29rdXASEwoDb3JnGAEgASgJQga6SAPIAQESUwoVaWRlbnRpdHlfcHJvdmlkZXJfcmVmGAIgASgLMjQuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlUmVmZXJlbmNlEhwKDGV4dGVybmFsX3N1YhgDIAEoCUIGukgDyAEBIvgBChtDcmVhdGVGZWRlcmF0ZWRBY2NvdW50SW5wdXQSEwoDb3JnGAEgASgJQga6SAPIAQESUwoVaWRlbnRpdHlfcHJvdmlkZXJfcmVmGAIgASgLMjQuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlUmVmZXJlbmNlEhwKDGV4dGVybmFsX3N1YhgDIAEoCUIGukgDyAEBEhUKBWVtYWlsGAQgASgJQga6SAPIAQESEgoKZmlyc3RfbmFtZRgFIAEoCRIRCglsYXN0X25hbWUYBiABKAkSEwoLcGljdHVyZV91cmwYByABKAki+AEKG1VwZGF0ZUZlZGVyYXRlZEFjY291bnRJbnB1dBITCgNvcmcYASABKAlCBrpIA8gBARJTChVpZGVudGl0eV9wcm92aWRlcl9yZWYYAiABKAsyNC5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VSZWZlcmVuY2USHAoMZXh0ZXJuYWxfc3ViGAMgASgJQga6SAPIAQESFQoFZW1haWwYBCABKAlCBrpIA8gBARISCgpmaXJzdF9uYW1lGAUgASgJEhEKCWxhc3RfbmFtZRgGIAEoCRITCgtwaWN0dXJlX3VybBgHIAEoCSLCAQogRGVwcm92aXNpb25GZWRlcmF0ZWRBY2NvdW50SW5wdXQSEwoDb3JnGAEgASgJQga6SAPIAQESUwoVaWRlbnRpdHlfcHJvdmlkZXJfcmVmGAIgASgLMjQuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlUmVmZXJlbmNlEhwKDGV4dGVybmFsX3N1YhgDIAEoCUIGukgDyAEBEhYKDmRlbGV0ZV9hY2NvdW50GAQgASgIYgZwcm90bzM",[d.file_ai_stigmer_commons_apiresource_io,Y.file_ai_stigmer_commons_rpc_pagination,g,s.file_buf_validate_validate]),V=(0,b.messageDesc)(y,1),v=(0,b.messageDesc)(y,3),R=(0,r.fileDesc)("Ci9haS9zdGlnbWVyL2lhbS9pZGVudGl0eWFjY291bnQvdjEvY29tbWFuZC5wcm90bxIhYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxMosKCiBJZGVudGl0eUFjY291bnRDb21tYW5kQ29udHJvbGxlchJ2CgZjcmVhdGUSMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50GjIuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudCIE0LgYARKwAQoGdXBkYXRlEjIuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudBoyLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnQiPsK4GDoIAhALIgttZXRhZGF0YS5pZCondW5hdXRob3JpemVkIHRvIHVwZGF0ZSBpZGVudGl0eSBhY2NvdW50EqwBCgZkZWxldGUSNC5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50SWQaMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50IjjCuBg0CAMQCyIFdmFsdWUqJ3VuYXV0aG9yaXplZCB0byBkZWxldGUgaWRlbnRpdHkgYWNjb3VudBLaAQoWY3JlYXRlRmVkZXJhdGVkQWNjb3VudBI+LmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5DcmVhdGVGZWRlcmF0ZWRBY2NvdW50SW5wdXQaMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50IkzCuBhICBUQHiIDb3JnKj11bmF1dGhvcml6ZWQgdG8gY3JlYXRlIGlkZW50aXR5IGFjY291bnRzIGluIHRoaXMgb3JnYW5pemF0aW9uEtoBChZ1cGRhdGVGZWRlcmF0ZWRBY2NvdW50Ej4uYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLlVwZGF0ZUZlZGVyYXRlZEFjY291bnRJbnB1dBoyLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnQiTMK4GEgIFRAeIgNvcmcqPXVuYXV0aG9yaXplZCB0byBtYW5hZ2UgaWRlbnRpdHkgYWNjb3VudHMgaW4gdGhpcyBvcmdhbml6YXRpb24S5AEKG2RlcHJvdmlzaW9uRmVkZXJhdGVkQWNjb3VudBJDLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5EZXByb3Zpc2lvbkZlZGVyYXRlZEFjY291bnRJbnB1dBoyLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnQiTMK4GEgIFRAeIgNvcmcqPXVuYXV0aG9yaXplZCB0byBtYW5hZ2UgaWRlbnRpdHkgYWNjb3VudHMgaW4gdGhpcyBvcmdhbml6YXRpb24SZgoScHJvdmlzaW9uTXlBY2NvdW50EhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GjIuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudCIE0LgYARoEoP8rC2IGcHJvdG8z",[G.file_ai_stigmer_commons_apiresource_rpc_service_options,h.file_ai_stigmer_commons_rpc_method_options,g,y,t.file_google_protobuf_empty]),S=(0,A.serviceDesc)(R,0),I=(0,r.fileDesc)("Ci1haS9zdGlnbWVyL2lhbS9pZGVudGl0eWFjY291bnQvdjEvcXVlcnkucHJvdG8SIWFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MTKDCAoeSWRlbnRpdHlBY2NvdW50UXVlcnlDb250cm9sbGVyEqYBCgNnZXQSNC5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50SWQaMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50IjXCuBgxCAEQCyIFdmFsdWUqJHVuYXV0aG9yaXplZCB0byBnZXQgaWRlbnRpdHkgYWNjb3VudBJaCgZ3aG9BbUkSFi5nb29nbGUucHJvdG9idWYuRW1wdHkaMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50IgTQuBgBErABCgpnZXRCeUVtYWlsEjcuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudEVtYWlsGjIuYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxLklkZW50aXR5QWNjb3VudCI1wrgYMQgBEAsiBXZhbHVlKiR1bmF1dGhvcml6ZWQgdG8gZ2V0IGlkZW50aXR5IGFjY291bnQSoQEKCmdldEJ5SWRwSWQSKC5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRwSWQaMi5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50IjXCuBgxCAEQCyIFdmFsdWUqJHVuYXV0aG9yaXplZCB0byBnZXQgaWRlbnRpdHkgYWNjb3VudBLLAQoQZ2V0QnlFeHRlcm5hbFN1YhI0LmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5FeHRlcm5hbFN1Ykxvb2t1cBoyLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnQiTcK4GEkIFRAeIgNvcmcqPnVuYXV0aG9yaXplZCB0byBsb29rIHVwIGlkZW50aXR5IGFjY291bnRzIGluIHRoaXMgb3JnYW5pemF0aW9uErABCgxnZXRBY3RvckluZm8SNC5haS5zdGlnbWVyLmlhbS5pZGVudGl0eWFjY291bnQudjEuSWRlbnRpdHlBY2NvdW50SWQaNS5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VBdWRpdEFjdG9yIjPCuBgvCAEQCyIFdmFsdWUqInVuYXV0aG9yaXplZCB0byBsb29rIHVwIGFjdG9yIGluZm8aBKD/KwtiBnByb3RvMw",[G.file_ai_stigmer_commons_apiresource_rpc_service_options,o.file_ai_stigmer_commons_apiresource_status,h.file_ai_stigmer_commons_rpc_method_options,g,y,t.file_google_protobuf_empty]),B=(0,A.serviceDesc)(I,0);function X(e){var a;let t=e.identityProviderRef?.slug||e.identityProviderRef?.org?(0,l.create)(d.ApiResourceReferenceSchema,e.identityProviderRef):void 0,c=e.preferences?(a=e.preferences,Object.assign((0,l.create)(p),(0,i.stripUndefined)({standingContext:a.standingContext,defaultHarness:a.defaultHarness,defaultNativeModel:a.defaultNativeModel,defaultCursorModel:a.defaultCursorModel,memoryEnabled:a.memoryEnabled,defaultAutoApprove:a.defaultAutoApprove}))):void 0;return Object.assign((0,l.create)(Z),{apiVersion:"iam.stigmer.ai/v1",kind:"IdentityAccount",metadata:Object.assign((0,l.create)(n.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:Object.assign((0,l.create)(W),(0,i.stripUndefined)({idpId:e.idpId,email:e.email,firstName:e.firstName,lastName:e.lastName,pictureUrl:e.pictureUrl,isMachineAccount:e.isMachineAccount,provisioningMode:e.provisioningMode,identityProviderRef:t,preferences:c}))})}e.s(["IdentityAccountClient",0,class{command;query;constructor(e){this.command=(0,c.createClient)(S,e),this.query=(0,c.createClient)(B,e)}async create(e){try{return await this.command.create(X(e))}catch(e){throw(0,a.wrapError)(e)}}async update(e){try{return await this.command.update(X(e))}catch(e){throw(0,a.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,l.create)(V,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async createFederatedAccount(e){try{return await this.command.createFederatedAccount(e)}catch(e){throw(0,a.wrapError)(e)}}async updateFederatedAccount(e){try{return await this.command.updateFederatedAccount(e)}catch(e){throw(0,a.wrapError)(e)}}async deprovisionFederatedAccount(e){try{return await this.command.deprovisionFederatedAccount(e)}catch(e){throw(0,a.wrapError)(e)}}async provisionMyAccount(){try{return await this.command.provisionMyAccount((0,l.create)(t.EmptySchema,{}))}catch(e){throw(0,a.wrapError)(e)}}async get(e){try{return await this.query.get((0,l.create)(V,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async whoAmI(){try{return await this.query.whoAmI((0,l.create)(t.EmptySchema,{}))}catch(e){throw(0,a.wrapError)(e)}}async getByEmail(e){try{return await this.query.getByEmail(e)}catch(e){throw(0,a.wrapError)(e)}}async getByIdpId(e){try{return await this.query.getByIdpId((0,l.create)(v,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async getByExternalSub(e){try{return await this.query.getByExternalSub(e)}catch(e){throw(0,a.wrapError)(e)}}async getActorInfo(e){try{return await this.query.getActorInfo((0,l.create)(V,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}},"toIdentityAccountUpdateInput",0,function(e){var a;let t=e.metadata,c=e.spec??(0,l.create)(W);return{id:t?.id||void 0,name:t?.name??"",slug:t?.slug||void 0,org:t?.org??"",labels:t?.labels&&Object.keys(t.labels).length>0?{...t.labels}:void 0,visibility:t?.visibility||void 0,idpId:c.idpId??"",email:c.email||void 0,firstName:c.firstName||void 0,lastName:c.lastName||void 0,pictureUrl:c.pictureUrl||void 0,isMachineAccount:c.isMachineAccount||void 0,provisioningMode:c.provisioningMode||void 0,identityProviderRef:(0,i.toResourceRefInput)(c.identityProviderRef),preferences:c.preferences?{standingContext:(a=c.preferences).standingContext||void 0,defaultHarness:a.defaultHarness||void 0,defaultNativeModel:a.defaultNativeModel||void 0,defaultCursorModel:a.defaultCursorModel||void 0,memoryEnabled:a.memoryEnabled||void 0,defaultAutoApprove:a.defaultAutoApprove||void 0}:void 0}}],808139)},546839,587751,290846,e=>{"use strict";var a=e.i(910304),i=e.i(292558),l=e.i(891287),t=e.i(17616),c=e.i(338300),d=e.i(170255),n=e.i(459153),r=e.i(421415),b=e.i(424407),o=e.i(304532),m=e.i(988158),s=e.i(823363),u=e.i(430182),W=e.i(761867),p=e.i(732303);let g=(0,b.fileDesc)("CithaS9zdGlnbWVyL2lhbS9wbGF0Zm9ybWNsaWVudC92MS9zcGVjLnByb3RvEiBhaS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MSKNBAoSUGxhdGZvcm1DbGllbnRTcGVjEhcKCWNsaWVudF9pZBgBIAEoCUIEyIUsARIgChJjbGllbnRfc2VjcmV0X2hhc2gYAiABKAlCBMiFLAESIAoSc2VjcmV0X2ZpbmdlcnByaW50GAMgASgJQgTIhSwBEi4KCmV4cGlyZXNfYXQYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhUKDW5ldmVyX2V4cGlyZXMYBSABKAgSHwoXYXV0b19wcm92aXNpb25fYWNjb3VudHMYBiABKAgSGQoRYXV0b19ncmFudF9vbl9vcmcYByABKAgSMwoPYXV0b19ncmFudF9yb2xlGAggASgOMhouYWkuc3RpZ21lci5pYW0udjEuSWFtUm9sZRIXCg9hbGxvd2VkX29yaWdpbnMYCSADKAkSyAEKEGVudmlyb25tZW50X3JlZnMYCiADKAsyNC5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VSZWZlcmVuY2VCeLpIcZIBbiJsugFpChVlbnZpcm9ubWVudF9yZWZzLmtpbmQSP2Vudmlyb25tZW50X3JlZnMgbXVzdCByZWZlcmVuY2UgcmVzb3VyY2VzIHdpdGgga2luZD1lbnZpcm9ubWVudBoPdGhpcy5raW5kID09IDUz4IUsNWIGcHJvdG8z",[s.file_ai_stigmer_commons_apiresource_field_options,n.file_ai_stigmer_commons_apiresource_io,u.file_ai_stigmer_iam_v1_enum,W.file_buf_validate_validate,p.file_google_protobuf_timestamp]),Z=(0,o.messageDesc)(g,0),A=(0,b.fileDesc)("CiphaS9zdGlnbWVyL2lhbS9wbGF0Zm9ybWNsaWVudC92MS9hcGkucHJvdG8SIGFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxIr8CCg5QbGF0Zm9ybUNsaWVudBItCgthcGlfdmVyc2lvbhgBIAEoCUIYukgVchMKEWlhbS5zdGlnbWVyLmFpL3YxEiMKBGtpbmQYAiABKAlCFbpIEnIQCg5QbGF0Zm9ybUNsaWVudBJNCghtZXRhZGF0YRgDIAEoCzIzLmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5BcGlSZXNvdXJjZU1ldGFkYXRhQga6SAPIAQESQgoEc3BlYxgEIAEoCzI0LmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLlBsYXRmb3JtQ2xpZW50U3BlYxJGCgZzdGF0dXMYBSABKAsyNi5haS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MS5QbGF0Zm9ybUNsaWVudFN0YXR1cyKJAQoUUGxhdGZvcm1DbGllbnRTdGF0dXMSPwoFYXVkaXQYYyABKAsyMC5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VBdWRpdBIwCgxsYXN0X3VzZWRfYXQYASABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wYgZwcm90bzM",[r.file_ai_stigmer_commons_apiresource_metadata,m.file_ai_stigmer_commons_apiresource_status,g,W.file_buf_validate_validate,p.file_google_protobuf_timestamp]),G=(0,o.messageDesc)(A,0);var h=e.i(499328),Y=e.i(819200),y=e.i(693569);let V=(0,b.fileDesc)("CilhaS9zdGlnbWVyL2lhbS9wbGF0Zm9ybWNsaWVudC92MS9pby5wcm90bxIgYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEiLAoQUGxhdGZvcm1DbGllbnRJZBIYCgV2YWx1ZRgBIAEoCUIJukgGcgQQARhAIlQKD1BsYXRmb3JtQ2xpZW50cxJBCgdlbnRyaWVzGAEgAygLMjAuYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEuUGxhdGZvcm1DbGllbnQiNQodTGlzdFBsYXRmb3JtQ2xpZW50c0J5T3JnSW5wdXQSFAoDb3JnGAEgASgJQge6SARyAhABIoABChxQbGF0Zm9ybUNsaWVudENyZWF0ZVJlc3BvbnNlEkkKD3BsYXRmb3JtX2NsaWVudBgBIAEoCzIwLmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLlBsYXRmb3JtQ2xpZW50EhUKDWNsaWVudF9zZWNyZXQYAiABKAliBnByb3RvMw",[A,W.file_buf_validate_validate]),v=(0,o.messageDesc)(V,0),R=(0,o.messageDesc)(V,2);e.s(["ListPlatformClientsByOrgInputSchema",0,R,"PlatformClientIdSchema",0,v,"file_ai_stigmer_iam_platformclient_v1_io",0,V],587751);let S=(0,b.fileDesc)("Ci5haS9zdGlnbWVyL2lhbS9wbGF0Zm9ybWNsaWVudC92MS9jb21tYW5kLnByb3RvEiBhaS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MTKgBgofUGxhdGZvcm1DbGllbnRDb21tYW5kQ29udHJvbGxlchLPAQoGY3JlYXRlEjAuYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEuUGxhdGZvcm1DbGllbnQaPi5haS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MS5QbGF0Zm9ybUNsaWVudENyZWF0ZVJlc3BvbnNlIlPCuBhPCBgQHiIMbWV0YWRhdGEub3JnKjt1bmF1dGhvcml6ZWQgdG8gY3JlYXRlIHBsYXRmb3JtIGNsaWVudCBpbiB0aGlzIG9yZ2FuaXphdGlvbhKrAQoGdXBkYXRlEjAuYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEuUGxhdGZvcm1DbGllbnQaMC5haS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MS5QbGF0Zm9ybUNsaWVudCI9wrgYOQgCEBciC21ldGFkYXRhLmlkKiZ1bmF1dGhvcml6ZWQgdG8gdXBkYXRlIHBsYXRmb3JtIGNsaWVudBKxAQoGZGVsZXRlEjYuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlRGVsZXRlSW5wdXQaMC5haS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MS5QbGF0Zm9ybUNsaWVudCI9wrgYOQgDEBciC3Jlc291cmNlX2lkKiZ1bmF1dGhvcml6ZWQgdG8gZGVsZXRlIHBsYXRmb3JtIGNsaWVudBLCAQoMcm90YXRlU2VjcmV0EjIuYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEuUGxhdGZvcm1DbGllbnRJZBo+LmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLlBsYXRmb3JtQ2xpZW50Q3JlYXRlUmVzcG9uc2UiPsK4GDoIAhAXIgV2YWx1ZSotdW5hdXRob3JpemVkIHRvIHJvdGF0ZSBwbGF0Zm9ybSBjbGllbnQgc2VjcmV0GgSg/ysXYgZwcm90bzM",[n.file_ai_stigmer_commons_apiresource_io,Y.file_ai_stigmer_commons_apiresource_rpc_service_options,y.file_ai_stigmer_commons_rpc_method_options,A,V]),I=(0,h.serviceDesc)(S,0),B=(0,b.fileDesc)("CixhaS9zdGlnbWVyL2lhbS9wbGF0Zm9ybWNsaWVudC92MS9xdWVyeS5wcm90bxIgYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEykgQKHVBsYXRmb3JtQ2xpZW50UXVlcnlDb250cm9sbGVyEp0BCgNnZXQSLS5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VJZBowLmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLlBsYXRmb3JtQ2xpZW50IjXCuBgxCAEQFyIFdmFsdWUqJHVuYXV0aG9yaXplZCB0byB2aWV3IHBsYXRmb3JtIGNsaWVudBJ+Cg5nZXRCeVJlZmVyZW5jZRI0LmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5BcGlSZXNvdXJjZVJlZmVyZW5jZRowLmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLlBsYXRmb3JtQ2xpZW50IgTQuBgBEsoBCglsaXN0QnlPcmcSPy5haS5zdGlnbWVyLmlhbS5wbGF0Zm9ybWNsaWVudC52MS5MaXN0UGxhdGZvcm1DbGllbnRzQnlPcmdJbnB1dBoxLmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLlBsYXRmb3JtQ2xpZW50cyJJwrgYRQgBEB4iA29yZyo6dW5hdXRob3JpemVkIHRvIGxpc3QgcGxhdGZvcm0gY2xpZW50cyBpbiB0aGlzIG9yZ2FuaXphdGlvbhoEoP8rF2IGcHJvdG8z",[n.file_ai_stigmer_commons_apiresource_io,Y.file_ai_stigmer_commons_apiresource_rpc_service_options,y.file_ai_stigmer_commons_rpc_method_options,A,V]),X=(0,h.serviceDesc)(B,0),F=(0,b.fileDesc)("CixhaS9zdGlnbWVyL2lhbS9wbGF0Zm9ybWNsaWVudC92MS90b2tlbi5wcm90bxIgYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEiowEKFE1pbnRVc2VyVG9rZW5SZXF1ZXN0EhoKCWNsaWVudF9pZBgBIAEoCUIHukgEcgIQARIeCg1jbGllbnRfc2VjcmV0GAIgASgJQge6SARyAhABEhgKB3VzZXJfaWQYAyABKAlCB7pIBHICEAESEgoKdXNlcl9lbWFpbBgEIAEoCRIRCgl1c2VyX25hbWUYBSABKAkSDgoGb3JnX2lkGAYgASgJIlUKFU1pbnRVc2VyVG9rZW5SZXNwb25zZRIUCgxhY2Nlc3NfdG9rZW4YASABKAkSEgoKdG9rZW5fdHlwZRgCIAEoCRISCgpleHBpcmVzX2luGAMgASgFIskDChVNaW50R3Vlc3RUb2tlblJlcXVlc3QSFAoDb3JnGAEgASgJQge6SARyAhABEhUKBHNsdWcYAiABKAlCB7pIBHICEAESFwoPZ3Vlc3RfY29va2llX2lkGAMgASgJEssCCgxlbWJlZF9vcmlnaW4YBCABKAlCtAK6SLACugGsAgoTZW1iZWRfb3JpZ2luLmZvcm1hdBJ3ZW1iZWRfb3JpZ2luIG11c3QgYmUgZW1wdHksICJudWxsIiwgb3IgYW4gZXhhY3Qgd2ViIG9yaWdpbiBsaWtlIGh0dHBzOi8vZXhhbXBsZS5jb20gKG5vIHBhdGgsIHF1ZXJ5LCBvciB0cmFpbGluZyBzbGFzaCkamwF0aGlzID09ICcnIHx8IHRoaXMgPT0gJ251bGwnIHx8IHRoaXMubWF0Y2hlcygnXmh0dHBzPzovL1tBLVphLXowLTldKFtBLVphLXowLTktXSpbQS1aYS16MC05XSk/KFxcLltBLVphLXowLTldKFtBLVphLXowLTktXSpbQS1aYS16MC05XSk/KSooOlswLTldezEsNX0pPyQnKRIcCgpsaW5rX3Rva2VuGAUgASgJQgi6SAVyAxiAASJvChZNaW50R3Vlc3RUb2tlblJlc3BvbnNlEhQKDGFjY2Vzc190b2tlbhgBIAEoCRISCgp0b2tlbl90eXBlGAIgASgJEhIKCmV4cGlyZXNfaW4YAyABKAUSFwoPZ3Vlc3RfY29va2llX2lkGAQgASgJMrQCCh1QbGF0Zm9ybUNsaWVudFRva2VuQ29udHJvbGxlchKGAQoNbWludFVzZXJUb2tlbhI2LmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLk1pbnRVc2VyVG9rZW5SZXF1ZXN0GjcuYWkuc3RpZ21lci5pYW0ucGxhdGZvcm1jbGllbnQudjEuTWludFVzZXJUb2tlblJlc3BvbnNlIgTIuBgBEokBCg5taW50R3Vlc3RUb2tlbhI3LmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLk1pbnRHdWVzdFRva2VuUmVxdWVzdBo4LmFpLnN0aWdtZXIuaWFtLnBsYXRmb3JtY2xpZW50LnYxLk1pbnRHdWVzdFRva2VuUmVzcG9uc2UiBMi4GAFiBnByb3RvMw",[y.file_ai_stigmer_commons_rpc_method_options,W.file_buf_validate_validate]),E=(0,o.messageDesc)(F,2),C=(0,h.serviceDesc)(F,0);function L(e){let a=void 0!==e.expiresAt?(0,i.toTimestamp)(e.expiresAt):void 0,t=e.environmentRefs?.map(e=>(0,l.create)(n.ApiResourceReferenceSchema,{...e,kind:53}));return Object.assign((0,l.create)(G),{apiVersion:"iam.stigmer.ai/v1",kind:"PlatformClient",metadata:Object.assign((0,l.create)(r.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:Object.assign((0,l.create)(Z),(0,i.stripUndefined)({clientId:e.clientId,clientSecretHash:e.clientSecretHash,secretFingerprint:e.secretFingerprint,expiresAt:a,neverExpires:e.neverExpires,autoProvisionAccounts:e.autoProvisionAccounts,autoGrantOnOrg:e.autoGrantOnOrg,autoGrantRole:e.autoGrantRole,allowedOrigins:e.allowedOrigins,environmentRefs:t}))})}e.s(["MintGuestTokenRequestSchema",0,E,"PlatformClientTokenController",0,C],290846),e.s(["PlatformClientClient",0,class{command;query;token;constructor(e){this.command=(0,c.createClient)(I,e),this.query=(0,c.createClient)(X,e),this.token=(0,c.createClient)(C,e)}async create(e){try{return await this.command.create(L(e))}catch(e){throw(0,a.wrapError)(e)}}async update(e){try{return await this.command.update(L(e))}catch(e){throw(0,a.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,l.create)(n.ApiResourceDeleteInputSchema,{resourceId:e.resourceId,versionMessage:e.versionMessage,force:e.force}))}catch(e){throw(0,a.wrapError)(e)}}async rotateSecret(e){try{return await this.command.rotateSecret((0,l.create)(v,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async get(e){try{return await this.query.get((0,l.create)(n.ApiResourceIdSchema,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async getByReference(e){try{return await this.query.getByReference((0,l.create)(n.ApiResourceReferenceSchema,{...e,kind:d.ApiResourceKind.platform_client}))}catch(e){throw(0,a.wrapError)(e)}}async listByOrg(e){try{return await this.query.listByOrg(e)}catch(e){throw(0,a.wrapError)(e)}}async mintUserToken(e){try{return await this.token.mintUserToken(e)}catch(e){throw(0,a.wrapError)(e)}}async mintGuestToken(e){try{return await this.token.mintGuestToken(e)}catch(e){throw(0,a.wrapError)(e)}}},"toPlatformClientUpdateInput",0,function(e){let a=e.metadata,c=e.spec??(0,l.create)(Z);return{id:a?.id||void 0,name:a?.name??"",slug:a?.slug||void 0,org:a?.org??"",labels:a?.labels&&Object.keys(a.labels).length>0?{...a.labels}:void 0,visibility:a?.visibility||void 0,clientId:c.clientId||void 0,clientSecretHash:c.clientSecretHash||void 0,secretFingerprint:c.secretFingerprint||void 0,expiresAt:c.expiresAt?(0,t.timestampDate)(c.expiresAt):void 0,neverExpires:c.neverExpires||void 0,autoProvisionAccounts:c.autoProvisionAccounts||void 0,autoGrantOnOrg:c.autoGrantOnOrg||void 0,autoGrantRole:c.autoGrantRole||void 0,allowedOrigins:c.allowedOrigins?.length?[...c.allowedOrigins]:void 0,environmentRefs:(0,i.toResourceRefInputs)(c.environmentRefs)}}],546839)},576985,823809,e=>{"use strict";e.i(113024);var a,i,l,t,c,d,n=e.i(424407),r=e.i(304532),b=e.i(761867),o=e.i(732303);let m=(0,n.fileDesc)("CjJhaS9zdGlnbWVyL2JpbGxpbmcvdjEvbW9kZWxfcHJpY2luZ19iYXNlbGluZS5wcm90bxIVYWkuc3RpZ21lci5iaWxsaW5nLnYxIoADCgxQcmljaW5nQmxvY2sSLwoeaW5wdXRfcHJpY2VfbWljcm9zX3Blcl9taWxsaW9uGAEgASgDQge6SAQiAigAEjAKH291dHB1dF9wcmljZV9taWNyb3NfcGVyX21pbGxpb24YAiABKANCB7pIBCICKAASNQokY2FjaGVfd3JpdGVfcHJpY2VfbWljcm9zX3Blcl9taWxsaW9uGAMgASgDQge6SAQiAigAEjQKI2NhY2hlX3JlYWRfcHJpY2VfbWljcm9zX3Blcl9taWxsaW9uGAQgASgDQge6SAQiAigAEjUKJGN1cnNvcl90b2tlbl9yYXRlX21pY3Jvc19wZXJfbWlsbGlvbhgFIAEoA0IHukgEIgIoABIYCgZzb3VyY2UYBiABKAlCCLpIBXIDGIABEh0KC3NvdXJjZV9ub3RlGAcgASgJQgi6SAVyAxiAEBIwCgxlZmZlY3RpdmVfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIm8KDlByaWNpbmdWYXJpYW50EjwKB3ByaWNpbmcYASABKAsyIy5haS5zdGlnbWVyLmJpbGxpbmcudjEuUHJpY2luZ0Jsb2NrQga6SAPIAQESHwoId2lyZV9pZHMYAiADKAlCDbpICpIBByIFcgMYgAEifgoTU3VtbWFyaXphdGlvbkNvbmZpZxIiChF0cmlnZ2VyX3RocmVzaG9sZBgBIAEoBUIHukgEGgIoABIeCg10YXJnZXRfdG9rZW5zGAIgASgFQge6SAQaAigAEiMKEm1heF9zdW1tYXJ5X3Rva2VucxgDIAEoBUIHukgEGgIoACJ1ChFNb2RlbENhcGFiaWxpdGllcxIQCgh0b29sX3VzZRgBIAEoCBIOCgZ2aXNpb24YAiABKAgSEQoJc3RyZWFtaW5nGAMgASgIEhAKCHRoaW5raW5nGAQgASgIEhkKEWFkYXB0aXZlX3RoaW5raW5nGAUgASgIIvcIChRNb2RlbFByaWNpbmdCYXNlbGluZRITCgtiYXNlbGluZV9pZBgBIAEoCRIdCghtb2RlbF9pZBgCIAEoCUILukgIyAEBcgMYgAESHgoMYXBpX21vZGVsX2lkGAMgASgJQgi6SAVyAxiAARIcCghwcm92aWRlchgEIAEoCUIKukgHyAEBcgIYQBIbCgdoYXJuZXNzGAUgASgJQgq6SAfIAQFyAhhAEiEKDGRpc3BsYXlfbmFtZRgGIAEoCUILukgIyAEBcgMYgAESIwoRc2hvcnRfZGVzY3JpcHRpb24YByABKAlCCLpIBXIDGIACEjgKCnNwZWVkX3RpZXIYCCABKAlCJLpIIXIfUgdmYXN0ZXN0UgRmYXN0UghiYWxhbmNlZFIEc2xvdxI0Cgljb3N0X3RpZXIYCSABKAlCIbpIHnIcUgdlY29ub215UghzdGFuZGFyZFIHcHJlbWl1bRIQCghmZWF0dXJlZBgKIAEoCBI8CgdwcmljaW5nGAsgASgLMiMuYWkuc3RpZ21lci5iaWxsaW5nLnYxLlByaWNpbmdCbG9ja0IGukgDyAEBEloKEHByaWNpbmdfdmFyaWFudHMYDCADKAsyQC5haS5zdGlnbWVyLmJpbGxpbmcudjEuTW9kZWxQcmljaW5nQmFzZWxpbmUuUHJpY2luZ1ZhcmlhbnRzRW50cnkSHwoId2lyZV9pZHMYGCADKAlCDbpICpIBByIFcgMYgAESJgoVY29udGV4dF93aW5kb3dfdG9rZW5zGA0gASgFQge6SAQaAigAEiIKEW1heF9vdXRwdXRfdG9rZW5zGA4gASgFQge6SAQaAigAEiUKFHRva2VuX2NvdW50ZXJfbWV0aG9kGA8gASgJQge6SARyAhhAEkEKDXN1bW1hcml6YXRpb24YECABKAsyKi5haS5zdGlnbWVyLmJpbGxpbmcudjEuU3VtbWFyaXphdGlvbkNvbmZpZxI+CgxjYXBhYmlsaXRpZXMYESABKAsyKC5haS5zdGlnbWVyLmJpbGxpbmcudjEuTW9kZWxDYXBhYmlsaXRpZXMSQQoGc3RhdHVzGBIgASgOMjEuYWkuc3RpZ21lci5iaWxsaW5nLnYxLk1vZGVsUHJpY2luZ0Jhc2VsaW5lU3RhdHVzEh4KFnN1cGVyc2VkZXNfYmFzZWxpbmVfaWQYEyABKAkSEgoKZGVjaWRlZF9ieRgUIAEoCRIuCgpkZWNpZGVkX2F0GBUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIfCg1yZXZpc2lvbl9ub3RlGBYgASgJQgi6SAVyAxiACBIuCgpjcmVhdGVkX2F0GBcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBpdChRQcmljaW5nVmFyaWFudHNFbnRyeRILCgNrZXkYASABKAkSNAoFdmFsdWUYAiABKAsyJS5haS5zdGlnbWVyLmJpbGxpbmcudjEuUHJpY2luZ1ZhcmlhbnQ6AjgBKqcBChpNb2RlbFByaWNpbmdCYXNlbGluZVN0YXR1cxItCiltb2RlbF9wcmljaW5nX2Jhc2VsaW5lX3N0YXR1c191bnNwZWNpZmllZBAAEhsKF3ByaWNpbmdfYmFzZWxpbmVfYWN0aXZlEAESHwobcHJpY2luZ19iYXNlbGluZV9zdXBlcnNlZGVkEAISHAoYcHJpY2luZ19iYXNlbGluZV9yZXRpcmVkEANiBnByb3RvMw",[b.file_buf_validate_validate,o.file_google_protobuf_timestamp]),s=(0,r.messageDesc)(m,0),u=(0,r.messageDesc)(m,1),W=(0,r.messageDesc)(m,4);(a=t||(t={}))[a.model_pricing_baseline_status_unspecified=0]="model_pricing_baseline_status_unspecified",a[a.pricing_baseline_active=1]="pricing_baseline_active",a[a.pricing_baseline_superseded=2]="pricing_baseline_superseded",a[a.pricing_baseline_retired=3]="pricing_baseline_retired",e.s(["ModelPricingBaselineSchema",0,W,"ModelPricingBaselineStatus",0,t,"PricingBlockSchema",0,s,"PricingVariantSchema",0,u,"file_ai_stigmer_billing_v1_model_pricing_baseline",0,m],576985);let p=(0,n.fileDesc)("CixhaS9zdGlnbWVyL2JpbGxpbmcvdjEvcHJpY2luZ19vdmVycmlkZS5wcm90bxIVYWkuc3RpZ21lci5iaWxsaW5nLnYxItMCChlQcmljaW5nT3ZlcnJpZGVQcm92ZW5hbmNlEhcKD3NvdXJjZV9wcm92aWRlchgBIAEoCRITCgt3aW5kb3dfZnJvbRgCIAEoCRIRCgl3aW5kb3dfdG8YAyABKAkSKAogb2JzZXJ2ZWRfcmF0ZV9taWNyb3NfcGVyX21pbGxpb24YBCABKAMSNwovZWZmZWN0aXZlX3JhdGVfYXRfZGVyaXZhdGlvbl9taWNyb3NfcGVyX21pbGxpb24YBSABKAMSGgoSZGVsdGFfYmFzaXNfcG9pbnRzGAYgASgDEhUKDXNhbXBsZV90b2tlbnMYByABKAMSGgoSc2FtcGxlX2Nvc3RfbWljcm9zGAggASgDEhMKC3dvcmtmbG93X2lkGAkgASgJEi4KCmRlcml2ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIrUEChRNb2RlbFByaWNpbmdPdmVycmlkZRITCgtvdmVycmlkZV9pZBgBIAEoCRIQCghtb2RlbF9pZBgCIAEoCRIQCghwcm92aWRlchgDIAEoCRIPCgdoYXJuZXNzGAQgASgJEg8KB3ZhcmlhbnQYBSABKAkSOwoKcmF0ZV9maWVsZBgGIAEoDjInLmFpLnN0aWdtZXIuYmlsbGluZy52MS5QcmljaW5nUmF0ZUZpZWxkEh8KF3JhdGVfbWljcm9zX3Blcl9taWxsaW9uGAcgASgDEkEKBnN0YXR1cxgIIAEoDjIxLmFpLnN0aWdtZXIuYmlsbGluZy52MS5Nb2RlbFByaWNpbmdPdmVycmlkZVN0YXR1cxJECgpwcm92ZW5hbmNlGAkgASgLMjAuYWkuc3RpZ21lci5iaWxsaW5nLnYxLlByaWNpbmdPdmVycmlkZVByb3ZlbmFuY2USMAoMZWZmZWN0aXZlX2F0GAogASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBISCgpkZWNpZGVkX2J5GAsgASgJEi4KCmRlY2lkZWRfYXQYDCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhUKDWRlY2lzaW9uX25vdGUYDSABKAkSHgoWc3VwZXJzZWRlc19vdmVycmlkZV9pZBgOIAEoCRIuCgpjcmVhdGVkX2F0GA8gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCrOAQoaTW9kZWxQcmljaW5nT3ZlcnJpZGVTdGF0dXMSLQopbW9kZWxfcHJpY2luZ19vdmVycmlkZV9zdGF0dXNfdW5zcGVjaWZpZWQQABIkCiBwcmljaW5nX292ZXJyaWRlX3BlbmRpbmdfc2lnbm9mZhABEhsKF3ByaWNpbmdfb3ZlcnJpZGVfYWN0aXZlEAISHwobcHJpY2luZ19vdmVycmlkZV9zdXBlcnNlZGVkEAMSHQoZcHJpY2luZ19vdmVycmlkZV9yZWplY3RlZBAEKuQBChBQcmljaW5nUmF0ZUZpZWxkEiIKHnByaWNpbmdfcmF0ZV9maWVsZF91bnNwZWNpZmllZBAAEhwKGHByaWNpbmdfcmF0ZV9maWVsZF9pbnB1dBABEh0KGXByaWNpbmdfcmF0ZV9maWVsZF9vdXRwdXQQAhIiCh5wcmljaW5nX3JhdGVfZmllbGRfY2FjaGVfd3JpdGUQAxIhCh1wcmljaW5nX3JhdGVfZmllbGRfY2FjaGVfcmVhZBAEEigKJHByaWNpbmdfcmF0ZV9maWVsZF9jdXJzb3JfdG9rZW5fcmF0ZRAFYgZwcm90bzM",[o.file_google_protobuf_timestamp]);(i=c||(c={}))[i.model_pricing_override_status_unspecified=0]="model_pricing_override_status_unspecified",i[i.pricing_override_pending_signoff=1]="pricing_override_pending_signoff",i[i.pricing_override_active=2]="pricing_override_active",i[i.pricing_override_superseded=3]="pricing_override_superseded",i[i.pricing_override_rejected=4]="pricing_override_rejected",(l=d||(d={}))[l.unspecified=0]="unspecified",l[l.input=1]="input",l[l.output=2]="output",l[l.cache_write=3]="cache_write",l[l.cache_read=4]="cache_read",l[l.cursor_token_rate=5]="cursor_token_rate",e.s(["PricingRateField",0,d,"file_ai_stigmer_billing_v1_pricing_override",0,p],823809)},456644,730578,e=>{"use strict";var a=e.i(910304),i=e.i(292558),l=e.i(891287),t=e.i(338300),c=e.i(424407),d=e.i(304532),n=e.i(761867);let r=(0,c.fileDesc)("CidhaS9zdGlnbWVyL2FnZW50aWMvbWVtb3J5L3YxL3NwZWMucHJvdG8SHGFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEikgEKCk1lbW9yeVNwZWMSGwoHY29udGVudBgBIAEoCUIKukgHcgUQARj0AxIjChtzdWJqZWN0X2lkZW50aXR5X2FjY291bnRfaWQYAiABKAkSQgoKcHJvdmVuYW5jZRgDIAEoCzIuLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5UHJvdmVuYW5jZSJqChBNZW1vcnlQcm92ZW5hbmNlEhAKCGFnZW50X2lkGAEgASgJEhIKCnNlc3Npb25faWQYAiABKAkSGgoSYWdlbnRfZXhlY3V0aW9uX2lkGAMgASgJEhQKDHRvb2xfY2FsbF9pZBgEIAEoCWIGcHJvdG8z",[n.file_buf_validate_validate]),b=(0,d.messageDesc)(r,0),o=(0,d.messageDesc)(r,1);var m=e.i(564138),s=e.i(988158),u=e.i(732303);let W=(0,c.fileDesc)("CilhaS9zdGlnbWVyL2FnZW50aWMvbWVtb3J5L3YxL3N0YXR1cy5wcm90bxIcYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MSLSAQoMTWVtb3J5U3RhdHVzEksKD2xpZmVjeWNsZV9zdGF0ZRgBIAEoDjIyLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5TGlmZWN5Y2xlU3RhdGUSNAoQc3RhdGVfY2hhbmdlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASPwoFYXVkaXQYYyABKAsyMC5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VBdWRpdGIGcHJvdG8z",[m.file_ai_stigmer_agentic_memory_v1_enum,s.file_ai_stigmer_commons_apiresource_status,u.file_google_protobuf_timestamp]);var p=e.i(421415);let g=(0,c.fileDesc)("CiZhaS9zdGlnbWVyL2FnZW50aWMvbWVtb3J5L3YxL2FwaS5wcm90bxIcYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MSKbAgoGTWVtb3J5EjEKC2FwaV92ZXJzaW9uGAEgASgJQhy6SBlyFwoVYWdlbnRpYy5zdGlnbWVyLmFpL3YxEhsKBGtpbmQYAiABKAlCDbpICnIICgZNZW1vcnkSTQoIbWV0YWRhdGEYAyABKAsyMy5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VNZXRhZGF0YUIGukgDyAEBEjYKBHNwZWMYBCABKAsyKC5haS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxLk1lbW9yeVNwZWMSOgoGc3RhdHVzGAUgASgLMiouYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MS5NZW1vcnlTdGF0dXNiBnByb3RvMw",[r,W,p.file_ai_stigmer_commons_apiresource_metadata,n.file_buf_validate_validate]),Z=(0,d.messageDesc)(g,0);var A=e.i(499328),G=e.i(85849);let h=(0,c.fileDesc)("CiVhaS9zdGlnbWVyL2FnZW50aWMvbWVtb3J5L3YxL2lvLnByb3RvEhxhaS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxIiEKCE1lbW9yeUlkEhUKBXZhbHVlGAEgASgJQga6SAPIAQEiYAoTTGlzdE1lbW9yaWVzUmVxdWVzdBIUCgNvcmcYASABKAlCB7pIBHICEAESMwoJcGFnZV9pbmZvGAIgASgLMiAuYWkuc3RpZ21lci5jb21tb25zLnJwYy5QYWdlSW5mbyJWCgpNZW1vcnlMaXN0EhMKC3RvdGFsX2NvdW50GAEgASgFEjMKBWl0ZW1zGAIgAygLMiQuYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MS5NZW1vcnliBnByb3RvMw",[g,G.file_ai_stigmer_commons_rpc_pagination,n.file_buf_validate_validate]),Y=(0,d.messageDesc)(h,0),y=(0,d.messageDesc)(h,1);e.s(["ListMemoriesRequestSchema",0,y,"MemoryIdSchema",0,Y,"file_ai_stigmer_agentic_memory_v1_io",0,h],730578);var V=e.i(819200),v=e.i(693569);let R=(0,c.fileDesc)("CiphaS9zdGlnbWVyL2FnZW50aWMvbWVtb3J5L3YxL2NvbW1hbmQucHJvdG8SHGFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEypQUKF01lbW9yeUNvbW1hbmRDb250cm9sbGVyEloKBmNyZWF0ZRIkLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5GiQuYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MS5NZW1vcnkiBNC4GAESigEKBnVwZGF0ZRIkLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5GiQuYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MS5NZW1vcnkiNMK4GDAIAhA5IgttZXRhZGF0YS5pZCoddW5hdXRob3JpemVkIHRvIHVwZGF0ZSBtZW1vcnkShgEKBmRlbGV0ZRImLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5SWQaJC5haS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxLk1lbW9yeSIuwrgYKggDEDkiBXZhbHVlKh11bmF1dGhvcml6ZWQgdG8gZGVsZXRlIG1lbW9yeRKIAQoHY29uZmlybRImLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5SWQaJC5haS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxLk1lbW9yeSIvwrgYKwgCEDkiBXZhbHVlKh51bmF1dGhvcml6ZWQgdG8gY29uZmlybSBtZW1vcnkShgEKBnJlamVjdBImLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5SWQaJC5haS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxLk1lbW9yeSIuwrgYKggCEDkiBXZhbHVlKh11bmF1dGhvcml6ZWQgdG8gcmVqZWN0IG1lbW9yeRoEoP8rOWIGcHJvdG8z",[g,h,V.file_ai_stigmer_commons_apiresource_rpc_service_options,v.file_ai_stigmer_commons_rpc_method_options]),S=(0,A.serviceDesc)(R,0),I=(0,c.fileDesc)("CihhaS9zdGlnbWVyL2FnZW50aWMvbWVtb3J5L3YxL3F1ZXJ5LnByb3RvEhxhaS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxMosCChVNZW1vcnlRdWVyeUNvbnRyb2xsZXISgAEKA2dldBImLmFpLnN0aWdtZXIuYWdlbnRpYy5tZW1vcnkudjEuTWVtb3J5SWQaJC5haS5zdGlnbWVyLmFnZW50aWMubWVtb3J5LnYxLk1lbW9yeSIrwrgYJwgBEDkiBXZhbHVlKhp1bmF1dGhvcml6ZWQgdG8gZ2V0IG1lbW9yeRJpCgRsaXN0EjEuYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MS5MaXN0TWVtb3JpZXNSZXF1ZXN0GiguYWkuc3RpZ21lci5hZ2VudGljLm1lbW9yeS52MS5NZW1vcnlMaXN0IgTQuBgBGgSg/ys5YgZwcm90bzM",[g,h,V.file_ai_stigmer_commons_apiresource_rpc_service_options,v.file_ai_stigmer_commons_rpc_method_options]),B=(0,A.serviceDesc)(I,0);function X(e){var a;let t=e.provenance?(a=e.provenance,Object.assign((0,l.create)(o),(0,i.stripUndefined)({agentId:a.agentId,sessionId:a.sessionId,agentExecutionId:a.agentExecutionId,toolCallId:a.toolCallId}))):void 0;return Object.assign((0,l.create)(Z),{apiVersion:"agentic.stigmer.ai/v1",kind:"Memory",metadata:Object.assign((0,l.create)(p.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:Object.assign((0,l.create)(b),(0,i.stripUndefined)({content:e.content,subjectIdentityAccountId:e.subjectIdentityAccountId,provenance:t}))})}e.s(["MemoryClient",0,class{command;query;constructor(e){this.command=(0,t.createClient)(S,e),this.query=(0,t.createClient)(B,e)}async create(e){try{return await this.command.create(X(e))}catch(e){throw(0,a.wrapError)(e)}}async update(e){try{return await this.command.update(X(e))}catch(e){throw(0,a.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,l.create)(Y,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async confirm(e){try{return await this.command.confirm((0,l.create)(Y,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async reject(e){try{return await this.command.reject((0,l.create)(Y,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async get(e){try{return await this.query.get((0,l.create)(Y,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async list(e){try{return await this.query.list(e)}catch(e){throw(0,a.wrapError)(e)}}},"toMemoryUpdateInput",0,function(e){var a;let i=e.metadata,t=e.spec??(0,l.create)(b);return{id:i?.id||void 0,name:i?.name??"",slug:i?.slug||void 0,org:i?.org??"",labels:i?.labels&&Object.keys(i.labels).length>0?{...i.labels}:void 0,visibility:i?.visibility||void 0,content:t.content||void 0,subjectIdentityAccountId:t.subjectIdentityAccountId||void 0,provenance:t.provenance?{agentId:(a=t.provenance).agentId||void 0,sessionId:a.sessionId||void 0,agentExecutionId:a.agentExecutionId||void 0,toolCallId:a.toolCallId||void 0}:void 0}}],456644)},988467,40253,e=>{"use strict";var a,i,l=e.i(424407),t=e.i(304532),c=e.i(761867),d=e.i(732303);let n=(0,l.fileDesc)("CjlhaS9zdGlnbWVyL3BsYXRmb3JtL2N1cnNvcmFjY291bnQvdjEvY3Vyc29yX2FjY291bnQucHJvdG8SJGFpLnN0aWdtZXIucGxhdGZvcm0uY3Vyc29yYWNjb3VudC52MSK/AwoNQ3Vyc29yQWNjb3VudBISCgphY2NvdW50X2lkGAEgASgJEiEKDGRpc3BsYXlfbmFtZRgCIAEoCUILukgIyAEBcgMYgAESFQoNYWRtaW5fYXBpX2tleRgDIAEoCRIPCgdlbmFibGVkGAQgASgIEh8KE2lzX3BsYXRmb3JtX2RlZmF1bHQYBSABKAhCAhgBEh4KB29yZ19pZHMYBiADKAlCDbpICpIBByIFcgMYgAESSgoLbWVtYmVyX2tleXMYByADKAsyNS5haS5zdGlnbWVyLnBsYXRmb3JtLmN1cnNvcmFjY291bnQudjEuQ3Vyc29yTWVtYmVyS2V5EhIKCmNyZWF0ZWRfYnkYCCABKAkSLgoKY3JlYXRlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEgoKdXBkYXRlZF9ieRgKIAEoCRIuCgp1cGRhdGVkX2F0GAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIgChhvbl9kZW1hbmRfdXNhZ2VfZGlzYWJsZWQYDCABKAgSGAoQdGVhbV9pbnZpdGVfbGluaxgNIAEoCSLhAQoPQ3Vyc29yTWVtYmVyS2V5Eg4KBmtleV9pZBgBIAEoCRIPCgdhcGlfa2V5GAIgASgJEhcKBWxhYmVsGAMgASgJQgi6SAVyAxiAARITCgtib3VuZF9lbWFpbBgEIAEoCRIVCg1ib3VuZF91c2VyX2lkGAUgASgJEhcKD2N1cnNvcl9rZXlfbmFtZRgGIAEoCRIPCgdlbmFibGVkGAcgASgIEhAKCGFkZGVkX2J5GAggASgJEiwKCGFkZGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJOChBDdXJzb3JUZWFtTWVtYmVyEg8KB3VzZXJfaWQYASABKAkSDQoFZW1haWwYAiABKAkSDAoEbmFtZRgDIAEoCRIMCgRyb2xlGAQgASgJItsBChFDdXJzb3JNZW1iZXJTcGVuZBIPCgd1c2VyX2lkGAEgASgJEg0KBWVtYWlsGAIgASgJEioKGWluY2x1ZGVkX3NwZW5kX3VzZF9taWNyb3MYAyABKANCB7pIBCICKAASKQoYb3ZlcmFnZV9zcGVuZF91c2RfbWljcm9zGAQgASgDQge6SAQiAigAEhoKEnRvdGFsX3BlcmNlbnRfdXNlZBgFIAEoARIZChFhdXRvX3BlcmNlbnRfdXNlZBgGIAEoARIYChBhcGlfcGVyY2VudF91c2VkGAcgASgBIrQCChlDdXJzb3JBY2NvdW50U3luY1NuYXBzaG90EhIKCmFjY291bnRfaWQYASABKAkSLQoJc3luY2VkX2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBJHCgdtZW1iZXJzGAMgAygLMjYuYWkuc3RpZ21lci5wbGF0Zm9ybS5jdXJzb3JhY2NvdW50LnYxLkN1cnNvclRlYW1NZW1iZXISRgoFc3BlbmQYBCADKAsyNy5haS5zdGlnbWVyLnBsYXRmb3JtLmN1cnNvcmFjY291bnQudjEuQ3Vyc29yTWVtYmVyU3BlbmQSLwoLY3ljbGVfc3RhcnQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhIKCnN5bmNfZXJyb3IYBiABKAliBnByb3RvMw",[c.file_buf_validate_validate,d.file_google_protobuf_timestamp]),r=(0,t.messageDesc)(n,0);e.s(["CursorAccountSchema",0,r,"file_ai_stigmer_platform_cursoraccount_v1_cursor_account",0,n],988467),e.i(113024);let b=(0,l.fileDesc)("Ci1haS9zdGlnbWVyL3BsYXRmb3JtL2N1cnNvcmFjY291bnQvdjEvaW8ucHJvdG8SJGFpLnN0aWdtZXIucGxhdGZvcm0uY3Vyc29yYWNjb3VudC52MSJoChhVcHNlcnRDdXJzb3JBY2NvdW50SW5wdXQSTAoHYWNjb3VudBgBIAEoCzIzLmFpLnN0aWdtZXIucGxhdGZvcm0uY3Vyc29yYWNjb3VudC52MS5DdXJzb3JBY2NvdW50Qga6SAPIAQEiRgoYRGVsZXRlQ3Vyc29yQWNjb3VudElucHV0EhsKCmFjY291bnRfaWQYASABKAlCB7pIBHICEAESDQoFZm9yY2UYAiABKAgibQoXQWRkQ3Vyc29yTWVtYmVyS2V5SW5wdXQSGwoKYWNjb3VudF9pZBgBIAEoCUIHukgEcgIQARIcCgdhcGlfa2V5GAIgASgJQgu6SAjIAQFyAxiAAhIXCgVsYWJlbBgDIAEoCUIIukgFcgMYgAEiYQoaUmVtb3ZlQ3Vyc29yTWVtYmVyS2V5SW5wdXQSGwoKYWNjb3VudF9pZBgBIAEoCUIHukgEcgIQARIXCgZrZXlfaWQYAiABKAlCB7pIBHICEAESDQoFZm9yY2UYAyABKAgiZwoeU2V0Q3Vyc29yTWVtYmVyS2V5RW5hYmxlZElucHV0EhsKCmFjY291bnRfaWQYASABKAlCB7pIBHICEAESFwoGa2V5X2lkGAIgASgJQge6SARyAhABEg8KB2VuYWJsZWQYAyABKAgiNQoWU3luY0N1cnNvckFjY291bnRJbnB1dBIbCgphY2NvdW50X2lkGAEgASgJQge6SARyAhABIhkKF0xpc3RDdXJzb3JBY2NvdW50c0lucHV0IugBChRDdXJzb3JBY2NvdW50U3VtbWFyeRJECgdhY2NvdW50GAEgASgLMjMuYWkuc3RpZ21lci5wbGF0Zm9ybS5jdXJzb3JhY2NvdW50LnYxLkN1cnNvckFjY291bnQSGQoRZW5hYmxlZF9rZXlfY291bnQYAiABKAUSMgoObGFzdF9zeW5jZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhoKEnJvdXRhYmxlX2tleV9jb3VudBgEIAEoBRIfChdndWFyZF90cmlwcGVkX2tleV9jb3VudBgFIAEoBSJmChZDdXJzb3JBY2NvdW50c1Jlc3BvbnNlEkwKCGFjY291bnRzGAEgAygLMjouYWkuc3RpZ21lci5wbGF0Zm9ybS5jdXJzb3JhY2NvdW50LnYxLkN1cnNvckFjY291bnRTdW1tYXJ5IjgKGUdldEN1cnNvckFjY291bnRWaWV3SW5wdXQSGwoKYWNjb3VudF9pZBgBIAEoCUIHukgEcgIQASKmAQoUQ3Vyc29yVGVhbU1lbWJlclZpZXcSRgoGbWVtYmVyGAEgASgLMjYuYWkuc3RpZ21lci5wbGF0Zm9ybS5jdXJzb3JhY2NvdW50LnYxLkN1cnNvclRlYW1NZW1iZXISRgoFc3BlbmQYAiABKAsyNy5haS5zdGlnbWVyLnBsYXRmb3JtLmN1cnNvcmFjY291bnQudjEuQ3Vyc29yTWVtYmVyU3BlbmQiiQIKE0N1cnNvck1lbWJlcktleVZpZXcSQgoDa2V5GAEgASgLMjUuYWkuc3RpZ21lci5wbGF0Zm9ybS5jdXJzb3JhY2NvdW50LnYxLkN1cnNvck1lbWJlcktleRJJCgVzdGF0ZRgCIAEoDjI6LmFpLnN0aWdtZXIucGxhdGZvcm0uY3Vyc29yYWNjb3VudC52MS5DdXJzb3JNZW1iZXJLZXlTdGF0ZRJGCgVzcGVuZBgDIAEoCzI3LmFpLnN0aWdtZXIucGxhdGZvcm0uY3Vyc29yYWNjb3VudC52MS5DdXJzb3JNZW1iZXJTcGVuZBIbChN1c2FnZV9ndWFyZF90cmlwcGVkGAQgASgIIvYCChFDdXJzb3JBY2NvdW50VmlldxJECgdhY2NvdW50GAEgASgLMjMuYWkuc3RpZ21lci5wbGF0Zm9ybS5jdXJzb3JhY2NvdW50LnYxLkN1cnNvckFjY291bnQSUQoIc25hcHNob3QYAiABKAsyPy5haS5zdGlnbWVyLnBsYXRmb3JtLmN1cnNvcmFjY291bnQudjEuQ3Vyc29yQWNjb3VudFN5bmNTbmFwc2hvdBJMCglrZXlfdmlld3MYAyADKAsyOS5haS5zdGlnbWVyLnBsYXRmb3JtLmN1cnNvcmFjY291bnQudjEuQ3Vyc29yTWVtYmVyS2V5VmlldxJeChptZW1iZXJzX3dpdGhvdXRfa2V5c192aWV3cxgFIAMoCzI6LmFpLnN0aWdtZXIucGxhdGZvcm0uY3Vyc29yYWNjb3VudC52MS5DdXJzb3JUZWFtTWVtYmVyVmlld0oECAQQBVIUbWVtYmVyc193aXRob3V0X2tleXMqkgEKFEN1cnNvck1lbWJlcktleVN0YXRlEicKI2N1cnNvcl9tZW1iZXJfa2V5X3N0YXRlX3Vuc3BlY2lmaWVkEAASFQoRbWVtYmVyX2tleV9hY3RpdmUQARIcChhtZW1iZXJfa2V5X293bmVyX3JlbW92ZWQQAhIcChhtZW1iZXJfa2V5X293bmVyX3Vua25vd24QA2IGcHJvdG8z",[n,c.file_buf_validate_validate,d.file_google_protobuf_timestamp]),o=(0,t.messageDesc)(b,0),m=(0,t.messageDesc)(b,1),s=(0,t.messageDesc)(b,2),u=(0,t.messageDesc)(b,3),W=(0,t.messageDesc)(b,4),p=(0,t.messageDesc)(b,5),g=(0,t.messageDesc)(b,6),Z=(0,t.messageDesc)(b,9);(a=i||(i={}))[a.cursor_member_key_state_unspecified=0]="cursor_member_key_state_unspecified",a[a.member_key_active=1]="member_key_active",a[a.member_key_owner_removed=2]="member_key_owner_removed",a[a.member_key_owner_unknown=3]="member_key_owner_unknown",e.s(["AddCursorMemberKeyInputSchema",0,s,"CursorMemberKeyState",0,i,"DeleteCursorAccountInputSchema",0,m,"GetCursorAccountViewInputSchema",0,Z,"ListCursorAccountsInputSchema",0,g,"RemoveCursorMemberKeyInputSchema",0,u,"SetCursorMemberKeyEnabledInputSchema",0,W,"SyncCursorAccountInputSchema",0,p,"UpsertCursorAccountInputSchema",0,o,"file_ai_stigmer_platform_cursoraccount_v1_io",0,b],40253)},767828,369072,435653,992649,e=>{"use strict";var a,i,l=e.i(424407),t=e.i(304532),c=e.i(421415),d=e.i(988158);e.i(113024);let n=(0,l.fileDesc)("CidhaS9zdGlnbWVyL2lhbS9pbnZpdGF0aW9uL3YxL2VudW0ucHJvdG8SHGFpLnN0aWdtZXIuaWFtLmludml0YXRpb24udjEqbQoPSW52aXRhdGlvblN0YXRlEiAKHGludml0YXRpb25fc3RhdGVfdW5zcGVjaWZpZWQQABIKCgZhY3RpdmUQARILCgdleHBpcmVkEAISCwoHcmV2b2tlZBADEhIKDmZ1bGx5X3JlZGVlbWVkEARiBnByb3RvMw");(a=i||(i={}))[a.invitation_state_unspecified=0]="invitation_state_unspecified",a[a.active=1]="active",a[a.expired=2]="expired",a[a.revoked=3]="revoked",a[a.fully_redeemed=4]="fully_redeemed",e.s(["InvitationState",0,i,"file_ai_stigmer_iam_invitation_v1_enum",0,n],369072);var r=e.i(430182),b=e.i(761867),o=e.i(732303);let m=(0,l.fileDesc)("CidhaS9zdGlnbWVyL2lhbS9pbnZpdGF0aW9uL3YxL3NwZWMucHJvdG8SHGFpLnN0aWdtZXIuaWFtLmludml0YXRpb24udjEirAEKDkludml0YXRpb25TcGVjEjAKBHJvbGUYASABKA4yGi5haS5zdGlnbWVyLmlhbS52MS5JYW1Sb2xlQga6SAPIAQESFwoPbWF4X3JlZGVtcHRpb25zGAIgASgFEjYKCmV4cGlyZXNfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQga6SAPIAQESFwoFbGFiZWwYBCABKAlCCLpIBXIDGMgBYgZwcm90bzM",[r.file_ai_stigmer_iam_v1_enum,b.file_buf_validate_validate,o.file_google_protobuf_timestamp]),s=(0,t.messageDesc)(m,0);e.s(["InvitationSpecSchema",0,s,"file_ai_stigmer_iam_invitation_v1_spec",0,m],435653);let u=(0,l.fileDesc)("CiZhaS9zdGlnbWVyL2lhbS9pbnZpdGF0aW9uL3YxL2FwaS5wcm90bxIcYWkuc3RpZ21lci5pYW0uaW52aXRhdGlvbi52MSKnAgoKSW52aXRhdGlvbhItCgthcGlfdmVyc2lvbhgBIAEoCUIYukgVchMKEWlhbS5zdGlnbWVyLmFpL3YxEh8KBGtpbmQYAiABKAlCEbpIDnIMCgpJbnZpdGF0aW9uEk0KCG1ldGFkYXRhGAMgASgLMjMuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlTWV0YWRhdGFCBrpIA8gBARI6CgRzcGVjGAQgASgLMiwuYWkuc3RpZ21lci5pYW0uaW52aXRhdGlvbi52MS5JbnZpdGF0aW9uU3BlYxI+CgZzdGF0dXMYBSABKAsyLi5haS5zdGlnbWVyLmlhbS5pbnZpdGF0aW9uLnYxLkludml0YXRpb25TdGF0dXMigwIKEEludml0YXRpb25TdGF0dXMSDQoFdG9rZW4YASABKAkSPAoFc3RhdGUYAiABKA4yLS5haS5zdGlnbWVyLmlhbS5pbnZpdGF0aW9uLnYxLkludml0YXRpb25TdGF0ZRIYChByZWRlbXB0aW9uX2NvdW50GAMgASgFEkcKC3JlZGVtcHRpb25zGAQgAygLMjIuYWkuc3RpZ21lci5pYW0uaW52aXRhdGlvbi52MS5JbnZpdGF0aW9uUmVkZW1wdGlvbhI/CgVhdWRpdBhjIAEoCzIwLmFpLnN0aWdtZXIuY29tbW9ucy5hcGlyZXNvdXJjZS5BcGlSZXNvdXJjZUF1ZGl0ImQKFEludml0YXRpb25SZWRlbXB0aW9uEhsKE2lkZW50aXR5X2FjY291bnRfaWQYASABKAkSLwoLcmVkZWVtZWRfYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wYgZwcm90bzM",[c.file_ai_stigmer_commons_apiresource_metadata,d.file_ai_stigmer_commons_apiresource_status,n,m,b.file_buf_validate_validate,o.file_google_protobuf_timestamp]),W=(0,t.messageDesc)(u,0);e.s(["InvitationSchema",0,W,"file_ai_stigmer_iam_invitation_v1_api",0,u],992649);let p=(0,l.fileDesc)("CiVhaS9zdGlnbWVyL2lhbS9pbnZpdGF0aW9uL3YxL2lvLnByb3RvEhxhaS5zdGlnbWVyLmlhbS5pbnZpdGF0aW9uLnYxIiUKDEludml0YXRpb25JZBIVCgV2YWx1ZRgBIAEoCUIGukgDyAEBIkgKC0ludml0YXRpb25zEjkKB2VudHJpZXMYASADKAsyKC5haS5zdGlnbWVyLmlhbS5pbnZpdGF0aW9uLnYxLkludml0YXRpb24iMQoZTGlzdEludml0YXRpb25zQnlPcmdJbnB1dBIUCgNvcmcYASABKAlCB7pIBHICEAEiLgoUSW52aXRhdGlvblRva2VuSW5wdXQSFgoFdG9rZW4YASABKAlCB7pIBHICEAEiLwoVUmVkZWVtSW52aXRhdGlvbklucHV0EhYKBXRva2VuGAEgASgJQge6SARyAhABIvsBChFJbnZpdGF0aW9uUHJldmlldxIZChFvcmdhbml6YXRpb25fbmFtZRgBIAEoCRIZChFvcmdhbml6YXRpb25fc2x1ZxgCIAEoCRIdChVvcmdhbml6YXRpb25fbG9nb191cmwYAyABKAkSKAoEcm9sZRgEIAEoDjIaLmFpLnN0aWdtZXIuaWFtLnYxLklhbVJvbGUSLgoKZXhwaXJlc19hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDQoFbGFiZWwYBiABKAkSEAoIaXNfdmFsaWQYByABKAgSFgoOaW52YWxpZF9yZWFzb24YCCABKAliBnByb3RvMw",[u,r.file_ai_stigmer_iam_v1_enum,b.file_buf_validate_validate,o.file_google_protobuf_timestamp]),g=(0,t.messageDesc)(p,0),Z=(0,t.messageDesc)(p,2),A=(0,t.messageDesc)(p,3),G=(0,t.messageDesc)(p,4);e.s(["InvitationIdSchema",0,g,"InvitationTokenInputSchema",0,A,"ListInvitationsByOrgInputSchema",0,Z,"RedeemInvitationInputSchema",0,G,"file_ai_stigmer_iam_invitation_v1_io",0,p],767828)},857897,e=>{"use strict";var a=e.i(910304),i=e.i(292558),l=e.i(891287),t=e.i(338300),c=e.i(166492),d=e.i(754260),n=e.i(297825),r=e.i(468296),b=e.i(170255),o=e.i(459153),m=e.i(421415);function s(e){var a,t;let d=Object.assign((0,l.create)(r.ChannelAppSpecSchema),(0,i.stripUndefined)({}));return e.slack?d.providerConfig={case:"slack",value:(a=e.slack,Object.assign((0,l.create)(r.SlackChannelAppConfigSchema),(0,i.stripUndefined)({clientId:a.clientId,clientSecret:a.clientSecret,signingSecret:a.signingSecret})))}:e.whatsapp&&(d.providerConfig={case:"whatsapp",value:(t=e.whatsapp,Object.assign((0,l.create)(r.WhatsAppChannelAppConfigSchema),(0,i.stripUndefined)({appId:t.appId,appSecret:t.appSecret,accessToken:t.accessToken,verifyToken:t.verifyToken})))}),Object.assign((0,l.create)(c.ChannelAppSchema),{apiVersion:"agentic.stigmer.ai/v1",kind:"ChannelApp",metadata:Object.assign((0,l.create)(m.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:d})}e.s(["ChannelAppClient",0,class{command;query;constructor(e){this.command=(0,t.createClient)(d.ChannelAppCommandController,e),this.query=(0,t.createClient)(n.ChannelAppQueryController,e)}async apply(e){try{return await this.command.apply(s(e))}catch(e){throw(0,a.wrapError)(e)}}async create(e){try{return await this.command.create(s(e))}catch(e){throw(0,a.wrapError)(e)}}async update(e){try{return await this.command.update(s(e))}catch(e){throw(0,a.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,l.create)(o.ApiResourceDeleteInputSchema,{resourceId:e.resourceId,versionMessage:e.versionMessage,force:e.force}))}catch(e){throw(0,a.wrapError)(e)}}async get(e){try{return await this.query.get((0,l.create)(o.ApiResourceIdSchema,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async getByReference(e){try{return await this.query.getByReference((0,l.create)(o.ApiResourceReferenceSchema,{...e,kind:b.ApiResourceKind.channel_app}))}catch(e){throw(0,a.wrapError)(e)}}async listByOrg(e){try{return await this.query.listByOrg(e)}catch(e){throw(0,a.wrapError)(e)}}},"toChannelAppUpdateInput",0,function(e){var a,i;let t=e.metadata,c=e.spec??(0,l.create)(r.ChannelAppSpecSchema);return{id:t?.id||void 0,name:t?.name??"",slug:t?.slug||void 0,org:t?.org??"",labels:t?.labels&&Object.keys(t.labels).length>0?{...t.labels}:void 0,visibility:t?.visibility||void 0,slack:c.providerConfig?.case==="slack"?{clientId:(a=c.providerConfig.value).clientId||void 0,clientSecret:a.clientSecret||void 0,signingSecret:a.signingSecret||void 0}:void 0,whatsapp:c.providerConfig?.case==="whatsapp"?{appId:(i=c.providerConfig.value).appId||void 0,appSecret:i.appSecret||void 0,accessToken:i.accessToken||void 0,verifyToken:i.verifyToken||void 0}:void 0}}])},34442,e=>{"use strict";var a=e.i(910304),i=e.i(292558),l=e.i(891287),t=e.i(338300),c=e.i(170255),d=e.i(459153),n=e.i(421415),r=e.i(741787),b=e.i(978477),o=e.i(791367),m=e.i(437241);function s(e){return Object.assign((0,l.create)(r.OAuthAppSchema),{apiVersion:"iam.stigmer.ai/v1",kind:"OAuthApp",metadata:Object.assign((0,l.create)(n.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:Object.assign((0,l.create)(m.OAuthAppSpecSchema),(0,i.stripUndefined)({provider:e.provider,clientId:e.clientId,clientSecret:e.clientSecret,authorizationUrl:e.authorizationUrl,tokenUrl:e.tokenUrl,scopes:e.scopes,userinfoUrl:e.userinfoUrl,scopeParameterName:e.scopeParameterName,vendorApprovalStatus:e.vendorApprovalStatus,vendorApprovalDocsUrl:e.vendorApprovalDocsUrl,tokenEndpointAuthMethod:e.tokenEndpointAuthMethod}))})}e.s(["OAuthAppClient",0,class{command;query;constructor(e){this.command=(0,t.createClient)(b.OAuthAppCommandController,e),this.query=(0,t.createClient)(o.OAuthAppQueryController,e)}async apply(e){try{return await this.command.apply(s(e))}catch(e){throw(0,a.wrapError)(e)}}async create(e){try{return await this.command.create(s(e))}catch(e){throw(0,a.wrapError)(e)}}async update(e){try{return await this.command.update(s(e))}catch(e){throw(0,a.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,l.create)(d.ApiResourceDeleteInputSchema,{resourceId:e.resourceId,versionMessage:e.versionMessage,force:e.force}))}catch(e){throw(0,a.wrapError)(e)}}async get(e){try{return await this.query.get((0,l.create)(d.ApiResourceIdSchema,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async getByReference(e){try{return await this.query.getByReference((0,l.create)(d.ApiResourceReferenceSchema,{...e,kind:c.ApiResourceKind.oauth_app}))}catch(e){throw(0,a.wrapError)(e)}}async listByOrg(e){try{return await this.query.listByOrg(e)}catch(e){throw(0,a.wrapError)(e)}}},"toOAuthAppUpdateInput",0,function(e){let a=e.metadata,i=e.spec??(0,l.create)(m.OAuthAppSpecSchema);return{id:a?.id||void 0,name:a?.name??"",slug:a?.slug||void 0,org:a?.org??"",labels:a?.labels&&Object.keys(a.labels).length>0?{...a.labels}:void 0,visibility:a?.visibility||void 0,provider:i.provider||void 0,clientId:i.clientId||void 0,clientSecret:i.clientSecret||void 0,authorizationUrl:i.authorizationUrl||void 0,tokenUrl:i.tokenUrl||void 0,scopes:i.scopes?.length?[...i.scopes]:void 0,userinfoUrl:i.userinfoUrl||void 0,scopeParameterName:i.scopeParameterName||void 0,vendorApprovalStatus:i.vendorApprovalStatus||void 0,vendorApprovalDocsUrl:i.vendorApprovalDocsUrl||void 0,tokenEndpointAuthMethod:i.tokenEndpointAuthMethod||void 0}}])},353978,e=>{"use strict";var a=e.i(910304),i=e.i(292558),l=e.i(891287),t=e.i(338300),c=e.i(170255),d=e.i(459153),n=e.i(421415),r=e.i(128486),b=e.i(739806),o=e.i(955598),m=e.i(122244);function s(e){return Object.assign((0,l.create)(r.IdentityProviderSchema),{apiVersion:"iam.stigmer.ai/v1",kind:"IdentityProvider",metadata:Object.assign((0,l.create)(n.ApiResourceMetadataSchema),{...e.id&&{id:e.id},name:e.name,org:e.org,...e.slug&&{slug:e.slug},...e.labels&&{labels:e.labels},...e.visibility&&{visibility:e.visibility}}),spec:Object.assign((0,l.create)(m.IdentityProviderSpecSchema),(0,i.stripUndefined)({displayName:e.displayName,jwksUri:e.jwksUri,allowedIssuers:e.allowedIssuers,expectedAudience:e.expectedAudience,rateLimitBudget:e.rateLimitBudget,userinfoEndpoint:e.userinfoEndpoint,isSsoProvider:e.isSsoProvider,oidcClientId:e.oidcClientId,autoProvisionAccounts:e.autoProvisionAccounts,autoGrantOnOrg:e.autoGrantOnOrg,autoGrantRole:e.autoGrantRole,tenantOrgClaim:e.tenantOrgClaim}))})}e.s(["IdentityProviderClient",0,class{command;query;constructor(e){this.command=(0,t.createClient)(b.IdentityProviderCommandController,e),this.query=(0,t.createClient)(o.IdentityProviderQueryController,e)}async apply(e){try{return await this.command.apply(s(e))}catch(e){throw(0,a.wrapError)(e)}}async create(e){try{return await this.command.create(s(e))}catch(e){throw(0,a.wrapError)(e)}}async update(e){try{return await this.command.update(s(e))}catch(e){throw(0,a.wrapError)(e)}}async delete(e){try{return await this.command.delete((0,l.create)(d.ApiResourceDeleteInputSchema,{resourceId:e.resourceId,versionMessage:e.versionMessage,force:e.force}))}catch(e){throw(0,a.wrapError)(e)}}async get(e){try{return await this.query.get((0,l.create)(d.ApiResourceIdSchema,{value:e}))}catch(e){throw(0,a.wrapError)(e)}}async getByReference(e){try{return await this.query.getByReference((0,l.create)(d.ApiResourceReferenceSchema,{...e,kind:c.ApiResourceKind.identity_provider}))}catch(e){throw(0,a.wrapError)(e)}}async listByOrg(e){try{return await this.query.listByOrg(e)}catch(e){throw(0,a.wrapError)(e)}}async getSsoProvider(e){try{return await this.query.getSsoProvider(e)}catch(e){throw(0,a.wrapError)(e)}}},"toIdentityProviderUpdateInput",0,function(e){let a=e.metadata,i=e.spec??(0,l.create)(m.IdentityProviderSpecSchema);return{id:a?.id||void 0,name:a?.name??"",slug:a?.slug||void 0,org:a?.org??"",labels:a?.labels&&Object.keys(a.labels).length>0?{...a.labels}:void 0,visibility:a?.visibility||void 0,displayName:i.displayName||void 0,jwksUri:i.jwksUri||void 0,allowedIssuers:i.allowedIssuers?.length?[...i.allowedIssuers]:void 0,expectedAudience:i.expectedAudience||void 0,rateLimitBudget:i.rateLimitBudget||void 0,userinfoEndpoint:i.userinfoEndpoint||void 0,isSsoProvider:i.isSsoProvider||void 0,oidcClientId:i.oidcClientId||void 0,autoProvisionAccounts:i.autoProvisionAccounts||void 0,autoGrantOnOrg:i.autoGrantOnOrg||void 0,autoGrantRole:i.autoGrantRole||void 0,tenantOrgClaim:i.tenantOrgClaim||void 0}}])}]);
|