@stigmer/server-slim 3.13.0 → 3.14.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 +16 -16
- package/console/__next._head.txt +4 -4
- package/console/__next._index.txt +10 -10
- package/console/__next._tree.txt +2 -2
- package/console/_next/static/chunks/00609po93aecc.js +1 -0
- package/console/_next/static/chunks/{0o-.19qua6web.js → 0243~hpvegq~b.js} +2 -2
- package/console/_next/static/chunks/{0iwpyv2wbln6f.js → 0a2~15er-td24.js} +1 -1
- package/console/_next/static/chunks/0bssx61s0a_wl.js +1 -0
- package/console/_next/static/chunks/{0qji_.pm~u8x3.js → 0d~8qc-i_t3~z.js} +1 -1
- package/console/_next/static/chunks/{04nu-nyhd8yfk.js → 0e21g0s~5r7o9.js} +2 -2
- package/console/_next/static/chunks/0fss.uff1x3km.js +2 -0
- package/console/_next/static/chunks/0gpuzaltw6-8i.js +1 -0
- package/console/_next/static/chunks/0q80yr288t-5-.css +1 -0
- package/console/_next/static/chunks/{0icsogze8wb_v.js → 0uq41itbafxa3.js} +1 -1
- package/console/_next/static/chunks/0wsn_vbkz2vb9.js +1 -0
- package/console/_next/static/chunks/0x0c3-ubfxc~5.js +1 -0
- package/console/_next/static/chunks/0zf7ijjyl6exo.js +1 -0
- package/console/_next/static/chunks/{0zsntdh42--v1.js → 0~l2og0651chl.js} +1 -1
- package/console/_next/static/chunks/10ki-iljfqcs_.js +1 -0
- package/console/_next/static/chunks/163ne8a28fcm8.js +1 -0
- package/console/_not-found/__next._full.txt +16 -16
- package/console/_not-found/__next._head.txt +4 -4
- package/console/_not-found/__next._index.txt +10 -10
- 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 +16 -16
- package/console/auth/callback/__next._full.txt +18 -18
- package/console/auth/callback/__next._head.txt +4 -4
- package/console/auth/callback/__next._index.txt +10 -10
- 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 +18 -18
- package/console/auth/github/callback/__next._full.txt +18 -18
- package/console/auth/github/callback/__next._head.txt +4 -4
- package/console/auth/github/callback/__next._index.txt +10 -10
- 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 +18 -18
- package/console/auth/oauth/callback/__next._full.txt +18 -18
- package/console/auth/oauth/callback/__next._head.txt +4 -4
- package/console/auth/oauth/callback/__next._index.txt +10 -10
- 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 +18 -18
- package/console/chat/__placeholder__/__placeholder__/__next._full.txt +17 -17
- package/console/chat/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/chat/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +17 -17
- package/console/conversations/__next._full.txt +17 -17
- package/console/conversations/__next._head.txt +4 -4
- package/console/conversations/__next._index.txt +10 -10
- 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 +17 -17
- package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +17 -17
- package/console/conversations.html +1 -1
- package/console/conversations.txt +17 -17
- package/console/dashboard/__next._full.txt +17 -17
- package/console/dashboard/__next._head.txt +4 -4
- package/console/dashboard/__next._index.txt +10 -10
- 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 +17 -17
- package/console/executions/__placeholder__/__next._full.txt +16 -16
- package/console/executions/__placeholder__/__next._head.txt +4 -4
- package/console/executions/__placeholder__/__next._index.txt +10 -10
- 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 +16 -16
- package/console/index.html +1 -1
- package/console/index.txt +16 -16
- package/console/invite/__placeholder__/__next._full.txt +17 -17
- package/console/invite/__placeholder__/__next._head.txt +4 -4
- package/console/invite/__placeholder__/__next._index.txt +10 -10
- 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 +17 -17
- package/console/library/__next._full.txt +20 -20
- package/console/library/__next._head.txt +4 -4
- package/console/library/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/agents/__next._head.txt +4 -4
- package/console/library/agents/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/agents/new/__next._full.txt +21 -21
- package/console/library/agents/new/__next._head.txt +4 -4
- package/console/library/agents/new/__next._index.txt +10 -10
- 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 +21 -21
- package/console/library/agents.html +1 -1
- package/console/library/agents.txt +20 -20
- package/console/library/mcp-servers/__next._full.txt +20 -20
- package/console/library/mcp-servers/__next._head.txt +4 -4
- package/console/library/mcp-servers/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/mcp-servers/new/__next._full.txt +21 -21
- package/console/library/mcp-servers/new/__next._head.txt +4 -4
- package/console/library/mcp-servers/new/__next._index.txt +10 -10
- 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 +21 -21
- package/console/library/mcp-servers.html +1 -1
- package/console/library/mcp-servers.txt +20 -20
- package/console/library/schedules/__next._full.txt +20 -20
- package/console/library/schedules/__next._head.txt +4 -4
- package/console/library/schedules/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/schedules/new/__next._full.txt +21 -21
- package/console/library/schedules/new/__next._head.txt +4 -4
- package/console/library/schedules/new/__next._index.txt +10 -10
- 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 +21 -21
- package/console/library/schedules.html +1 -1
- package/console/library/schedules.txt +20 -20
- package/console/library/skills/__next._full.txt +20 -20
- package/console/library/skills/__next._head.txt +4 -4
- package/console/library/skills/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/skills/new/__next._full.txt +21 -21
- package/console/library/skills/new/__next._head.txt +4 -4
- package/console/library/skills/new/__next._index.txt +10 -10
- 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 +21 -21
- package/console/library/skills.html +1 -1
- package/console/library/skills.txt +20 -20
- package/console/library/workflows/__next._full.txt +20 -20
- package/console/library/workflows/__next._head.txt +4 -4
- package/console/library/workflows/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/workflows/executions/__next._full.txt +20 -20
- package/console/library/workflows/executions/__next._head.txt +4 -4
- package/console/library/workflows/executions/__next._index.txt +10 -10
- 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 +20 -20
- package/console/library/workflows/new/__next._full.txt +21 -21
- package/console/library/workflows/new/__next._head.txt +4 -4
- package/console/library/workflows/new/__next._index.txt +10 -10
- 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 +21 -21
- package/console/library/workflows.html +1 -1
- package/console/library/workflows.txt +20 -20
- package/console/library.html +1 -1
- package/console/library.txt +20 -20
- package/console/login/__next._full.txt +18 -18
- package/console/login/__next._head.txt +4 -4
- package/console/login/__next._index.txt +10 -10
- 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 +18 -18
- package/console/oauth/slack/callback/__next._full.txt +18 -18
- package/console/oauth/slack/callback/__next._head.txt +4 -4
- package/console/oauth/slack/callback/__next._index.txt +10 -10
- 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 +18 -18
- package/console/sessions/__placeholder__/__next._full.txt +16 -16
- package/console/sessions/__placeholder__/__next._head.txt +4 -4
- package/console/sessions/__placeholder__/__next._index.txt +10 -10
- 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 +16 -16
- package/console/settings/__next._full.txt +20 -20
- package/console/settings/__next._head.txt +4 -4
- package/console/settings/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/account-preferences/__next._head.txt +4 -4
- package/console/settings/account-preferences/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/api-keys/__next._full.txt +19 -19
- package/console/settings/api-keys/__next._head.txt +4 -4
- package/console/settings/api-keys/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/billing/__next._full.txt +20 -20
- package/console/settings/billing/__next._head.txt +4 -4
- package/console/settings/billing/__next._index.txt +10 -10
- 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 +20 -20
- package/console/settings/channel-apps/__next._full.txt +19 -19
- package/console/settings/channel-apps/__next._head.txt +4 -4
- package/console/settings/channel-apps/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/cursor-accounts/__next._full.txt +21 -21
- package/console/settings/cursor-accounts/__next._head.txt +4 -4
- package/console/settings/cursor-accounts/__next._index.txt +10 -10
- 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 +21 -21
- package/console/settings/environments/__next._full.txt +19 -19
- package/console/settings/environments/__next._head.txt +4 -4
- package/console/settings/environments/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/identity-providers/__next._full.txt +19 -19
- package/console/settings/identity-providers/__next._head.txt +4 -4
- package/console/settings/identity-providers/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/invitations/__next._full.txt +19 -19
- package/console/settings/invitations/__next._head.txt +4 -4
- package/console/settings/invitations/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/members/__next._full.txt +19 -19
- package/console/settings/members/__next._head.txt +4 -4
- package/console/settings/members/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/memory/__next._full.txt +19 -19
- package/console/settings/memory/__next._head.txt +4 -4
- package/console/settings/memory/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/oauth-apps/__next._full.txt +19 -19
- package/console/settings/oauth-apps/__next._head.txt +4 -4
- package/console/settings/oauth-apps/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/org-preferences/__next._full.txt +19 -19
- package/console/settings/org-preferences/__next._head.txt +4 -4
- package/console/settings/org-preferences/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/org-profile/__next._full.txt +19 -19
- package/console/settings/org-profile/__next._head.txt +4 -4
- package/console/settings/org-profile/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/platform-clients/__next._full.txt +19 -19
- package/console/settings/platform-clients/__next._head.txt +4 -4
- package/console/settings/platform-clients/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings/pricing-governance/__next._full.txt +20 -20
- package/console/settings/pricing-governance/__next._head.txt +4 -4
- package/console/settings/pricing-governance/__next._index.txt +10 -10
- 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 +20 -20
- package/console/settings/provider-standing/__next._full.txt +20 -20
- package/console/settings/provider-standing/__next._head.txt +4 -4
- package/console/settings/provider-standing/__next._index.txt +10 -10
- 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 +20 -20
- package/console/settings/usage/__next._full.txt +19 -19
- package/console/settings/usage/__next._head.txt +4 -4
- package/console/settings/usage/__next._index.txt +10 -10
- 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 +19 -19
- package/console/settings.html +1 -1
- package/console/settings.txt +20 -20
- package/console/workflows/__next._full.txt +16 -16
- package/console/workflows/__next._head.txt +4 -4
- package/console/workflows/__next._index.txt +10 -10
- 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 +17 -17
- package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
- package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +10 -10
- 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 +17 -17
- package/console/workflows/executions/__next._full.txt +16 -16
- package/console/workflows/executions/__next._head.txt +4 -4
- package/console/workflows/executions/__next._index.txt +10 -10
- 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 +17 -17
- package/console/workflows/executions/__placeholder__/__next._head.txt +4 -4
- package/console/workflows/executions/__placeholder__/__next._index.txt +10 -10
- 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 +17 -17
- package/console/workflows/executions.html +1 -1
- package/console/workflows/executions.txt +16 -16
- package/console/workflows.html +1 -1
- package/console/workflows.txt +16 -16
- package/main.js +286 -100
- package/package.json +6 -6
- package/workflow-bundle-agent-execution.js +26 -8
- package/workflow-bundle-workflow-execution.js +25 -7
- package/console/_next/static/chunks/0-l4jzu40dd8w.js +0 -1
- package/console/_next/static/chunks/0-z-fnjdx4ulh.js +0 -1
- package/console/_next/static/chunks/07wnm1~gr1rx~.js +0 -1
- package/console/_next/static/chunks/0af53k.rxu1kn.js +0 -1
- package/console/_next/static/chunks/0cgp87bgoglgv.js +0 -1
- package/console/_next/static/chunks/0g-98wql22rf4.css +0 -1
- package/console/_next/static/chunks/0oprw5m.lmqln.js +0 -1
- package/console/_next/static/chunks/0ptwwlt0l20~o.js +0 -1
- package/console/_next/static/chunks/0taiwi2j.k7mm.js +0 -1
- package/console/_next/static/chunks/11xfx57fbi3md.js +0 -2
- /package/console/_next/static/{XrBnttPHHP5Wmi7mT4uLM → _-1QOBCdmEZcdWQHZomTm}/_buildManifest.js +0 -0
- /package/console/_next/static/{XrBnttPHHP5Wmi7mT4uLM → _-1QOBCdmEZcdWQHZomTm}/_clientMiddlewareManifest.js +0 -0
- /package/console/_next/static/{XrBnttPHHP5Wmi7mT4uLM → _-1QOBCdmEZcdWQHZomTm}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,774079,901501,t=>{"use strict";var e=t.i(843476),s=t.i(893976);t.s(["RedactedSecretsNotice",0,function({className:t}){return(0,e.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",t),children:["Secret values are shown as ",(0,e.jsx)("code",{className:"stg:font-mono",children:"***REDACTED***"}),". Applying keeps the stored secrets; replace a marker to set a new value."]})}],774079),t.s(["containsRedactedSecrets",0,function(t){return t.includes("***REDACTED***")}],901501)},616629,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976),n=t.i(468806),i=t.i(610595),a=t.i(846696),g=t.i(774079),l=t.i(901501),o=t.i(864652),c=t.i(590745),d=t.i(586108),u=t.i(326283);let x=(0,s.lazy)(()=>t.A(573374).then(t=>({default:t.YamlEditor})));function m({label:t="Loading editor…"}){return(0,e.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:t})}t.s(["EditResourceYamlDialog",0,function({open:t,onOpenChange:f,resource:p,onApplied:b}){let h=function({resource:t}){let e=(0,d.useStigmer)(),r=(0,s.useMemo)(()=>t?(0,c.serializeManifest)(t):"",[t]),[n,i]=(0,s.useState)(r),[a,g]=(0,s.useState)(!1),[x,m]=(0,s.useState)(!1),[f,p]=(0,s.useState)(null),[b,h]=(0,s.useState)(null);(0,s.useEffect)(()=>{a||i(r)},[r,a]);let v=(0,s.useCallback)(t=>{i(t),g(t!==r)},[r]),j=(0,s.useCallback)(()=>{i(r),g(!1),p(null)},[r]),y=(0,s.useCallback)(()=>p(null),[]),k=(0,s.useMemo)(()=>t&&r?(0,o.parseManifest)(r)[0].handler.yamlKind:null,[t,r]),N=(0,s.useMemo)(()=>{let t;if(!n.trim())return{status:"empty"};try{t=(0,o.parseManifest)(n)}catch(t){return{status:"invalid",message:(0,u.toError)(t).message}}if(t.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 e=t[0];return null!==k&&e.handler.yamlKind!==k?{status:"invalid",message:`The document's kind changed from ${k} to ${e.handler.yamlKind}. To apply a different resource kind, use Apply YAML in the Library instead.`}:{status:"valid",document:e}},[n,k]),C=(0,s.useRef)(0);(0,s.useEffect)(()=>{if("valid"!==N.status)return void h(null);let{document:t}=N,s=++C.current;h(null);let r=setTimeout(async()=>{let r;try{let s=await e.manifest.getByReference(t.handler.yamlKind,t.org,t.slug);r=null!==s?"update":"create"}catch{r="unknown"}C.current===s&&h({action:r,slug:t.slug})},400);return()=>clearTimeout(r)},[N,e]);let w=(0,s.useCallback)(async()=>{if("valid"!==N.status)return null;m(!0),p(null);try{let t=await e.manifest.apply(N.document);return g(!1),t}catch(t){throw p((0,u.toError)(t)),t}finally{m(!1)}},[N,e]),M=(0,s.useMemo)(()=>(0,l.containsRedactedSecrets)(n),[n]);return(0,s.useMemo)(()=>({yaml:n,setYaml:v,isDirty:a,validation:N,target:b,hasRedactedSecrets:M,apply:w,isApplying:x,error:f,clearError:y,reset:j}),[n,v,a,N,b,M,w,x,f,y,j])}({resource:p}),{reset:v}=h;(0,s.useEffect)(()=>{t&&v()},[t,v]);let j=(0,s.useCallback)(async()=>{try{let t=await h.apply();if(!t)return;a.toast.success(`${t.displayName} "${t.name}" applied`),f(!1),b?.(t)}catch{}},[h,f,b]),y="valid"===h.validation.status&&h.isDirty&&!h.isApplying;return(0,e.jsx)(n.DialogShell,{open:t,onOpenChange:f,width:"3xl","aria-label":"Edit YAML",children:(0,e.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4 stg:p-6",children:[(0,e.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,e.jsx)("h3",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Edit YAML"}),(0,e.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."})]}),p?(0,e.jsx)(s.Suspense,{fallback:(0,e.jsx)(m,{}),children:(0,e.jsx)(x,{value:h.yaml,onChange:h.setYaml,className:"stg:h-80"})}):(0,e.jsx)(m,{label:"Loading resource…"}),h.hasRedactedSecrets&&(0,e.jsx)(g.RedactedSecretsNotice,{}),"invalid"===h.validation.status&&(0,e.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:h.validation.message}),h.error&&(0,e.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,e.jsx)("p",{className:"stg:flex-1 stg:text-sm stg:text-destructive",children:(0,i.getUserMessage)(h.error)}),(0,e.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-2",children:[(0,e.jsx)("button",{type:"button",onClick:j,disabled:"valid"!==h.validation.status||h.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,e.jsx)("button",{type:"button",onClick:h.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,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,e.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground","aria-live":"polite",children:function(t,e,s){if("valid"!==t)return"";if(!e)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}.`}}(h.validation.status,h.isDirty,h.target)}),(0,e.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,e.jsx)("button",{type:"button",onClick:()=>f(!1),disabled:h.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,e.jsx)("button",{type:"button",onClick:j,disabled:!y,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:h.isApplying?"Applying…":"Apply changes"})]})]})]})})}],616629)},476007,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(610595),n=t.i(893976);let i={auth:"Authentication required",permission:"Access denied","not-found":"Not found",validation:"Invalid request",server:"Server error",unavailable:"Service unavailable",cancelled:"Request cancelled",unknown:"Something went wrong"};function a({className:t}){return(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M7.13 2.5a1 1 0 0 1 1.74 0l5.5 9.5A1 1 0 0 1 13.5 13.5h-11a1 1 0 0 1-.87-1.5l5.5-9.5z"}),(0,e.jsx)("path",{d:"M8 6v3"}),(0,e.jsx)("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor",stroke:"none"})]})}function g({className:t}){return(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M8 1.5l5 2v4c0 3.5-2.5 5.5-5 6.5-2.5-1-5-3-5-6.5v-4l5-2z"}),(0,e.jsx)("path",{d:"M6 6.5l4 4M10 6.5l-4 4"})]})}function l({className:t}){return(0,e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:(0,e.jsx)("path",{d:"M4 6l4 4 4-4"})})}function o({className:t}){return(0,e.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M2 6.5h4v-4"}),(0,e.jsx)("path",{d:"M3.5 11.5a5.5 5.5 0 1 0 .5-6l-2 1"})]})}t.s(["ErrorMessage",0,function({error:t,title:c,retry:d,className:u}){let[x,m]=(0,s.useState)(!1);if(!t)return null;let f=(0,r.classifyError)(t),p=(0,r.getUserMessage)(t),b=(0,r.getRpcMetadata)(t),h=(0,r.isRetryableError)(t);return(0,e.jsx)("div",{role:"alert",className:(0,n.cn)("stg:bg-destructive-subtle stg:border-destructive/20 stg:text-destructive stg:rounded-lg stg:border stg:p-4",u),children:(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:["auth"===f||"permission"===f?(0,e.jsx)(g,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}):(0,e.jsx)(a,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,e.jsxs)("div",{className:"stg:min-w-0 stg:flex-1 stg:space-y-1",children:[(0,e.jsx)("p",{className:"stg:text-sm stg:font-medium",children:c??i[f]}),(0,e.jsx)("p",{className:"stg:text-destructive-muted stg:text-sm",children:p}),b&&(0,e.jsxs)("div",{className:"stg:pt-1",children:[(0,e.jsxs)("button",{type:"button",onClick:()=>m(t=>!t),className:"stg:text-destructive-muted stg:hover:text-destructive-muted stg:inline-flex stg:items-center stg:gap-1 stg:text-xs stg:transition-colors",children:[(0,e.jsx)(l,{className:(0,n.cn)("stg:size-3 stg:transition-transform",x&&"stg:rotate-180")}),"Technical details"]}),x&&(0,e.jsxs)("dl",{className:"stg:text-destructive-muted stg:mt-1.5 stg:space-y-0.5 stg:font-mono stg:text-xs",children:[(0,e.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,e.jsx)("dt",{className:"stg:shrink-0",children:"Method:"}),(0,e.jsx)("dd",{className:"stg:truncate",children:b.method})]}),(0,e.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,e.jsx)("dt",{className:"stg:shrink-0",children:"Path:"}),(0,e.jsx)("dd",{className:"stg:truncate",children:b.path})]})]})]})]}),d&&h&&(0,e.jsxs)("button",{type:"button",onClick:d,className:(0,n.cn)("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1.5 stg:rounded-md stg:border stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:border-destructive/20 stg:text-destructive stg:hover:bg-destructive-subtle","stg:transition-colors"),children:[(0,e.jsx)(o,{className:"stg:size-3"}),"Retry"]})]})})}])},310057,t=>{"use strict";var e=t.i(843476),s=t.i(271645);let r=(0,s.createContext)(null);t.s(["LibraryBreadcrumbProvider",0,function({children:t}){let[n,i]=(0,s.useState)(null),a=(0,s.useCallback)(t=>i(t),[]),g=(0,s.useMemo)(()=>({label:n,setLabel:a}),[n,a]);return(0,e.jsx)(r.Provider,{value:g,children:t})},"useBreadcrumbLabel",0,function(){return(0,s.useContext)(r)?.label??null},"useBreadcrumbOverride",0,function(){let t=(0,s.useContext)(r),e=(0,s.useCallback)(t=>{},[]);return{setLabel:t?.setLabel??e}}])},927056,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);t.s(["Tabs",0,function({tabs:t,activeTab:n,onTabChange:i,children:a,"aria-label":g,className:l}){let o=(0,s.useId)(),c=(0,s.useRef)(new Map),d=t=>`${o}-tab-${t}`,u=t=>`${o}-panel-${t}`,x=(0,s.useCallback)(t=>{c.current.get(t)?.focus(),i(t)},[i]),m=(0,s.useCallback)(e=>{let s=t.findIndex(t=>t.id===n);if(-1===s)return;let r=null;switch(e.key){case"ArrowRight":r=(s+1)%t.length;break;case"ArrowLeft":r=(s-1+t.length)%t.length;break;case"Home":r=0;break;case"End":r=t.length-1;break;default:return}e.preventDefault(),x(t[r].id)},[t,n,x]);return(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col",l),children:[(0,e.jsx)("div",{role:"tablist","aria-label":g,onKeyDown:m,className:"stg:flex stg:border-b stg:border-border",children:t.map(t=>{let s=t.id===n;return(0,e.jsxs)("button",{ref:e=>{e?c.current.set(t.id,e):c.current.delete(t.id)},id:d(t.id),role:"tab",type:"button","aria-selected":s,"aria-controls":u(t.id),tabIndex:s?0:-1,onClick:()=>i(t.id),"data-cursor-target":`tab-${t.id}`,className:(0,r.cn)("stg:relative stg:inline-flex stg:items-center stg:gap-1.5 stg:px-3 stg:py-2 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:focus-visible:ring-offset-1",s?"stg:text-foreground":"stg:text-muted-foreground stg:hover:text-foreground"),children:[t.icon,t.label,null!=t.badge&&t.badge>0&&(0,e.jsx)("span",{"aria-hidden":"true",className:(0,r.cn)("stg:inline-flex stg:min-w-[1.25rem] stg:items-center stg:justify-center stg:rounded-full stg:px-1 stg:py-px stg:text-[10px] stg:font-medium stg:leading-none",s?"stg:bg-primary-subtle stg:text-primary":"stg:bg-muted stg:text-muted-foreground"),children:t.badge}),s&&(0,e.jsx)("span",{className:"stg:absolute stg:inset-x-0 stg:-bottom-px stg:h-0.5 stg:bg-primary","aria-hidden":"true"})]},t.id)})}),(0,e.jsx)("div",{id:u(n),role:"tabpanel","aria-labelledby":d(n),tabIndex:0,className:"stg:min-h-0 stg:flex-1 stg:pt-4 stg:focus-visible:outline-none",children:a})]})}])},266442,t=>{"use strict";var e=t.i(843476),s=t.i(893976),r=t.i(188482);let n={ready:"Ready",running:"Running",pending:"Pending",degraded:"Degraded",failed:"Failed",disabled:"Disabled",draft:"Draft"};t.s(["StatusBadge",0,function({phase:t,label:i,tooltip:a,className:g}){let l=i??n[t],o=(0,e.jsxs)("span",{className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-full stg:px-2 stg:py-0.5 stg:text-[11px] stg:font-medium stg:leading-none",function(t){switch(t){case"ready":return"stg:bg-[var(--stgm-status-ready-subtle)] stg:text-[var(--stgm-status-ready)]";case"running":return"stg:bg-[var(--stgm-status-running-subtle)] stg:text-[var(--stgm-status-running)]";case"pending":return"stg:bg-[var(--stgm-status-pending-subtle)] stg:text-[var(--stgm-status-pending)]";case"degraded":return"stg:bg-[var(--stgm-status-degraded-subtle)] stg:text-[var(--stgm-status-degraded)]";case"failed":return"stg:bg-[var(--stgm-status-failed-subtle)] stg:text-[var(--stgm-status-failed)]";case"disabled":return"stg:bg-[var(--stgm-status-disabled-subtle)] stg:text-[var(--stgm-status-disabled)]";case"draft":return"stg:bg-[var(--stgm-status-draft-subtle)] stg:text-[var(--stgm-status-draft)]"}}(t),g),children:[(0,e.jsx)("span",{className:(0,s.cn)("stg:size-1.5 stg:shrink-0 stg:rounded-full",function(t){switch(t){case"ready":return"stg:bg-[var(--stgm-status-ready)]";case"running":return"stg:bg-[var(--stgm-status-running)]";case"pending":return"stg:bg-[var(--stgm-status-pending)]";case"degraded":return"stg:bg-[var(--stgm-status-degraded)]";case"failed":return"stg:bg-[var(--stgm-status-failed)]";case"disabled":return"stg:bg-[var(--stgm-status-disabled)]";case"draft":return"stg:bg-[var(--stgm-status-draft)]"}}(t)),"aria-hidden":"true"}),l]});return a?(0,e.jsxs)(r.Tooltip,{children:[(0,e.jsx)(r.TooltipTrigger,{render:(0,e.jsx)("span",{className:"stg:inline-flex"}),children:o}),(0,e.jsx)(r.TooltipContent,{side:"top",children:a})]}):o}])},154752,t=>{"use strict";var e=t.i(271645),s=t.i(846696),r=t.i(193799);t.s(["useCopyResource",0,function(){let{copy:t}=(0,r.useCopyFeedback)(),n=(0,e.useCallback)(async(e,r)=>{await t(e)?s.toast.success(`${r} copied`):s.toast.error(`Couldn't copy ${r}`)},[t]),i=(0,e.useCallback)(t=>n(t,"ID"),[n]),a=(0,e.useCallback)(t=>n(t,"Slug"),[n]),g=(0,e.useCallback)((t,e)=>n(`${t}/${e}`,"Qualified slug"),[n]);return(0,e.useMemo)(()=>({copy:n,copyId:i,copySlug:a,copyQualifiedSlug:g}),[n,i,a,g])}])},668093,652337,t=>{"use strict";var e=t.i(843476),s=t.i(893976),r=t.i(266442),n=t.i(927056),i=t.i(271645),a=t.i(845132);function g({primaryAction:t,actions:r,className:n}){let i=null!=r&&r.length>0;return t||i?(0,e.jsxs)("div",{className:(0,s.cn)("stg:flex stg:items-center stg:gap-2",n),children:[t&&(0,e.jsxs)("button",{type:"button",onClick:t.onAction,disabled:t.disabled,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[t.icon,t.label]}),i&&(0,e.jsx)(l,{actions:r})]}):null}function l({actions:t}){var s;let r=(s=t,(0,i.useMemo)(()=>{let t=new Map;for(let e of s){let s=e.group??"__default",r=t.get(s);r?r.push(e):t.set(s,[e])}return Array.from(t.entries()).map(([t,e])=>({key:t,items:e}))},[s]));return(0,e.jsxs)(a.ActionMenu,{children:[(0,e.jsx)(a.ActionMenu.Trigger,{"aria-label":"More actions",children:(0,e.jsx)(o,{className:"stg:size-4"})}),(0,e.jsx)(a.ActionMenu.Content,{children:r.map((t,s)=>(0,e.jsxs)(a.ActionMenu.Group,{children:[s>0&&(0,e.jsx)(a.ActionMenu.Separator,{}),t.items.map(t=>(0,e.jsx)(a.ActionMenu.Item,{icon:t.icon,shortcut:t.shortcut,variant:t.variant,disabled:t.disabled,onSelect:t.onAction,children:t.label},t.id))]},t.key))})]})}function o({className:t}){return(0,e.jsxs)("svg",{className:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"8",cy:"3",r:"1.25"}),(0,e.jsx)("circle",{cx:"8",cy:"8",r:"1.25"}),(0,e.jsx)("circle",{cx:"8",cy:"13",r:"1.25"})]})}function c({header:t,visibilityControl:s,metaExtra:n}){let{name:i,nameElement:a,org:g,slug:l,qualifiedSlug:o,description:x,iconUrl:m,icon:f,createdAt:p,updatedAt:b,status:h,statusLabel:v}=t,j=l&&l!==i&&!o;return(0,e.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-start stg:gap-3",children:[m?(0,e.jsx)("img",{src:m,alt:"",className:"stg:mt-0.5 stg:size-8 stg:shrink-0 stg:rounded stg:object-cover"}):f?(0,e.jsx)("span",{className:"stg:mt-1 stg:shrink-0",children:f}):null,(0,e.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[a??(0,e.jsx)("h2",{className:"stg:truncate stg:text-lg stg:font-semibold stg:text-foreground",children:i}),j&&(0,e.jsx)("code",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:l}),h&&(0,e.jsx)(r.StatusBadge,{phase:h,label:v}),s]}),o&&(0,e.jsx)("span",{className:"stg:mt-0.5 stg:block stg:truncate stg:font-mono stg:text-xs stg:text-muted-foreground",children:o}),(0,e.jsxs)("div",{className:"stg:mt-0.5 stg:flex stg:flex-wrap stg:items-center stg:gap-x-1.5 stg:text-xs stg:text-muted-foreground",children:[g&&(0,e.jsx)("span",{children:g}),n,p&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(d,{}),(0,e.jsxs)("span",{children:["Created ",u(p)]})]}),b&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(d,{}),(0,e.jsxs)("span",{children:["Updated ",u(b)]})]})]}),x&&(0,e.jsx)("p",{className:"stg:mt-2 stg:text-sm stg:text-muted-foreground",children:x})]})]})}function d(){return(0,e.jsx)("span",{className:"stg:shrink-0","aria-hidden":"true",children:"·"})}function u(t){return t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function x({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z"})})}t.s(["ResourceDetailShell",0,function({header:t,visibilityControl:r,headerMetaExtra:i,headerBanner:a,primaryAction:l,actions:o,tabs:d,activeTab:u,onTabChange:x,tabsAriaLabel:m,children:f,className:p}){let b=null!=d&&d.length>0;return(0,e.jsxs)("div",{className:(0,s.cn)("stg:flex stg:flex-col stg:gap-6",p),children:[a,(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-4",children:[(0,e.jsx)(c,{header:t,visibilityControl:r,metaExtra:i}),(0,e.jsx)(g,{primaryAction:l,actions:o,className:"stg:shrink-0"})]}),b&&u&&x?(0,e.jsx)(n.Tabs,{tabs:d,activeTab:u,onTabChange:x,"aria-label":m,children:f}):f]})}],668093),t.s(["Section",0,function({title:t,count:r,headerActions:n,onEdit:i,scrollTarget:a,children:g,className:l}){return(0,e.jsxs)("section",{className:l,"data-scroll-target":a,children:[(0,e.jsxs)("div",{className:"stg:mb-2 stg:flex stg:items-center stg:gap-2",children:[(0,e.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:t}),null!=r&&r>0&&(0,e.jsx)("span",{className:"stg:inline-flex stg:size-5 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-[10px] stg:font-semibold stg:text-muted-foreground",children:r}),(n||i)&&(0,e.jsxs)("div",{className:"stg:ml-auto stg:flex stg:items-center stg:gap-1",children:[n,i&&(0,e.jsx)("button",{type:"button",onClick:i,"aria-label":`Edit ${t.toLowerCase()}`,className:(0,s.cn)("stg:inline-flex stg:size-6 stg:items-center stg:justify-center stg:rounded-md stg:text-muted-foreground","stg:hover:bg-accent-hover stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:transition-colors"),children:(0,e.jsx)(x,{className:"stg:size-3.5"})})]})]}),(0,e.jsx)("div",{className:"stg:overflow-hidden stg:rounded-lg stg:border stg:border-border",children:g})]})}],652337)},261722,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);function n({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z"})})}function i(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}t.s(["InlineEditTextarea",0,function({value:t,onSave:a,placeholder:g="Click to edit",validate:l,minRows:o=3,disabled:c,isSaving:d,error:u,className:x}){let[m,f]=(0,s.useState)(!1),[p,b]=(0,s.useState)(t),[h,v]=(0,s.useState)(null),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{m&&(b(t),v(null),requestAnimationFrame(()=>{let t=j.current;t&&(t.focus(),t.selectionStart=t.value.length)}))},[m,t]),(0,s.useEffect)(()=>{let t=j.current;t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)},[p,m]);let y=(0,s.useCallback)(async()=>{if(p===t)return void f(!1);if(l){let t=l(p);if(t)return void v(t)}await a(p)&&f(!1)},[p,t,l,a]),k=(0,s.useCallback)(()=>{f(!1),b(t),v(null)},[t]),N=(0,s.useCallback)(t=>{"Enter"===t.key&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),y()):"Escape"===t.key&&k()},[y,k]),C=h||u;return c||!m?(0,e.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit",x),children:(0,e.jsx)("button",{type:"button",onClick:()=>{c||f(!0)},disabled:c,className:(0,r.cn)("stg:w-full stg:rounded-md stg:px-2 stg:py-1.5 stg:text-left stg:transition-colors",!c&&"stg:hover:bg-accent-hover stg:cursor-pointer",c&&"stg:cursor-default","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-2",children:[(0,e.jsx)("pre",{className:(0,r.cn)("stg:min-w-0 stg:whitespace-pre-wrap stg:break-words stg:font-mono stg:text-sm stg:text-foreground",!t&&"stg:text-muted-foreground stg:italic stg:font-sans"),children:t||g}),!c&&(0,e.jsx)(n,{className:"stg:mt-0.5 stg:size-3 stg:shrink-0 stg:text-muted-foreground stg:opacity-0 stg:transition-opacity stg:group-hover/inline-edit:opacity-100"})]})})}):(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-1.5",x),children:[(0,e.jsx)("textarea",{ref:j,value:p,onChange:t=>{b(t.target.value),v(null)},onKeyDown:N,disabled:d,placeholder:g,rows:o,className:(0,r.cn)("stg:w-full stg:resize-y stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring","stg:disabled:opacity-50",C&&"stg:border-destructive")}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between",children:[(0,e.jsx)("span",{className:"stg:text-[10px] stg:text-muted-foreground",children:d?"Saving...":"Ctrl+Enter to save, Escape to cancel"}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,e.jsx)("button",{type:"button",onClick:k,disabled:d,className:(0,r.cn)("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:hover:text-accent-foreground","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:"Cancel"}),(0,e.jsxs)("button",{type:"button",onClick:y,disabled:d,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[d&&(0,e.jsx)(i,{}),"Save"]})]})]}),C&&(0,e.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:C})]})}])},582321,t=>{"use strict";var e=t.i(271645),s=t.i(586108),r=t.i(326283),n=t.i(846696);function i(t){switch(t){case"agent":return"agent";case"skill":return"skill";case"mcpServer":return"MCP server";case"workflow":return"workflow";case"schedule":return"schedule"}}t.s(["useDeleteResource",0,function(t,a,g){let l=(0,s.useStigmer)(),[o,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(null),x=(0,e.useCallback)(async()=>{if(a){c(!0),u(null);try{switch(t){case"agent":await l.agent.delete(a);break;case"skill":await l.skill.delete(a);break;case"mcpServer":await l.mcpServer.delete({resourceId:a});break;case"workflow":await l.workflow.delete(a);break;case"schedule":await l.schedule.delete(a)}n.toast.success(g?`${g} deleted`:`${i(t)} deleted`)}catch(s){let e=(0,r.toError)(s);throw u(e),n.toast.error(`Failed to delete ${i(t)}`),e}finally{c(!1)}}},[l,t,a,g]);return(0,e.useMemo)(()=>({deleteResource:x,isDeleting:o,error:d}),[x,o,d])}])},484763,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(981922),n=t.i(213149);t.s(["useManageAccess",0,function({resource:t,visibility:i,extraSection:a,label:g="Manage access"}){let[l,o]=(0,s.useState)(!1),{allowed:c}=(0,r.useCheckPermission)(t?{kind:t.kindString,id:t.id}:null,"can_view_access"),d=(0,s.useCallback)(()=>o(!0),[]);return{action:t&&c?{id:"manage-access",label:g,group:"sharing",onAction:d}:null,dialog:t?(0,e.jsx)(n.ManageAccessDialog,{open:l,onOpenChange:o,resource:t,visibility:i,extraSection:a}):null,open:d,isOpen:l}}])},352371,t=>{"use strict";var e=t.i(271645);t.i(222258);var s=t.i(967785),r=t.i(590745),n=t.i(846696),i=t.i(745176),a=t.i(193799),g=t.i(926059);t.s(["useExportResource",0,function({kind:t,resource:l}){let o=(0,e.useMemo)(()=>l?"Workflow"===t?(0,g.serializeWorkflowYaml)(l):(0,r.serializeManifest)(l):null,[t,l]),c=(0,e.useMemo)(()=>o?JSON.stringify((0,s.parse)(o),null,2):null,[o]),d=(0,e.useMemo)(()=>l&&(l.metadata?.slug||l.metadata?.name)||"resource",[l]),{copy:u}=(0,a.useCopyFeedback)(),x=(0,e.useCallback)(async()=>{o&&(await u(o)?n.toast.success("YAML copied to clipboard"):n.toast.error("Couldn't copy YAML"))},[u,o]),m=(0,e.useCallback)(async()=>{c&&(await u(c)?n.toast.success("JSON copied to clipboard"):n.toast.error("Couldn't copy JSON"))},[u,c]),f=(0,e.useCallback)(()=>{o&&(0,i.downloadTextFile)(o,`${d}.yaml`,"text/yaml")},[o,d]),p=(0,e.useCallback)(()=>{c&&(0,i.downloadTextFile)(c,`${d}.json`,"application/json")},[c,d]);return(0,e.useMemo)(()=>({copyYaml:x,copyJson:m,downloadYaml:f,downloadJson:p,yaml:o,json:c}),[x,m,f,p,o,c])}])},52595,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);function n({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M8 3v10M3 8h10"})})}function i({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M2 4h12M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.333 1.333 0 0 1 1.334 1.334V4M12.667 4v9.333a1.333 1.333 0 0 1-1.334 1.334H4.667a1.333 1.333 0 0 1-1.334-1.334V4"})})}function a(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}t.s(["InlineEditKeyValue",0,function({value:t,onSave:g,keyLabel:l="Key",showValue:o=!1,valueLabel:c="Value",showSecretToggle:d=!1,showOptionalToggle:u=!1,showDescription:x=!1,editing:m,onEditingChange:f,disabled:p,isSaving:b,error:h,className:v}){let[j,y]=(0,s.useState)(!1),k=m??j,N=(0,s.useCallback)(t=>{y(t),f?.(t)},[f]);(0,s.useEffect)(()=>{void 0!==m&&y(m)},[m]);let[C,w]=(0,s.useState)([...t]);(0,s.useCallback)(()=>{w([...t]),N(!0)},[t,N]);let M=(0,s.useCallback)(()=>{N(!1),w([...t])},[t,N]),S=(0,s.useCallback)(async()=>{let t=C.filter(t=>t.key.trim());await g(t)&&N(!1)},[C,g,N]),L=(0,s.useCallback)((t,e)=>{w(s=>s.map((s,r)=>r===t?{...s,...e}:s))},[]),A=(0,s.useCallback)(t=>{w(e=>e.filter((e,s)=>s!==t))},[]),E=(0,s.useCallback)(()=>{w(t=>[...t,{key:"",value:"",isSecret:!1,description:""}])},[]);return p||!k?(0,e.jsx)("div",{className:(0,r.cn)("stg:flex stg:flex-col",v),children:t.length>0?(0,e.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:t.map(t=>(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3 stg:px-3 stg:py-2.5",children:[(0,e.jsx)("code",{className:"stg:shrink-0 stg:font-mono stg:text-sm stg:font-medium stg:text-foreground",children:t.key}),o&&(0,e.jsx)("span",{className:"stg:min-w-0 stg:break-all stg:font-mono stg:text-xs stg:text-muted-foreground",children:t.value}),d&&(0,e.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground",children:t.isSecret?"secret":"config"}),u&&t.optional&&(0,e.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground-subtle",children:"optional"}),t.description&&(0,e.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:t.description})]},t.key))}):(0,e.jsx)("p",{className:"stg:px-3 stg:py-3 stg:text-xs stg:text-muted-foreground stg:italic",children:"No entries"})}):(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-3",v),children:[C.map((t,s)=>(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:p-2.5",children:[(0,e.jsxs)("div",{className:"stg:flex stg:flex-1 stg:flex-col stg:gap-1.5",children:[(0,e.jsx)("input",{type:"text",value:t.key,onChange:t=>L(s,{key:t.target.value}),placeholder:l,className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:font-mono stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring")}),o&&(0,e.jsx)("input",{type:"text",value:t.value,onChange:t=>L(s,{value:t.target.value}),placeholder:c,className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:font-mono stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring")}),x&&(0,e.jsx)("input",{type:"text",value:t.description??"",onChange:t=>L(s,{description:t.target.value}),placeholder:"Description",className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:text-xs stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring")}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3",children:[d&&(0,e.jsxs)("label",{className:"stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-muted-foreground stg:cursor-pointer",children:[(0,e.jsx)("input",{type:"checkbox",checked:t.isSecret??!1,onChange:t=>L(s,{isSecret:t.target.checked}),className:"stg:size-3.5 stg:rounded stg:border-border"}),"Secret"]}),u&&(0,e.jsxs)("label",{className:"stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-muted-foreground stg:cursor-pointer",children:[(0,e.jsx)("input",{type:"checkbox",checked:t.optional??!1,onChange:t=>L(s,{optional:t.target.checked}),className:"stg:size-3.5 stg:rounded stg:border-border"}),"Optional"]})]})]}),(0,e.jsx)("button",{type:"button",onClick:()=>A(s),"aria-label":`Remove ${t.key||"entry"}`,className:(0,r.cn)("stg:mt-1 stg:inline-flex stg:size-6 stg:items-center stg:justify-center stg:rounded-md stg:text-muted-foreground","stg:hover:bg-destructive-subtle stg:hover:text-destructive","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:(0,e.jsx)(i,{className:"stg:size-3.5"})})]},s)),(0,e.jsxs)("button",{type:"button",onClick:E,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:border stg:border-dashed stg:border-border stg:text-muted-foreground","stg:hover:border-muted-foreground stg:hover:text-foreground stg:hover:bg-muted-subtle","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:transition-colors"),children:[(0,e.jsx)(n,{className:"stg:size-3"}),"Add entry"]}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-end stg:gap-1.5",children:[(0,e.jsx)("button",{type:"button",onClick:M,disabled:b,className:(0,r.cn)("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:"Cancel"}),(0,e.jsxs)("button",{type:"button",onClick:S,disabled:b,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[b&&(0,e.jsx)(a,{}),"Save changes"]})]}),h&&(0,e.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:h})]})}])},81346,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);function n({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z"})})}function i({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"m3 8.5 3.5 3.5 6.5-8"})})}function a({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"m4 4 8 8M12 4l-8 8"})})}function g({className:t}){return(0,e.jsxs)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,e.jsx)("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1.5"}),(0,e.jsx)("circle",{cx:"5.5",cy:"5.5",r:"1"}),(0,e.jsx)("path",{d:"m14 10.5-3-3L4 14"})]})}function l(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}t.s(["InlineEditImage",0,function({value:t,onSave:o,fallback:c,size:d="md",disabled:u,isSaving:x,error:m,className:f}){let[p,b]=(0,s.useState)(!1),[h,v]=(0,s.useState)(t),[j,y]=(0,s.useState)(null),k=(0,s.useRef)(null);(0,s.useEffect)(()=>{p&&(v(t),y(null),requestAnimationFrame(()=>k.current?.focus()))},[p,t]);let N=(0,s.useCallback)(async()=>{let e=h.trim();e===t?b(!1):e&&!function(t){try{return new URL(t),!0}catch{return!1}}(e)?y("Enter a valid URL"):await o(e)&&b(!1)},[h,t,o]),C=(0,s.useCallback)(()=>{b(!1),v(t),y(null)},[t]),w=(0,s.useCallback)(t=>{"Enter"===t.key?(t.preventDefault(),N()):"Escape"===t.key&&C()},[N,C]),M="sm"===d?"stg:size-6":"stg:size-8",S=j||m;return u||!p?(0,e.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit stg:inline-flex",f),children:(0,e.jsxs)("button",{type:"button",onClick:()=>{u||b(!0)},disabled:u,className:(0,r.cn)("stg:relative stg:rounded-md stg:p-0.5 stg:transition-colors",!u&&"stg:hover:bg-accent-hover stg:cursor-pointer","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),"aria-label":"Change icon",children:[t?(0,e.jsx)("img",{src:t,alt:"",className:(0,r.cn)(M,"stg:shrink-0 stg:rounded stg:object-cover")}):c??(0,e.jsx)(g,{className:(0,r.cn)(M,"stg:text-muted-foreground")}),!u&&(0,e.jsx)("span",{className:"stg:absolute stg:-bottom-0.5 stg:-right-0.5 stg:flex stg:size-4 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-muted-foreground stg:opacity-0 stg:transition-opacity stg:group-hover/inline-edit:opacity-100",children:(0,e.jsx)(n,{className:"stg:size-2.5"})})]})}):(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-1",f),children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,e.jsx)("input",{ref:k,type:"url",value:h,onChange:t=>{v(t.target.value),y(null)},onKeyDown:w,disabled:x,placeholder:"https://example.com/icon.png",className:(0,r.cn)("stg:flex-1 stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring","stg:disabled:opacity-50",S&&"stg:border-destructive")}),(0,e.jsx)("button",{type:"button",onClick:N,disabled:x,"aria-label":"Save",className:(0,r.cn)("stg:inline-flex stg:size-7 stg:items-center stg:justify-center stg:rounded-md","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:x?(0,e.jsx)(l,{}):(0,e.jsx)(i,{className:"stg:size-3.5"})}),(0,e.jsx)("button",{type:"button",onClick:C,disabled:x,"aria-label":"Cancel",className:(0,r.cn)("stg:inline-flex stg:size-7 stg:items-center stg:justify-center stg:rounded-md","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:(0,e.jsx)(a,{className:"stg:size-3.5"})}),h&&(0,e.jsx)("button",{type:"button",onClick:()=>v(""),disabled:x,"aria-label":"Clear",className:"stg:text-xs stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground",children:"Clear"})]}),S&&(0,e.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:S})]})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,297629,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(586108),i=e.i(941693);let n=(0,s.createContext)(null),a="stigmer:activeOrgSlug";function l(e){try{localStorage.setItem(a,e)}catch{}}function o(){let e=(0,s.useContext)(n);if(!e)throw Error("useOrg must be used within <OrgProvider>. Wrap your component tree with <OrgProvider> inside a <StigmerProvider>.");return e}e.s(["OrgProvider",0,function({children:e}){let o=(0,r.useStigmer)(),c=(0,i.useFetchCache)(),[d,g]=(0,s.useState)([]),[u,m]=(0,s.useState)(null),[p,x]=(0,s.useState)(!0),[h,f]=(0,s.useState)(null),v=(0,s.useRef)(0),b=(0,s.useCallback)(async e=>{let t=++v.current;x(!0),f(null);try{let s=(await o.organization.findMyOrganizations()).entries;if(t!==v.current)return;if(g(s),0===s.length)return void m(null);let r=e??function(){try{return localStorage.getItem(a)}catch{return null}}(),i=(r?s.find(e=>e.metadata?.slug===r):void 0)??s[0];m(i),i.metadata?.slug&&l(i.metadata.slug)}catch(e){if(t!==v.current)return;f(e instanceof Error?e.message:"Failed to load organizations"),g([]),m(null)}finally{t===v.current&&x(!1)}},[o]);(0,s.useEffect)(()=>{b()},[b]);let R=(0,s.useCallback)(e=>{m(e),e.metadata?.slug&&l(e.metadata.slug)},[]),y=(0,s.useRef)(null),w=u?.metadata?.slug??null;(0,s.useEffect)(()=>{let e=y.current;y.current=w,null!==e&&null!==w&&e!==w&&c?.clear()},[w,c]);let j=(0,s.useMemo)(()=>({orgs:d,activeOrg:u,setActiveOrg:R,isLoading:p,error:h,retry:b,refresh:b}),[d,u,R,p,h,b]);return(0,t.jsx)(n.Provider,{value:j,children:e})},"useActiveOrgId",0,function(){let{activeOrg:e}=o();return e?.metadata?.id??""},"useActiveOrgSlug",0,function(){let{activeOrg:e}=o();return e?.metadata?.slug??""},"useOrg",0,o])},869803,e=>{"use strict";e.s(["UNSTYLED_FIELDSET",0,"stg:m-0 stg:min-w-0 stg:p-0","UNSTYLED_LIST",0,"stg:m-0 stg:list-none stg:p-0"])},63209,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},691444,e=>{"use strict";var t=e.i(430182);let s={[t.IamRole.iam_role_unspecified]:"unspecified",[t.IamRole.owner]:"owner",[t.IamRole.admin]:"admin",[t.IamRole.member]:"member",[t.IamRole.viewer]:"viewer",[t.IamRole.participant]:"participant"},r={owner:t.IamRole.owner,admin:t.IamRole.admin,member:t.IamRole.member,viewer:t.IamRole.viewer,participant:t.IamRole.participant},i={[t.IamRole.iam_role_unspecified]:"Unspecified",[t.IamRole.owner]:"Owner",[t.IamRole.admin]:"Admin",[t.IamRole.member]:"Member",[t.IamRole.viewer]:"Viewer",[t.IamRole.participant]:"Participant"},n={[t.IamRole.iam_role_unspecified]:"",[t.IamRole.owner]:"Full access including delete and access management",[t.IamRole.admin]:"Edit access and member management",[t.IamRole.member]:"Standard access to organization resources",[t.IamRole.viewer]:"Read-only access",[t.IamRole.participant]:"Reply to customers and manage conversation takeover"};e.s(["iamRoleDescription",0,function(e){return n[e]??""},"iamRoleDisplayName",0,function(e){return i[e]??"Unknown"},"iamRoleFromString",0,function(e){return r[e]},"iamRoleToString",0,function(e){return s[e]??"unspecified"}])},146312,818094,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),i=e.i(869803),n=e.i(170255),a=e.i(430182);let l=new Map([[n.ApiResourceKind.identity_provider,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.oauth_app,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.platform_client,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.organization,[a.IamRole.owner,a.IamRole.admin,a.IamRole.member,a.IamRole.viewer]],[n.ApiResourceKind.agent,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.session,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.skill,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.mcp_server,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.agent_instance,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.agent_share,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.agent_channel,[a.IamRole.owner,a.IamRole.viewer,a.IamRole.participant]],[n.ApiResourceKind.channel_app,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.workflow,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.workflow_instance,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.workflow_execution,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.environment,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.artifact,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.schedule,[a.IamRole.owner,a.IamRole.viewer]],[n.ApiResourceKind.project,[a.IamRole.owner,a.IamRole.viewer]]]),o=Object.freeze([]);function c(e){return l.get(e)??o}e.s(["getGrantableRoles",0,c,"hasGrantableRoles",0,function(e){let t=l.get(e);return void 0!==t&&t.length>0}],818094);var d=e.i(691444);e.s(["RoleSelector",0,function({kind:e,onSelect:n,selected:a,defaultRole:l,disabled:o=!1,className:g}){let u=(0,s.useId)(),{options:m,selected:p,select:x}=function(e,t){let[r,i]=(0,s.useState)(t??null),n=(0,s.useMemo)(()=>null===e?[]:c(e).map(e=>({role:e,label:(0,d.iamRoleDisplayName)(e),description:(0,d.iamRoleDescription)(e),value:(0,d.iamRoleToString)(e)})),[e]),a=(0,s.useMemo)(()=>null!==r?(0,d.iamRoleToString)(r):"",[r]);return{options:n,selected:r,selectedValue:a,select:(0,s.useCallback)(e=>i(e),[]),clear:(0,s.useCallback)(()=>i(null),[]),hasOptions:n.length>0}}(e,l),h=void 0!==a?a:p;return 0===m.length?null:(0,t.jsxs)("fieldset",{className:(0,r.cn)(i.UNSTYLED_FIELDSET,"stg:space-y-1.5",g),children:[(0,t.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Role"}),(0,t.jsx)("div",{className:"stg:flex stg:flex-wrap stg:gap-2",children:m.map(e=>{let s=h===e.role;return(0,t.jsxs)("label",{className:(0,r.cn)("stg:inline-flex stg:cursor-pointer stg:flex-col stg:rounded-md stg:border stg:px-3 stg:py-1.5 stg:text-xs stg:transition-colors",s?"stg:border-primary stg:bg-primary-subtle stg:text-primary stg:font-medium":"stg:border-input stg:bg-background stg:text-muted-foreground stg:hover:border-border stg:hover:text-foreground",o&&"stg:pointer-events-none stg:opacity-50"),children:[(0,t.jsx)("input",{type:"radio",name:u,value:e.value,checked:s,disabled:o,onChange:()=>{var t;x(t=e.role),n?.(t)},className:"stg:sr-only"}),(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"stg:text-[0.625rem] stg:text-muted-foreground stg:font-normal stg:mt-0.5",children:e.description})]},e.value)})})]})}],146312)},564035,288441,890079,32011,e=>{"use strict";var t=e.i(891287),s=e.i(452026),r=e.i(632897),i=e.i(586108),n=e.i(583093);e.s(["useResourceAccess",0,function(e,a){let l=(0,i.useStigmer)(),o=e?.kind??null,c=e?.id??null,d=a?.includeInherited??!1,{data:g,isLoading:u,isRefetching:m,error:p,refetch:x}=(0,n.useFetch)(o&&c?()=>{let e=(0,t.create)(s.ListResourceAccessInputSchema,{resource:(0,t.create)(r.ApiResourceRefSchema,{kind:o,id:c}),includeInherited:d});return l.iamPolicy.listResourceAccessByPrincipal(e).then(e=>[...e.entries])}:null,[o,c,d,l],[]);return{members:g,isLoading:u,isRefetching:m,error:p,refetch:x}}],564035);var a=e.i(271645),l=e.i(326283);e.s(["useCreateIamPolicy",0,function(){let e=(0,i.useStigmer)(),[t,s]=(0,a.useState)(!1),[r,n]=(0,a.useState)(null),o=(0,a.useCallback)(()=>n(null),[]);return{create:(0,a.useCallback)(async t=>{s(!0),n(null);try{return await e.iamPolicy.create(t)}catch(e){throw n((0,l.toError)(e)),e}finally{s(!1)}},[e]),isCreating:t,error:r,clearError:o}}],288441),e.s(["useDeleteIamPolicy",0,function(){let e=(0,i.useStigmer)(),[t,s]=(0,a.useState)(!1),[r,n]=(0,a.useState)(null),o=(0,a.useCallback)(()=>n(null),[]);return{remove:(0,a.useCallback)(async t=>{s(!0),n(null);try{return await e.iamPolicy.delete(t)}catch(e){throw n((0,l.toError)(e)),e}finally{s(!1)}},[e]),isDeleting:t,error:r,clearError:o}}],890079);var o=e.i(843476),c=e.i(893976),d=e.i(188482);function g(e){return e?.identityOrigin?.providerDisplayName??""}e.s(["ProviderBadge",0,function({principal:e,className:t}){let s=g(e);return s?(0,o.jsxs)(d.Tooltip,{children:[(0,o.jsx)(d.TooltipTrigger,{render:(0,o.jsx)("span",{className:(0,c.cn)("stg:inline-flex stg:items-center stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[0.6rem] stg:font-medium","stg:bg-muted-subtle stg:text-muted-foreground",t)}),children:s}),(0,o.jsx)(d.TooltipContent,{side:"top",children:`Identity provider: ${s}`})]}):null},"providerLabel",0,g],32011)},213149,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),i=e.i(468806),n=e.i(818094),a=e.i(869803),l=e.i(610595),o=e.i(891287),c=e.i(632897),d=e.i(564035),g=e.i(288441),u=e.i(890079),m=e.i(691444),p=e.i(146312),x=e.i(32011);function h({orgId:e,value:i,onChange:n,excludePrincipalIds:o,disabled:c=!1,className:g}){let u=(0,s.useId)(),{members:m,isLoading:p,error:v}=(0,d.useResourceAccess)(e?{kind:"organization",id:e}:null),[b,R]=(0,s.useState)(""),[y,w]=(0,s.useState)(!1),[j,I]=(0,s.useState)(0),k=(0,s.useRef)(null),N=(0,s.useMemo)(()=>new Set(o??[]),[o]),S=(0,s.useMemo)(()=>{let e=new Map;for(let t of m){let s=t.principal;s&&"identity_account"===s.kind&&s.id&&(e.has(s.id)||e.set(s.id,s))}return[...e.values()]},[m]),C=(0,s.useMemo)(()=>{let e=new Map;for(let t of S){let s=t.email?.toLowerCase();s&&e.set(s,(e.get(s)??0)+1)}return new Set([...e.entries()].filter(([,e])=>e>1).map(([e])=>e))},[S]),A=(0,s.useMemo)(()=>{let e=b.trim().toLowerCase();return e?S.filter(t=>{let s=(t.name??"").toLowerCase(),r=(t.email??"").toLowerCase();return s.includes(e)||r.includes(e)}):S},[S,b]),P=(0,s.useCallback)(e=>{N.has(e.id)||(n({id:e.id,name:e.name||e.email||e.id,email:e.email,view:e}),R(""),w(!1))},[N,n]),M=(0,s.useCallback)(e=>{if("ArrowDown"===e.key)e.preventDefault(),w(!0),I(e=>Math.min(e+1,A.length-1));else if("ArrowUp"===e.key)e.preventDefault(),I(e=>Math.max(e-1,0));else if("Enter"===e.key){e.preventDefault();let t=A[j];t&&!N.has(t.id)&&P(t)}else"Escape"===e.key&&w(!1)},[A,j,N,P]);return i?(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",g),children:[(0,t.jsx)("span",{className:"stg:block stg:text-xs stg:font-medium stg:text-foreground",children:"Person"}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:flex stg:h-6 stg:w-6 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground","aria-hidden":"true",children:(i.name[0]??"?").toUpperCase()}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-foreground",children:i.name}),(0,t.jsx)(x.ProviderBadge,{principal:i.view})]}),i.email&&i.email!==i.name&&(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-[0.6rem] stg:text-muted-foreground",children:i.email})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(null),disabled:c,"aria-label":"Clear selected person",className:(0,r.cn)("stg:shrink-0 stg:rounded stg:p-0.5 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,t.jsx)(f,{})})]})]}):(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-1",g),children:[(0,t.jsx)("label",{htmlFor:`${u}-input`,className:"stg:block stg:text-xs stg:font-medium stg:text-foreground",children:"Person"}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{id:`${u}-input`,ref:k,type:"text",role:"combobox","aria-expanded":y,"aria-controls":u,"aria-autocomplete":"list",autoComplete:"off",value:b,onChange:e=>{R(e.target.value),w(!0),I(0)},onFocus:()=>w(!0),onBlur:()=>{window.setTimeout(()=>w(!1),120)},onKeyDown:M,placeholder:"Search by name or email",disabled:c||p,autoFocus:!0,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")}),y&&(0,t.jsxs)("ul",{id:u,role:"listbox","aria-label":"Organization members",className:(0,r.cn)(a.UNSTYLED_LIST,"stg:absolute stg:z-10 stg:mt-1 stg:max-h-56 stg:w-full stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-popover stg:py-1 stg:shadow-md"),children:[p&&(0,t.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-xs stg:text-muted-foreground",children:"Loading members…"}),!p&&v&&(0,t.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-[0.65rem] stg:text-destructive",role:"alert",children:(0,l.getUserMessage)(v)}),!p&&!v&&0===A.length&&(0,t.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-xs stg:text-muted-foreground",children:b.trim()?"No members match your search.":"No members to share with."}),!p&&!v&&A.map((e,s)=>{let i=N.has(e.id),n=s===j,a=e.name||e.email||e.id,l=!!(0,x.providerLabel)(e)&&(e.identityOrigin?.providerDisplayName!=="Stigmer"||!!e.email&&C.has(e.email.toLowerCase()));return(0,t.jsxs)("li",{role:"option","aria-selected":n,"aria-disabled":i,onMouseEnter:()=>I(s),onMouseDown:t=>{t.preventDefault(),i||P(e)},className:(0,r.cn)("stg:flex stg:items-center stg:justify-between stg:gap-2 stg:px-2.5 stg:py-1.5",i?"stg:cursor-not-allowed stg:opacity-50":"stg:cursor-pointer",n&&!i&&"stg:bg-accent-hover"),children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[(0,t.jsx)("div",{className:"stg:flex stg:h-6 stg:w-6 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground","aria-hidden":"true",children:(a[0]??"?").toUpperCase()}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-foreground",children:a}),l&&(0,t.jsx)(x.ProviderBadge,{principal:e})]}),e.email&&e.email!==a&&(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-[0.6rem] stg:text-muted-foreground",children:e.email})]})]}),i&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[0.6rem] stg:text-muted-foreground",children:"Has access"})]},e.id)})]})]})]})}function f(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}var v=e.i(379410);function b({resourceKind:e,resourceKindString:i,resourceId:n,orgId:a,excludePrincipalIds:d,onGranted:u,onCancel:x,className:f}){let{create:R,isCreating:y,error:w,clearError:j}=(0,g.useCreateIamPolicy)(),[I,k]=(0,s.useState)(null),[N,S]=(0,s.useState)(null),C=null!==I&&null!==N&&!y,A=(0,s.useCallback)(async e=>{if(e.preventDefault(),C&&null!==N&&null!==I){j();try{let e=(0,o.create)(c.IamPolicySpecSchema,{principal:(0,o.create)(c.ApiResourceRefSchema,{kind:"identity_account",id:I.id}),resource:(0,o.create)(c.ApiResourceRefSchema,{kind:i,id:n}),relation:(0,m.iamRoleToString)(N)}),t=await R(e);u?.(t)}catch{}}},[C,N,I,i,n,R,j,u]);return(0,t.jsxs)("form",{onSubmit:A,className:(0,r.cn)("stg:space-y-3",f),children:[(0,t.jsxs)("div",{className:"stg:space-y-3",children:[(0,t.jsx)(h,{orgId:a,value:I,onChange:k,excludePrincipalIds:d,disabled:y}),(0,t.jsx)(p.RoleSelector,{kind:e,selected:N,onSelect:S,disabled:y})]}),w&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(w)}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsxs)("button",{type:"submit",disabled:!C,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-40"),children:[y&&(0,t.jsx)(v.SpinnerIcon,{size:12}),"Grant access"]}),x&&(0,t.jsx)("button",{type:"button",onClick:x,disabled:y,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"})]})]})}var R=e.i(590150);function y({resource:e,resourceKindString:i,resourceKind:m,orgId:p,className:x}){let{accessList:h,isLoading:f,fetchError:v,revokeAccess:j,isRevoking:I,revokeError:k,refetch:N,hasGrantableRoles:S}=function(e){var t;let r=(0,s.useMemo)(()=>e?{kind:e.kind,id:e.id}:null,[e?.kind,e?.id]),{members:i,isLoading:a,isRefetching:l,error:m,refetch:p}=(0,d.useResourceAccess)(r),{roles:x,hasRoles:h}=(t=e?.resourceKind??null,(0,s.useMemo)(()=>null===t?{roles:[],hasRoles:!1}:{roles:(0,n.getGrantableRoles)(t),hasRoles:(0,n.hasGrantableRoles)(t)},[t])),{create:f,isCreating:v,error:b,clearError:R}=(0,g.useCreateIamPolicy)(),{remove:y,isDeleting:w,error:j,clearError:I}=(0,u.useDeleteIamPolicy)(),k=(0,s.useRef)(e);k.current=e;let N=(0,s.useCallback)(async(e,t)=>{let s=k.current;if(!s)return;let r=(0,o.create)(c.IamPolicySpecSchema,{principal:(0,o.create)(c.ApiResourceRefSchema,{kind:"identity_account",id:e}),resource:(0,o.create)(c.ApiResourceRefSchema,{kind:s.kind,id:s.id}),relation:t});await f(r),p()},[f,p]);return{accessList:i,isLoading:a,isRefetching:l,fetchError:m,grantableRoles:x,hasGrantableRoles:h,grantAccess:N,isGranting:v,grantError:b,revokeAccess:(0,s.useCallback)(async(e,t)=>{let s=k.current;if(!s)return;let r=(0,o.create)(c.IamPolicySpecSchema,{principal:(0,o.create)(c.ApiResourceRefSchema,{kind:"identity_account",id:e}),resource:(0,o.create)(c.ApiResourceRefSchema,{kind:s.kind,id:s.id}),relation:t});await y(r),p()},[y,p]),isRevoking:w,revokeError:j,refetch:p,clearErrors:(0,s.useCallback)(()=>{R(),I()},[R,I])}}(e),[C,A]=(0,s.useState)(!1),P=h.map(e=>e.principal?.id).filter(e=>!!e),M={kind:i,id:e.id};return(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-4",x),children:[(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:f?"Loading access list...":`${h.length} ${1===h.length?"person":"people"} with access`}),v&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(v)}),!f&&h.length>0&&(0,t.jsx)("ul",{className:(0,r.cn)(a.UNSTYLED_LIST,"stg:space-y-1 stg:mt-2"),"aria-label":"People with access",children:h.map(e=>(0,t.jsx)(w,{entry:e,grantGate:M,onRevoke:j,isRevoking:I},e.principal?.id??"unknown"))}),k&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(k)})]}),S&&(0,t.jsx)(R.PermissionGate,{resource:M,relation:"can_grant_access",children:(0,t.jsx)("div",{className:"stg:border-t stg:border-border stg:pt-3",children:C?(0,t.jsx)(b,{resourceKind:m,resourceKindString:i,resourceId:e.id,orgId:p,excludePrincipalIds:P,onGranted:()=>{A(!1),N()},onCancel:()=>A(!1)}):(0,t.jsx)("button",{type:"button",onClick:()=>A(!0),className:(0,r.cn)("stg:w-full stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium stg:text-center","stg:border stg:border-dashed stg:border-border","stg:text-muted-foreground stg:hover:text-foreground stg:hover:border-foreground/30","stg:hover:bg-accent-hover stg:transition-colors"),children:"+ Add people"})})})]})}function w({entry:e,grantGate:i,onRevoke:n,isRevoking:a}){let l=e.principal,o=e.roles,c=l?.name||l?.email||l?.id||"Unknown",d=o[0]?.role,g=(0,s.useCallback)(async()=>{l?.id&&d?.code&&await n(l.id,d.code)},[l?.id,d?.code,n]);return(0,t.jsxs)("li",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:px-2 stg:py-1.5 stg:hover:bg-accent-hover stg:group",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:min-w-0",children:[(0,t.jsx)("div",{className:"stg:h-6 stg:w-6 stg:rounded-full stg:bg-muted stg:flex stg:items-center stg:justify-center stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground stg:shrink-0","aria-hidden":"true",children:(l?.name?.[0]??l?.email?.[0]??"?").toUpperCase()}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-foreground stg:truncate",children:c}),l?.email&&l.name&&(0,t.jsx)("p",{className:"stg:text-[0.6rem] stg:text-muted-foreground stg:truncate",children:l.email})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:shrink-0",children:[(0,t.jsx)("span",{className:"stg:text-[0.6rem] stg:text-muted-foreground stg:capitalize",children:d?.name??d?.code??"—"}),(0,t.jsx)(R.PermissionGate,{resource:i,relation:"can_grant_access",children:(0,t.jsx)("button",{type:"button",onClick:g,disabled:a,"aria-label":`Remove ${c}'s access`,className:(0,r.cn)("stg:rounded stg:p-0.5 stg:text-muted-foreground stg:opacity-0 stg:group-hover:opacity-100","stg:hover:text-destructive stg:hover:bg-destructive/10","stg:disabled:pointer-events-none stg:disabled:opacity-50","stg:transition-opacity"),children:(0,t.jsx)(j,{})})})]})]})}function j(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}var I=e.i(388023);function k({title:e,description:s,children:r}){return(0,t.jsxs)("section",{className:"stg:px-6 stg:py-4",children:[(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:e}),s&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-[0.65rem] stg:text-muted-foreground",children:s}),(0,t.jsx)("div",{className:"stg:mt-2.5",children:r})]})}function N(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}e.s(["ManageAccessDialog",0,function({open:e,onOpenChange:a,resource:l,visibility:o,extraSection:c}){let d=(0,s.useId)(),g=(0,s.useCallback)(()=>{a(!1)},[a]),u=(0,n.hasGrantableRoles)(l.kind);return(0,t.jsx)(i.DialogShell,{open:e,onOpenChange:a,width:"md","aria-labelledby":d,children:e&&(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:border-b stg:border-border stg:px-6 stg:py-4",children:[(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("h2",{id:d,className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Manage access"}),l.name&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:truncate stg:text-xs stg:text-muted-foreground",children:l.name})]}),(0,t.jsx)("button",{type:"button",onClick:g,"aria-label":"Close",className:(0,r.cn)("stg:rounded-md stg:p-1 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"),children:(0,t.jsx)(N,{})})]}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:[o&&(0,t.jsx)(k,{title:"General access",description:"Who can find and open this resource.",children:(0,t.jsx)(I.ResourceVisibilityControl,{kind:o.kind,resourceId:l.id,visibility:o.current,org:o.org,onChanged:o.onChanged})}),u&&(0,t.jsx)(k,{title:"People with access",children:(0,t.jsx)(y,{resource:{kind:l.kindString,id:l.id,resourceKind:l.kind},resourceKindString:l.kindString,resourceKind:l.kind,orgId:l.org})}),c&&(0,t.jsx)(k,{title:c.title,description:c.description,children:c.content})]}),(0,t.jsx)("div",{className:"stg:flex stg:items-center stg:justify-end stg:border-t stg:border-border stg:px-6 stg:py-3",children:(0,t.jsx)("button",{type:"button",onClick:g,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring stg:focus:ring-offset-2"),children:"Done"})})]})})}],213149)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65642,e=>{"use strict";var t=e.i(843476),s=e.i(893976);let r={primary:"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover",outline:"stg:border stg:border-border stg:text-foreground stg:hover:bg-accent-hover",ghost:"stg:text-foreground stg:hover:bg-accent-hover",destructive:"stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover"},n={xs:"stg:px-2.5 stg:py-1 stg:text-xs",sm:"stg:px-3 stg:py-1.5 stg:text-xs"};e.s(["Button",0,function({variant:e="primary",size:a="sm",icon:o,type:l="button",className:i,children:c,...d}){return(0,t.jsxs)("button",{type:l,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:font-medium stg:transition-colors","stg:motion-reduce:transition-none","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",n[a],r[e],i),...d,children:[o,c]})}])},424089,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(869803),a=e.i(610595),o=e.i(910304),l=e.i(65642);function i({tone:e,label:s}){return(0,t.jsx)("span",{className:(0,r.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,S]=(0,s.useState)((e?.orgIds??[]).join("\n")),[w,I]=(0,s.useState)(e?.teamInviteLink??""),A=""!==p.trim()&&""!==y.trim()&&!n;return(0,t.jsxs)("form",{className:(0,r.cn)("stg:max-w-xl stg:space-y-3",h),onSubmit:t=>{t.preventDefault(),A&&i((0,c.create)(d.CursorAccountSchema,{accountId:e?.accountId??"",displayName:p.trim(),adminApiKey:y.trim(),enabled:j,onDemandUsageDisabled:!k,teamInviteLink:w.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:w,onChange:e=>I(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,r.cn)(u.INPUT_CLASSES,"stg:min-h-16 stg:font-mono"),value:C,onChange:e=>S(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,a.getUserMessage)(o)}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)(l.Button,{type:"submit",size:"sm",disabled:!A,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,r.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(193799),v=e.i(364802);let k="stg:grid stg:grid-cols-[minmax(0,2.2fr)_minmax(0,1fr)_4.5rem_4.5rem_4.5rem_4.5rem_minmax(6rem,auto)_minmax(10rem,auto)] stg:items-center stg:gap-2 stg:px-3 stg:py-2";function N({accountId:e,coverage:s,inviteLink:n,actions:a,onChanged:o}){return(0,t.jsxs)("div",{role:"table","aria-label":"Team coverage",className:"stg:rounded-lg stg:border stg:border-border stg:bg-card",children:[(0,t.jsxs)("div",{role:"row",className:(0,r.cn)(k,"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",children:"Key"}),(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",className:"stg:text-right",children:"Actions"})]}),!s.hasRoster&&(0,t.jsx)(C,{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)(w,{accountId:e,keyView:s,hasRoster:!1,inviteLink:"",actions:a,onChanged:o},s.key?.keyId))}),s.onTeamWithKey.length>0&&(0,t.jsx)(C,{title:"On the team — key held",count:s.onTeamWithKey.length,children:s.onTeamWithKey.map(s=>(0,t.jsx)(w,{accountId:e,keyView:s,hasRoster:!0,inviteLink:"",actions:a,onChanged:o},s.key?.keyId))}),s.hasRoster&&(0,t.jsx)(C,{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)(I,{memberView:e},e.member?.email))}),s.offTeamWithKey.length>0&&(0,t.jsx)(C,{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 to them 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,children:s.offTeamWithKey.map(s=>(0,t.jsx)(w,{accountId:e,keyView:s,hasRoster:!0,inviteLink:n,actions:a,onChanged:o},s.key?.keyId))})]})}function C({title:e,description:s,count:r,children:n}){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":8,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:r})]}),s&&(0,t.jsx)("span",{className:"stg:block stg:text-[11px] stg:text-muted-foreground",children:s})]})}),n]})}function S({email:e,name:s}){return(0,t.jsxs)("span",{role:"cell",className:"stg:min-w-0",children:[(0,t.jsx)("span",{className:"stg:block stg:break-words stg:font-medium stg:text-foreground",children:e}),s&&(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-[11px] stg:text-muted-foreground",children:s})]})}function w({accountId:e,keyView:s,hasRoster:n,inviteLink:a,actions:o,onChanged:c}){let d=s.key;return d?(0,t.jsxs)("div",{role:"row",className:(0,r.cn)(k,"stg:border-t stg:border-border-muted stg:text-xs"),children:[(0,t.jsx)(S,{email:d.boundEmail}),(0,t.jsxs)("span",{role:"cell",className:"stg:min-w-0",children:[(0,t.jsx)(v.TruncatedText,{text:d.cursorKeyName||"unnamed key",className:"stg:block stg:text-muted-foreground"}),d.label&&(0,t.jsx)(v.TruncatedText,{text:d.label,className:"stg:block stg:text-[11px] stg:text-muted-foreground"})]}),(0,t.jsx)(A,{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)(K,{keyView:s,hasRoster:n})]}),(0,t.jsxs)("span",{role:"cell",className:"stg:flex stg:items-center stg:justify-end stg:gap-2",children:[""!==a&&(0,t.jsx)(T,{inviteLink:a}),(0,t.jsx)(l.Button,{size:"sm",variant:"outline",disabled:o.isSubmitting,onClick:()=>{o.setKeyEnabled(e,d.keyId,!d.enabled).then(c,()=>{})},children:d.enabled?"Disable":"Enable"}),(0,t.jsx)(l.Button,{size:"sm",variant:"destructive",disabled:o.isSubmitting,onClick:()=>{o.removeKey({accountId:e,keyId:d.keyId}).then(c,()=>{})},children:"Remove"})]})]}):null}function I({memberView:e}){let s=e.member;return s?(0,t.jsxs)("div",{role:"row",className:(0,r.cn)(k,"stg:border-t stg:border-border-muted stg:text-xs"),children:[(0,t.jsx)(S,{email:s.email,name:s.name}),(0,t.jsx)("span",{role:"cell",className:"stg:text-muted-foreground",children:"—"}),(0,t.jsx)(A,{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",className:"stg:text-right stg:text-muted-foreground",children:"—"})]}):null}function A({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 K({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 T({inviteLink:e}){let{copy:s,copied:r}=(0,j.useCopyFeedback)();return(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:()=>void s(e),children:r?"Copied":"Copy invite"})}function E(e){return[...new Set(e.split(/\r?\n/).map(e=>e.trim()).filter(e=>""!==e))]}function _(e,t){return e.length>=8?`key ${t+1} (…${e.slice(-4)})`:`key ${t+1}`}function L({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,C]=(0,s.useState)(!1),[S,w]=(0,s.useState)(null),[I,A]=(0,s.useState)(null),K=o.keyViews,T=i.unclassified.length>0||i.onTeamWithKey.length>0||i.onTeamWithoutKey.length>0||i.offTeamWithKey.length>0,P=E(j).length,U=async t=>{t.preventDefault();let s=E(j);if(0===s.length||k)return;C(!0),A(null);let r=new Set(K.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=>!r.has(e.keyId));s&&r.add(s.keyId),n.push({keyPreview:_(l,t),ok:!0,message:s?.boundEmail?`added — bound to ${s.boundEmail}`:"added"})}catch(e){c.clearError(),o.push(l),n.push({keyPreview:_(l,t),ok:!1,message:(0,a.getUserMessage)((0,f.toError)(e))})}}w(null),A(n),v(o.join("\n")),C(!1),o.length<s.length&&g()};return(0,t.jsxs)("section",{className:"stg:space-y-2",children:[(0,t.jsx)("h4",{className:"stg:text-xs stg:font-semibold stg:text-foreground",children:"Team coverage"}),0===K.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."]}),T&&(0,t.jsx)(N,{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,a.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:U,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,r.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===P||k,children:k&&S?`Importing ${S.done+1} of ${S.total}…`:P>0?`Import ${P} ${1===P?"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"})]}),I&&(0,t.jsx)("ul",{role:"list","aria-label":"Import results",className:(0,r.cn)(n.UNSTYLED_LIST,"stg:space-y-0.5 stg:text-[11px]"),children:I.map(e=>(0,t.jsxs)("li",{className:e.ok?"stg:text-muted-foreground":"stg:text-destructive",children:[e.keyPreview,": ",e.message]},e.keyPreview))})]})]})}var P=e.i(586108),U=e.i(583093);function D(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null);return{upsert:(0,s.useCallback)(async t=>{r(!0),a(null);try{return await e.cursorAccounts.upsertAccount({account:t})}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}function $({className:e}){let[i,c]=(0,s.useState)({phase:"list"}),d=function(){let e=(0,P.useStigmer)(),t=(void 0)??!0,{data:s,isLoading:r,isRefetching:n,error:a,refetch:o}=(0,U.useFetch)(t?()=>e.cursorAccounts.listAccounts():null,[t,e],null);return{accounts:s,isLoading:r,isRefetching:n,error:a,refetch:o}}(),u=(0,s.useCallback)(()=>c({phase:"list"}),[]);if(d.isLoading)return(0,t.jsxs)("div",{className:(0,r.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,r.cn)("stg:text-destructive stg:text-xs",e),role:"alert",children:(0,a.getUserMessage)(d.error)});if("create"===i.phase)return(0,t.jsx)(W,{className:e,onSaved:()=>{d.refetch(),u()},onCancel:u});if("detail"===i.phase)return(0,t.jsx)(M,{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,r=0;for(let n of e)t+=n.routableKeyCount,r+=n.guardTrippedKeyCount,n.account?.enabled===!0&&n.enabledKeyCount>0&&0===n.routableKeyCount&&(s+=1);return{totalAccounts:e.length,totalRoutableKeys:t,drainedAccounts:s,guardTrippedKeys:r}}(g);return(0,t.jsxs)("div",{className:(0,r.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,r.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)(B,{summary:e,onOpen:()=>c({phase:"detail",accountId:e.account?.accountId??"",editing:!1})},e.account?.accountId))})]})]})}function B({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,r.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 W({className:e,onSaved:s,onCancel:r}){let{upsert:n,isSubmitting:a,error:o}=D();return(0,t.jsx)("div",{className:e,children:(0,t.jsx)(g,{initial:null,isSubmitting:a,submitError:o,onSubmit:e=>{n(e).then(s,()=>{})},onCancel:r})})}function M({className:e,accountId:n,editing:o,onEditingChange:i,onDeleted:c,onChanged:d,onBack:u}){let m,x=function(e){let t=(0,P.useStigmer)(),{data:s,isLoading:r,isRefetching:n,error:a,refetch:o}=(0,U.useFetch)(e?()=>t.cursorAccounts.getAccountView(e):null,[e,t],null);return{view:s,isLoading:r,isRefetching:n,error:a,refetch:o}}(n),{upsert:p,isSubmitting:y,error:j,clearError:v}=D(),{remove:k,isSubmitting:N,error:C}=function(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null);return{remove:(0,s.useCallback)(async t=>{r(!0),a(null);try{return await e.cursorAccounts.deleteAccount(t)}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}(),{sync:S,isSyncing:w,error:I}=function(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null);return{sync:(0,s.useCallback)(async t=>{r(!0),a(null);try{return await e.cursorAccounts.syncAccount(t)}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!1)}},[e.cursorAccounts]),isSyncing:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}(),A=function(){let e=(0,P.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(null),o=(0,s.useCallback)(async e=>{r(!0),a(null);try{return await e()}catch(t){let e=(0,f.toError)(t);throw a(e),e}finally{r(!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,r)=>o(()=>e.cursorAccounts.setMemberKeyEnabled({accountId:t,keyId:s,enabled:r})),[o,e.cursorAccounts]),isSubmitting:t,error:n,clearError:(0,s.useCallback)(()=>a(null),[])}}(),K=(0,s.useCallback)(()=>{x.refetch(),d()},[x.refetch,d]),T=(0,s.useCallback)(()=>{S(n).then(K,K)},[S,n,K]);if(x.isLoading)return(0,t.jsxs)("div",{className:(0,r.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,r.cn)("stg:space-y-2",e),children:[(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:x.error?(0,a.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=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},B=$.onTeamWithKey.length+$.onTeamWithoutKey.length,W=(E.snapshot?.members.length??0)-B;return o?(0,t.jsx)("div",{className:e,children:(0,t.jsx)(g,{initial:_,isSubmitting:y,submitError:j,onSubmit:e=>{p(e).then(()=>{K(),i(!1)},()=>{})},onCancel:()=>{v(),i(!1)}})}):(0,t.jsxs)("div",{className:(0,r.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),$.hasRoster?` \xb7 ${B} ${1===B?"member":"members"}`:"",$.hasRoster&&W>0?` \xb7 ${W} removed ${1===W?"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:w,onClick:()=>{S(n).then(K,()=>{})},children:w?"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"})]})]}),I&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,a.getUserMessage)(I)}),C&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-xs",role:"alert",children:(0,a.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)(L,{accountId:n,view:E,coverage:$,actions:A,onChanged:K,onImported:T})]})}e.s(["default",0,function(){return(0,t.jsx)($,{})}],424089)}]);
|