@agenticmail/enterprise 0.3.2 → 0.4.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/.github/CODEOWNERS +23 -0
- package/.github/workflows/publish-community-skills.yml +121 -0
- package/.github/workflows/validate-community-skills.yml +172 -0
- package/ARCHITECTURE.md +184 -167
- package/CLAUDE.md +40 -0
- package/CONTRIBUTING.md +254 -0
- package/DEPLOYMENT.md +1031 -0
- package/README.md +355 -174
- package/community-skills/_template/README.md +31 -0
- package/community-skills/_template/agenticmail-skill.json +48 -0
- package/community-skills/activecampaign/README.md +21 -0
- package/community-skills/activecampaign/agenticmail-skill.json +56 -0
- package/community-skills/adobe-sign/README.md +21 -0
- package/community-skills/adobe-sign/agenticmail-skill.json +72 -0
- package/community-skills/adp/README.md +21 -0
- package/community-skills/adp/agenticmail-skill.json +65 -0
- package/community-skills/airtable-bases/README.md +29 -0
- package/community-skills/airtable-bases/agenticmail-skill.json +69 -0
- package/community-skills/apollo-io/README.md +21 -0
- package/community-skills/apollo-io/agenticmail-skill.json +50 -0
- package/community-skills/asana-tasks/README.md +30 -0
- package/community-skills/asana-tasks/agenticmail-skill.json +70 -0
- package/community-skills/auth0/README.md +21 -0
- package/community-skills/auth0/agenticmail-skill.json +56 -0
- package/community-skills/aws-services/README.md +38 -0
- package/community-skills/aws-services/agenticmail-skill.json +70 -0
- package/community-skills/azure-devops/README.md +21 -0
- package/community-skills/azure-devops/agenticmail-skill.json +57 -0
- package/community-skills/bamboohr/README.md +21 -0
- package/community-skills/bamboohr/agenticmail-skill.json +56 -0
- package/community-skills/basecamp/README.md +21 -0
- package/community-skills/basecamp/agenticmail-skill.json +56 -0
- package/community-skills/bigcommerce/README.md +21 -0
- package/community-skills/bigcommerce/agenticmail-skill.json +55 -0
- package/community-skills/bitbucket-repos/README.md +29 -0
- package/community-skills/bitbucket-repos/agenticmail-skill.json +70 -0
- package/community-skills/box/README.md +21 -0
- package/community-skills/box/agenticmail-skill.json +48 -0
- package/community-skills/brex/README.md +21 -0
- package/community-skills/brex/agenticmail-skill.json +48 -0
- package/community-skills/buffer/README.md +21 -0
- package/community-skills/buffer/agenticmail-skill.json +50 -0
- package/community-skills/calendly/README.md +20 -0
- package/community-skills/calendly/agenticmail-skill.json +43 -0
- package/community-skills/canva-design/README.md +33 -0
- package/community-skills/canva-design/agenticmail-skill.json +60 -0
- package/community-skills/chargebee/README.md +21 -0
- package/community-skills/chargebee/agenticmail-skill.json +55 -0
- package/community-skills/circleci-pipelines/README.md +28 -0
- package/community-skills/circleci-pipelines/agenticmail-skill.json +66 -0
- package/community-skills/clickup/README.md +21 -0
- package/community-skills/clickup/agenticmail-skill.json +48 -0
- package/community-skills/close-crm/README.md +21 -0
- package/community-skills/close-crm/agenticmail-skill.json +49 -0
- package/community-skills/cloudflare-cdn/README.md +37 -0
- package/community-skills/cloudflare-cdn/agenticmail-skill.json +67 -0
- package/community-skills/confluence-wiki/README.md +31 -0
- package/community-skills/confluence-wiki/agenticmail-skill.json +74 -0
- package/community-skills/contentful/README.md +21 -0
- package/community-skills/contentful/agenticmail-skill.json +62 -0
- package/community-skills/copper-crm/README.md +21 -0
- package/community-skills/copper-crm/agenticmail-skill.json +56 -0
- package/community-skills/crisp/README.md +21 -0
- package/community-skills/crisp/agenticmail-skill.json +56 -0
- package/community-skills/crowdstrike/README.md +21 -0
- package/community-skills/crowdstrike/agenticmail-skill.json +69 -0
- package/community-skills/datadog-monitoring/README.md +37 -0
- package/community-skills/datadog-monitoring/agenticmail-skill.json +73 -0
- package/community-skills/digitalocean/README.md +21 -0
- package/community-skills/digitalocean/agenticmail-skill.json +48 -0
- package/community-skills/discord/README.md +45 -0
- package/community-skills/discord/agenticmail-skill.json +65 -0
- package/community-skills/docker-containers/README.md +38 -0
- package/community-skills/docker-containers/agenticmail-skill.json +70 -0
- package/community-skills/docusign-esign/README.md +35 -0
- package/community-skills/docusign-esign/agenticmail-skill.json +66 -0
- package/community-skills/drift/README.md +21 -0
- package/community-skills/drift/agenticmail-skill.json +50 -0
- package/community-skills/dropbox-storage/README.md +36 -0
- package/community-skills/dropbox-storage/agenticmail-skill.json +67 -0
- package/community-skills/figma-design/README.md +36 -0
- package/community-skills/figma-design/agenticmail-skill.json +66 -0
- package/community-skills/firebase/README.md +21 -0
- package/community-skills/firebase/agenticmail-skill.json +56 -0
- package/community-skills/flyio/README.md +21 -0
- package/community-skills/flyio/agenticmail-skill.json +56 -0
- package/community-skills/freshbooks/README.md +21 -0
- package/community-skills/freshbooks/agenticmail-skill.json +55 -0
- package/community-skills/freshdesk/README.md +21 -0
- package/community-skills/freshdesk/agenticmail-skill.json +57 -0
- package/community-skills/freshsales/README.md +21 -0
- package/community-skills/freshsales/agenticmail-skill.json +55 -0
- package/community-skills/freshservice/README.md +21 -0
- package/community-skills/freshservice/agenticmail-skill.json +56 -0
- package/community-skills/front/README.md +21 -0
- package/community-skills/front/agenticmail-skill.json +48 -0
- package/community-skills/github/README.md +49 -0
- package/community-skills/github/agenticmail-skill.json +73 -0
- package/community-skills/github-actions/README.md +29 -0
- package/community-skills/github-actions/agenticmail-skill.json +72 -0
- package/community-skills/gitlab-ci/README.md +51 -0
- package/community-skills/gitlab-ci/agenticmail-skill.json +66 -0
- package/community-skills/gong/README.md +21 -0
- package/community-skills/gong/agenticmail-skill.json +50 -0
- package/community-skills/google-ads/README.md +36 -0
- package/community-skills/google-ads/agenticmail-skill.json +58 -0
- package/community-skills/google-analytics/README.md +28 -0
- package/community-skills/google-analytics/agenticmail-skill.json +69 -0
- package/community-skills/google-cloud/README.md +33 -0
- package/community-skills/google-cloud/agenticmail-skill.json +59 -0
- package/community-skills/google-drive/README.md +36 -0
- package/community-skills/google-drive/agenticmail-skill.json +65 -0
- package/community-skills/gotomeeting/README.md +20 -0
- package/community-skills/gotomeeting/agenticmail-skill.json +45 -0
- package/community-skills/grafana/README.md +21 -0
- package/community-skills/grafana/agenticmail-skill.json +56 -0
- package/community-skills/greenhouse/README.md +21 -0
- package/community-skills/greenhouse/agenticmail-skill.json +49 -0
- package/community-skills/gusto/README.md +21 -0
- package/community-skills/gusto/agenticmail-skill.json +49 -0
- package/community-skills/hashicorp-vault/README.md +21 -0
- package/community-skills/hashicorp-vault/agenticmail-skill.json +58 -0
- package/community-skills/heroku/README.md +21 -0
- package/community-skills/heroku/agenticmail-skill.json +48 -0
- package/community-skills/hibob/README.md +21 -0
- package/community-skills/hibob/agenticmail-skill.json +48 -0
- package/community-skills/hootsuite/README.md +21 -0
- package/community-skills/hootsuite/agenticmail-skill.json +48 -0
- package/community-skills/hubspot-crm/README.md +36 -0
- package/community-skills/hubspot-crm/agenticmail-skill.json +70 -0
- package/community-skills/huggingface/README.md +21 -0
- package/community-skills/huggingface/agenticmail-skill.json +48 -0
- package/community-skills/index.json +1320 -0
- package/community-skills/intercom-support/README.md +36 -0
- package/community-skills/intercom-support/agenticmail-skill.json +64 -0
- package/community-skills/jira/README.md +53 -0
- package/community-skills/jira/agenticmail-skill.json +72 -0
- package/community-skills/klaviyo/README.md +21 -0
- package/community-skills/klaviyo/agenticmail-skill.json +48 -0
- package/community-skills/kubernetes-cluster/README.md +36 -0
- package/community-skills/kubernetes-cluster/agenticmail-skill.json +72 -0
- package/community-skills/lattice/README.md +21 -0
- package/community-skills/lattice/agenticmail-skill.json +49 -0
- package/community-skills/launchdarkly/README.md +21 -0
- package/community-skills/launchdarkly/agenticmail-skill.json +48 -0
- package/community-skills/lever/README.md +21 -0
- package/community-skills/lever/agenticmail-skill.json +49 -0
- package/community-skills/linear/README.md +29 -0
- package/community-skills/linear/agenticmail-skill.json +81 -0
- package/community-skills/linkedin/README.md +21 -0
- package/community-skills/linkedin/agenticmail-skill.json +48 -0
- package/community-skills/livechat/README.md +20 -0
- package/community-skills/livechat/agenticmail-skill.json +43 -0
- package/community-skills/loom-video/README.md +20 -0
- package/community-skills/loom-video/agenticmail-skill.json +44 -0
- package/community-skills/mailchimp-campaigns/README.md +37 -0
- package/community-skills/mailchimp-campaigns/agenticmail-skill.json +69 -0
- package/community-skills/mailgun/README.md +21 -0
- package/community-skills/mailgun/agenticmail-skill.json +71 -0
- package/community-skills/microsoft-teams/README.md +51 -0
- package/community-skills/microsoft-teams/agenticmail-skill.json +66 -0
- package/community-skills/miro-boards/README.md +20 -0
- package/community-skills/miro-boards/agenticmail-skill.json +44 -0
- package/community-skills/mixpanel-analytics/README.md +34 -0
- package/community-skills/mixpanel-analytics/agenticmail-skill.json +64 -0
- package/community-skills/monday-boards/README.md +28 -0
- package/community-skills/monday-boards/agenticmail-skill.json +68 -0
- package/community-skills/mongodb-atlas/README.md +21 -0
- package/community-skills/mongodb-atlas/agenticmail-skill.json +58 -0
- package/community-skills/neon/README.md +21 -0
- package/community-skills/neon/agenticmail-skill.json +50 -0
- package/community-skills/netlify/README.md +21 -0
- package/community-skills/netlify/agenticmail-skill.json +48 -0
- package/community-skills/netsuite/README.md +21 -0
- package/community-skills/netsuite/agenticmail-skill.json +57 -0
- package/community-skills/newrelic/README.md +21 -0
- package/community-skills/newrelic/agenticmail-skill.json +58 -0
- package/community-skills/notion/README.md +49 -0
- package/community-skills/notion/agenticmail-skill.json +72 -0
- package/community-skills/okta/README.md +21 -0
- package/community-skills/okta/agenticmail-skill.json +57 -0
- package/community-skills/openai/README.md +21 -0
- package/community-skills/openai/agenticmail-skill.json +48 -0
- package/community-skills/opsgenie/README.md +21 -0
- package/community-skills/opsgenie/agenticmail-skill.json +48 -0
- package/community-skills/outreach/README.md +21 -0
- package/community-skills/outreach/agenticmail-skill.json +50 -0
- package/community-skills/paddle/README.md +21 -0
- package/community-skills/paddle/agenticmail-skill.json +55 -0
- package/community-skills/pagerduty/README.md +21 -0
- package/community-skills/pagerduty/agenticmail-skill.json +48 -0
- package/community-skills/pandadoc/README.md +21 -0
- package/community-skills/pandadoc/agenticmail-skill.json +48 -0
- package/community-skills/paypal/README.md +21 -0
- package/community-skills/paypal/agenticmail-skill.json +55 -0
- package/community-skills/personio/README.md +21 -0
- package/community-skills/personio/agenticmail-skill.json +48 -0
- package/community-skills/pinecone/README.md +21 -0
- package/community-skills/pinecone/agenticmail-skill.json +48 -0
- package/community-skills/pipedrive-deals/README.md +33 -0
- package/community-skills/pipedrive-deals/agenticmail-skill.json +60 -0
- package/community-skills/plaid/README.md +21 -0
- package/community-skills/plaid/agenticmail-skill.json +65 -0
- package/community-skills/postmark/README.md +21 -0
- package/community-skills/postmark/agenticmail-skill.json +48 -0
- package/community-skills/power-automate/README.md +21 -0
- package/community-skills/power-automate/agenticmail-skill.json +59 -0
- package/community-skills/quickbooks-accounting/README.md +38 -0
- package/community-skills/quickbooks-accounting/agenticmail-skill.json +70 -0
- package/community-skills/recurly/README.md +21 -0
- package/community-skills/recurly/agenticmail-skill.json +48 -0
- package/community-skills/reddit/README.md +21 -0
- package/community-skills/reddit/agenticmail-skill.json +48 -0
- package/community-skills/render/README.md +21 -0
- package/community-skills/render/agenticmail-skill.json +48 -0
- package/community-skills/ringcentral/README.md +20 -0
- package/community-skills/ringcentral/agenticmail-skill.json +43 -0
- package/community-skills/rippling/README.md +21 -0
- package/community-skills/rippling/agenticmail-skill.json +48 -0
- package/community-skills/salesforce/README.md +53 -0
- package/community-skills/salesforce/agenticmail-skill.json +73 -0
- package/community-skills/salesloft/README.md +21 -0
- package/community-skills/salesloft/agenticmail-skill.json +48 -0
- package/community-skills/sanity/README.md +21 -0
- package/community-skills/sanity/agenticmail-skill.json +62 -0
- package/community-skills/sap/README.md +21 -0
- package/community-skills/sap/agenticmail-skill.json +63 -0
- package/community-skills/segment-cdp/README.md +37 -0
- package/community-skills/segment-cdp/agenticmail-skill.json +66 -0
- package/community-skills/sendgrid-email/README.md +51 -0
- package/community-skills/sendgrid-email/agenticmail-skill.json +71 -0
- package/community-skills/sentry/README.md +21 -0
- package/community-skills/sentry/agenticmail-skill.json +58 -0
- package/community-skills/servicenow/README.md +21 -0
- package/community-skills/servicenow/agenticmail-skill.json +56 -0
- package/community-skills/shopify/README.md +21 -0
- package/community-skills/shopify/agenticmail-skill.json +56 -0
- package/community-skills/shortcut/README.md +21 -0
- package/community-skills/shortcut/agenticmail-skill.json +48 -0
- package/community-skills/slack/README.md +45 -0
- package/community-skills/slack/agenticmail-skill.json +73 -0
- package/community-skills/smartsheet/README.md +21 -0
- package/community-skills/smartsheet/agenticmail-skill.json +48 -0
- package/community-skills/snowflake-warehouse/README.md +37 -0
- package/community-skills/snowflake-warehouse/agenticmail-skill.json +71 -0
- package/community-skills/snyk/README.md +21 -0
- package/community-skills/snyk/agenticmail-skill.json +48 -0
- package/community-skills/splunk/README.md +21 -0
- package/community-skills/splunk/agenticmail-skill.json +56 -0
- package/community-skills/square/README.md +21 -0
- package/community-skills/square/agenticmail-skill.json +55 -0
- package/community-skills/statuspage/README.md +21 -0
- package/community-skills/statuspage/agenticmail-skill.json +56 -0
- package/community-skills/stripe/README.md +45 -0
- package/community-skills/stripe/agenticmail-skill.json +66 -0
- package/community-skills/supabase/README.md +21 -0
- package/community-skills/supabase/agenticmail-skill.json +56 -0
- package/community-skills/teamwork/README.md +21 -0
- package/community-skills/teamwork/agenticmail-skill.json +56 -0
- package/community-skills/telegram-bot/README.md +20 -0
- package/community-skills/telegram-bot/agenticmail-skill.json +52 -0
- package/community-skills/terraform-iac/README.md +34 -0
- package/community-skills/terraform-iac/agenticmail-skill.json +66 -0
- package/community-skills/todoist-tasks/README.md +29 -0
- package/community-skills/todoist-tasks/agenticmail-skill.json +72 -0
- package/community-skills/trello-cards/README.md +30 -0
- package/community-skills/trello-cards/agenticmail-skill.json +72 -0
- package/community-skills/twilio-sms/README.md +47 -0
- package/community-skills/twilio-sms/agenticmail-skill.json +63 -0
- package/community-skills/twitter/README.md +21 -0
- package/community-skills/twitter/agenticmail-skill.json +48 -0
- package/community-skills/vercel-deployments/README.md +29 -0
- package/community-skills/vercel-deployments/agenticmail-skill.json +70 -0
- package/community-skills/weaviate/README.md +21 -0
- package/community-skills/weaviate/agenticmail-skill.json +56 -0
- package/community-skills/webex/README.md +20 -0
- package/community-skills/webex/agenticmail-skill.json +43 -0
- package/community-skills/webflow/README.md +21 -0
- package/community-skills/webflow/agenticmail-skill.json +48 -0
- package/community-skills/whatsapp-business/README.md +20 -0
- package/community-skills/whatsapp-business/agenticmail-skill.json +52 -0
- package/community-skills/whereby/README.md +20 -0
- package/community-skills/whereby/agenticmail-skill.json +43 -0
- package/community-skills/woocommerce/README.md +21 -0
- package/community-skills/woocommerce/agenticmail-skill.json +55 -0
- package/community-skills/wordpress/README.md +21 -0
- package/community-skills/wordpress/agenticmail-skill.json +56 -0
- package/community-skills/workday/README.md +21 -0
- package/community-skills/workday/agenticmail-skill.json +56 -0
- package/community-skills/wrike/README.md +21 -0
- package/community-skills/wrike/agenticmail-skill.json +48 -0
- package/community-skills/xero/README.md +21 -0
- package/community-skills/xero/agenticmail-skill.json +56 -0
- package/community-skills/youtube/README.md +21 -0
- package/community-skills/youtube/agenticmail-skill.json +52 -0
- package/community-skills/zendesk-tickets/README.md +37 -0
- package/community-skills/zendesk-tickets/agenticmail-skill.json +65 -0
- package/community-skills/zoho-crm/README.md +21 -0
- package/community-skills/zoho-crm/agenticmail-skill.json +74 -0
- package/community-skills/zoom-meetings/README.md +51 -0
- package/community-skills/zoom-meetings/agenticmail-skill.json +66 -0
- package/community-skills/zuora/README.md +21 -0
- package/community-skills/zuora/agenticmail-skill.json +55 -0
- package/dashboards/README.md +81 -70
- package/dashboards/django/app.py +117 -0
- package/dashboards/django/static/styles.css +284 -0
- package/dashboards/django/templates/agent_detail.html +501 -0
- package/dashboards/django/templates/agents.html +217 -0
- package/dashboards/django/templates/api_keys.html +41 -0
- package/dashboards/django/templates/audit.html +26 -0
- package/dashboards/django/templates/compliance.html +33 -0
- package/dashboards/django/templates/components/modal.html +6 -0
- package/dashboards/django/templates/components/pagination.html +9 -0
- package/dashboards/django/templates/components/stats.html +8 -0
- package/dashboards/django/templates/dashboard.html +24 -0
- package/dashboards/django/templates/dlp.html +70 -0
- package/dashboards/django/templates/guardrails.html +78 -0
- package/dashboards/django/templates/journal.html +39 -0
- package/dashboards/django/templates/layout.html +52 -0
- package/dashboards/django/templates/login.html +30 -0
- package/dashboards/django/templates/messages.html +38 -0
- package/dashboards/django/templates/settings.html +472 -0
- package/dashboards/django/templates/skills.html +66 -0
- package/dashboards/django/templates/users.html +34 -0
- package/dashboards/django/templates/vault.html +46 -0
- package/dashboards/django/utils/__init__.py +0 -0
- package/dashboards/django/utils/api.py +20 -0
- package/dashboards/django/utils/helpers.py +39 -0
- package/dashboards/django/views/__init__.py +38 -0
- package/dashboards/django/views/agents.py +343 -0
- package/dashboards/django/views/api_keys.py +47 -0
- package/dashboards/django/views/audit.py +35 -0
- package/dashboards/django/views/auth.py +34 -0
- package/dashboards/django/views/compliance.py +37 -0
- package/dashboards/django/views/dashboard.py +27 -0
- package/dashboards/django/views/dlp.py +53 -0
- package/dashboards/django/views/guardrails.py +61 -0
- package/dashboards/django/views/journal.py +41 -0
- package/dashboards/django/views/messages.py +65 -0
- package/dashboards/django/views/settings_view.py +335 -0
- package/dashboards/django/views/skills.py +50 -0
- package/dashboards/django/views/users.py +42 -0
- package/dashboards/django/views/vault.py +50 -0
- package/dashboards/dotnet/AgenticMailDashboard.csproj +10 -0
- package/dashboards/dotnet/Program.cs +53 -233
- package/dashboards/dotnet/Routes/AgentRoutes.cs +771 -0
- package/dashboards/dotnet/Routes/ApiKeyRoutes.cs +185 -0
- package/dashboards/dotnet/Routes/AuditRoutes.cs +86 -0
- package/dashboards/dotnet/Routes/AuthRoutes.cs +50 -0
- package/dashboards/dotnet/Routes/ComplianceRoutes.cs +143 -0
- package/dashboards/dotnet/Routes/DashboardRoutes.cs +81 -0
- package/dashboards/dotnet/Routes/DlpRoutes.cs +230 -0
- package/dashboards/dotnet/Routes/GuardrailRoutes.cs +285 -0
- package/dashboards/dotnet/Routes/JournalRoutes.cs +118 -0
- package/dashboards/dotnet/Routes/MessageRoutes.cs +167 -0
- package/dashboards/dotnet/Routes/SettingRoutes.cs +907 -0
- package/dashboards/dotnet/Routes/SkillRoutes.cs +198 -0
- package/dashboards/dotnet/Routes/UserRoutes.cs +111 -0
- package/dashboards/dotnet/Routes/VaultRoutes.cs +162 -0
- package/dashboards/dotnet/Services/ApiClient.cs +103 -0
- package/dashboards/dotnet/Services/HtmlBuilder.cs +249 -0
- package/dashboards/dotnet/wwwroot/styles.css +284 -0
- package/dashboards/express/app.js +37 -126
- package/dashboards/express/middleware/auth.js +10 -0
- package/dashboards/express/package-lock.json +922 -0
- package/dashboards/express/package.json +17 -0
- package/dashboards/express/public/styles.css +284 -0
- package/dashboards/express/routes/agents.js +771 -0
- package/dashboards/express/routes/apiKeys.js +107 -0
- package/dashboards/express/routes/audit.js +75 -0
- package/dashboards/express/routes/auth.js +38 -0
- package/dashboards/express/routes/compliance.js +93 -0
- package/dashboards/express/routes/dashboard.js +65 -0
- package/dashboards/express/routes/dlp.js +165 -0
- package/dashboards/express/routes/guardrails.js +195 -0
- package/dashboards/express/routes/journal.js +95 -0
- package/dashboards/express/routes/messages.js +97 -0
- package/dashboards/express/routes/settings.js +830 -0
- package/dashboards/express/routes/skills.js +141 -0
- package/dashboards/express/routes/users.js +69 -0
- package/dashboards/express/routes/vault.js +141 -0
- package/dashboards/express/utils/api.js +44 -0
- package/dashboards/express/utils/helpers.js +46 -0
- package/dashboards/express/views/components/modal.js +255 -0
- package/dashboards/express/views/components/stats.js +22 -0
- package/dashboards/express/views/components/table.js +31 -0
- package/dashboards/express/views/layout.js +73 -0
- package/dashboards/express/views/login.js +45 -0
- package/dashboards/go/go.mod +3 -0
- package/dashboards/go/handlers/agents.go +790 -0
- package/dashboards/go/handlers/apikeys.go +38 -0
- package/dashboards/go/handlers/audit.go +52 -0
- package/dashboards/go/handlers/auth.go +39 -0
- package/dashboards/go/handlers/compliance.go +58 -0
- package/dashboards/go/handlers/dashboard.go +43 -0
- package/dashboards/go/handlers/dlp.go +78 -0
- package/dashboards/go/handlers/guardrails.go +89 -0
- package/dashboards/go/handlers/journal.go +60 -0
- package/dashboards/go/handlers/messages.go +59 -0
- package/dashboards/go/handlers/settings.go +951 -0
- package/dashboards/go/handlers/skills.go +129 -0
- package/dashboards/go/handlers/users.go +54 -0
- package/dashboards/go/handlers/vault.go +85 -0
- package/dashboards/go/main.go +35 -485
- package/dashboards/go/middleware/auth.go +17 -0
- package/dashboards/go/services/api.go +38 -0
- package/dashboards/go/services/session.go +52 -0
- package/dashboards/go/static/styles.css +284 -0
- package/dashboards/go/templates/components.go +45 -0
- package/dashboards/go/templates/helpers.go +35 -0
- package/dashboards/go/templates/layout.go +59 -0
- package/dashboards/html/index.html +203 -450
- package/dashboards/html/package.json +11 -0
- package/dashboards/html/public/styles.css +149 -0
- package/dashboards/html/src/api.js +36 -0
- package/dashboards/html/src/components/badge.js +13 -0
- package/dashboards/html/src/components/layout.js +11 -0
- package/dashboards/html/src/components/modal.js +9 -0
- package/dashboards/html/src/components/pagination.js +12 -0
- package/dashboards/html/src/components/stat-card.js +14 -0
- package/dashboards/html/src/components/table.js +6 -0
- package/dashboards/html/src/main.js +83 -0
- package/dashboards/html/src/pages/agents.js +831 -0
- package/dashboards/html/src/pages/api-keys.js +80 -0
- package/dashboards/html/src/pages/audit.js +50 -0
- package/dashboards/html/src/pages/compliance.js +69 -0
- package/dashboards/html/src/pages/dashboard.js +25 -0
- package/dashboards/html/src/pages/dlp.js +112 -0
- package/dashboards/html/src/pages/guardrails.js +127 -0
- package/dashboards/html/src/pages/journal.js +54 -0
- package/dashboards/html/src/pages/login.js +84 -0
- package/dashboards/html/src/pages/messages.js +90 -0
- package/dashboards/html/src/pages/settings.js +656 -0
- package/dashboards/html/src/pages/skills.js +114 -0
- package/dashboards/html/src/pages/users.js +62 -0
- package/dashboards/html/src/pages/vault.js +105 -0
- package/dashboards/html/src/router.js +40 -0
- package/dashboards/html/src/utils/escape.js +7 -0
- package/dashboards/html/src/utils/time.js +16 -0
- package/dashboards/html/src/utils/toast.js +10 -0
- package/dashboards/java/AgenticMailDashboard.java +123 -346
- package/dashboards/java/handlers/AgentsHandler.java +807 -0
- package/dashboards/java/handlers/ApiKeysHandler.java +201 -0
- package/dashboards/java/handlers/AuditHandler.java +95 -0
- package/dashboards/java/handlers/AuthHandler.java +71 -0
- package/dashboards/java/handlers/ComplianceHandler.java +192 -0
- package/dashboards/java/handlers/DashboardHandler.java +98 -0
- package/dashboards/java/handlers/DlpHandler.java +230 -0
- package/dashboards/java/handlers/GuardrailsHandler.java +272 -0
- package/dashboards/java/handlers/JournalHandler.java +130 -0
- package/dashboards/java/handlers/MessagesHandler.java +168 -0
- package/dashboards/java/handlers/SettingsHandler.java +1017 -0
- package/dashboards/java/handlers/SkillsHandler.java +198 -0
- package/dashboards/java/handlers/UsersHandler.java +118 -0
- package/dashboards/java/handlers/VaultHandler.java +168 -0
- package/dashboards/java/services/ApiClient.java +233 -0
- package/dashboards/java/services/SessionManager.java +138 -0
- package/dashboards/java/static/styles.css +288 -0
- package/dashboards/java/templates/Components.java +142 -0
- package/dashboards/java/templates/Helpers.java +106 -0
- package/dashboards/java/templates/Layout.java +98 -0
- package/dashboards/laravel/controllers/AgentController.php +250 -0
- package/dashboards/laravel/controllers/ApiKeyController.php +73 -0
- package/dashboards/laravel/controllers/AuditController.php +31 -0
- package/dashboards/laravel/controllers/AuthController.php +44 -0
- package/dashboards/laravel/controllers/ComplianceController.php +55 -0
- package/dashboards/laravel/controllers/DashboardController.php +28 -0
- package/dashboards/laravel/controllers/DlpController.php +88 -0
- package/dashboards/laravel/controllers/GuardrailController.php +110 -0
- package/dashboards/laravel/controllers/JournalController.php +44 -0
- package/dashboards/laravel/controllers/MessageController.php +47 -0
- package/dashboards/laravel/controllers/SettingController.php +258 -0
- package/dashboards/laravel/controllers/SkillController.php +74 -0
- package/dashboards/laravel/controllers/UserController.php +47 -0
- package/dashboards/laravel/controllers/VaultController.php +94 -0
- package/dashboards/laravel/index.php +319 -0
- package/dashboards/laravel/lib/Api.php +73 -0
- package/dashboards/laravel/lib/Helpers.php +123 -0
- package/dashboards/laravel/public/styles.css +291 -0
- package/dashboards/laravel/views/agent-detail.php +534 -0
- package/dashboards/laravel/views/agents.php +204 -0
- package/dashboards/laravel/views/api-keys.php +55 -0
- package/dashboards/laravel/views/audit.php +30 -0
- package/dashboards/laravel/views/compliance.php +48 -0
- package/dashboards/laravel/views/components/modal.php +59 -0
- package/dashboards/laravel/views/components/stats.php +21 -0
- package/dashboards/laravel/views/components/table.php +35 -0
- package/dashboards/laravel/views/dashboard.php +31 -0
- package/dashboards/laravel/views/dlp.php +87 -0
- package/dashboards/laravel/views/guardrails.php +95 -0
- package/dashboards/laravel/views/journal.php +50 -0
- package/dashboards/laravel/views/layout.php +82 -0
- package/dashboards/laravel/views/login.php +45 -0
- package/dashboards/laravel/views/messages.php +60 -0
- package/dashboards/laravel/views/settings.php +622 -0
- package/dashboards/laravel/views/skills.php +74 -0
- package/dashboards/laravel/views/users.php +42 -0
- package/dashboards/laravel/views/vault.php +80 -0
- package/dashboards/php/components/layout.php +80 -0
- package/dashboards/php/components/modal.php +22 -0
- package/dashboards/php/components/stats.php +20 -0
- package/dashboards/php/components/table.php +33 -0
- package/dashboards/php/index.php +663 -381
- package/dashboards/php/lib/api.php +37 -0
- package/dashboards/php/lib/auth.php +47 -0
- package/dashboards/php/lib/helpers.php +69 -0
- package/dashboards/php/pages/agent-detail.php +552 -0
- package/dashboards/php/pages/agents.php +185 -0
- package/dashboards/php/pages/api-keys.php +34 -0
- package/dashboards/php/pages/audit.php +31 -0
- package/dashboards/php/pages/compliance.php +38 -0
- package/dashboards/php/pages/dashboard.php +29 -0
- package/dashboards/php/pages/dlp.php +65 -0
- package/dashboards/php/pages/guardrails.php +70 -0
- package/dashboards/php/pages/journal.php +53 -0
- package/dashboards/php/pages/login.php +34 -0
- package/dashboards/php/pages/messages.php +53 -0
- package/dashboards/php/pages/settings.php +687 -0
- package/dashboards/php/pages/skills.php +70 -0
- package/dashboards/php/pages/users.php +37 -0
- package/dashboards/php/pages/vault.php +70 -0
- package/dashboards/php/public/styles.css +81 -0
- package/dashboards/python/app.py +61 -259
- package/dashboards/python/routes/__init__.py +0 -0
- package/dashboards/python/routes/agents.py +296 -0
- package/dashboards/python/routes/api_keys.py +49 -0
- package/dashboards/python/routes/audit.py +33 -0
- package/dashboards/python/routes/auth.py +30 -0
- package/dashboards/python/routes/compliance.py +50 -0
- package/dashboards/python/routes/dashboard.py +32 -0
- package/dashboards/python/routes/dlp.py +64 -0
- package/dashboards/python/routes/guardrails.py +79 -0
- package/dashboards/python/routes/journal.py +40 -0
- package/dashboards/python/routes/messages.py +46 -0
- package/dashboards/python/routes/settings.py +260 -0
- package/dashboards/python/routes/skills.py +59 -0
- package/dashboards/python/routes/users.py +43 -0
- package/dashboards/python/routes/vault.py +59 -0
- package/dashboards/python/static/styles.css +288 -0
- package/dashboards/python/templates/agent_detail.html +552 -0
- package/dashboards/python/templates/agents.html +246 -0
- package/dashboards/python/templates/api_keys.html +64 -0
- package/dashboards/python/templates/audit.html +50 -0
- package/dashboards/python/templates/compliance.html +74 -0
- package/dashboards/python/templates/components/modal.html +43 -0
- package/dashboards/python/templates/components/stats.html +26 -0
- package/dashboards/python/templates/components/table.html +43 -0
- package/dashboards/python/templates/dashboard.html +34 -0
- package/dashboards/python/templates/dlp.html +159 -0
- package/dashboards/python/templates/guardrails.html +131 -0
- package/dashboards/python/templates/journal.html +66 -0
- package/dashboards/python/templates/layout.html +86 -0
- package/dashboards/python/templates/login.html +36 -0
- package/dashboards/python/templates/messages.html +90 -0
- package/dashboards/python/templates/settings.html +624 -0
- package/dashboards/python/templates/skills.html +89 -0
- package/dashboards/python/templates/users.html +70 -0
- package/dashboards/python/templates/vault.html +73 -0
- package/dashboards/python/utils/__init__.py +0 -0
- package/dashboards/python/utils/api.py +35 -0
- package/dashboards/python/utils/helpers.py +90 -0
- package/dashboards/rails/app.rb +56 -0
- package/dashboards/rails/helpers/api.rb +39 -0
- package/dashboards/rails/helpers/auth.rb +11 -0
- package/dashboards/rails/helpers/view.rb +95 -0
- package/dashboards/rails/public/styles.css +299 -0
- package/dashboards/rails/routes/agents.rb +173 -0
- package/dashboards/rails/routes/api_keys.rb +30 -0
- package/dashboards/rails/routes/audit.rb +15 -0
- package/dashboards/rails/routes/auth.rb +29 -0
- package/dashboards/rails/routes/compliance.rb +25 -0
- package/dashboards/rails/routes/dashboard.rb +13 -0
- package/dashboards/rails/routes/dlp.rb +40 -0
- package/dashboards/rails/routes/guardrails.rb +51 -0
- package/dashboards/rails/routes/journal.rb +24 -0
- package/dashboards/rails/routes/messages.rb +22 -0
- package/dashboards/rails/routes/settings.rb +196 -0
- package/dashboards/rails/routes/skills.rb +38 -0
- package/dashboards/rails/routes/users.rb +18 -0
- package/dashboards/rails/routes/vault.rb +37 -0
- package/dashboards/rails/views/agent_detail.erb +550 -0
- package/dashboards/rails/views/agents.erb +214 -0
- package/dashboards/rails/views/api_keys.erb +52 -0
- package/dashboards/rails/views/audit.erb +38 -0
- package/dashboards/rails/views/compliance.erb +69 -0
- package/dashboards/rails/views/dashboard.erb +46 -0
- package/dashboards/rails/views/dlp.erb +104 -0
- package/dashboards/rails/views/guardrails.erb +107 -0
- package/dashboards/rails/views/journal.erb +65 -0
- package/dashboards/rails/views/layout.erb +53 -0
- package/dashboards/rails/views/login.erb +47 -0
- package/dashboards/rails/views/messages.erb +62 -0
- package/dashboards/rails/views/settings.erb +578 -0
- package/dashboards/rails/views/skills.erb +66 -0
- package/dashboards/rails/views/users.erb +53 -0
- package/dashboards/rails/views/vault.erb +66 -0
- package/dashboards/ruby/app.rb +53 -182
- package/dashboards/ruby/helpers/api.rb +63 -0
- package/dashboards/ruby/helpers/auth.rb +20 -0
- package/dashboards/ruby/helpers/view.rb +91 -0
- package/dashboards/ruby/public/styles.css +294 -0
- package/dashboards/ruby/routes/agents.rb +197 -0
- package/dashboards/ruby/routes/api_keys.rb +43 -0
- package/dashboards/ruby/routes/audit.rb +15 -0
- package/dashboards/ruby/routes/auth.rb +29 -0
- package/dashboards/ruby/routes/compliance.rb +28 -0
- package/dashboards/ruby/routes/dashboard.rb +13 -0
- package/dashboards/ruby/routes/dlp.rb +55 -0
- package/dashboards/ruby/routes/guardrails.rb +77 -0
- package/dashboards/ruby/routes/journal.rb +24 -0
- package/dashboards/ruby/routes/messages.rb +27 -0
- package/dashboards/ruby/routes/settings.rb +214 -0
- package/dashboards/ruby/routes/skills.rb +50 -0
- package/dashboards/ruby/routes/users.rb +26 -0
- package/dashboards/ruby/routes/vault.rb +49 -0
- package/dashboards/ruby/views/agent_detail.erb +550 -0
- package/dashboards/ruby/views/agents.erb +214 -0
- package/dashboards/ruby/views/api_keys.erb +59 -0
- package/dashboards/ruby/views/audit.erb +38 -0
- package/dashboards/ruby/views/compliance.erb +45 -0
- package/dashboards/ruby/views/dashboard.erb +46 -0
- package/dashboards/ruby/views/dlp.erb +88 -0
- package/dashboards/ruby/views/guardrails.erb +103 -0
- package/dashboards/ruby/views/journal.erb +53 -0
- package/dashboards/ruby/views/layout.erb +52 -0
- package/dashboards/ruby/views/login.erb +31 -0
- package/dashboards/ruby/views/messages.erb +51 -0
- package/dashboards/ruby/views/settings.erb +579 -0
- package/dashboards/ruby/views/skills.erb +66 -0
- package/dashboards/ruby/views/users.erb +53 -0
- package/dashboards/ruby/views/vault.erb +66 -0
- package/dashboards/shared/styles.css +322 -0
- package/dist/{chunk-TVF23PUW.js → chunk-7FVRYOP4.js} +22 -7
- package/dist/chunk-DRXMYYKN.js +79 -0
- package/dist/chunk-E23VJ3QX.js +9427 -0
- package/dist/chunk-EOBN6RCA.js +12652 -0
- package/dist/chunk-FLRYMSKY.js +23 -0
- package/dist/chunk-HAUHDCUB.js +764 -0
- package/dist/chunk-HSF6OJ5Z.js +154 -0
- package/dist/{chunk-PNKVD2UK.js → chunk-KFQGP6VL.js} +7 -0
- package/dist/chunk-LKAFZ343.js +591 -0
- package/dist/{chunk-GXIEEA2T.js → chunk-NTVN3JHS.js} +10 -10
- package/dist/chunk-RO537U6H.js +70 -0
- package/dist/chunk-SGBTJHEF.js +2287 -0
- package/dist/chunk-SMUXH6FM.js +1943 -0
- package/dist/chunk-TY7NVD4U.js +275 -0
- package/dist/chunk-X6UVWFHW.js +3455 -0
- package/dist/{chunk-7RGCCHIT.js → chunk-XMDE2NGH.js} +2 -1
- package/dist/chunk-ZNR5DDTA.js +239 -0
- package/dist/cidr-LISVZSM2.js +17 -0
- package/dist/cli-build-skill-XOYECCLE.js +235 -0
- package/dist/cli-recover-SSGGSKZJ.js +97 -0
- package/dist/cli-submit-skill-RSBLF5XN.js +162 -0
- package/dist/cli-validate-WJBUOEGW.js +148 -0
- package/dist/cli-verify-V3GPFMWU.js +98 -0
- package/dist/cli.js +50 -376
- package/dist/config-store-CRMKWBON.js +58 -0
- package/dist/dashboard/app.js +246 -0
- package/dist/dashboard/assets/logo.png +0 -0
- package/dist/dashboard/components/error-boundary.js +21 -0
- package/dist/dashboard/components/help-button.js +34 -0
- package/dist/dashboard/components/icons.js +53 -0
- package/dist/dashboard/components/modal.js +124 -0
- package/dist/dashboard/components/persona-fields.js +271 -0
- package/dist/dashboard/components/settings-help.js +191 -0
- package/dist/dashboard/components/tag-input.js +96 -0
- package/dist/dashboard/components/utils.js +148 -0
- package/dist/dashboard/index.html +407 -874
- package/dist/dashboard/pages/activity.js +62 -0
- package/dist/dashboard/pages/agent-detail.js +3577 -0
- package/dist/dashboard/pages/agents.js +1072 -0
- package/dist/dashboard/pages/approvals.js +81 -0
- package/dist/dashboard/pages/audit.js +133 -0
- package/dist/dashboard/pages/community-skills.js +665 -0
- package/dist/dashboard/pages/compliance.js +81 -0
- package/dist/dashboard/pages/dashboard.js +150 -0
- package/dist/dashboard/pages/dlp.js +107 -0
- package/dist/dashboard/pages/domain-status.js +123 -0
- package/dist/dashboard/pages/guardrails.js +995 -0
- package/dist/dashboard/pages/journal.js +51 -0
- package/dist/dashboard/pages/knowledge-contributions.js +763 -0
- package/dist/dashboard/pages/knowledge.js +46 -0
- package/dist/dashboard/pages/login.js +491 -0
- package/dist/dashboard/pages/messages.js +274 -0
- package/dist/dashboard/pages/settings.js +1554 -0
- package/dist/dashboard/pages/skill-connections.js +452 -0
- package/dist/dashboard/pages/skills.js +433 -0
- package/dist/dashboard/pages/users.js +49 -0
- package/dist/dashboard/pages/vault.js +538 -0
- package/dist/dashboard/pages/workforce.js +569 -0
- package/dist/dashboard/vendor/react-dom.production.min.js +267 -0
- package/dist/dashboard/vendor/react.production.min.js +31 -0
- package/dist/db-adapter-5PWMLY67.js +7 -0
- package/dist/domain-lock-URIFILHB.js +7 -0
- package/dist/{dynamodb-CCGL2E77.js → dynamodb-CD3LREWD.js} +4 -4
- package/dist/{factory-HINWFYZ3.js → factory-FVJH5RRY.js} +2 -2
- package/dist/firewall-AHIRE6UB.js +10 -0
- package/dist/index.js +133 -448
- package/dist/{managed-RZITNPXG.js → managed-QVTONZ7E.js} +4 -2
- package/dist/{mongodb-ODTXIVPV.js → mongodb-73MGW7LD.js} +4 -4
- package/dist/{mysql-RM3S2FV5.js → mysql-A2RYNBQG.js} +59 -6
- package/dist/{postgres-LN7A6MGQ.js → postgres-OE23X46P.js} +63 -6
- package/dist/registry/cli.js +411 -0
- package/dist/routes-NJK5OI5N.js +5673 -0
- package/dist/runtime-SMA6JUMP.js +46 -0
- package/dist/server-ZT5NWHT4.js +11 -0
- package/dist/setup-RCYNX5NA.js +20 -0
- package/dist/skills-QNR3CCHA.js +14 -0
- package/dist/soul-templates.json +1525 -0
- package/dist/{sqlite-VLKVAJA4.js → sqlite-SFVNZPHX.js} +56 -8
- package/dist/{turso-LDWODSDI.js → turso-L6WQAY7U.js} +59 -6
- package/live-test.mjs +1 -1
- package/package.json +11 -10
- package/schemas/agenticmail-skill.v1.schema.json +180 -0
- package/serve.mjs +12 -2
- package/src/admin/routes.ts +536 -5
- package/src/agent-tools/common.ts +232 -0
- package/src/agent-tools/index.ts +246 -0
- package/src/agent-tools/merge.ts +62 -0
- package/src/agent-tools/middleware.ts +436 -0
- package/src/agent-tools/security.ts +352 -0
- package/src/agent-tools/tools/bash.ts +154 -0
- package/src/agent-tools/tools/browser.ts +236 -0
- package/src/agent-tools/tools/edit.ts +100 -0
- package/src/agent-tools/tools/enterprise-calendar.ts +561 -0
- package/src/agent-tools/tools/enterprise-code-sandbox.ts +395 -0
- package/src/agent-tools/tools/enterprise-database.ts +377 -0
- package/src/agent-tools/tools/enterprise-diff.ts +580 -0
- package/src/agent-tools/tools/enterprise-documents.ts +896 -0
- package/src/agent-tools/tools/enterprise-finance.ts +484 -0
- package/src/agent-tools/tools/enterprise-http.ts +477 -0
- package/src/agent-tools/tools/enterprise-knowledge-search.ts +369 -0
- package/src/agent-tools/tools/enterprise-logs.ts +479 -0
- package/src/agent-tools/tools/enterprise-notifications.ts +532 -0
- package/src/agent-tools/tools/enterprise-security-scan.ts +528 -0
- package/src/agent-tools/tools/enterprise-spreadsheet.ts +825 -0
- package/src/agent-tools/tools/enterprise-translation.ts +530 -0
- package/src/agent-tools/tools/enterprise-vision.ts +348 -0
- package/src/agent-tools/tools/enterprise-web-research.ts +422 -0
- package/src/agent-tools/tools/enterprise-workflow.ts +308 -0
- package/src/agent-tools/tools/glob.ts +129 -0
- package/src/agent-tools/tools/grep.ts +178 -0
- package/src/agent-tools/tools/memory.ts +194 -0
- package/src/agent-tools/tools/read.ts +160 -0
- package/src/agent-tools/tools/web-fetch-utils.ts +202 -0
- package/src/agent-tools/tools/web-fetch.ts +456 -0
- package/src/agent-tools/tools/web-search.ts +480 -0
- package/src/agent-tools/tools/web-shared.ts +232 -0
- package/src/agent-tools/tools/write.ts +68 -0
- package/src/agent-tools/types.ts +193 -0
- package/src/auth/routes.ts +916 -51
- package/src/cli.ts +74 -14
- package/src/dashboard/app.js +246 -0
- package/src/dashboard/assets/logo.png +0 -0
- package/src/dashboard/components/error-boundary.js +21 -0
- package/src/dashboard/components/help-button.js +34 -0
- package/src/dashboard/components/icons.js +53 -0
- package/src/dashboard/components/modal.js +124 -0
- package/src/dashboard/components/persona-fields.js +271 -0
- package/src/dashboard/components/settings-help.js +191 -0
- package/src/dashboard/components/tag-input.js +96 -0
- package/src/dashboard/components/utils.js +148 -0
- package/src/dashboard/index.html +407 -874
- package/src/dashboard/pages/activity.js +62 -0
- package/src/dashboard/pages/agent-detail.js +3577 -0
- package/src/dashboard/pages/agents.js +1072 -0
- package/src/dashboard/pages/approvals.js +81 -0
- package/src/dashboard/pages/audit.js +133 -0
- package/src/dashboard/pages/community-skills.js +665 -0
- package/src/dashboard/pages/compliance.js +81 -0
- package/src/dashboard/pages/dashboard.js +150 -0
- package/src/dashboard/pages/dlp.js +107 -0
- package/src/dashboard/pages/domain-status.js +123 -0
- package/src/dashboard/pages/guardrails.js +995 -0
- package/src/dashboard/pages/journal.js +51 -0
- package/src/dashboard/pages/knowledge-contributions.js +763 -0
- package/src/dashboard/pages/knowledge.js +46 -0
- package/src/dashboard/pages/login.js +491 -0
- package/src/dashboard/pages/messages.js +274 -0
- package/src/dashboard/pages/settings.js +1554 -0
- package/src/dashboard/pages/skill-connections.js +452 -0
- package/src/dashboard/pages/skills.js +433 -0
- package/src/dashboard/pages/users.js +49 -0
- package/src/dashboard/pages/vault.js +538 -0
- package/src/dashboard/pages/workforce.js +569 -0
- package/src/dashboard/vendor/react-dom.production.min.js +267 -0
- package/src/dashboard/vendor/react.production.min.js +31 -0
- package/src/db/adapter.ts +134 -1
- package/src/db/dynamodb.ts +2 -2
- package/src/db/mongodb.ts +2 -2
- package/src/db/mysql.ts +55 -1
- package/src/db/postgres.ts +59 -1
- package/src/db/proxy.ts +39 -0
- package/src/db/sql-schema.ts +2 -1
- package/src/db/sqlite.ts +51 -3
- package/src/db/turso.ts +55 -1
- package/src/deploy/fly.ts +2 -2
- package/src/deploy/managed.ts +32 -11
- package/src/domain-lock/cli-recover.ts +124 -0
- package/src/domain-lock/cli-verify.ts +122 -0
- package/src/domain-lock/index.ts +220 -0
- package/src/engine/activity-routes.ts +116 -0
- package/src/engine/activity.ts +62 -2
- package/src/engine/agent-config.ts +190 -24
- package/src/engine/agent-memory.ts +1062 -0
- package/src/engine/agent-routes.ts +379 -0
- package/src/engine/approvals.ts +309 -2
- package/src/engine/catalog-routes.ts +155 -0
- package/src/engine/cli-build-skill.ts +285 -0
- package/src/engine/cli-submit-skill.ts +200 -0
- package/src/engine/cli-validate.ts +188 -0
- package/src/engine/communication-routes.ts +139 -0
- package/src/engine/communication.ts +759 -0
- package/src/engine/community-registry.ts +1509 -0
- package/src/engine/community-routes.ts +233 -0
- package/src/engine/compliance-routes.ts +93 -0
- package/src/engine/compliance.ts +325 -0
- package/src/engine/db-adapter.ts +349 -1
- package/src/engine/db-schema.ts +971 -23
- package/src/engine/deploy-schema-routes.ts +176 -0
- package/src/engine/deployer.ts +6 -6
- package/src/engine/dlp-routes.ts +59 -0
- package/src/engine/dlp.ts +231 -0
- package/src/engine/guardrail-routes.ts +125 -0
- package/src/engine/guardrails.ts +403 -0
- package/src/engine/index.ts +131 -10
- package/src/engine/journal-routes.ts +56 -0
- package/src/engine/journal.ts +249 -0
- package/src/engine/knowledge-contribution-routes.ts +385 -0
- package/src/engine/knowledge-contribution.ts +1319 -0
- package/src/engine/knowledge-routes.ts +68 -0
- package/src/engine/knowledge.ts +73 -1
- package/src/engine/lifecycle.ts +487 -31
- package/src/engine/memory-routes.ts +142 -0
- package/src/engine/oauth-connect-routes.ts +366 -0
- package/src/engine/oauth-connect.ts +304 -0
- package/src/engine/onboarding-routes.ts +140 -0
- package/src/engine/onboarding.ts +574 -0
- package/src/engine/org-approval-routes.ts +146 -0
- package/src/engine/org-policies.ts +497 -0
- package/src/engine/policy-import-routes.ts +125 -0
- package/src/engine/policy-import.ts +1186 -0
- package/src/engine/policy-routes.ts +163 -0
- package/src/engine/routes.ts +239 -482
- package/src/engine/skill-updater-routes.ts +132 -0
- package/src/engine/skill-updater.ts +480 -0
- package/src/engine/skill-validator.ts +331 -0
- package/src/engine/skills/enterprise-calendar.ts +142 -0
- package/src/engine/skills/enterprise-code-sandbox.ts +112 -0
- package/src/engine/skills/enterprise-database.ts +122 -0
- package/src/engine/skills/enterprise-diff.ts +94 -0
- package/src/engine/skills/enterprise-documents.ts +161 -0
- package/src/engine/skills/enterprise-finance.ts +109 -0
- package/src/engine/skills/enterprise-http.ts +98 -0
- package/src/engine/skills/enterprise-knowledge-search.ts +106 -0
- package/src/engine/skills/enterprise-logs.ts +115 -0
- package/src/engine/skills/enterprise-notifications.ts +119 -0
- package/src/engine/skills/enterprise-security-scan.ts +124 -0
- package/src/engine/skills/enterprise-spreadsheet.ts +170 -0
- package/src/engine/skills/enterprise-translation.ts +111 -0
- package/src/engine/skills/enterprise-vision.ts +107 -0
- package/src/engine/skills/enterprise-web-research.ts +114 -0
- package/src/engine/skills/enterprise-workflow.ts +109 -0
- package/src/engine/skills/gws-admin.ts +17 -0
- package/src/engine/skills/gws-calendar.ts +19 -0
- package/src/engine/skills/gws-chat.ts +16 -0
- package/src/engine/skills/gws-docs.ts +17 -0
- package/src/engine/skills/gws-drive.ts +20 -0
- package/src/engine/skills/gws-forms.ts +16 -0
- package/src/engine/skills/gws-gmail.ts +20 -0
- package/src/engine/skills/gws-groups.ts +16 -0
- package/src/engine/skills/gws-keep.ts +16 -0
- package/src/engine/skills/gws-meet.ts +16 -0
- package/src/engine/skills/gws-sheets.ts +18 -0
- package/src/engine/skills/gws-sites.ts +15 -0
- package/src/engine/skills/gws-slides.ts +16 -0
- package/src/engine/skills/gws-vault.ts +16 -0
- package/src/engine/skills/index.ts +121 -0
- package/src/engine/skills/m365-admin.ts +17 -0
- package/src/engine/skills/m365-bookings.ts +16 -0
- package/src/engine/skills/m365-copilot.ts +16 -0
- package/src/engine/skills/m365-excel.ts +59 -0
- package/src/engine/skills/m365-forms.ts +16 -0
- package/src/engine/skills/m365-onedrive.ts +59 -0
- package/src/engine/skills/m365-onenote.ts +16 -0
- package/src/engine/skills/m365-outlook.ts +26 -0
- package/src/engine/skills/m365-planner.ts +17 -0
- package/src/engine/skills/m365-power-automate.ts +17 -0
- package/src/engine/skills/m365-power-bi.ts +18 -0
- package/src/engine/skills/m365-powerpoint.ts +32 -0
- package/src/engine/skills/m365-sharepoint.ts +19 -0
- package/src/engine/skills/m365-teams.ts +20 -0
- package/src/engine/skills/m365-todo.ts +16 -0
- package/src/engine/skills/m365-whiteboard.ts +15 -0
- package/src/engine/skills/m365-word.ts +41 -0
- package/src/engine/skills.ts +353 -17
- package/src/engine/soul-library.ts +142 -0
- package/src/engine/soul-templates.json +1525 -0
- package/src/engine/storage-manager.ts +252 -0
- package/src/engine/storage-routes.ts +113 -0
- package/src/engine/storage.ts +528 -0
- package/src/engine/tenant.ts +69 -5
- package/src/engine/tool-catalog.ts +177 -13
- package/src/engine/vault-routes.ts +130 -0
- package/src/engine/vault.ts +544 -0
- package/src/engine/workforce-routes.ts +282 -0
- package/src/engine/workforce.ts +957 -0
- package/src/index.ts +9 -1
- package/src/lib/cidr.ts +122 -0
- package/src/lib/config-store.ts +86 -0
- package/src/mcp/adapters/activecampaign.adapter.ts +391 -0
- package/src/mcp/adapters/adobe-sign.adapter.ts +469 -0
- package/src/mcp/adapters/adp.adapter.ts +358 -0
- package/src/mcp/adapters/airtable.adapter.ts +273 -0
- package/src/mcp/adapters/apollo.adapter.ts +420 -0
- package/src/mcp/adapters/asana.adapter.ts +315 -0
- package/src/mcp/adapters/auth0.adapter.ts +386 -0
- package/src/mcp/adapters/aws.adapter.ts +345 -0
- package/src/mcp/adapters/azure-devops.adapter.ts +389 -0
- package/src/mcp/adapters/bamboohr.adapter.ts +376 -0
- package/src/mcp/adapters/basecamp.adapter.ts +366 -0
- package/src/mcp/adapters/bigcommerce.adapter.ts +429 -0
- package/src/mcp/adapters/bitbucket.adapter.ts +260 -0
- package/src/mcp/adapters/box.adapter.ts +350 -0
- package/src/mcp/adapters/brex.adapter.ts +367 -0
- package/src/mcp/adapters/buffer.adapter.ts +303 -0
- package/src/mcp/adapters/calendly.adapter.ts +262 -0
- package/src/mcp/adapters/canva.adapter.ts +256 -0
- package/src/mcp/adapters/chargebee.adapter.ts +448 -0
- package/src/mcp/adapters/circleci.adapter.ts +216 -0
- package/src/mcp/adapters/clickup.adapter.ts +335 -0
- package/src/mcp/adapters/close.adapter.ts +390 -0
- package/src/mcp/adapters/cloudflare.adapter.ts +377 -0
- package/src/mcp/adapters/confluence.adapter.ts +301 -0
- package/src/mcp/adapters/contentful.adapter.ts +355 -0
- package/src/mcp/adapters/copper.adapter.ts +468 -0
- package/src/mcp/adapters/crisp.adapter.ts +415 -0
- package/src/mcp/adapters/crowdstrike.adapter.ts +413 -0
- package/src/mcp/adapters/datadog.adapter.ts +373 -0
- package/src/mcp/adapters/digitalocean.adapter.ts +336 -0
- package/src/mcp/adapters/discord.adapter.ts +248 -0
- package/src/mcp/adapters/docker.adapter.ts +238 -0
- package/src/mcp/adapters/docusign.adapter.ts +431 -0
- package/src/mcp/adapters/drift.adapter.ts +386 -0
- package/src/mcp/adapters/dropbox.adapter.ts +315 -0
- package/src/mcp/adapters/figma.adapter.ts +302 -0
- package/src/mcp/adapters/firebase.adapter.ts +446 -0
- package/src/mcp/adapters/flyio.adapter.ts +302 -0
- package/src/mcp/adapters/freshbooks.adapter.ts +474 -0
- package/src/mcp/adapters/freshdesk.adapter.ts +441 -0
- package/src/mcp/adapters/freshsales.adapter.ts +457 -0
- package/src/mcp/adapters/freshservice.adapter.ts +481 -0
- package/src/mcp/adapters/front.adapter.ts +357 -0
- package/src/mcp/adapters/github-actions.adapter.ts +329 -0
- package/src/mcp/adapters/github.adapter.ts +387 -0
- package/src/mcp/adapters/gitlab.adapter.ts +368 -0
- package/src/mcp/adapters/gong.adapter.ts +386 -0
- package/src/mcp/adapters/google-ads.adapter.ts +363 -0
- package/src/mcp/adapters/google-analytics.adapter.ts +316 -0
- package/src/mcp/adapters/google-cloud.adapter.ts +312 -0
- package/src/mcp/adapters/google-drive.adapter.ts +387 -0
- package/src/mcp/adapters/gotomeeting.adapter.ts +255 -0
- package/src/mcp/adapters/grafana.adapter.ts +361 -0
- package/src/mcp/adapters/greenhouse.adapter.ts +354 -0
- package/src/mcp/adapters/gusto.adapter.ts +329 -0
- package/src/mcp/adapters/hashicorp-vault.adapter.ts +355 -0
- package/src/mcp/adapters/heroku.adapter.ts +291 -0
- package/src/mcp/adapters/hibob.adapter.ts +334 -0
- package/src/mcp/adapters/hootsuite.adapter.ts +322 -0
- package/src/mcp/adapters/hubspot.adapter.ts +400 -0
- package/src/mcp/adapters/huggingface.adapter.ts +349 -0
- package/src/mcp/adapters/index.ts +530 -0
- package/src/mcp/adapters/intercom.adapter.ts +269 -0
- package/src/mcp/adapters/jira.adapter.ts +482 -0
- package/src/mcp/adapters/klaviyo.adapter.ts +353 -0
- package/src/mcp/adapters/kubernetes.adapter.ts +431 -0
- package/src/mcp/adapters/lattice.adapter.ts +339 -0
- package/src/mcp/adapters/launchdarkly.adapter.ts +368 -0
- package/src/mcp/adapters/lever.adapter.ts +347 -0
- package/src/mcp/adapters/linear.adapter.ts +300 -0
- package/src/mcp/adapters/linkedin.adapter.ts +331 -0
- package/src/mcp/adapters/livechat.adapter.ts +259 -0
- package/src/mcp/adapters/loom.adapter.ts +230 -0
- package/src/mcp/adapters/mailchimp.adapter.ts +394 -0
- package/src/mcp/adapters/mailgun.adapter.ts +425 -0
- package/src/mcp/adapters/microsoft-teams.adapter.ts +251 -0
- package/src/mcp/adapters/miro.adapter.ts +274 -0
- package/src/mcp/adapters/mixpanel.adapter.ts +324 -0
- package/src/mcp/adapters/monday.adapter.ts +308 -0
- package/src/mcp/adapters/mongodb-atlas.adapter.ts +345 -0
- package/src/mcp/adapters/neon.adapter.ts +312 -0
- package/src/mcp/adapters/netlify.adapter.ts +324 -0
- package/src/mcp/adapters/netsuite.adapter.ts +411 -0
- package/src/mcp/adapters/newrelic.adapter.ts +339 -0
- package/src/mcp/adapters/notion.adapter.ts +338 -0
- package/src/mcp/adapters/okta.adapter.ts +394 -0
- package/src/mcp/adapters/openai.adapter.ts +315 -0
- package/src/mcp/adapters/opsgenie.adapter.ts +375 -0
- package/src/mcp/adapters/outreach.adapter.ts +372 -0
- package/src/mcp/adapters/paddle.adapter.ts +467 -0
- package/src/mcp/adapters/pagerduty.adapter.ts +412 -0
- package/src/mcp/adapters/pandadoc.adapter.ts +389 -0
- package/src/mcp/adapters/paypal.adapter.ts +465 -0
- package/src/mcp/adapters/personio.adapter.ts +401 -0
- package/src/mcp/adapters/pinecone.adapter.ts +340 -0
- package/src/mcp/adapters/pipedrive.adapter.ts +324 -0
- package/src/mcp/adapters/plaid.adapter.ts +444 -0
- package/src/mcp/adapters/postmark.adapter.ts +387 -0
- package/src/mcp/adapters/power-automate.adapter.ts +388 -0
- package/src/mcp/adapters/quickbooks.adapter.ts +431 -0
- package/src/mcp/adapters/recurly.adapter.ts +433 -0
- package/src/mcp/adapters/reddit.adapter.ts +371 -0
- package/src/mcp/adapters/render.adapter.ts +332 -0
- package/src/mcp/adapters/ringcentral.adapter.ts +281 -0
- package/src/mcp/adapters/rippling.adapter.ts +287 -0
- package/src/mcp/adapters/salesforce.adapter.ts +321 -0
- package/src/mcp/adapters/salesloft.adapter.ts +413 -0
- package/src/mcp/adapters/sanity.adapter.ts +363 -0
- package/src/mcp/adapters/sap.adapter.ts +483 -0
- package/src/mcp/adapters/segment.adapter.ts +260 -0
- package/src/mcp/adapters/sendgrid.adapter.ts +265 -0
- package/src/mcp/adapters/sentry.adapter.ts +331 -0
- package/src/mcp/adapters/servicenow.adapter.ts +468 -0
- package/src/mcp/adapters/shopify.adapter.ts +451 -0
- package/src/mcp/adapters/shortcut.adapter.ts +290 -0
- package/src/mcp/adapters/slack.adapter.ts +380 -0
- package/src/mcp/adapters/smartsheet.adapter.ts +326 -0
- package/src/mcp/adapters/snowflake.adapter.ts +347 -0
- package/src/mcp/adapters/snyk.adapter.ts +394 -0
- package/src/mcp/adapters/splunk.adapter.ts +403 -0
- package/src/mcp/adapters/square.adapter.ts +467 -0
- package/src/mcp/adapters/statuspage.adapter.ts +401 -0
- package/src/mcp/adapters/stripe.adapter.ts +380 -0
- package/src/mcp/adapters/supabase.adapter.ts +334 -0
- package/src/mcp/adapters/teamwork.adapter.ts +404 -0
- package/src/mcp/adapters/telegram.adapter.ts +299 -0
- package/src/mcp/adapters/terraform.adapter.ts +300 -0
- package/src/mcp/adapters/todoist.adapter.ts +239 -0
- package/src/mcp/adapters/trello.adapter.ts +316 -0
- package/src/mcp/adapters/twilio.adapter.ts +233 -0
- package/src/mcp/adapters/twitter.adapter.ts +348 -0
- package/src/mcp/adapters/vercel.adapter.ts +219 -0
- package/src/mcp/adapters/weaviate.adapter.ts +371 -0
- package/src/mcp/adapters/webex.adapter.ts +237 -0
- package/src/mcp/adapters/webflow.adapter.ts +287 -0
- package/src/mcp/adapters/whatsapp.adapter.ts +273 -0
- package/src/mcp/adapters/whereby.adapter.ts +240 -0
- package/src/mcp/adapters/woocommerce.adapter.ts +454 -0
- package/src/mcp/adapters/wordpress.adapter.ts +455 -0
- package/src/mcp/adapters/workday.adapter.ts +354 -0
- package/src/mcp/adapters/wrike.adapter.ts +349 -0
- package/src/mcp/adapters/xero.adapter.ts +472 -0
- package/src/mcp/adapters/youtube.adapter.ts +401 -0
- package/src/mcp/adapters/zendesk.adapter.ts +399 -0
- package/src/mcp/adapters/zoho-crm.adapter.ts +410 -0
- package/src/mcp/adapters/zoom.adapter.ts +241 -0
- package/src/mcp/adapters/zuora.adapter.ts +476 -0
- package/src/mcp/framework/api-executor.ts +192 -0
- package/src/mcp/framework/aws-sigv4.ts +216 -0
- package/src/mcp/framework/credential-resolver.ts +128 -0
- package/src/mcp/framework/skill-mcp-framework.ts +226 -0
- package/src/mcp/framework/types.ts +130 -0
- package/src/mcp/index.ts +124 -0
- package/src/middleware/egress-filter.ts +81 -0
- package/src/middleware/firewall.ts +121 -0
- package/src/middleware/index.ts +33 -0
- package/src/registry/cli.ts +63 -0
- package/src/registry/server.ts +504 -0
- package/src/runtime/agent-loop.ts +504 -0
- package/src/runtime/email-channel.ts +120 -0
- package/src/runtime/followup.ts +211 -0
- package/src/runtime/gateway.ts +260 -0
- package/src/runtime/hooks.ts +472 -0
- package/src/runtime/index.ts +679 -0
- package/src/runtime/llm-client.ts +1019 -0
- package/src/runtime/providers.ts +231 -0
- package/src/runtime/session-manager.ts +340 -0
- package/src/runtime/subagent.ts +154 -0
- package/src/runtime/tool-executor.ts +202 -0
- package/src/runtime/types.ts +215 -0
- package/src/server.ts +157 -45
- package/src/setup/company.ts +127 -8
- package/src/setup/database.ts +2 -1
- package/src/setup/domain.ts +33 -4
- package/src/setup/index.ts +19 -7
- package/src/setup/provision.ts +128 -8
- package/src/setup/registration.ts +227 -0
- package/src/types/hono-env.ts +14 -0
- package/src/types/optional-deps.d.ts +10 -0
- package/start-live.mjs +12 -3
- package/test-integration.mjs +628 -257
- package/dist/chunk-77IDQJL3.js +0 -7
- package/dist/chunk-BE7MXVLA.js +0 -757
- package/dist/chunk-BS2WCSHO.js +0 -48
- package/dist/chunk-FL3VQBGL.js +0 -757
- package/dist/chunk-IQWA44WT.js +0 -970
- package/dist/chunk-N2JVTNNJ.js +0 -2553
- package/dist/chunk-YFDSE4BW.js +0 -1355
- package/dist/db-adapter-DEWEFNIV.js +0 -7
- package/dist/factory-V37IG5AT.js +0 -9
- package/dist/routes-2JEPIIKC.js +0 -441
- package/dist/server-32YYCI3A.js +0 -8
- package/dist/server-H3C6WUOS.js +0 -8
- package/dist/sqlite-3K5YOZ4K.js +0 -439
- package/src/engine/agenticmail-bridge.ts +0 -296
- package/src/engine/openclaw-hook.ts +0 -371
|
@@ -0,0 +1,1072 @@
|
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall, engineCall, DEPLOY_PHASES, DEPLOY_PHASE_LABELS, showConfirm } from '../components/utils.js';
|
|
2
|
+
import { I } from '../components/icons.js';
|
|
3
|
+
import { CULTURES, LANGUAGES, PersonaForm } from '../components/persona-fields.js';
|
|
4
|
+
|
|
5
|
+
// ════════════════════════════════════════════════════════════
|
|
6
|
+
// DEPLOY MODAL
|
|
7
|
+
// ════════════════════════════════════════════════════════════
|
|
8
|
+
|
|
9
|
+
export function DeployModal({ agentId, agentConfig, onClose, onDeployed, toast }) {
|
|
10
|
+
const [step, setStep] = useState(0);
|
|
11
|
+
const [targetType, setTargetType] = useState('docker');
|
|
12
|
+
const [credentials, setCredentials] = useState([]);
|
|
13
|
+
const [selectedCred, setSelectedCred] = useState('');
|
|
14
|
+
const [config, setConfig] = useState({ imageTag: 'latest', ports: '3000', memory: '512m', cpu: '0.5', installPath: '/opt/agent', systemd: true, region: 'iad' });
|
|
15
|
+
const [loading, setLoading] = useState(false);
|
|
16
|
+
const [error, setError] = useState('');
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
engineCall('/deploy-credentials?orgId=default').then(d => setCredentials(d.credentials || [])).catch(() => {});
|
|
20
|
+
}, []);
|
|
21
|
+
|
|
22
|
+
const targets = [
|
|
23
|
+
{ id: 'docker', name: 'Docker', desc: 'Run in an isolated Docker container' },
|
|
24
|
+
{ id: 'vps', name: 'VPS / Server', desc: 'Deploy via SSH to a remote server' },
|
|
25
|
+
{ id: 'fly', name: 'Fly.io', desc: 'Deploy to Fly.io edge network' },
|
|
26
|
+
{ id: 'railway', name: 'Railway', desc: 'Deploy to Railway platform' },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
const filteredCreds = credentials.filter(c => c.targetType === targetType || c.targetType === 'ssh' && targetType === 'vps');
|
|
30
|
+
|
|
31
|
+
const doDeploy = async () => {
|
|
32
|
+
setError(''); setLoading(true);
|
|
33
|
+
try {
|
|
34
|
+
await engineCall('/agents/' + agentId + '/deploy', { method: 'POST', body: JSON.stringify({ targetType: targetType, credentialId: selectedCred || undefined, config: config, deployedBy: 'dashboard' }) });
|
|
35
|
+
if (toast) toast('Deployment started', 'success');
|
|
36
|
+
if (onDeployed) onDeployed();
|
|
37
|
+
onClose();
|
|
38
|
+
} catch (err) { setError(err.message); if (toast) toast(err.message, 'error'); }
|
|
39
|
+
setLoading(false);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return h('div', { className: 'modal-overlay', onClick: e => { if (e.target === e.currentTarget) onClose(); } },
|
|
43
|
+
h('div', { className: 'modal modal-lg' },
|
|
44
|
+
h('div', { className: 'modal-header' },
|
|
45
|
+
h('h2', null, 'Deploy Agent'),
|
|
46
|
+
h('button', { className: 'btn btn-ghost btn-icon', onClick: onClose }, I.x())
|
|
47
|
+
),
|
|
48
|
+
h('div', { className: 'modal-body' },
|
|
49
|
+
h('div', { className: 'wizard-steps' }, [0, 1, 2].map(i =>
|
|
50
|
+
h('div', { key: i, className: 'wizard-step' + (i === step ? ' active' : '') + (i < step ? ' done' : '') })
|
|
51
|
+
)),
|
|
52
|
+
|
|
53
|
+
step === 0 && h(Fragment, null,
|
|
54
|
+
h('h4', { style: { fontSize: 14, fontWeight: 600, marginBottom: 12 } }, 'Select Target'),
|
|
55
|
+
h('div', { className: 'target-grid' }, targets.map(t =>
|
|
56
|
+
h('div', { key: t.id, className: 'target-card' + (targetType === t.id ? ' selected' : ''), onClick: () => setTargetType(t.id) },
|
|
57
|
+
h('h4', null, t.name),
|
|
58
|
+
h('p', null, t.desc)
|
|
59
|
+
)
|
|
60
|
+
))
|
|
61
|
+
),
|
|
62
|
+
|
|
63
|
+
step === 1 && h(Fragment, null,
|
|
64
|
+
h('h4', { style: { fontSize: 14, fontWeight: 600, marginBottom: 12 } }, 'Configure Deployment'),
|
|
65
|
+
filteredCreds.length > 0 && h('div', { className: 'form-group' },
|
|
66
|
+
h('label', { className: 'form-label' }, 'Credential'),
|
|
67
|
+
h('select', { className: 'input', value: selectedCred, onChange: e => setSelectedCred(e.target.value) },
|
|
68
|
+
h('option', { value: '' }, '-- Select credential --'),
|
|
69
|
+
filteredCreds.map(c => h('option', { key: c.id, value: c.id }, c.name))
|
|
70
|
+
)
|
|
71
|
+
),
|
|
72
|
+
filteredCreds.length === 0 && h('div', { style: { padding: 12, background: 'var(--warning-soft)', borderRadius: 'var(--radius)', fontSize: 13, color: 'var(--warning)', marginBottom: 16 } }, 'No credentials found for this target type. Add one in Settings > Deployments.'),
|
|
73
|
+
|
|
74
|
+
targetType === 'docker' && h(Fragment, null,
|
|
75
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
76
|
+
h('div', { className: 'form-group' },
|
|
77
|
+
h('label', { className: 'form-label' }, 'Image Tag'),
|
|
78
|
+
h('input', { className: 'input', value: config.imageTag, onChange: e => setConfig(c => ({ ...c, imageTag: e.target.value })) })
|
|
79
|
+
),
|
|
80
|
+
h('div', { className: 'form-group' },
|
|
81
|
+
h('label', { className: 'form-label' }, 'Ports'),
|
|
82
|
+
h('input', { className: 'input', value: config.ports, onChange: e => setConfig(c => ({ ...c, ports: e.target.value })), placeholder: '3000' })
|
|
83
|
+
)
|
|
84
|
+
),
|
|
85
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
86
|
+
h('div', { className: 'form-group' },
|
|
87
|
+
h('label', { className: 'form-label' }, 'Memory'),
|
|
88
|
+
h('input', { className: 'input', value: config.memory, onChange: e => setConfig(c => ({ ...c, memory: e.target.value })), placeholder: '512m' })
|
|
89
|
+
),
|
|
90
|
+
h('div', { className: 'form-group' },
|
|
91
|
+
h('label', { className: 'form-label' }, 'CPU'),
|
|
92
|
+
h('input', { className: 'input', value: config.cpu, onChange: e => setConfig(c => ({ ...c, cpu: e.target.value })), placeholder: '0.5' })
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
),
|
|
96
|
+
|
|
97
|
+
targetType === 'vps' && h(Fragment, null,
|
|
98
|
+
h('div', { className: 'form-group' },
|
|
99
|
+
h('label', { className: 'form-label' }, 'Install Path'),
|
|
100
|
+
h('input', { className: 'input', value: config.installPath, onChange: e => setConfig(c => ({ ...c, installPath: e.target.value })), placeholder: '/opt/agent' })
|
|
101
|
+
),
|
|
102
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 12, marginTop: 8 } },
|
|
103
|
+
h('div', { className: 'toggle' + (config.systemd ? ' on' : ''), onClick: () => setConfig(c => ({ ...c, systemd: !c.systemd })) }),
|
|
104
|
+
h('span', { style: { fontSize: 13 } }, 'Create systemd service')
|
|
105
|
+
)
|
|
106
|
+
),
|
|
107
|
+
|
|
108
|
+
targetType === 'fly' && h('div', { className: 'form-group' },
|
|
109
|
+
h('label', { className: 'form-label' }, 'Region'),
|
|
110
|
+
h('select', { className: 'input', value: config.region, onChange: e => setConfig(c => ({ ...c, region: e.target.value })) },
|
|
111
|
+
h('option', { value: 'iad' }, 'Ashburn (iad)'), h('option', { value: 'ord' }, 'Chicago (ord)'), h('option', { value: 'lax' }, 'Los Angeles (lax)'), h('option', { value: 'lhr' }, 'London (lhr)'), h('option', { value: 'ams' }, 'Amsterdam (ams)'), h('option', { value: 'nrt' }, 'Tokyo (nrt)')
|
|
112
|
+
)
|
|
113
|
+
),
|
|
114
|
+
|
|
115
|
+
targetType === 'railway' && h('div', { className: 'form-group' },
|
|
116
|
+
h('label', { className: 'form-label' }, 'Region'),
|
|
117
|
+
h('select', { className: 'input', value: config.region, onChange: e => setConfig(c => ({ ...c, region: e.target.value })) },
|
|
118
|
+
h('option', { value: 'us-west1' }, 'US West'), h('option', { value: 'us-east4' }, 'US East'), h('option', { value: 'europe-west4' }, 'Europe West'), h('option', { value: 'asia-southeast1' }, 'Asia Southeast')
|
|
119
|
+
)
|
|
120
|
+
)
|
|
121
|
+
),
|
|
122
|
+
|
|
123
|
+
step === 2 && h(Fragment, null,
|
|
124
|
+
h('h4', { style: { fontSize: 14, fontWeight: 600, marginBottom: 12 } }, 'Review Deployment'),
|
|
125
|
+
h('div', { style: { background: 'var(--bg-tertiary)', borderRadius: 'var(--radius-lg)', padding: 20 } },
|
|
126
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '120px 1fr', gap: '8px 16px', fontSize: 13 } },
|
|
127
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Agent'), h('span', { style: { fontWeight: 600 } }, agentConfig?.name || agentConfig?.email?.address || agentId),
|
|
128
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Target'), h('span', null, targets.find(t => t.id === targetType)?.name || targetType),
|
|
129
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Credential'), h('span', null, selectedCred ? (filteredCreds.find(c => c.id === selectedCred)?.name || selectedCred) : 'None'),
|
|
130
|
+
targetType === 'docker' && h(Fragment, null,
|
|
131
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Image Tag'), h('span', null, config.imageTag),
|
|
132
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Resources'), h('span', null, config.memory + ' / ' + config.cpu + ' CPU')
|
|
133
|
+
),
|
|
134
|
+
(targetType === 'fly' || targetType === 'railway') && h(Fragment, null,
|
|
135
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Region'), h('span', null, config.region)
|
|
136
|
+
),
|
|
137
|
+
targetType === 'vps' && h(Fragment, null,
|
|
138
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Install Path'), h('span', null, config.installPath),
|
|
139
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Systemd'), h('span', null, config.systemd ? 'Yes' : 'No')
|
|
140
|
+
)
|
|
141
|
+
)
|
|
142
|
+
),
|
|
143
|
+
error && h('div', { style: { color: 'var(--danger)', fontSize: 13, marginTop: 12 } }, error)
|
|
144
|
+
)
|
|
145
|
+
),
|
|
146
|
+
h('div', { className: 'modal-footer' },
|
|
147
|
+
step > 0 && h('button', { className: 'btn btn-secondary', onClick: () => setStep(step - 1) }, 'Back'),
|
|
148
|
+
h('div', { style: { flex: 1 } }),
|
|
149
|
+
step < 2 && h('button', { className: 'btn btn-primary', onClick: () => setStep(step + 1) }, 'Next'),
|
|
150
|
+
step === 2 && h('button', { className: 'btn btn-primary', disabled: loading, onClick: doDeploy }, loading ? 'Deploying...' : 'Deploy')
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ════════════════════════════════════════════════════════════
|
|
157
|
+
// DEPLOYMENT PROGRESS
|
|
158
|
+
// ════════════════════════════════════════════════════════════
|
|
159
|
+
|
|
160
|
+
export function DeploymentProgress({ agentId, onComplete }) {
|
|
161
|
+
const [phases, setPhases] = useState({});
|
|
162
|
+
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
var es = new EventSource('/api/engine/activity/stream');
|
|
165
|
+
es.onmessage = function(e) {
|
|
166
|
+
try {
|
|
167
|
+
var data = JSON.parse(e.data);
|
|
168
|
+
if (data.agentId && data.agentId !== agentId) return;
|
|
169
|
+
if (data.type === 'deploy-phase' || data.type === 'deploy_phase') {
|
|
170
|
+
setPhases(function(prev) {
|
|
171
|
+
var next = Object.assign({}, prev);
|
|
172
|
+
next[data.phase] = { status: data.status, message: data.message || '', timestamp: data.timestamp || new Date().toISOString() };
|
|
173
|
+
return next;
|
|
174
|
+
});
|
|
175
|
+
if (data.phase === 'complete') {
|
|
176
|
+
if (onComplete) onComplete(data.status === 'completed' || data.status === 'success');
|
|
177
|
+
}
|
|
178
|
+
if (data.status === 'failed' || data.status === 'error') {
|
|
179
|
+
if (onComplete) onComplete(false);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
} catch (err) {}
|
|
183
|
+
};
|
|
184
|
+
es.onerror = function() { es.close(); };
|
|
185
|
+
return function() { es.close(); };
|
|
186
|
+
}, [agentId]);
|
|
187
|
+
|
|
188
|
+
var currentPhaseIndex = -1;
|
|
189
|
+
DEPLOY_PHASES.forEach(function(p, i) {
|
|
190
|
+
if (phases[p]) currentPhaseIndex = i;
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
return h('div', { className: 'deploy-timeline' },
|
|
194
|
+
DEPLOY_PHASES.map(function(phase, i) {
|
|
195
|
+
var info = phases[phase];
|
|
196
|
+
var status = 'pending';
|
|
197
|
+
if (info) {
|
|
198
|
+
if (info.status === 'completed' || info.status === 'success' || info.status === 'done') status = 'completed';
|
|
199
|
+
else if (info.status === 'failed' || info.status === 'error') status = 'failed';
|
|
200
|
+
else status = 'active';
|
|
201
|
+
} else if (i <= currentPhaseIndex) {
|
|
202
|
+
status = 'completed';
|
|
203
|
+
}
|
|
204
|
+
// Mark first un-completed phase after current as active if nothing explicitly active
|
|
205
|
+
if (status === 'pending' && i === currentPhaseIndex + 1 && currentPhaseIndex >= 0) {
|
|
206
|
+
var prevInfo = phases[DEPLOY_PHASES[currentPhaseIndex]];
|
|
207
|
+
if (prevInfo && (prevInfo.status === 'completed' || prevInfo.status === 'success' || prevInfo.status === 'done')) {
|
|
208
|
+
status = 'active';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
var icon = '-';
|
|
213
|
+
if (status === 'completed') icon = h('svg', { viewBox: '0 0 24 24', width: 12, height: 12, fill: 'none', stroke: 'currentColor', strokeWidth: 3 }, h('polyline', { points: '20 6 9 17 4 12' }));
|
|
214
|
+
else if (status === 'active') icon = h('svg', { viewBox: '0 0 24 24', width: 12, height: 12, fill: 'none', stroke: 'currentColor', strokeWidth: 2 }, h('path', { d: 'M12 2v4m0 12v4m-7.07-14.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4m-14.93-7.07l2.83 2.83m8.48 8.48l2.83 2.83' }));
|
|
215
|
+
else if (status === 'failed') icon = h('svg', { viewBox: '0 0 24 24', width: 12, height: 12, fill: 'none', stroke: 'currentColor', strokeWidth: 3 }, h('line', { x1: 18, y1: 6, x2: 6, y2: 18 }), h('line', { x1: 6, y1: 6, x2: 18, y2: 18 }));
|
|
216
|
+
|
|
217
|
+
return h('div', { key: phase, className: 'deploy-phase ' + status },
|
|
218
|
+
h('div', { className: 'deploy-phase-icon' }, icon),
|
|
219
|
+
h('div', { className: 'deploy-phase-content' },
|
|
220
|
+
h('div', { className: 'deploy-phase-title' }, DEPLOY_PHASE_LABELS[phase] || phase),
|
|
221
|
+
info && info.message && h('div', { className: 'deploy-phase-msg' }, info.message),
|
|
222
|
+
info && info.timestamp && h('div', { className: 'deploy-phase-msg' }, new Date(info.timestamp).toLocaleTimeString())
|
|
223
|
+
)
|
|
224
|
+
);
|
|
225
|
+
})
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// ════════════════════════════════════════════════════════════
|
|
230
|
+
// AGENT CREATION WIZARD
|
|
231
|
+
// ════════════════════════════════════════════════════════════
|
|
232
|
+
|
|
233
|
+
export function CreateAgentWizard({ onClose, onCreated, toast }) {
|
|
234
|
+
const [step, setStep] = useState(0);
|
|
235
|
+
const steps = ['Role', 'Basics', 'Persona', 'Skills', 'Permissions', 'Deployment', 'Review'];
|
|
236
|
+
const [form, setForm] = useState({ name: '', email: '', role: 'assistant', description: '', personality: '', skills: [], preset: null, customTools: { allowed: [], blocked: [] }, deployTarget: 'docker', knowledgeBases: [], provider: 'anthropic', model: 'claude-sonnet-4-20250514', approvalRequired: true, soulId: null, avatar: null, gender: '', dateOfBirth: '', maritalStatus: '', culturalBackground: '', language: 'en-us', autoOnboard: true, maxRiskLevel: 'medium', blockedSideEffects: ['runs-code', 'deletes-data', 'financial', 'controls-device'], approvalForRiskLevels: ['high', 'critical'], approvalForSideEffects: ['sends-email', 'sends-message'], rateLimits: { toolCallsPerMinute: 30, toolCallsPerHour: 500, toolCallsPerDay: 5000, externalActionsPerHour: 50 }, constraints: { maxConcurrentTasks: 5, maxSessionDurationMinutes: 480, sandboxMode: false }, traits: { communication: 'direct', detail: 'detail-oriented', energy: 'calm', humor: 'warm', formality: 'adaptive', empathy: 'moderate', patience: 'patient', creativity: 'creative' } });
|
|
237
|
+
const [allSkills, setAllSkills] = useState({});
|
|
238
|
+
const [providers, setProviders] = useState([]);
|
|
239
|
+
const [providerModels, setProviderModels] = useState([]);
|
|
240
|
+
const [presets, setPresets] = useState([]);
|
|
241
|
+
const [soulCategories, setSoulCategories] = useState({});
|
|
242
|
+
const [soulMeta, setSoulMeta] = useState({});
|
|
243
|
+
const [soulSearch, setSoulSearch] = useState('');
|
|
244
|
+
const [selectedSoul, setSelectedSoul] = useState(null);
|
|
245
|
+
const [previewOpen, setPreviewOpen] = useState(false);
|
|
246
|
+
const [loading, setLoading] = useState(false);
|
|
247
|
+
|
|
248
|
+
useEffect(() => {
|
|
249
|
+
engineCall('/skills/by-category').then(d => setAllSkills(d.categories || {})).catch(() => {});
|
|
250
|
+
engineCall('/profiles/presets').then(d => setPresets(d.presets || [])).catch(() => {});
|
|
251
|
+
engineCall('/souls/by-category').then(d => { setSoulCategories(d.categories || {}); setSoulMeta(d.categoryMeta || {}); }).catch(() => {});
|
|
252
|
+
apiCall('/providers').then(function(d) { setProviders(d.providers || []); }).catch(function() {});
|
|
253
|
+
}, []);
|
|
254
|
+
|
|
255
|
+
// Fetch models when provider changes
|
|
256
|
+
useEffect(function() {
|
|
257
|
+
var p = form.provider || 'anthropic';
|
|
258
|
+
apiCall('/providers/' + p + '/models').then(function(d) {
|
|
259
|
+
var models = d.models || [];
|
|
260
|
+
setProviderModels(models);
|
|
261
|
+
// Auto-select first model if current model doesn't belong to this provider
|
|
262
|
+
if (models.length > 0) {
|
|
263
|
+
var currentValid = models.some(function(m) { return m.id === form.model; });
|
|
264
|
+
if (!currentValid) {
|
|
265
|
+
set('model', models[0].id);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}).catch(function() { setProviderModels([]); });
|
|
269
|
+
}, [form.provider]);
|
|
270
|
+
|
|
271
|
+
const set = (k, v) => setForm(f => ({ ...f, [k]: v }));
|
|
272
|
+
const toggleSkill = (id) => setForm(f => ({ ...f, skills: f.skills.includes(id) ? f.skills.filter(s => s !== id) : [...f.skills, id] }));
|
|
273
|
+
const [suites, setSuites] = useState([]);
|
|
274
|
+
const [skillSearch, setSkillSearch] = useState('');
|
|
275
|
+
|
|
276
|
+
// Load suites
|
|
277
|
+
useEffect(() => {
|
|
278
|
+
engineCall('/skills/suites').then(d => setSuites(d.suites || [])).catch(() => {});
|
|
279
|
+
}, []);
|
|
280
|
+
|
|
281
|
+
// Toggle an entire suite — adds all its skills at once, or removes them all
|
|
282
|
+
const toggleSuite = (suite) => {
|
|
283
|
+
setForm(f => {
|
|
284
|
+
const allIn = suite.skills.every(id => f.skills.includes(id));
|
|
285
|
+
if (allIn) {
|
|
286
|
+
return { ...f, skills: f.skills.filter(id => !suite.skills.includes(id)) };
|
|
287
|
+
} else {
|
|
288
|
+
const merged = [...new Set([...f.skills, ...suite.skills])];
|
|
289
|
+
return { ...f, skills: merged };
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
const selectSoul = (tpl) => {
|
|
295
|
+
if (form.soulId === tpl.id) {
|
|
296
|
+
setForm(f => ({ ...f, soulId: null }));
|
|
297
|
+
setSelectedSoul(null);
|
|
298
|
+
setPreviewOpen(false);
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
setForm(f => ({
|
|
302
|
+
...f,
|
|
303
|
+
soulId: tpl.id,
|
|
304
|
+
role: tpl.identity.role || tpl.name || f.role,
|
|
305
|
+
personality: tpl.personality,
|
|
306
|
+
description: tpl.description,
|
|
307
|
+
skills: tpl.suggestedSkills || [],
|
|
308
|
+
preset: tpl.suggestedPreset || f.preset,
|
|
309
|
+
}));
|
|
310
|
+
setSelectedSoul(tpl);
|
|
311
|
+
setPreviewOpen(true);
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// Parse personality markdown into named sections
|
|
315
|
+
const parseSections = (text) => {
|
|
316
|
+
if (!text) return {};
|
|
317
|
+
const sections = {};
|
|
318
|
+
const parts = text.split(/^## /m);
|
|
319
|
+
for (const part of parts) {
|
|
320
|
+
if (!part.trim()) continue;
|
|
321
|
+
const nl = part.indexOf('\n');
|
|
322
|
+
if (nl === -1) continue;
|
|
323
|
+
sections[part.slice(0, nl).trim()] = part.slice(nl + 1).trim();
|
|
324
|
+
}
|
|
325
|
+
return sections;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
// Rewrite "You are..." personality text into user-facing "This agent..." descriptions
|
|
329
|
+
const rewriteForUser = (text) => {
|
|
330
|
+
if (!text) return '';
|
|
331
|
+
return text
|
|
332
|
+
// Sentence-start patterns (after . or start of string)
|
|
333
|
+
.replace(/(^|[.!?]\s+)You are /g, '$1This agent is ')
|
|
334
|
+
.replace(/(^|[.!?]\s+)You do not /g, '$1This agent does not ')
|
|
335
|
+
.replace(/(^|[.!?]\s+)You don't /g, '$1This agent won\'t ')
|
|
336
|
+
.replace(/(^|[.!?]\s+)You never /g, '$1This agent never ')
|
|
337
|
+
.replace(/(^|[.!?]\s+)You always /g, '$1This agent always ')
|
|
338
|
+
.replace(/(^|[.!?]\s+)You can /g, '$1This agent can ')
|
|
339
|
+
.replace(/(^|[.!?]\s+)You will /g, '$1This agent will ')
|
|
340
|
+
.replace(/(^|[.!?]\s+)You have /g, '$1This agent has ')
|
|
341
|
+
.replace(/(^|[.!?]\s+)You treat /g, '$1This agent treats ')
|
|
342
|
+
.replace(/(^|[.!?]\s+)You use /g, '$1This agent uses ')
|
|
343
|
+
.replace(/(^|[.!?]\s+)You apply /g, '$1This agent applies ')
|
|
344
|
+
.replace(/(^|[.!?]\s+)You rely /g, '$1This agent relies ')
|
|
345
|
+
.replace(/(^|[.!?]\s+)You prioritize /g, '$1This agent prioritizes ')
|
|
346
|
+
.replace(/(^|[.!?]\s+)You write /g, '$1This agent writes ')
|
|
347
|
+
.replace(/(^|[.!?]\s+)You keep /g, '$1This agent keeps ')
|
|
348
|
+
.replace(/(^|[.!?]\s+)You work /g, '$1This agent works ')
|
|
349
|
+
.replace(/(^|[.!?]\s+)You gather /g, '$1This agent gathers ')
|
|
350
|
+
.replace(/(^|[.!?]\s+)You begin /g, '$1This agent begins ')
|
|
351
|
+
.replace(/(^|[.!?]\s+)You maintain /g, '$1This agent maintains ')
|
|
352
|
+
.replace(/(^|[.!?]\s+)You watch /g, '$1This agent watches ')
|
|
353
|
+
.replace(/(^|[.!?]\s+)You guard /g, '$1This agent guards ')
|
|
354
|
+
.replace(/(^|[.!?]\s+)You distinguish /g, '$1This agent distinguishes ')
|
|
355
|
+
// Generic catch-all for remaining "You [verb]" at sentence start
|
|
356
|
+
.replace(/(^|[.!?]\s+)You (\w)/g, (m, pre, c) => pre + 'This agent ' + c.toLowerCase())
|
|
357
|
+
// Mid-sentence
|
|
358
|
+
.replace(/ you /g, ' this agent ')
|
|
359
|
+
.replace(/ your /g, ' this agent\'s ')
|
|
360
|
+
.replace(/ Your /g, ' This agent\'s ')
|
|
361
|
+
// Possessive at start
|
|
362
|
+
.replace(/(^|[.!?]\s+)Your /g, '$1This agent\'s ');
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
// Extract first N sentences from a prose paragraph, rewritten for user
|
|
366
|
+
const firstSentences = (text, n) => {
|
|
367
|
+
if (!text) return '';
|
|
368
|
+
const rewritten = rewriteForUser(text);
|
|
369
|
+
const sentences = rewritten.match(/[^.!?]+[.!?]+/g) || [rewritten];
|
|
370
|
+
return sentences.slice(0, n).join(' ').trim();
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// Rewrite bullet/list items for user-facing language
|
|
374
|
+
const extractItems = (text) => {
|
|
375
|
+
if (!text) return [];
|
|
376
|
+
const bullets = text.split('\n').filter(l => l.trim().startsWith('- ')).map(l => rewriteForUser(l.trim().slice(2).trim()));
|
|
377
|
+
if (bullets.length > 0) return bullets;
|
|
378
|
+
if (text.includes(',')) return text.split(',').map(s => s.trim()).filter(Boolean);
|
|
379
|
+
return [rewriteForUser(text)];
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
// Filter souls by search
|
|
383
|
+
const filteredCategories = {};
|
|
384
|
+
for (const [cat, templates] of Object.entries(soulCategories)) {
|
|
385
|
+
if (!soulSearch) { filteredCategories[cat] = templates; continue; }
|
|
386
|
+
const q = soulSearch.toLowerCase();
|
|
387
|
+
const filtered = templates.filter(t => t.name.toLowerCase().includes(q) || t.description.toLowerCase().includes(q) || (t.tags || []).some(tag => tag.includes(q)));
|
|
388
|
+
if (filtered.length > 0) filteredCategories[cat] = filtered;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const doCreate = async () => {
|
|
392
|
+
setLoading(true);
|
|
393
|
+
try {
|
|
394
|
+
const result = await engineCall('/bridge/agents', { method: 'POST', body: JSON.stringify({
|
|
395
|
+
orgId: 'default',
|
|
396
|
+
name: form.name,
|
|
397
|
+
displayName: form.name,
|
|
398
|
+
email: form.email || form.name.toLowerCase().replace(/\s+/g, '.') + '@agenticmail.local',
|
|
399
|
+
role: form.role,
|
|
400
|
+
model: { provider: form.provider || 'anthropic', modelId: form.model === 'custom' ? (form.customModelId || form.model) : form.model },
|
|
401
|
+
deployment: { target: form.deployTarget },
|
|
402
|
+
presetName: form.preset || undefined,
|
|
403
|
+
permissions: {
|
|
404
|
+
maxRiskLevel: form.maxRiskLevel,
|
|
405
|
+
blockedSideEffects: form.blockedSideEffects,
|
|
406
|
+
requireApproval: {
|
|
407
|
+
enabled: form.approvalRequired,
|
|
408
|
+
forRiskLevels: form.approvalForRiskLevels,
|
|
409
|
+
forSideEffects: form.approvalForSideEffects,
|
|
410
|
+
approvers: [],
|
|
411
|
+
timeoutMinutes: 60,
|
|
412
|
+
},
|
|
413
|
+
rateLimits: form.rateLimits,
|
|
414
|
+
constraints: form.constraints,
|
|
415
|
+
},
|
|
416
|
+
persona: {
|
|
417
|
+
avatar: form.avatar || undefined,
|
|
418
|
+
gender: form.gender || undefined,
|
|
419
|
+
dateOfBirth: form.dateOfBirth || undefined,
|
|
420
|
+
maritalStatus: form.maritalStatus || undefined,
|
|
421
|
+
culturalBackground: form.culturalBackground || undefined,
|
|
422
|
+
language: form.language,
|
|
423
|
+
traits: form.traits,
|
|
424
|
+
},
|
|
425
|
+
}) });
|
|
426
|
+
|
|
427
|
+
const agentId = result?.agentId || result?.agent?.id;
|
|
428
|
+
|
|
429
|
+
if (form.autoOnboard && agentId) {
|
|
430
|
+
try {
|
|
431
|
+
await engineCall('/onboarding/initiate/' + agentId, { method: 'POST', body: JSON.stringify({ orgId: 'default' }) });
|
|
432
|
+
toast('Agent "' + form.name + '" created and onboarding started', 'success');
|
|
433
|
+
} catch (e) {
|
|
434
|
+
toast('Agent created but onboarding failed: ' + e.message, 'warning');
|
|
435
|
+
}
|
|
436
|
+
} else {
|
|
437
|
+
toast('Agent "' + form.name + '" created successfully', 'success');
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
onCreated();
|
|
441
|
+
onClose();
|
|
442
|
+
} catch (err) { toast(err.message, 'error'); }
|
|
443
|
+
setLoading(false);
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
const canNext = () => {
|
|
447
|
+
if (step === 1) return form.name.trim().length > 0;
|
|
448
|
+
return true;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
const lastStep = steps.length - 1;
|
|
452
|
+
|
|
453
|
+
const stepIcons = ['soul', 'basics', 'skills', 'perms', 'deploy', 'review'];
|
|
454
|
+
|
|
455
|
+
return h('div', { className: 'modal-overlay', onClick: e => { if (e.target === e.currentTarget) onClose(); } },
|
|
456
|
+
h('div', { className: 'modal modal-xl' },
|
|
457
|
+
h('div', { className: 'modal-header' },
|
|
458
|
+
h('div', null,
|
|
459
|
+
h('h2', null, 'Create Agent'),
|
|
460
|
+
h('p', { style: { fontSize: 12, color: 'var(--text-muted)', margin: '2px 0 0', fontWeight: 400 } }, 'Configure your new AI agent step by step')
|
|
461
|
+
),
|
|
462
|
+
h('button', { className: 'btn btn-ghost btn-icon', onClick: onClose }, I.x())
|
|
463
|
+
),
|
|
464
|
+
h('div', { className: 'modal-body', style: { padding: 0 } },
|
|
465
|
+
h('div', { className: 'wizard-layout' },
|
|
466
|
+
// ─── Sidebar stepper ───
|
|
467
|
+
h('div', { className: 'wizard-sidebar' },
|
|
468
|
+
steps.map((s, i) =>
|
|
469
|
+
h('div', {
|
|
470
|
+
key: i,
|
|
471
|
+
className: 'wizard-sidebar-step' + (i === step ? ' active' : '') + (i < step ? ' done' : ''),
|
|
472
|
+
onClick: () => { if (i < step || (i === step + 1 && canNext())) setStep(i); },
|
|
473
|
+
style: { cursor: i <= step || (i === step + 1 && canNext()) ? 'pointer' : 'default', opacity: i > step + 1 ? 0.5 : 1 }
|
|
474
|
+
},
|
|
475
|
+
h('div', { className: 'wizard-sidebar-num' }, i < step ? I.check() : i + 1),
|
|
476
|
+
h('span', null, s)
|
|
477
|
+
)
|
|
478
|
+
)
|
|
479
|
+
),
|
|
480
|
+
// ─── Step content ───
|
|
481
|
+
h('div', { className: 'wizard-content' },
|
|
482
|
+
|
|
483
|
+
// Step 0: Role (Soul Template Selector)
|
|
484
|
+
step === 0 && h(Fragment, null,
|
|
485
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Choose a Role Template'),
|
|
486
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 16, fontSize: 13 } }, 'Select a pre-built role to auto-configure skills, permissions, and personality. Or skip to configure from scratch.'),
|
|
487
|
+
|
|
488
|
+
// ── Role Resume Card (shown when a soul is selected) ──
|
|
489
|
+
selectedSoul && form.soulId && (() => {
|
|
490
|
+
const ps = parseSections(selectedSoul.personality || '');
|
|
491
|
+
const identity = selectedSoul.identity || {};
|
|
492
|
+
const skills = selectedSoul.suggestedSkills || [];
|
|
493
|
+
const toneLabels = { formal: 'Formal & structured', casual: 'Casual & conversational', professional: 'Professional & clear', friendly: 'Friendly & warm' };
|
|
494
|
+
const expertiseItems = extractItems(ps['Expertise'] || '');
|
|
495
|
+
const principleItems = extractItems(ps['Principles'] || '');
|
|
496
|
+
const boundaryItems = extractItems(ps['Boundaries'] || '');
|
|
497
|
+
|
|
498
|
+
const sectionHead = (title) => h('div', { style: { marginBottom: 8, paddingBottom: 6, borderBottom: '1px solid var(--border)' } },
|
|
499
|
+
h('span', { style: { fontSize: 11, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.06em', color: 'var(--text-muted)' } }, title)
|
|
500
|
+
);
|
|
501
|
+
|
|
502
|
+
const prose = (text, sentences) => h('p', { style: { fontSize: 13, lineHeight: 1.6, color: 'var(--text-secondary)', margin: 0 } }, firstSentences(text, sentences));
|
|
503
|
+
|
|
504
|
+
return h('div', { style: { marginBottom: 16, border: '2px solid var(--accent)', borderRadius: 'var(--radius-lg)', overflow: 'hidden', background: 'var(--bg-primary)' } },
|
|
505
|
+
|
|
506
|
+
// ── Resume header ──
|
|
507
|
+
h('div', { style: { padding: '16px 20px', background: 'var(--accent-soft)', display: 'flex', alignItems: 'flex-start', gap: 14 } },
|
|
508
|
+
h('div', { style: { width: 44, height: 44, borderRadius: '50%', background: 'var(--accent)', color: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center', fontWeight: 800, fontSize: 18, flexShrink: 0 } },
|
|
509
|
+
selectedSoul.name.charAt(0)
|
|
510
|
+
),
|
|
511
|
+
h('div', { style: { flex: 1, minWidth: 0 } },
|
|
512
|
+
h('div', { style: { fontWeight: 800, fontSize: 16 } }, selectedSoul.name),
|
|
513
|
+
h('div', { style: { fontSize: 13, color: 'var(--text-secondary)', marginTop: 2 } }, selectedSoul.description),
|
|
514
|
+
h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 5, marginTop: 8 } },
|
|
515
|
+
h('span', { className: 'badge badge-primary' }, identity.role || selectedSoul.name),
|
|
516
|
+
h('span', { className: 'badge badge-neutral' }, toneLabels[identity.tone] || 'Professional'),
|
|
517
|
+
h('span', { className: 'badge badge-neutral' }, 'Language: ' + (identity.language || 'en').toUpperCase()),
|
|
518
|
+
selectedSoul.suggestedPreset && h('span', { className: 'badge badge-info' }, 'Preset: ' + selectedSoul.suggestedPreset)
|
|
519
|
+
)
|
|
520
|
+
),
|
|
521
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0 } },
|
|
522
|
+
h('button', { className: 'btn btn-ghost btn-sm', onClick: () => selectSoul(selectedSoul) }, 'Clear'),
|
|
523
|
+
h('button', {
|
|
524
|
+
className: 'btn btn-ghost btn-sm',
|
|
525
|
+
onClick: () => setPreviewOpen(o => !o),
|
|
526
|
+
title: previewOpen ? 'Collapse' : 'Expand'
|
|
527
|
+
},
|
|
528
|
+
h('svg', { viewBox: '0 0 24 24', width: 14, height: 14, fill: 'none', stroke: 'currentColor', strokeWidth: 2, style: { transition: 'transform 150ms', transform: previewOpen ? 'rotate(180deg)' : 'rotate(0)' } },
|
|
529
|
+
h('polyline', { points: '6 9 12 15 18 9' })
|
|
530
|
+
)
|
|
531
|
+
)
|
|
532
|
+
)
|
|
533
|
+
),
|
|
534
|
+
|
|
535
|
+
// ── Expandable resume body ──
|
|
536
|
+
previewOpen && h('div', { style: { padding: '16px 20px 20px' } },
|
|
537
|
+
|
|
538
|
+
// What this agent does
|
|
539
|
+
ps['Identity'] && h('div', { style: { marginBottom: 18 } },
|
|
540
|
+
sectionHead('What this agent does'),
|
|
541
|
+
prose(ps['Identity'], 3)
|
|
542
|
+
),
|
|
543
|
+
|
|
544
|
+
// How it works
|
|
545
|
+
ps['Approach'] && h('div', { style: { marginBottom: 18 } },
|
|
546
|
+
sectionHead('How it works'),
|
|
547
|
+
prose(ps['Approach'], 3)
|
|
548
|
+
),
|
|
549
|
+
|
|
550
|
+
// Two-column: Thinking + Decision making
|
|
551
|
+
(ps['Mental Models'] || ps['Decision Framework']) && h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16, marginBottom: 18 } },
|
|
552
|
+
ps['Mental Models'] && h('div', null,
|
|
553
|
+
sectionHead('How it thinks'),
|
|
554
|
+
prose(ps['Mental Models'], 3)
|
|
555
|
+
),
|
|
556
|
+
ps['Decision Framework'] && h('div', null,
|
|
557
|
+
sectionHead('How it prioritizes'),
|
|
558
|
+
prose(ps['Decision Framework'], 3)
|
|
559
|
+
)
|
|
560
|
+
),
|
|
561
|
+
|
|
562
|
+
// Communication style
|
|
563
|
+
ps['Communication Style'] && h('div', { style: { marginBottom: 18 } },
|
|
564
|
+
sectionHead('How it communicates'),
|
|
565
|
+
prose(ps['Communication Style'], 3)
|
|
566
|
+
),
|
|
567
|
+
|
|
568
|
+
// Expertise — pill tags
|
|
569
|
+
expertiseItems.length > 0 && h('div', { style: { marginBottom: 18 } },
|
|
570
|
+
sectionHead('Areas of expertise'),
|
|
571
|
+
h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 6 } },
|
|
572
|
+
expertiseItems.map((item, i) =>
|
|
573
|
+
h('span', { key: i, style: { padding: '4px 12px', fontSize: 12, background: 'var(--bg-tertiary)', borderRadius: 20, color: 'var(--text-primary)', border: '1px solid var(--border)' } }, item)
|
|
574
|
+
)
|
|
575
|
+
)
|
|
576
|
+
),
|
|
577
|
+
|
|
578
|
+
// Skills auto-enabled
|
|
579
|
+
skills.length > 0 && h('div', { style: { marginBottom: 18 } },
|
|
580
|
+
sectionHead('Tools this agent will use (' + skills.length + ')'),
|
|
581
|
+
h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 6 } },
|
|
582
|
+
skills.map(s => h('span', { key: s, style: { padding: '4px 12px', fontSize: 12, background: 'var(--accent-soft)', borderRadius: 20, color: 'var(--accent-text)', border: '1px solid var(--accent)', fontWeight: 500 } }, s.replace(/-/g, ' ')))
|
|
583
|
+
)
|
|
584
|
+
),
|
|
585
|
+
|
|
586
|
+
// Core principles
|
|
587
|
+
principleItems.length > 0 && h('div', { style: { marginBottom: 18 } },
|
|
588
|
+
sectionHead('Operating principles'),
|
|
589
|
+
h('ol', { style: { margin: 0, paddingLeft: 20, fontSize: 13, lineHeight: 1.7, color: 'var(--text-secondary)' } },
|
|
590
|
+
principleItems.slice(0, 6).map((p, i) => h('li', { key: i, style: { marginBottom: 2 } }, p))
|
|
591
|
+
)
|
|
592
|
+
),
|
|
593
|
+
|
|
594
|
+
// Limitations
|
|
595
|
+
boundaryItems.length > 0 && h('div', { style: { padding: '12px 14px', background: 'rgba(239,68,68,0.06)', borderRadius: 'var(--radius)', border: '1px solid rgba(239,68,68,0.15)' } },
|
|
596
|
+
sectionHead('Limitations'),
|
|
597
|
+
h('ul', { style: { margin: 0, paddingLeft: 18, fontSize: 13, lineHeight: 1.7, color: 'var(--text-secondary)' } },
|
|
598
|
+
boundaryItems.map((b, i) => h('li', { key: i, style: { marginBottom: 2 } }, b))
|
|
599
|
+
)
|
|
600
|
+
)
|
|
601
|
+
)
|
|
602
|
+
);
|
|
603
|
+
})(),
|
|
604
|
+
|
|
605
|
+
h('div', { style: { marginBottom: 14 } },
|
|
606
|
+
h('input', { className: 'input', value: soulSearch, onChange: e => setSoulSearch(e.target.value), placeholder: 'Search roles (e.g., support, engineer, analyst...)' })
|
|
607
|
+
),
|
|
608
|
+
h('div', null,
|
|
609
|
+
Object.entries(filteredCategories).map(([cat, templates]) =>
|
|
610
|
+
h('div', { key: cat, style: { marginBottom: 20 } },
|
|
611
|
+
h('h4', { style: { fontSize: 11, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.06em', color: 'var(--text-muted)', marginBottom: 8, display: 'flex', alignItems: 'center', gap: 6 } },
|
|
612
|
+
soulMeta[cat]?.icon || '',
|
|
613
|
+
' ',
|
|
614
|
+
soulMeta[cat]?.name || cat,
|
|
615
|
+
h('span', { style: { fontWeight: 400, opacity: 0.6, marginLeft: 4 } }, '(' + templates.length + ')')
|
|
616
|
+
),
|
|
617
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(240px, 1fr))', gap: 8 } },
|
|
618
|
+
templates.map(tpl =>
|
|
619
|
+
h('div', {
|
|
620
|
+
key: tpl.id,
|
|
621
|
+
className: 'preset-card' + (form.soulId === tpl.id ? ' selected' : ''),
|
|
622
|
+
onClick: () => selectSoul(tpl),
|
|
623
|
+
style: { cursor: 'pointer', padding: '10px 14px' }
|
|
624
|
+
},
|
|
625
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
626
|
+
h('h4', { style: { fontSize: 13, fontWeight: 600, margin: 0 } }, tpl.name),
|
|
627
|
+
form.soulId === tpl.id && h('span', { style: { color: 'var(--accent)' } }, I.check())
|
|
628
|
+
),
|
|
629
|
+
h('p', { style: { fontSize: 11, color: 'var(--text-muted)', margin: '4px 0 0', lineHeight: 1.4 } }, tpl.description)
|
|
630
|
+
)
|
|
631
|
+
)
|
|
632
|
+
)
|
|
633
|
+
)
|
|
634
|
+
),
|
|
635
|
+
Object.keys(filteredCategories).length === 0 && h('div', { style: { textAlign: 'center', padding: 40, color: 'var(--text-muted)', fontSize: 13 } }, 'No roles match your search.')
|
|
636
|
+
)
|
|
637
|
+
),
|
|
638
|
+
|
|
639
|
+
// Step 1: Basics
|
|
640
|
+
step === 1 && h(Fragment, null,
|
|
641
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Basic Information'),
|
|
642
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 20, fontSize: 13 } }, 'Give your agent their real identity — this is how they\'ll introduce themselves and be known.'),
|
|
643
|
+
form.soulId && h('div', { style: { marginBottom: 16, padding: '8px 12px', background: 'var(--accent-soft)', borderRadius: 'var(--radius)', fontSize: 12, display: 'flex', alignItems: 'center', gap: 6 } },
|
|
644
|
+
h('span', { className: 'badge badge-primary' }, 'Role Template'),
|
|
645
|
+
h('span', null, form.soulId.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase()))
|
|
646
|
+
),
|
|
647
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
648
|
+
h('div', { className: 'form-group' },
|
|
649
|
+
h('label', { className: 'form-label' }, 'Full Name *'),
|
|
650
|
+
h('input', { className: 'input', value: form.name, onChange: e => set('name', e.target.value), placeholder: 'e.g., Sarah Chen, Marcus Johnson' }),
|
|
651
|
+
h('p', { className: 'form-help' }, 'Their real human name — how they\'ll introduce themselves')
|
|
652
|
+
),
|
|
653
|
+
h('div', { className: 'form-group' },
|
|
654
|
+
h('label', { className: 'form-label' }, 'Email Address'),
|
|
655
|
+
h('input', { className: 'input', value: form.email, onChange: e => set('email', e.target.value), placeholder: form.name ? form.name.toLowerCase().replace(/\s+/g, '.') + '@yourdomain.com' : 'first.last@yourdomain.com' }),
|
|
656
|
+
h('p', { className: 'form-help' }, 'Leave blank for auto-generated from their name')
|
|
657
|
+
)
|
|
658
|
+
),
|
|
659
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
660
|
+
h('div', { className: 'form-group' },
|
|
661
|
+
h('label', { className: 'form-label' }, 'Role / Job Title'),
|
|
662
|
+
h('input', { className: 'input', value: form.role, onChange: e => set('role', e.target.value), placeholder: 'e.g., Customer Support Lead' }),
|
|
663
|
+
h('p', { className: 'form-help' }, 'Pre-filled from role template — edit to customize')
|
|
664
|
+
),
|
|
665
|
+
h('div', { className: 'form-group' },
|
|
666
|
+
h('label', { className: 'form-label' }, 'LLM Provider'),
|
|
667
|
+
h('select', {
|
|
668
|
+
className: 'input',
|
|
669
|
+
value: form.provider || 'anthropic',
|
|
670
|
+
onChange: function(e) { setForm(Object.assign({}, form, { provider: e.target.value })); },
|
|
671
|
+
},
|
|
672
|
+
providers.length > 0
|
|
673
|
+
? providers.filter(function(p) { return p.configured; }).map(function(p) {
|
|
674
|
+
return h('option', { key: p.id, value: p.id }, p.name + (p.isLocal ? ' (Local)' : ''));
|
|
675
|
+
})
|
|
676
|
+
: [
|
|
677
|
+
h('option', { value: 'anthropic' }, 'Anthropic'),
|
|
678
|
+
h('option', { value: 'openai' }, 'OpenAI'),
|
|
679
|
+
h('option', { value: 'google' }, 'Google'),
|
|
680
|
+
h('option', { value: 'deepseek' }, 'DeepSeek'),
|
|
681
|
+
h('option', { value: 'xai' }, 'xAI (Grok)'),
|
|
682
|
+
h('option', { value: 'mistral' }, 'Mistral'),
|
|
683
|
+
h('option', { value: 'groq' }, 'Groq'),
|
|
684
|
+
h('option', { value: 'ollama' }, 'Ollama (Local)'),
|
|
685
|
+
]
|
|
686
|
+
)
|
|
687
|
+
)
|
|
688
|
+
),
|
|
689
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
690
|
+
h('div', { className: 'form-group' },
|
|
691
|
+
h('label', { className: 'form-label' }, 'Model'),
|
|
692
|
+
providerModels.length > 0
|
|
693
|
+
? h('select', { className: 'input', value: form.model, onChange: e => set('model', e.target.value) },
|
|
694
|
+
providerModels.map(function(m) {
|
|
695
|
+
return h('option', { key: m.id, value: m.id }, m.name || m.id);
|
|
696
|
+
}),
|
|
697
|
+
h('option', { value: 'custom' }, 'Custom (enter manually)')
|
|
698
|
+
)
|
|
699
|
+
: h('input', { className: 'input', value: form.model, onChange: e => set('model', e.target.value), placeholder: 'Enter model ID (e.g. claude-opus-4-6)' })
|
|
700
|
+
),
|
|
701
|
+
form.model === 'custom' && h('div', { className: 'form-group' },
|
|
702
|
+
h('label', { className: 'form-label' }, 'Custom Model ID'),
|
|
703
|
+
h('input', { className: 'input', value: form.customModelId || '', onChange: e => set('customModelId', e.target.value), placeholder: 'e.g. my-fine-tuned-model-v2' })
|
|
704
|
+
)
|
|
705
|
+
),
|
|
706
|
+
h('div', { className: 'form-group' },
|
|
707
|
+
h('label', { className: 'form-label' }, 'Description'),
|
|
708
|
+
h('textarea', { className: 'input', value: form.description, onChange: e => set('description', e.target.value), placeholder: 'What does this agent do? What are its responsibilities?', rows: 3 })
|
|
709
|
+
)
|
|
710
|
+
),
|
|
711
|
+
|
|
712
|
+
// Step 2: Persona — uses shared PersonaForm component
|
|
713
|
+
step === 2 && h(Fragment, null,
|
|
714
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Persona & Identity'),
|
|
715
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 20, fontSize: 13 } }, 'Upload a photo, set their birthday, and customize their background — they\'ll age naturally over time.'),
|
|
716
|
+
h(PersonaForm, { form: form, set: set, toast: toast })
|
|
717
|
+
),
|
|
718
|
+
|
|
719
|
+
// Step 3: Skills
|
|
720
|
+
step === 3 && h(Fragment, null,
|
|
721
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Skills & Capabilities'),
|
|
722
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 16, fontSize: 13 } }, 'Select the skills this agent should have. Skills determine what tools and actions are available.'),
|
|
723
|
+
h('div', { style: { marginBottom: 14, display: 'flex', alignItems: 'center', gap: 10 } },
|
|
724
|
+
h('span', { className: 'badge badge-primary' }, form.skills.length + ' selected'),
|
|
725
|
+
form.skills.length > 0 && h('button', { className: 'btn btn-ghost btn-sm', onClick: () => set('skills', []) }, 'Clear all')
|
|
726
|
+
),
|
|
727
|
+
|
|
728
|
+
// Suites — one-click to add an entire platform
|
|
729
|
+
suites.length > 0 && h('div', { style: { marginBottom: 24 } },
|
|
730
|
+
h('h4', { style: { fontSize: 11, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.06em', color: 'var(--text-muted)', marginBottom: 8 } }, 'Suites — select a platform to add all its apps'),
|
|
731
|
+
h('div', { className: 'suite-grid' }, suites.map(s =>
|
|
732
|
+
h('div', { key: s.id, className: 'suite-card' + (s.skills.every(id => form.skills.includes(id)) ? ' selected' : s.skills.some(id => form.skills.includes(id)) ? ' partial' : ''), onClick: () => toggleSuite(s) },
|
|
733
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 4 } },
|
|
734
|
+
h('span', { style: { fontSize: 20 } }, s.icon),
|
|
735
|
+
s.skills.every(id => form.skills.includes(id)) && h('span', { style: { color: 'var(--accent)' } }, I.check())
|
|
736
|
+
),
|
|
737
|
+
h('div', { className: 'suite-name' }, s.name),
|
|
738
|
+
h('div', { className: 'suite-desc' }, s.skills.length + ' apps included'),
|
|
739
|
+
s.skills.some(id => form.skills.includes(id)) && !s.skills.every(id => form.skills.includes(id)) && h('div', { className: 'badge badge-warning', style: { marginTop: 6, fontSize: 10 } }, s.skills.filter(id => form.skills.includes(id)).length + '/' + s.skills.length + ' selected')
|
|
740
|
+
)
|
|
741
|
+
))
|
|
742
|
+
),
|
|
743
|
+
|
|
744
|
+
// Search bar for filtering individual skills
|
|
745
|
+
h('div', { style: { marginBottom: 14 } },
|
|
746
|
+
h('input', { className: 'input', type: 'text', placeholder: 'Search skills...', value: skillSearch, onChange: e => setSkillSearch(e.target.value), style: { maxWidth: 300 } })
|
|
747
|
+
),
|
|
748
|
+
|
|
749
|
+
// Individual skills by category
|
|
750
|
+
Object.entries(allSkills).map(([cat, skills]) => {
|
|
751
|
+
const filtered = skillSearch ? skills.filter(s => s.name.toLowerCase().includes(skillSearch.toLowerCase()) || s.description.toLowerCase().includes(skillSearch.toLowerCase())) : skills;
|
|
752
|
+
if (filtered.length === 0) return null;
|
|
753
|
+
return h('div', { key: cat, style: { marginBottom: 20 } },
|
|
754
|
+
h('h4', { style: { fontSize: 11, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.06em', color: 'var(--text-muted)', marginBottom: 8 } }, cat.replace(/-/g, ' ')),
|
|
755
|
+
h('div', { className: 'skill-grid' }, filtered.map(s =>
|
|
756
|
+
h('div', { key: s.id, className: 'skill-card' + (form.skills.includes(s.id) ? ' selected' : ''), onClick: () => toggleSkill(s.id) },
|
|
757
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
758
|
+
h('span', { className: 'skill-name' }, (s.icon || '') + ' ' + s.name),
|
|
759
|
+
form.skills.includes(s.id) && h('span', { style: { color: 'var(--accent)' } }, I.check())
|
|
760
|
+
),
|
|
761
|
+
h('div', { className: 'skill-desc' }, s.description)
|
|
762
|
+
)
|
|
763
|
+
))
|
|
764
|
+
);
|
|
765
|
+
})
|
|
766
|
+
),
|
|
767
|
+
|
|
768
|
+
// Step 4: Permissions
|
|
769
|
+
step === 4 && h(Fragment, null,
|
|
770
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Permissions & Security'),
|
|
771
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 16, fontSize: 13 } }, 'Start with a preset, then fine-tune individual controls below.'),
|
|
772
|
+
|
|
773
|
+
// Preset cards
|
|
774
|
+
h('div', { className: 'preset-grid' }, presets.map(p =>
|
|
775
|
+
h('div', { key: p.name, className: 'preset-card' + (form.preset === p.name ? ' selected' : ''), onClick: () => {
|
|
776
|
+
if (form.preset === p.name) { set('preset', null); return; }
|
|
777
|
+
setForm(f => ({ ...f, preset: p.name, maxRiskLevel: p.maxRiskLevel || 'medium', blockedSideEffects: p.blockedSideEffects || [], approvalRequired: p.requireApproval?.enabled ?? true, approvalForRiskLevels: p.requireApproval?.forRiskLevels || ['high', 'critical'], approvalForSideEffects: p.requireApproval?.forSideEffects || [], rateLimits: p.rateLimits || f.rateLimits, constraints: p.constraints || f.constraints }));
|
|
778
|
+
} },
|
|
779
|
+
h('h4', null, p.name),
|
|
780
|
+
h('p', null, p.description),
|
|
781
|
+
p.maxRiskLevel && h('div', { style: { marginTop: 6 } }, h('span', { className: 'badge badge-' + (p.maxRiskLevel === 'low' ? 'success' : p.maxRiskLevel === 'medium' ? 'warning' : 'danger') }, 'Risk: ' + p.maxRiskLevel))
|
|
782
|
+
)
|
|
783
|
+
)),
|
|
784
|
+
|
|
785
|
+
// Max Risk Level
|
|
786
|
+
h('div', { style: { marginTop: 24 } },
|
|
787
|
+
h('h4', { style: { fontSize: 13, fontWeight: 600, marginBottom: 8 } }, 'Maximum Risk Level'),
|
|
788
|
+
h('p', { style: { fontSize: 12, color: 'var(--text-muted)', marginBottom: 10 } }, 'The highest risk level of tools this agent is allowed to use.'),
|
|
789
|
+
h('div', { style: { display: 'flex', gap: 8 } },
|
|
790
|
+
['low', 'medium', 'high', 'critical'].map(level =>
|
|
791
|
+
h('button', { key: level, className: 'btn' + (form.maxRiskLevel === level ? ' btn-primary' : ' btn-secondary'), onClick: () => set('maxRiskLevel', level), style: { textTransform: 'capitalize' } }, level)
|
|
792
|
+
)
|
|
793
|
+
)
|
|
794
|
+
),
|
|
795
|
+
|
|
796
|
+
// Blocked Side Effects
|
|
797
|
+
h('div', { style: { marginTop: 20 } },
|
|
798
|
+
h('h4', { style: { fontSize: 13, fontWeight: 600, marginBottom: 8 } }, 'Blocked Side Effects'),
|
|
799
|
+
h('p', { style: { fontSize: 12, color: 'var(--text-muted)', marginBottom: 10 } }, 'Actions this agent is never allowed to perform, regardless of tool permissions.'),
|
|
800
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 6 } },
|
|
801
|
+
[
|
|
802
|
+
{ id: 'sends-email', label: 'Send Emails' },
|
|
803
|
+
{ id: 'sends-message', label: 'Send Messages' },
|
|
804
|
+
{ id: 'sends-sms', label: 'Send SMS' },
|
|
805
|
+
{ id: 'posts-social', label: 'Post to Social Media' },
|
|
806
|
+
{ id: 'runs-code', label: 'Execute Code' },
|
|
807
|
+
{ id: 'modifies-files', label: 'Modify Files' },
|
|
808
|
+
{ id: 'deletes-data', label: 'Delete Data' },
|
|
809
|
+
{ id: 'controls-device', label: 'Control Devices' },
|
|
810
|
+
{ id: 'financial', label: 'Financial Actions' },
|
|
811
|
+
].map(se =>
|
|
812
|
+
h('label', { key: se.id, style: { display: 'flex', alignItems: 'center', gap: 6, fontSize: 12, padding: '6px 8px', borderRadius: 'var(--radius)', background: form.blockedSideEffects.includes(se.id) ? 'var(--danger-soft, rgba(239,68,68,0.08))' : 'var(--bg-tertiary)', cursor: 'pointer', border: '1px solid ' + (form.blockedSideEffects.includes(se.id) ? 'var(--danger)' : 'transparent') } },
|
|
813
|
+
h('input', { type: 'checkbox', checked: form.blockedSideEffects.includes(se.id), onChange: () => {
|
|
814
|
+
const cur = form.blockedSideEffects;
|
|
815
|
+
set('blockedSideEffects', cur.includes(se.id) ? cur.filter(x => x !== se.id) : [...cur, se.id]);
|
|
816
|
+
}, style: { accentColor: 'var(--danger)' } }),
|
|
817
|
+
se.label
|
|
818
|
+
)
|
|
819
|
+
)
|
|
820
|
+
)
|
|
821
|
+
),
|
|
822
|
+
|
|
823
|
+
// Approval Settings
|
|
824
|
+
h('div', { style: { marginTop: 20 } },
|
|
825
|
+
h('h4', { style: { fontSize: 13, fontWeight: 600, marginBottom: 8 } }, 'Approval Requirements'),
|
|
826
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 12, marginBottom: 12 } },
|
|
827
|
+
h('div', { className: 'toggle' + (form.approvalRequired ? ' on' : ''), onClick: () => set('approvalRequired', !form.approvalRequired) }),
|
|
828
|
+
h('div', null,
|
|
829
|
+
h('div', { style: { fontWeight: 500, fontSize: 12 } }, 'Require human approval for sensitive actions'),
|
|
830
|
+
h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Agent pauses and waits for approval before executing flagged operations')
|
|
831
|
+
)
|
|
832
|
+
),
|
|
833
|
+
form.approvalRequired && h(Fragment, null,
|
|
834
|
+
h('div', { style: { marginLeft: 4, paddingLeft: 16, borderLeft: '2px solid var(--border)' } },
|
|
835
|
+
h('div', { style: { marginBottom: 10 } },
|
|
836
|
+
h('div', { style: { fontSize: 12, fontWeight: 500, marginBottom: 6 } }, 'Require approval for risk levels:'),
|
|
837
|
+
h('div', { style: { display: 'flex', gap: 6 } },
|
|
838
|
+
['low', 'medium', 'high', 'critical'].map(level =>
|
|
839
|
+
h('label', { key: level, style: { display: 'flex', alignItems: 'center', gap: 4, fontSize: 11, padding: '4px 8px', borderRadius: 'var(--radius)', background: form.approvalForRiskLevels.includes(level) ? 'var(--accent-soft)' : 'var(--bg-tertiary)', cursor: 'pointer', textTransform: 'capitalize' } },
|
|
840
|
+
h('input', { type: 'checkbox', checked: form.approvalForRiskLevels.includes(level), onChange: () => {
|
|
841
|
+
const cur = form.approvalForRiskLevels;
|
|
842
|
+
set('approvalForRiskLevels', cur.includes(level) ? cur.filter(x => x !== level) : [...cur, level]);
|
|
843
|
+
} }),
|
|
844
|
+
level
|
|
845
|
+
)
|
|
846
|
+
)
|
|
847
|
+
)
|
|
848
|
+
),
|
|
849
|
+
h('div', null,
|
|
850
|
+
h('div', { style: { fontSize: 12, fontWeight: 500, marginBottom: 6 } }, 'Require approval for side effects:'),
|
|
851
|
+
h('div', { style: { display: 'flex', gap: 6, flexWrap: 'wrap' } },
|
|
852
|
+
['sends-email', 'sends-message', 'sends-sms', 'posts-social', 'runs-code', 'financial'].map(se =>
|
|
853
|
+
h('label', { key: se, style: { display: 'flex', alignItems: 'center', gap: 4, fontSize: 11, padding: '4px 8px', borderRadius: 'var(--radius)', background: form.approvalForSideEffects.includes(se) ? 'var(--accent-soft)' : 'var(--bg-tertiary)', cursor: 'pointer' } },
|
|
854
|
+
h('input', { type: 'checkbox', checked: form.approvalForSideEffects.includes(se), onChange: () => {
|
|
855
|
+
const cur = form.approvalForSideEffects;
|
|
856
|
+
set('approvalForSideEffects', cur.includes(se) ? cur.filter(x => x !== se) : [...cur, se]);
|
|
857
|
+
} }),
|
|
858
|
+
se.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase())
|
|
859
|
+
)
|
|
860
|
+
)
|
|
861
|
+
)
|
|
862
|
+
)
|
|
863
|
+
)
|
|
864
|
+
)
|
|
865
|
+
),
|
|
866
|
+
|
|
867
|
+
// Rate Limits
|
|
868
|
+
h('div', { style: { marginTop: 20 } },
|
|
869
|
+
h('h4', { style: { fontSize: 13, fontWeight: 600, marginBottom: 8 } }, 'Rate Limits'),
|
|
870
|
+
h('p', { style: { fontSize: 12, color: 'var(--text-muted)', marginBottom: 10 } }, 'Maximum number of tool calls the agent can make within each time window.'),
|
|
871
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 10 } },
|
|
872
|
+
[
|
|
873
|
+
{ key: 'toolCallsPerMinute', label: 'Calls / Minute' },
|
|
874
|
+
{ key: 'toolCallsPerHour', label: 'Calls / Hour' },
|
|
875
|
+
{ key: 'toolCallsPerDay', label: 'Calls / Day' },
|
|
876
|
+
{ key: 'externalActionsPerHour', label: 'External Actions / Hour' },
|
|
877
|
+
].map(rl =>
|
|
878
|
+
h('div', { key: rl.key, className: 'form-group' },
|
|
879
|
+
h('label', { style: { fontSize: 11, fontWeight: 500, color: 'var(--text-secondary)', display: 'block', marginBottom: 4 } }, rl.label),
|
|
880
|
+
h('input', { className: 'input', type: 'number', min: 0, value: form.rateLimits[rl.key], onChange: e => setForm(f => ({ ...f, rateLimits: { ...f.rateLimits, [rl.key]: parseInt(e.target.value) || 0 } })), style: { fontSize: 12 } })
|
|
881
|
+
)
|
|
882
|
+
)
|
|
883
|
+
)
|
|
884
|
+
),
|
|
885
|
+
|
|
886
|
+
// Constraints
|
|
887
|
+
h('div', { style: { marginTop: 20 } },
|
|
888
|
+
h('h4', { style: { fontSize: 13, fontWeight: 600, marginBottom: 8 } }, 'Execution Constraints'),
|
|
889
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 10 } },
|
|
890
|
+
h('div', { className: 'form-group' },
|
|
891
|
+
h('label', { style: { fontSize: 11, fontWeight: 500, color: 'var(--text-secondary)', display: 'block', marginBottom: 4 } }, 'Max Concurrent Tasks'),
|
|
892
|
+
h('input', { className: 'input', type: 'number', min: 1, max: 50, value: form.constraints.maxConcurrentTasks, onChange: e => setForm(f => ({ ...f, constraints: { ...f.constraints, maxConcurrentTasks: parseInt(e.target.value) || 1 } })), style: { fontSize: 12 } })
|
|
893
|
+
),
|
|
894
|
+
h('div', { className: 'form-group' },
|
|
895
|
+
h('label', { style: { fontSize: 11, fontWeight: 500, color: 'var(--text-secondary)', display: 'block', marginBottom: 4 } }, 'Max Session (minutes)'),
|
|
896
|
+
h('input', { className: 'input', type: 'number', min: 1, value: form.constraints.maxSessionDurationMinutes, onChange: e => setForm(f => ({ ...f, constraints: { ...f.constraints, maxSessionDurationMinutes: parseInt(e.target.value) || 60 } })), style: { fontSize: 12 } })
|
|
897
|
+
),
|
|
898
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, paddingTop: 18 } },
|
|
899
|
+
h('div', { className: 'toggle' + (form.constraints.sandboxMode ? ' on' : ''), onClick: () => setForm(f => ({ ...f, constraints: { ...f.constraints, sandboxMode: !f.constraints.sandboxMode } })) }),
|
|
900
|
+
h('div', null,
|
|
901
|
+
h('div', { style: { fontWeight: 500, fontSize: 12 } }, 'Sandbox Mode'),
|
|
902
|
+
h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Simulate actions only')
|
|
903
|
+
)
|
|
904
|
+
)
|
|
905
|
+
)
|
|
906
|
+
)
|
|
907
|
+
),
|
|
908
|
+
|
|
909
|
+
// Step 5: Deployment
|
|
910
|
+
step === 5 && h(Fragment, null,
|
|
911
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Deployment Target'),
|
|
912
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 16, fontSize: 13 } }, 'Choose where and how this agent will run.'),
|
|
913
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 } },
|
|
914
|
+
['docker', 'vps', 'local'].map(t =>
|
|
915
|
+
h('div', { key: t, className: 'preset-card' + (form.deployTarget === t ? ' selected' : ''), onClick: () => set('deployTarget', t), style: { padding: '16px 18px' } },
|
|
916
|
+
h('h4', { style: { marginBottom: 6 } }, { docker: 'Docker Container', vps: 'VPS / Dedicated Server', local: 'Local Machine' }[t]),
|
|
917
|
+
h('p', null, { docker: 'Run in an isolated Docker container with resource limits. Recommended for production.', vps: 'Deploy to a VPS or dedicated server via SSH. Full control over the environment.', local: 'Run on the current machine. Best for development and testing.' }[t])
|
|
918
|
+
)
|
|
919
|
+
)
|
|
920
|
+
)
|
|
921
|
+
),
|
|
922
|
+
|
|
923
|
+
// Step 6: Review
|
|
924
|
+
step === 6 && h(Fragment, null,
|
|
925
|
+
h('h3', { style: { fontSize: 15, fontWeight: 700, marginBottom: 4 } }, 'Review & Create'),
|
|
926
|
+
h('p', { style: { color: 'var(--text-secondary)', marginBottom: 20, fontSize: 13 } }, 'Review your agent configuration before creating.'),
|
|
927
|
+
|
|
928
|
+
// Agent identity card
|
|
929
|
+
h('div', { style: { background: 'var(--bg-tertiary)', borderRadius: 'var(--radius-lg)', padding: 24, display: 'flex', gap: 20, alignItems: 'flex-start' } },
|
|
930
|
+
// Avatar
|
|
931
|
+
h('div', { style: { width: 64, height: 64, borderRadius: '50%', background: 'var(--accent)', color: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center', fontWeight: 800, fontSize: 24, flexShrink: 0, overflow: 'hidden' } },
|
|
932
|
+
form.avatar ? h('img', { src: form.avatar, style: { width: '100%', height: '100%', objectFit: 'cover' } }) : (form.name ? form.name.charAt(0).toUpperCase() : '?')
|
|
933
|
+
),
|
|
934
|
+
h('div', { style: { flex: 1 } },
|
|
935
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '140px 1fr', gap: '10px 20px', fontSize: 13 } },
|
|
936
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Name'), h('span', { style: { fontWeight: 600 } }, form.name),
|
|
937
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Email'), h('span', null, form.email || form.name.toLowerCase().replace(/\s+/g, '.') + '@agenticmail.local'),
|
|
938
|
+
form.soulId && h(Fragment, null, h('span', { style: { color: 'var(--text-muted)' } }, 'Role Template'), h('span', null, h('span', { className: 'badge badge-primary' }, form.soulId.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase())))),
|
|
939
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Role'), h('span', null, form.role),
|
|
940
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Provider'), h('span', null, (form.provider || 'anthropic').charAt(0).toUpperCase() + (form.provider || 'anthropic').slice(1)),
|
|
941
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Model'), h('span', null, form.model),
|
|
942
|
+
// Persona fields
|
|
943
|
+
form.gender && h(Fragment, null, h('span', { style: { color: 'var(--text-muted)' } }, 'Gender'), h('span', null, form.gender.charAt(0).toUpperCase() + form.gender.slice(1))),
|
|
944
|
+
form.dateOfBirth && (() => {
|
|
945
|
+
const dob = new Date(form.dateOfBirth);
|
|
946
|
+
const today = new Date();
|
|
947
|
+
let age = today.getFullYear() - dob.getFullYear();
|
|
948
|
+
const m = today.getMonth() - dob.getMonth();
|
|
949
|
+
if (m < 0 || (m === 0 && today.getDate() < dob.getDate())) age--;
|
|
950
|
+
return h(Fragment, null,
|
|
951
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Date of Birth'), h('span', null, dob.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' }) + ' (' + age + ' years old)')
|
|
952
|
+
);
|
|
953
|
+
})(),
|
|
954
|
+
form.maritalStatus && h(Fragment, null, h('span', { style: { color: 'var(--text-muted)' } }, 'Marital Status'), h('span', null, form.maritalStatus.charAt(0).toUpperCase() + form.maritalStatus.slice(1))),
|
|
955
|
+
form.culturalBackground && h(Fragment, null, h('span', { style: { color: 'var(--text-muted)' } }, 'Background'), h('span', null, CULTURES.find(c => c.id === form.culturalBackground)?.name || form.culturalBackground)),
|
|
956
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Language'), h('span', null, LANGUAGES.find(l => l.id === form.language)?.name || form.language),
|
|
957
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Traits'), h('span', { style: { display: 'flex', flexWrap: 'wrap', gap: 4 } },
|
|
958
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.communication),
|
|
959
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.detail),
|
|
960
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.energy),
|
|
961
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.humor),
|
|
962
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.formality),
|
|
963
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.empathy),
|
|
964
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.patience),
|
|
965
|
+
h('span', { className: 'badge badge-neutral' }, form.traits.creativity)
|
|
966
|
+
),
|
|
967
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Skills'), h('span', null, form.skills.length + ' selected'),
|
|
968
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Permission Preset'), h('span', null, form.preset || 'Custom'),
|
|
969
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Max Risk Level'), h('span', null, h('span', { className: 'badge badge-' + (form.maxRiskLevel === 'low' ? 'success' : form.maxRiskLevel === 'medium' ? 'warning' : 'danger'), style: { textTransform: 'capitalize' } }, form.maxRiskLevel)),
|
|
970
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Blocked Side Effects'), h('span', null, form.blockedSideEffects.length > 0 ? form.blockedSideEffects.length + ' blocked' : 'None'),
|
|
971
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Approvals'), h('span', null, form.approvalRequired ? 'Required (risk: ' + form.approvalForRiskLevels.join(', ') + ')' : 'Not required'),
|
|
972
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Rate Limits'), h('span', null, form.rateLimits.toolCallsPerMinute + '/min, ' + form.rateLimits.toolCallsPerHour + '/hr, ' + form.rateLimits.toolCallsPerDay + '/day'),
|
|
973
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Constraints'), h('span', null, form.constraints.maxConcurrentTasks + ' tasks, ' + form.constraints.maxSessionDurationMinutes + 'min max' + (form.constraints.sandboxMode ? ', sandbox' : '')),
|
|
974
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Deployment'), h('span', null, { docker: 'Docker Container', vps: 'VPS / Dedicated Server', local: 'Local Machine' }[form.deployTarget]),
|
|
975
|
+
h('span', { style: { color: 'var(--text-muted)' } }, 'Onboarding'), h('span', null, form.autoOnboard ? h('span', { className: 'badge badge-success' }, 'Auto-start') : h('span', { className: 'badge badge-neutral' }, 'Manual'))
|
|
976
|
+
)
|
|
977
|
+
)
|
|
978
|
+
),
|
|
979
|
+
form.description && h('div', { style: { marginTop: 14, fontSize: 13, color: 'var(--text-secondary)', padding: '12px 16px', background: 'var(--bg-tertiary)', borderRadius: 'var(--radius)' } }, h('strong', null, 'Description: '), form.description),
|
|
980
|
+
|
|
981
|
+
// Onboarding toggle
|
|
982
|
+
h('div', { style: { marginTop: 20, padding: '16px 20px', background: 'var(--bg-tertiary)', borderRadius: 'var(--radius-lg)', display: 'flex', alignItems: 'center', justifyContent: 'space-between' } },
|
|
983
|
+
h('div', null,
|
|
984
|
+
h('div', { style: { fontWeight: 600, fontSize: 14 } }, 'Start Onboarding Immediately'),
|
|
985
|
+
h('p', { style: { fontSize: 12, color: 'var(--text-muted)', margin: '4px 0 0' } }, form.autoOnboard ? 'Agent will go through all compliance policies and guardrails pipeline after creation.' : 'You can manually trigger onboarding later from the Guardrails page.')
|
|
986
|
+
),
|
|
987
|
+
h('label', { style: { position: 'relative', display: 'inline-block', width: 44, height: 24, flexShrink: 0, cursor: 'pointer' } },
|
|
988
|
+
h('input', { type: 'checkbox', checked: form.autoOnboard, onChange: e => set('autoOnboard', e.target.checked), style: { opacity: 0, width: 0, height: 0 } }),
|
|
989
|
+
h('span', { style: { position: 'absolute', inset: 0, borderRadius: 12, background: form.autoOnboard ? 'var(--accent)' : 'var(--border)', transition: 'background 0.2s' } },
|
|
990
|
+
h('span', { style: { position: 'absolute', top: 2, left: form.autoOnboard ? 22 : 2, width: 20, height: 20, borderRadius: '50%', background: '#fff', transition: 'left 0.2s', boxShadow: '0 1px 3px rgba(0,0,0,0.2)' } })
|
|
991
|
+
)
|
|
992
|
+
)
|
|
993
|
+
)
|
|
994
|
+
)
|
|
995
|
+
)
|
|
996
|
+
)
|
|
997
|
+
),
|
|
998
|
+
h('div', { className: 'modal-footer' },
|
|
999
|
+
step > 0 && h('button', { className: 'btn btn-secondary', onClick: () => setStep(step - 1) }, 'Back'),
|
|
1000
|
+
step === 0 && !form.soulId && h('button', { className: 'btn btn-ghost', onClick: () => setStep(1) }, 'Skip — Configure Manually'),
|
|
1001
|
+
h('div', { style: { flex: 1 } }),
|
|
1002
|
+
step < lastStep && h('button', { className: 'btn btn-primary', disabled: !canNext(), onClick: () => setStep(step + 1) }, 'Next'),
|
|
1003
|
+
step === lastStep && h('button', { className: 'btn btn-primary', disabled: loading, onClick: doCreate }, loading ? 'Creating...' : 'Create Agent')
|
|
1004
|
+
)
|
|
1005
|
+
)
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
// ════════════════════════════════════════════════════════════
|
|
1010
|
+
// AGENTS PAGE
|
|
1011
|
+
// ════════════════════════════════════════════════════════════
|
|
1012
|
+
|
|
1013
|
+
export function AgentsPage({ onSelectAgent }) {
|
|
1014
|
+
const { toast } = useApp();
|
|
1015
|
+
const [agents, setAgents] = useState([]);
|
|
1016
|
+
const [creating, setCreating] = useState(false);
|
|
1017
|
+
|
|
1018
|
+
const load = () => apiCall('/agents').then(d => setAgents(d.agents || d || [])).catch(() => {});
|
|
1019
|
+
useEffect(() => { load(); }, []);
|
|
1020
|
+
|
|
1021
|
+
const deleteAgent = async (id) => {
|
|
1022
|
+
const ok = await showConfirm({ title: 'Delete Agent', message: 'Are you sure you want to delete this agent? This will remove all associated data.', warning: 'This action cannot be undone.', danger: true, confirmText: 'Delete Agent' });
|
|
1023
|
+
if (!ok) return;
|
|
1024
|
+
try { await engineCall('/bridge/agents/' + id, { method: 'DELETE', body: JSON.stringify({ destroyedBy: 'dashboard' }) }); toast('Agent deleted', 'success'); load(); } catch (e) { toast(e.message, 'error'); }
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
return h(Fragment, null,
|
|
1028
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 } },
|
|
1029
|
+
h('div', null, h('h1', { style: { fontSize: 20, fontWeight: 700 } }, 'Agents'), h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Manage your AI agents — create, configure, deploy, and monitor')),
|
|
1030
|
+
h('button', { className: 'btn btn-primary', onClick: () => setCreating(true) }, I.plus(), ' Create Agent')
|
|
1031
|
+
),
|
|
1032
|
+
creating && h(CreateAgentWizard, { onClose: () => setCreating(false), onCreated: load, toast }),
|
|
1033
|
+
agents.length === 0
|
|
1034
|
+
? h('div', { className: 'card' }, h('div', { className: 'card-body' },
|
|
1035
|
+
h('div', { className: 'empty-state' },
|
|
1036
|
+
I.agents(),
|
|
1037
|
+
h('h3', null, 'No agents yet'),
|
|
1038
|
+
h('p', null, 'Create your first agent to give it an email identity, skills, and deploy it to start working autonomously.'),
|
|
1039
|
+
h('button', { className: 'btn btn-primary', onClick: () => setCreating(true) }, I.plus(), ' Create Your First Agent')
|
|
1040
|
+
)
|
|
1041
|
+
))
|
|
1042
|
+
: h('div', { className: 'card' },
|
|
1043
|
+
h('div', { className: 'card-body-flush' },
|
|
1044
|
+
h('table', null,
|
|
1045
|
+
h('thead', null, h('tr', null, h('th', null, 'Name'), h('th', null, 'Email'), h('th', null, 'Role'), h('th', null, 'Status'), h('th', null, 'Created'), h('th', { style: { width: 180 } }, 'Actions'))),
|
|
1046
|
+
h('tbody', null, agents.map(a =>
|
|
1047
|
+
h('tr', { key: a.id },
|
|
1048
|
+
h('td', null, h('strong', { style: { cursor: 'pointer', color: 'var(--accent-text)' }, onClick: () => onSelectAgent && onSelectAgent(a.id) }, a.name)),
|
|
1049
|
+
h('td', null, h('span', { style: { fontFamily: 'var(--font-mono)', fontSize: 12 } }, a.email || '-')),
|
|
1050
|
+
h('td', null, h('span', { className: 'badge badge-neutral' }, a.role || 'agent')),
|
|
1051
|
+
h('td', null, h('span', { className: 'badge badge-' + (a.status === 'active' ? 'success' : a.status === 'archived' ? 'neutral' : 'warning') }, a.status || 'active')),
|
|
1052
|
+
h('td', { style: { fontSize: 12, color: 'var(--text-muted)' } }, a.createdAt ? new Date(a.createdAt).toLocaleDateString() : '-'),
|
|
1053
|
+
h('td', null,
|
|
1054
|
+
h('div', { style: { display: 'flex', gap: 4 } },
|
|
1055
|
+
h('button', { className: 'btn btn-primary btn-sm', onClick: () => onSelectAgent && onSelectAgent(a.id) }, 'View Details'),
|
|
1056
|
+
h('button', { className: 'btn btn-ghost btn-sm', title: 'Restart', onClick: () => engineCall('/agents/' + a.id + '/restart', { method: 'POST', body: JSON.stringify({ restartedBy: 'dashboard' }) }).then(() => toast('Restarting...', 'info')).catch(e => toast(e.message, 'error')) }, I.refresh()),
|
|
1057
|
+
h('button', { className: 'btn btn-ghost btn-sm', title: 'Delete', onClick: () => deleteAgent(a.id) }, I.trash())
|
|
1058
|
+
)
|
|
1059
|
+
)
|
|
1060
|
+
)
|
|
1061
|
+
))
|
|
1062
|
+
)
|
|
1063
|
+
)
|
|
1064
|
+
)
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
// ════════════════════════════════════════════════════════════
|
|
1069
|
+
// AGENT DETAIL PAGE — Re-exported from agent-detail.js
|
|
1070
|
+
// ════════════════════════════════════════════════════════════
|
|
1071
|
+
|
|
1072
|
+
export { AgentDetailPage } from './agent-detail.js';
|