@hoknie/aip 0.3.1 → 0.5.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/.claude-plugin/marketplace.json +3 -0
- package/dist/app/actors.js +82 -0
- package/dist/app/actors.js.map +1 -0
- package/dist/app/agents.js +9 -1
- package/dist/app/agents.js.map +1 -1
- package/dist/app/application.js +72 -57
- package/dist/app/application.js.map +1 -1
- package/dist/app/integration-operations.js +34 -0
- package/dist/app/integration-operations.js.map +1 -0
- package/dist/app/lifecycle.js +91 -2
- package/dist/app/lifecycle.js.map +1 -1
- package/dist/app/maintenance.js +4 -0
- package/dist/app/maintenance.js.map +1 -1
- package/dist/app/notifications/index.js +44 -0
- package/dist/app/notifications/index.js.map +1 -0
- package/dist/app/oidc.js +27 -0
- package/dist/app/oidc.js.map +1 -0
- package/dist/app/saml.js +43 -0
- package/dist/app/saml.js.map +1 -0
- package/dist/app/timings.js +2 -1
- package/dist/app/timings.js.map +1 -1
- package/dist/app/wire.js +88 -0
- package/dist/app/wire.js.map +1 -0
- package/dist/app/wiring.js +10 -0
- package/dist/app/wiring.js.map +1 -1
- package/dist/cli/main.js +42 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/feature/access/services/access.js +73 -0
- package/dist/feature/access/services/access.js.map +1 -0
- package/dist/feature/access/services/create.js +31 -0
- package/dist/feature/access/services/create.js.map +1 -0
- package/dist/feature/access/services/index.js +3 -0
- package/dist/feature/access/services/index.js.map +1 -0
- package/dist/feature/access/types/actions.js +145 -0
- package/dist/feature/access/types/actions.js.map +1 -0
- package/dist/feature/access/types/evaluate.js +58 -0
- package/dist/feature/access/types/evaluate.js.map +1 -0
- package/dist/feature/access/types/index.js +4 -0
- package/dist/feature/access/types/index.js.map +1 -0
- package/dist/feature/access/types/presets.js +41 -0
- package/dist/feature/access/types/presets.js.map +1 -0
- package/dist/feature/agents/clients/agy/runtime.js +1 -0
- package/dist/feature/agents/clients/agy/runtime.js.map +1 -1
- package/dist/feature/agents/clients/claude/parser.js +7 -1
- package/dist/feature/agents/clients/claude/parser.js.map +1 -1
- package/dist/feature/agents/clients/claude/permissions.js +5 -2
- package/dist/feature/agents/clients/claude/permissions.js.map +1 -1
- package/dist/feature/agents/clients/claude/runtime.js +2 -0
- package/dist/feature/agents/clients/claude/runtime.js.map +1 -1
- package/dist/feature/agents/clients/cline/events.js +36 -0
- package/dist/feature/agents/clients/cline/events.js.map +1 -0
- package/dist/feature/agents/clients/cline/gate.js +55 -0
- package/dist/feature/agents/clients/cline/gate.js.map +1 -0
- package/dist/feature/agents/clients/cline/index.js +5 -0
- package/dist/feature/agents/clients/cline/index.js.map +1 -0
- package/dist/feature/agents/clients/cline/parser.js +41 -0
- package/dist/feature/agents/clients/cline/parser.js.map +1 -0
- package/dist/feature/agents/clients/cline/runtime.js +126 -0
- package/dist/feature/agents/clients/cline/runtime.js.map +1 -0
- package/dist/feature/agents/clients/cline/transcript.js +49 -0
- package/dist/feature/agents/clients/cline/transcript.js.map +1 -0
- package/dist/feature/agents/clients/codex/config.js +72 -0
- package/dist/feature/agents/clients/codex/config.js.map +1 -0
- package/dist/feature/agents/clients/codex/events.js +35 -0
- package/dist/feature/agents/clients/codex/events.js.map +1 -0
- package/dist/feature/agents/clients/codex/index.js +5 -0
- package/dist/feature/agents/clients/codex/index.js.map +1 -0
- package/dist/feature/agents/clients/codex/parser.js +54 -0
- package/dist/feature/agents/clients/codex/parser.js.map +1 -0
- package/dist/feature/agents/clients/codex/runtime.js +83 -0
- package/dist/feature/agents/clients/codex/runtime.js.map +1 -0
- package/dist/feature/agents/clients/codex/transcript.js +84 -0
- package/dist/feature/agents/clients/codex/transcript.js.map +1 -0
- package/dist/feature/agents/clients/copilot/config.js +25 -0
- package/dist/feature/agents/clients/copilot/config.js.map +1 -0
- package/dist/feature/agents/clients/copilot/events.js +43 -0
- package/dist/feature/agents/clients/copilot/events.js.map +1 -0
- package/dist/feature/agents/clients/copilot/gate.js +79 -0
- package/dist/feature/agents/clients/copilot/gate.js.map +1 -0
- package/dist/feature/agents/clients/copilot/index.js +6 -0
- package/dist/feature/agents/clients/copilot/index.js.map +1 -0
- package/dist/feature/agents/clients/copilot/parser.js +58 -0
- package/dist/feature/agents/clients/copilot/parser.js.map +1 -0
- package/dist/feature/agents/clients/copilot/runtime.js +149 -0
- package/dist/feature/agents/clients/copilot/runtime.js.map +1 -0
- package/dist/feature/agents/clients/copilot/sandbox.js +107 -0
- package/dist/feature/agents/clients/copilot/sandbox.js.map +1 -0
- package/dist/feature/agents/clients/copilot/transcript.js +45 -0
- package/dist/feature/agents/clients/copilot/transcript.js.map +1 -0
- package/dist/feature/agents/clients/kilo/config.js +84 -0
- package/dist/feature/agents/clients/kilo/config.js.map +1 -0
- package/dist/feature/agents/clients/kilo/index.js +3 -0
- package/dist/feature/agents/clients/kilo/index.js.map +1 -0
- package/dist/feature/agents/clients/kilo/runtime.js +87 -0
- package/dist/feature/agents/clients/kilo/runtime.js.map +1 -0
- package/dist/feature/agents/clients/opencode/parser.js +24 -1
- package/dist/feature/agents/clients/opencode/parser.js.map +1 -1
- package/dist/feature/agents/clients/opencode/runtime.js +1 -0
- package/dist/feature/agents/clients/opencode/runtime.js.map +1 -1
- package/dist/feature/agents/clients/policy/decision.js +69 -0
- package/dist/feature/agents/clients/policy/decision.js.map +1 -0
- package/dist/feature/agents/clients/policy/gate.js +37 -0
- package/dist/feature/agents/clients/policy/gate.js.map +1 -0
- package/dist/feature/agents/clients/policy/index.js +4 -0
- package/dist/feature/agents/clients/policy/index.js.map +1 -0
- package/dist/feature/agents/clients/policy/mcp.js +45 -0
- package/dist/feature/agents/clients/policy/mcp.js.map +1 -0
- package/dist/feature/agents/services/agents.js +18 -6
- package/dist/feature/agents/services/agents.js.map +1 -1
- package/dist/feature/agents/services/create.js +3 -1
- package/dist/feature/agents/services/create.js.map +1 -1
- package/dist/feature/agents/services/index.js +1 -0
- package/dist/feature/agents/services/index.js.map +1 -1
- package/dist/feature/agents/services/providers.js +82 -0
- package/dist/feature/agents/services/providers.js.map +1 -0
- package/dist/feature/agents/services/skills.js +4 -1
- package/dist/feature/agents/services/skills.js.map +1 -1
- package/dist/feature/agents/services/supervisor.js +12 -5
- package/dist/feature/agents/services/supervisor.js.map +1 -1
- package/dist/feature/agents/types/index.js +1 -0
- package/dist/feature/agents/types/index.js.map +1 -1
- package/dist/feature/agents/types/mcp/env.js +6 -1
- package/dist/feature/agents/types/mcp/env.js.map +1 -1
- package/dist/feature/agents/types/message.js +13 -1
- package/dist/feature/agents/types/message.js.map +1 -1
- package/dist/feature/agents/types/providers/providers.js +62 -0
- package/dist/feature/agents/types/providers/providers.js.map +1 -0
- package/dist/feature/agents/types/runtime.js +27 -0
- package/dist/feature/agents/types/runtime.js.map +1 -1
- package/dist/feature/agents/types/worker-tools.js +6 -1
- package/dist/feature/agents/types/worker-tools.js.map +1 -1
- package/dist/feature/audit/repositories/events.js +66 -0
- package/dist/feature/audit/repositories/events.js.map +1 -0
- package/dist/feature/audit/repositories/index.js +2 -0
- package/dist/feature/audit/repositories/index.js.map +1 -0
- package/dist/feature/audit/services/audit-log.js +24 -0
- package/dist/feature/audit/services/audit-log.js.map +1 -0
- package/dist/feature/audit/services/create.js +6 -0
- package/dist/feature/audit/services/create.js.map +1 -0
- package/dist/feature/audit/services/index.js +3 -0
- package/dist/feature/audit/services/index.js.map +1 -0
- package/dist/feature/audit/types/event.js +12 -0
- package/dist/feature/audit/types/event.js.map +1 -0
- package/dist/feature/audit/types/index.js +2 -0
- package/dist/feature/audit/types/index.js.map +1 -0
- package/dist/feature/compose/services/repository-move.js +8 -1
- package/dist/feature/compose/services/repository-move.js.map +1 -1
- package/dist/feature/compose/services/repository-removal.js +6 -1
- package/dist/feature/compose/services/repository-removal.js.map +1 -1
- package/dist/feature/delivery/ports/authors.js +2 -0
- package/dist/feature/delivery/ports/authors.js.map +1 -0
- package/dist/feature/delivery/services/commit-stamp.js +20 -0
- package/dist/feature/delivery/services/commit-stamp.js.map +1 -0
- package/dist/feature/delivery/services/create.js +6 -2
- package/dist/feature/delivery/services/create.js.map +1 -1
- package/dist/feature/delivery/services/deliver.js +8 -0
- package/dist/feature/delivery/services/deliver.js.map +1 -1
- package/dist/feature/delivery/services/push.js +23 -0
- package/dist/feature/delivery/services/push.js.map +1 -0
- package/dist/feature/delivery/types/index.js +2 -0
- package/dist/feature/delivery/types/index.js.map +1 -1
- package/dist/feature/delivery/types/remote-url.js +44 -0
- package/dist/feature/delivery/types/remote-url.js.map +1 -0
- package/dist/feature/delivery/types/trailer.js +22 -0
- package/dist/feature/delivery/types/trailer.js.map +1 -0
- package/dist/feature/identity/clients/oidc/client.js +78 -0
- package/dist/feature/identity/clients/oidc/client.js.map +1 -0
- package/dist/feature/identity/clients/oidc/index.js +2 -0
- package/dist/feature/identity/clients/oidc/index.js.map +1 -0
- package/dist/feature/identity/clients/oidc/signature.js +51 -0
- package/dist/feature/identity/clients/oidc/signature.js.map +1 -0
- package/dist/feature/identity/clients/saml/client.js +108 -0
- package/dist/feature/identity/clients/saml/client.js.map +1 -0
- package/dist/feature/identity/clients/saml/idp-metadata.js +123 -0
- package/dist/feature/identity/clients/saml/idp-metadata.js.map +1 -0
- package/dist/feature/identity/clients/saml/index.js +3 -0
- package/dist/feature/identity/clients/saml/index.js.map +1 -0
- package/dist/feature/identity/ports/clock.js +2 -0
- package/dist/feature/identity/ports/clock.js.map +1 -0
- package/dist/feature/identity/ports/index.js +2 -0
- package/dist/feature/identity/ports/index.js.map +1 -0
- package/dist/feature/identity/ports/oidc.js +2 -0
- package/dist/feature/identity/ports/oidc.js.map +1 -0
- package/dist/feature/identity/ports/saml.js +2 -0
- package/dist/feature/identity/ports/saml.js.map +1 -0
- package/dist/feature/identity/repositories/index.js +7 -0
- package/dist/feature/identity/repositories/index.js.map +1 -0
- package/dist/feature/identity/repositories/links.js +57 -0
- package/dist/feature/identity/repositories/links.js.map +1 -0
- package/dist/feature/identity/repositories/saml-assertions.js +16 -0
- package/dist/feature/identity/repositories/saml-assertions.js.map +1 -0
- package/dist/feature/identity/repositories/sessions.js +27 -0
- package/dist/feature/identity/repositories/sessions.js.map +1 -0
- package/dist/feature/identity/repositories/sso-requests.js +34 -0
- package/dist/feature/identity/repositories/sso-requests.js.map +1 -0
- package/dist/feature/identity/repositories/tokens.js +55 -0
- package/dist/feature/identity/repositories/tokens.js.map +1 -0
- package/dist/feature/identity/repositories/users.js +75 -0
- package/dist/feature/identity/repositories/users.js.map +1 -0
- package/dist/feature/identity/services/cli-login.js +48 -0
- package/dist/feature/identity/services/cli-login.js.map +1 -0
- package/dist/feature/identity/services/create.js +76 -0
- package/dist/feature/identity/services/create.js.map +1 -0
- package/dist/feature/identity/services/index.js +10 -0
- package/dist/feature/identity/services/index.js.map +1 -0
- package/dist/feature/identity/services/saml.js +115 -0
- package/dist/feature/identity/services/saml.js.map +1 -0
- package/dist/feature/identity/services/sessions.js +81 -0
- package/dist/feature/identity/services/sessions.js.map +1 -0
- package/dist/feature/identity/services/sso-accounts.js +46 -0
- package/dist/feature/identity/services/sso-accounts.js.map +1 -0
- package/dist/feature/identity/services/sso.js +120 -0
- package/dist/feature/identity/services/sso.js.map +1 -0
- package/dist/feature/identity/services/system.js +15 -0
- package/dist/feature/identity/services/system.js.map +1 -0
- package/dist/feature/identity/services/tokens.js +74 -0
- package/dist/feature/identity/services/tokens.js.map +1 -0
- package/dist/feature/identity/services/users.js +103 -0
- package/dist/feature/identity/services/users.js.map +1 -0
- package/dist/feature/identity/types/claims.js +39 -0
- package/dist/feature/identity/types/claims.js.map +1 -0
- package/dist/feature/identity/types/index.js +5 -0
- package/dist/feature/identity/types/index.js.map +1 -0
- package/dist/feature/identity/types/token.js +11 -0
- package/dist/feature/identity/types/token.js.map +1 -0
- package/dist/feature/identity/types/ttl.js +19 -0
- package/dist/feature/identity/types/ttl.js.map +1 -0
- package/dist/feature/identity/types/user.js +47 -0
- package/dist/feature/identity/types/user.js.map +1 -0
- package/dist/feature/integrations/ports/adapter.js +2 -0
- package/dist/feature/integrations/ports/adapter.js.map +1 -0
- package/dist/feature/integrations/ports/changes.js +2 -0
- package/dist/feature/integrations/ports/changes.js.map +1 -0
- package/dist/feature/integrations/ports/index.js +5 -0
- package/dist/feature/integrations/ports/index.js.map +1 -0
- package/dist/feature/integrations/ports/operations.js +2 -0
- package/dist/feature/integrations/ports/operations.js.map +1 -0
- package/dist/feature/integrations/ports/secrets.js +2 -0
- package/dist/feature/integrations/ports/secrets.js.map +1 -0
- package/dist/feature/integrations/repositories/connections.js +89 -0
- package/dist/feature/integrations/repositories/connections.js.map +1 -0
- package/dist/feature/integrations/repositories/deliveries.js +56 -0
- package/dist/feature/integrations/repositories/deliveries.js.map +1 -0
- package/dist/feature/integrations/repositories/index.js +4 -0
- package/dist/feature/integrations/repositories/index.js.map +1 -0
- package/dist/feature/integrations/repositories/secrets.js +102 -0
- package/dist/feature/integrations/repositories/secrets.js.map +1 -0
- package/dist/feature/integrations/services/access.js +63 -0
- package/dist/feature/integrations/services/access.js.map +1 -0
- package/dist/feature/integrations/services/catalog.js +38 -0
- package/dist/feature/integrations/services/catalog.js.map +1 -0
- package/dist/feature/integrations/services/checks.js +66 -0
- package/dist/feature/integrations/services/checks.js.map +1 -0
- package/dist/feature/integrations/services/connections.js +189 -0
- package/dist/feature/integrations/services/connections.js.map +1 -0
- package/dist/feature/integrations/services/create.js +71 -0
- package/dist/feature/integrations/services/create.js.map +1 -0
- package/dist/feature/integrations/services/dispatch.js +162 -0
- package/dist/feature/integrations/services/dispatch.js.map +1 -0
- package/dist/feature/integrations/services/index.js +9 -0
- package/dist/feature/integrations/services/index.js.map +1 -0
- package/dist/feature/integrations/services/outbound.js +46 -0
- package/dist/feature/integrations/services/outbound.js.map +1 -0
- package/dist/feature/integrations/services/secrets.js +271 -0
- package/dist/feature/integrations/services/secrets.js.map +1 -0
- package/dist/feature/integrations/types/connection.js +81 -0
- package/dist/feature/integrations/types/connection.js.map +1 -0
- package/dist/feature/integrations/types/deliveries.js +5 -0
- package/dist/feature/integrations/types/deliveries.js.map +1 -0
- package/dist/feature/integrations/types/errors.js +58 -0
- package/dist/feature/integrations/types/errors.js.map +1 -0
- package/dist/feature/integrations/types/index.js +6 -0
- package/dist/feature/integrations/types/index.js.map +1 -0
- package/dist/feature/integrations/types/operations.js +16 -0
- package/dist/feature/integrations/types/operations.js.map +1 -0
- package/dist/feature/integrations/types/secrets.js +8 -0
- package/dist/feature/integrations/types/secrets.js.map +1 -0
- package/dist/feature/notifications/clients/index.js +7 -0
- package/dist/feature/notifications/clients/index.js.map +1 -0
- package/dist/feature/notifications/clients/slack/api.js +133 -0
- package/dist/feature/notifications/clients/slack/api.js.map +1 -0
- package/dist/feature/notifications/clients/slack/blocks.js +189 -0
- package/dist/feature/notifications/clients/slack/blocks.js.map +1 -0
- package/dist/feature/notifications/clients/slack/channel.js +219 -0
- package/dist/feature/notifications/clients/slack/channel.js.map +1 -0
- package/dist/feature/notifications/clients/slack/events.js +117 -0
- package/dist/feature/notifications/clients/slack/events.js.map +1 -0
- package/dist/feature/notifications/clients/slack/kind.js +39 -0
- package/dist/feature/notifications/clients/slack/kind.js.map +1 -0
- package/dist/feature/notifications/clients/slack/socket.js +141 -0
- package/dist/feature/notifications/clients/slack/socket.js.map +1 -0
- package/dist/feature/notifications/clients/telegram/api.js +93 -0
- package/dist/feature/notifications/clients/telegram/api.js.map +1 -0
- package/dist/feature/notifications/clients/telegram/channel.js +250 -0
- package/dist/feature/notifications/clients/telegram/channel.js.map +1 -0
- package/dist/feature/notifications/clients/telegram/kind.js +34 -0
- package/dist/feature/notifications/clients/telegram/kind.js.map +1 -0
- package/dist/feature/notifications/clients/telegram/render.js +68 -0
- package/dist/feature/notifications/clients/telegram/render.js.map +1 -0
- package/dist/feature/notifications/clients/telegram/updates.js +71 -0
- package/dist/feature/notifications/clients/telegram/updates.js.map +1 -0
- package/dist/feature/notifications/clients/webhook/channel.js +131 -0
- package/dist/feature/notifications/clients/webhook/channel.js.map +1 -0
- package/dist/feature/notifications/clients/webhook/kind.js +52 -0
- package/dist/feature/notifications/clients/webhook/kind.js.map +1 -0
- package/dist/feature/notifications/clients/webhook/payload.js +96 -0
- package/dist/feature/notifications/clients/webhook/payload.js.map +1 -0
- package/dist/feature/notifications/clients/webhook/sign.js +15 -0
- package/dist/feature/notifications/clients/webhook/sign.js.map +1 -0
- package/dist/feature/notifications/ports/channel.js +2 -0
- package/dist/feature/notifications/ports/channel.js.map +1 -0
- package/dist/feature/notifications/ports/index.js +2 -0
- package/dist/feature/notifications/ports/index.js.map +1 -0
- package/dist/feature/notifications/ports/publish.js +2 -0
- package/dist/feature/notifications/ports/publish.js.map +1 -0
- package/dist/feature/notifications/repositories/answers.js +25 -0
- package/dist/feature/notifications/repositories/answers.js.map +1 -0
- package/dist/feature/notifications/repositories/attempts.js +34 -0
- package/dist/feature/notifications/repositories/attempts.js.map +1 -0
- package/dist/feature/notifications/repositories/cursors.js +25 -0
- package/dist/feature/notifications/repositories/cursors.js.map +1 -0
- package/dist/feature/notifications/repositories/deliveries.js +118 -0
- package/dist/feature/notifications/repositories/deliveries.js.map +1 -0
- package/dist/feature/notifications/repositories/index.js +7 -0
- package/dist/feature/notifications/repositories/index.js.map +1 -0
- package/dist/feature/notifications/repositories/outcomes.js +80 -0
- package/dist/feature/notifications/repositories/outcomes.js.map +1 -0
- package/dist/feature/notifications/repositories/subscriptions.js +85 -0
- package/dist/feature/notifications/repositories/subscriptions.js.map +1 -0
- package/dist/feature/notifications/services/channels.js +199 -0
- package/dist/feature/notifications/services/channels.js.map +1 -0
- package/dist/feature/notifications/services/closer.js +79 -0
- package/dist/feature/notifications/services/closer.js.map +1 -0
- package/dist/feature/notifications/services/create.js +116 -0
- package/dist/feature/notifications/services/create.js.map +1 -0
- package/dist/feature/notifications/services/dispatcher.js +210 -0
- package/dist/feature/notifications/services/dispatcher.js.map +1 -0
- package/dist/feature/notifications/services/drawing.js +27 -0
- package/dist/feature/notifications/services/drawing.js.map +1 -0
- package/dist/feature/notifications/services/factories.js +31 -0
- package/dist/feature/notifications/services/factories.js.map +1 -0
- package/dist/feature/notifications/services/inbound.js +172 -0
- package/dist/feature/notifications/services/inbound.js.map +1 -0
- package/dist/feature/notifications/services/index.js +10 -0
- package/dist/feature/notifications/services/index.js.map +1 -0
- package/dist/feature/notifications/services/journal.js +38 -0
- package/dist/feature/notifications/services/journal.js.map +1 -0
- package/dist/feature/notifications/services/lanes.js +28 -0
- package/dist/feature/notifications/services/lanes.js.map +1 -0
- package/dist/feature/notifications/services/outbox.js +2 -0
- package/dist/feature/notifications/services/outbox.js.map +1 -0
- package/dist/feature/notifications/services/sender.js +129 -0
- package/dist/feature/notifications/services/sender.js.map +1 -0
- package/dist/feature/notifications/services/senders/index.js +3 -0
- package/dist/feature/notifications/services/senders/index.js.map +1 -0
- package/dist/feature/notifications/services/senders/recent.js +32 -0
- package/dist/feature/notifications/services/senders/recent.js.map +1 -0
- package/dist/feature/notifications/services/senders/senders.js +23 -0
- package/dist/feature/notifications/services/senders/senders.js.map +1 -0
- package/dist/feature/notifications/services/subscriptions.js +221 -0
- package/dist/feature/notifications/services/subscriptions.js.map +1 -0
- package/dist/feature/notifications/services/webhooks/index.js +3 -0
- package/dist/feature/notifications/services/webhooks/index.js.map +1 -0
- package/dist/feature/notifications/services/webhooks/streaks.js +44 -0
- package/dist/feature/notifications/services/webhooks/streaks.js.map +1 -0
- package/dist/feature/notifications/services/webhooks/webhooks.js +249 -0
- package/dist/feature/notifications/services/webhooks/webhooks.js.map +1 -0
- package/dist/feature/notifications/types/answers.js +42 -0
- package/dist/feature/notifications/types/answers.js.map +1 -0
- package/dist/feature/notifications/types/channel.js +20 -0
- package/dist/feature/notifications/types/channel.js.map +1 -0
- package/dist/feature/notifications/types/display-url.js +11 -0
- package/dist/feature/notifications/types/display-url.js.map +1 -0
- package/dist/feature/notifications/types/drafts.js +35 -0
- package/dist/feature/notifications/types/drafts.js.map +1 -0
- package/dist/feature/notifications/types/errors.js +38 -0
- package/dist/feature/notifications/types/errors.js.map +1 -0
- package/dist/feature/notifications/types/events.js +137 -0
- package/dist/feature/notifications/types/events.js.map +1 -0
- package/dist/feature/notifications/types/index.js +13 -0
- package/dist/feature/notifications/types/index.js.map +1 -0
- package/dist/feature/notifications/types/limits.js +32 -0
- package/dist/feature/notifications/types/limits.js.map +1 -0
- package/dist/feature/notifications/types/model.js +29 -0
- package/dist/feature/notifications/types/model.js.map +1 -0
- package/dist/feature/notifications/types/render.js +132 -0
- package/dist/feature/notifications/types/render.js.map +1 -0
- package/dist/feature/notifications/types/retry.js +35 -0
- package/dist/feature/notifications/types/retry.js.map +1 -0
- package/dist/feature/notifications/types/texts.js +130 -0
- package/dist/feature/notifications/types/texts.js.map +1 -0
- package/dist/feature/notifications/types/webhooks.js +22 -0
- package/dist/feature/notifications/types/webhooks.js.map +1 -0
- package/dist/feature/queue/repositories/queues.js +7 -4
- package/dist/feature/queue/repositories/queues.js.map +1 -1
- package/dist/feature/queue/services/advance.js +3 -0
- package/dist/feature/queue/services/advance.js.map +1 -1
- package/dist/feature/queue/services/create.js +2 -0
- package/dist/feature/queue/services/create.js.map +1 -1
- package/dist/feature/queue/services/edit.js +33 -11
- package/dist/feature/queue/services/edit.js.map +1 -1
- package/dist/feature/queue/services/items.js +31 -48
- package/dist/feature/queue/services/items.js.map +1 -1
- package/dist/feature/queue/services/links.js +10 -4
- package/dist/feature/queue/services/links.js.map +1 -1
- package/dist/feature/queue/services/projects.js +26 -9
- package/dist/feature/queue/services/projects.js.map +1 -1
- package/dist/feature/queue/services/task-tags.js +30 -15
- package/dist/feature/queue/services/task-tags.js.map +1 -1
- package/dist/feature/queue/services/worker/tasks.js +108 -0
- package/dist/feature/queue/services/worker/tasks.js.map +1 -0
- package/dist/feature/queue/types/advance.js +1 -0
- package/dist/feature/queue/types/advance.js.map +1 -1
- package/dist/feature/queue/types/duplicates.js +46 -0
- package/dist/feature/queue/types/duplicates.js.map +1 -0
- package/dist/feature/queue/types/edit.js +7 -2
- package/dist/feature/queue/types/edit.js.map +1 -1
- package/dist/feature/queue/types/filter.js +3 -3
- package/dist/feature/queue/types/filter.js.map +1 -1
- package/dist/feature/queue/types/global/queue.js +2 -2
- package/dist/feature/queue/types/global/queue.js.map +1 -1
- package/dist/feature/queue/types/index.js +1 -0
- package/dist/feature/queue/types/index.js.map +1 -1
- package/dist/feature/queue/types/items.js.map +1 -1
- package/dist/feature/queue/types/limit-hits.js +3 -0
- package/dist/feature/queue/types/limit-hits.js.map +1 -1
- package/dist/feature/queue/types/returns.js +3 -0
- package/dist/feature/queue/types/returns.js.map +1 -1
- package/dist/feature/repos/services/projects.js +26 -2
- package/dist/feature/repos/services/projects.js.map +1 -1
- package/dist/feature/repos/types/index.js +1 -0
- package/dist/feature/repos/types/index.js.map +1 -1
- package/dist/feature/repos/types/remote.js +28 -0
- package/dist/feature/repos/types/remote.js.map +1 -0
- package/dist/feature/runs/machine/answers.js +13 -0
- package/dist/feature/runs/machine/answers.js.map +1 -1
- package/dist/feature/runs/machine/delivery-checks.js +4 -2
- package/dist/feature/runs/machine/delivery-checks.js.map +1 -1
- package/dist/feature/runs/machine/delivery-flow.js +18 -1
- package/dist/feature/runs/machine/delivery-flow.js.map +1 -1
- package/dist/feature/runs/machine/exits.js +1 -1
- package/dist/feature/runs/machine/exits.js.map +1 -1
- package/dist/feature/runs/machine/plan.js +17 -4
- package/dist/feature/runs/machine/plan.js.map +1 -1
- package/dist/feature/runs/machine/provider/index.js +2 -0
- package/dist/feature/runs/machine/provider/index.js.map +1 -0
- package/dist/feature/runs/machine/provider/set-provider.js +71 -0
- package/dist/feature/runs/machine/provider/set-provider.js.map +1 -0
- package/dist/feature/runs/machine/push/index.js +2 -0
- package/dist/feature/runs/machine/push/index.js.map +1 -0
- package/dist/feature/runs/machine/push/push.js +48 -0
- package/dist/feature/runs/machine/push/push.js.map +1 -0
- package/dist/feature/runs/machine/restart/index.js +2 -0
- package/dist/feature/runs/machine/restart/index.js.map +1 -0
- package/dist/feature/runs/machine/restart/restart-step.js +31 -0
- package/dist/feature/runs/machine/restart/restart-step.js.map +1 -0
- package/dist/feature/runs/machine/scheduler.js +33 -7
- package/dist/feature/runs/machine/scheduler.js.map +1 -1
- package/dist/feature/runs/machine/texts.js +3 -1
- package/dist/feature/runs/machine/texts.js.map +1 -1
- package/dist/feature/runs/machine/transition.js +28 -4
- package/dist/feature/runs/machine/transition.js.map +1 -1
- package/dist/feature/runs/machine/variant/set-variant.js +3 -22
- package/dist/feature/runs/machine/variant/set-variant.js.map +1 -1
- package/dist/feature/runs/ports/commits.js +2 -0
- package/dist/feature/runs/ports/commits.js.map +1 -0
- package/dist/feature/runs/ports/notify.js +2 -0
- package/dist/feature/runs/ports/notify.js.map +1 -0
- package/dist/feature/runs/ports/push.js +2 -0
- package/dist/feature/runs/ports/push.js.map +1 -0
- package/dist/feature/runs/ports/registry-project.js +2 -0
- package/dist/feature/runs/ports/registry-project.js.map +1 -0
- package/dist/feature/runs/ports/registry-skills.js +2 -0
- package/dist/feature/runs/ports/registry-skills.js.map +1 -0
- package/dist/feature/runs/ports/remote-mcp.js +2 -0
- package/dist/feature/runs/ports/remote-mcp.js.map +1 -0
- package/dist/feature/runs/repositories/finished-runs.js +5 -1
- package/dist/feature/runs/repositories/finished-runs.js.map +1 -1
- package/dist/feature/runs/repositories/rows.js +18 -0
- package/dist/feature/runs/repositories/rows.js.map +1 -1
- package/dist/feature/runs/repositories/write.js +7 -7
- package/dist/feature/runs/repositories/write.js.map +1 -1
- package/dist/feature/runs/services/create.js +1 -0
- package/dist/feature/runs/services/create.js.map +1 -1
- package/dist/feature/runs/services/effects/actions.js +2 -1
- package/dist/feature/runs/services/effects/actions.js.map +1 -1
- package/dist/feature/runs/services/effects/attempts.js +57 -80
- package/dist/feature/runs/services/effects/attempts.js.map +1 -1
- package/dist/feature/runs/services/effects/context.js +2 -0
- package/dist/feature/runs/services/effects/context.js.map +1 -1
- package/dist/feature/runs/services/effects/conversations.js +238 -0
- package/dist/feature/runs/services/effects/conversations.js.map +1 -0
- package/dist/feature/runs/services/effects/effects.js +2 -0
- package/dist/feature/runs/services/effects/effects.js.map +1 -1
- package/dist/feature/runs/services/effects/git.js +17 -2
- package/dist/feature/runs/services/effects/git.js.map +1 -1
- package/dist/feature/runs/services/effects/naming.js +1 -1
- package/dist/feature/runs/services/effects/naming.js.map +1 -1
- package/dist/feature/runs/services/effects/runtime-check.js +28 -0
- package/dist/feature/runs/services/effects/runtime-check.js.map +1 -1
- package/dist/feature/runs/services/effects/skills/index.js +3 -0
- package/dist/feature/runs/services/effects/skills/index.js.map +1 -0
- package/dist/feature/runs/services/effects/skills/outside-queue.js +58 -0
- package/dist/feature/runs/services/effects/skills/outside-queue.js.map +1 -0
- package/dist/feature/runs/services/effects/skills/registry.js +70 -0
- package/dist/feature/runs/services/effects/skills/registry.js.map +1 -0
- package/dist/feature/runs/services/engine.js +8 -1
- package/dist/feature/runs/services/engine.js.map +1 -1
- package/dist/feature/runs/services/index.js +2 -2
- package/dist/feature/runs/services/index.js.map +1 -1
- package/dist/feature/runs/services/reads.js +30 -1
- package/dist/feature/runs/services/reads.js.map +1 -1
- package/dist/feature/runs/services/refresh.js +23 -1
- package/dist/feature/runs/services/refresh.js.map +1 -1
- package/dist/feature/runs/services/requests.js +21 -4
- package/dist/feature/runs/services/requests.js.map +1 -1
- package/dist/feature/runs/services/states.js +2 -2
- package/dist/feature/runs/services/states.js.map +1 -1
- package/dist/feature/runs/types/answers/answers-text.js +7 -0
- package/dist/feature/runs/types/answers/answers-text.js.map +1 -0
- package/dist/feature/runs/types/attempt.js +2 -0
- package/dist/feature/runs/types/attempt.js.map +1 -1
- package/dist/feature/runs/types/chains/chain-select.js +93 -0
- package/dist/feature/runs/types/chains/chain-select.js.map +1 -0
- package/dist/feature/runs/types/constants.js +1 -1
- package/dist/feature/runs/types/constants.js.map +1 -1
- package/dist/feature/runs/types/create.js +17 -4
- package/dist/feature/runs/types/create.js.map +1 -1
- package/dist/feature/runs/types/index.js +2 -0
- package/dist/feature/runs/types/index.js.map +1 -1
- package/dist/feature/runs/types/input.js +2 -1
- package/dist/feature/runs/types/input.js.map +1 -1
- package/dist/feature/runs/types/limits.js +11 -55
- package/dist/feature/runs/types/limits.js.map +1 -1
- package/dist/feature/runs/types/problems.js +9 -5
- package/dist/feature/runs/types/problems.js.map +1 -1
- package/dist/feature/runs/types/run.js.map +1 -1
- package/dist/feature/runs/types/stage-status.js +3 -1
- package/dist/feature/runs/types/stage-status.js.map +1 -1
- package/dist/feature/service-registry/clients/http-mcp/client.js +164 -0
- package/dist/feature/service-registry/clients/http-mcp/client.js.map +1 -0
- package/dist/feature/service-registry/clients/http-mcp/index.js +2 -0
- package/dist/feature/service-registry/clients/http-mcp/index.js.map +1 -0
- package/dist/feature/service-registry/ports/adapter.js +2 -0
- package/dist/feature/service-registry/ports/adapter.js.map +1 -0
- package/dist/feature/service-registry/ports/index.js +3 -0
- package/dist/feature/service-registry/ports/index.js.map +1 -0
- package/dist/feature/service-registry/ports/transport.js +2 -0
- package/dist/feature/service-registry/ports/transport.js.map +1 -0
- package/dist/feature/service-registry/repositories/index.js +2 -0
- package/dist/feature/service-registry/repositories/index.js.map +1 -0
- package/dist/feature/service-registry/repositories/links.js +61 -0
- package/dist/feature/service-registry/repositories/links.js.map +1 -0
- package/dist/feature/service-registry/services/adapter.js +63 -0
- package/dist/feature/service-registry/services/adapter.js.map +1 -0
- package/dist/feature/service-registry/services/calls.js +86 -0
- package/dist/feature/service-registry/services/calls.js.map +1 -0
- package/dist/feature/service-registry/services/catalog-scan.js +49 -0
- package/dist/feature/service-registry/services/catalog-scan.js.map +1 -0
- package/dist/feature/service-registry/services/create.js +30 -0
- package/dist/feature/service-registry/services/create.js.map +1 -0
- package/dist/feature/service-registry/services/forwarder.js +107 -0
- package/dist/feature/service-registry/services/forwarder.js.map +1 -0
- package/dist/feature/service-registry/services/index.js +6 -0
- package/dist/feature/service-registry/services/index.js.map +1 -0
- package/dist/feature/service-registry/services/links.js +256 -0
- package/dist/feature/service-registry/services/links.js.map +1 -0
- package/dist/feature/service-registry/services/skill-cache.js +135 -0
- package/dist/feature/service-registry/services/skill-cache.js.map +1 -0
- package/dist/feature/service-registry/services/skill-source.js +128 -0
- package/dist/feature/service-registry/services/skill-source.js.map +1 -0
- package/dist/feature/service-registry/services/skills.js +197 -0
- package/dist/feature/service-registry/services/skills.js.map +1 -0
- package/dist/feature/service-registry/types/descriptor.js +41 -0
- package/dist/feature/service-registry/types/descriptor.js.map +1 -0
- package/dist/feature/service-registry/types/endpoint.js +2 -0
- package/dist/feature/service-registry/types/endpoint.js.map +1 -0
- package/dist/feature/service-registry/types/errors.js +26 -0
- package/dist/feature/service-registry/types/errors.js.map +1 -0
- package/dist/feature/service-registry/types/index.js +7 -0
- package/dist/feature/service-registry/types/index.js.map +1 -0
- package/dist/feature/service-registry/types/link.js +26 -0
- package/dist/feature/service-registry/types/link.js.map +1 -0
- package/dist/feature/service-registry/types/semver.js +2 -0
- package/dist/feature/service-registry/types/semver.js.map +1 -0
- package/dist/feature/service-registry/types/skills.js +27 -0
- package/dist/feature/service-registry/types/skills.js.map +1 -0
- package/dist/feature/stats/repositories/meta.js +10 -0
- package/dist/feature/stats/repositories/meta.js.map +1 -1
- package/dist/feature/stats/repositories/records.js +18 -7
- package/dist/feature/stats/repositories/records.js.map +1 -1
- package/dist/feature/stats/repositories/report.js +14 -4
- package/dist/feature/stats/repositories/report.js.map +1 -1
- package/dist/feature/stats/services/ledger.js +16 -1
- package/dist/feature/stats/services/ledger.js.map +1 -1
- package/dist/feature/stats/services/report.js +7 -2
- package/dist/feature/stats/services/report.js.map +1 -1
- package/dist/feature/stats/types/capture.js +3 -0
- package/dist/feature/stats/types/capture.js.map +1 -1
- package/dist/feature/stats/types/records.js.map +1 -1
- package/dist/feature/stats/types/report.js +2 -0
- package/dist/feature/stats/types/report.js.map +1 -1
- package/dist/feature/swarm-config/repositories/config-files.js +3 -1
- package/dist/feature/swarm-config/repositories/config-files.js.map +1 -1
- package/dist/feature/swarm-config/services/access/file.js +83 -0
- package/dist/feature/swarm-config/services/access/file.js.map +1 -0
- package/dist/feature/swarm-config/services/access/index.js +3 -0
- package/dist/feature/swarm-config/services/access/index.js.map +1 -0
- package/dist/feature/swarm-config/services/access/validate.js +134 -0
- package/dist/feature/swarm-config/services/access/validate.js.map +1 -0
- package/dist/feature/swarm-config/services/assemble.js +52 -2
- package/dist/feature/swarm-config/services/assemble.js.map +1 -1
- package/dist/feature/swarm-config/services/index.js +3 -2
- package/dist/feature/swarm-config/services/index.js.map +1 -1
- package/dist/feature/swarm-config/services/load.js +22 -2
- package/dist/feature/swarm-config/services/load.js.map +1 -1
- package/dist/feature/swarm-config/services/sections/mcp-servers.js +33 -5
- package/dist/feature/swarm-config/services/sections/mcp-servers.js.map +1 -1
- package/dist/feature/swarm-config/services/sections/provider-access.js +158 -0
- package/dist/feature/swarm-config/services/sections/provider-access.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/provider-models.js +56 -0
- package/dist/feature/swarm-config/services/sections/provider-models.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/providers.js +105 -0
- package/dist/feature/swarm-config/services/sections/providers.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/queue.js +3 -2
- package/dist/feature/swarm-config/services/sections/queue.js.map +1 -1
- package/dist/feature/swarm-config/services/sections/roles.js +27 -0
- package/dist/feature/swarm-config/services/sections/roles.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/server-saml.js +116 -0
- package/dist/feature/swarm-config/services/sections/server-saml.js.map +1 -0
- package/dist/feature/swarm-config/services/sections/server.js +272 -0
- package/dist/feature/swarm-config/services/sections/server.js.map +1 -0
- package/dist/feature/swarm-config/services/settings.js +36 -2
- package/dist/feature/swarm-config/services/settings.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-runtimes.js +60 -6
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-settings.js +51 -3
- package/dist/feature/swarm-config/services/validate-settings.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-specialists.js +23 -0
- package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -1
- package/dist/feature/swarm-config/services/validate.js +42 -3
- package/dist/feature/swarm-config/services/validate.js.map +1 -1
- package/dist/feature/swarm-config/types/access/index.js +2 -0
- package/dist/feature/swarm-config/types/access/index.js.map +1 -0
- package/dist/feature/swarm-config/types/access/policy.js +10 -0
- package/dist/feature/swarm-config/types/access/policy.js.map +1 -0
- package/dist/feature/swarm-config/types/chain.js +9 -1
- package/dist/feature/swarm-config/types/chain.js.map +1 -1
- package/dist/feature/swarm-config/types/index.js +3 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -1
- package/dist/feature/swarm-config/types/levels.js +1 -0
- package/dist/feature/swarm-config/types/levels.js.map +1 -1
- package/dist/feature/swarm-config/types/machine/machine-settings.js +45 -0
- package/dist/feature/swarm-config/types/machine/machine-settings.js.map +1 -0
- package/dist/feature/swarm-config/types/merge.js +2 -0
- package/dist/feature/swarm-config/types/merge.js.map +1 -1
- package/dist/feature/swarm-config/types/providers/provider.js +55 -0
- package/dist/feature/swarm-config/types/providers/provider.js.map +1 -0
- package/dist/feature/swarm-config/types/settings.js +42 -52
- package/dist/feature/swarm-config/types/settings.js.map +1 -1
- package/dist/feature/swarm-config/types/skills/index.js +3 -0
- package/dist/feature/swarm-config/types/skills/index.js.map +1 -0
- package/dist/feature/swarm-config/types/skills/semver.js +250 -0
- package/dist/feature/swarm-config/types/skills/semver.js.map +1 -0
- package/dist/feature/swarm-config/types/skills/skill-ref.js +35 -0
- package/dist/feature/swarm-config/types/skills/skill-ref.js.map +1 -0
- package/dist/feature/swarm-config/types/specialist.js +8 -1
- package/dist/feature/swarm-config/types/specialist.js.map +1 -1
- package/dist/feature/swarm-config/types/web/index.js +2 -0
- package/dist/feature/swarm-config/types/web/index.js.map +1 -0
- package/dist/feature/swarm-config/types/web/settings.js +14 -0
- package/dist/feature/swarm-config/types/web/settings.js.map +1 -0
- package/dist/feature/swarm-edit/services/config-edits.js +19 -5
- package/dist/feature/swarm-edit/services/config-edits.js.map +1 -1
- package/dist/feature/swarm-edit/services/editor-settings.js +1 -0
- package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -1
- package/dist/feature/swarm-edit/services/editor-view.js +11 -1
- package/dist/feature/swarm-edit/services/editor-view.js.map +1 -1
- package/dist/feature/swarm-edit/services/index.js +1 -1
- package/dist/feature/swarm-edit/services/index.js.map +1 -1
- package/dist/feature/swarm-edit/services/levels.js +1 -0
- package/dist/feature/swarm-edit/services/levels.js.map +1 -1
- package/dist/feature/swarm-edit/services/mcp/editor-mcp.js +2 -0
- package/dist/feature/swarm-edit/services/mcp/editor-mcp.js.map +1 -1
- package/dist/feature/swarm-edit/services/plan-edit.js +9 -4
- package/dist/feature/swarm-edit/services/plan-edit.js.map +1 -1
- package/dist/feature/swarm-edit/services/plan-settings.js +4 -2
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -1
- package/dist/feature/swarm-edit/services/references.js +36 -1
- package/dist/feature/swarm-edit/services/references.js.map +1 -1
- package/dist/feature/swarm-edit/services/shared-config.js +5 -0
- package/dist/feature/swarm-edit/services/shared-config.js.map +1 -1
- package/dist/feature/swarm-edit/types/editor.js +3 -1
- package/dist/feature/swarm-edit/types/editor.js.map +1 -1
- package/dist/feature/swarm-edit/types/setting-fields.js +4 -2
- package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -1
- package/dist/feature/swarm-edit/types/stages.js +1 -0
- package/dist/feature/swarm-edit/types/stages.js.map +1 -1
- package/dist/feature/tags/types/tags.js +0 -4
- package/dist/feature/tags/types/tags.js.map +1 -1
- package/dist/platform/archive/index.js +2 -0
- package/dist/platform/archive/index.js.map +1 -0
- package/dist/platform/archive/zip.js +164 -0
- package/dist/platform/archive/zip.js.map +1 -0
- package/dist/platform/files/index.js +2 -0
- package/dist/platform/files/index.js.map +1 -0
- package/dist/platform/files/read.js +20 -0
- package/dist/platform/files/read.js.map +1 -0
- package/dist/platform/git/authorship.js +12 -0
- package/dist/platform/git/authorship.js.map +1 -0
- package/dist/platform/git/changes.js +26 -0
- package/dist/platform/git/changes.js.map +1 -0
- package/dist/platform/git/delivery.js +8 -20
- package/dist/platform/git/delivery.js.map +1 -1
- package/dist/platform/git/index.js +3 -0
- package/dist/platform/git/index.js.map +1 -1
- package/dist/platform/git/remote.js +69 -0
- package/dist/platform/git/remote.js.map +1 -0
- package/dist/platform/git/workspace.js +3 -4
- package/dist/platform/git/workspace.js.map +1 -1
- package/dist/platform/http/index.js +3 -0
- package/dist/platform/http/index.js.map +1 -0
- package/dist/platform/http/request.js +157 -0
- package/dist/platform/http/request.js.map +1 -0
- package/dist/platform/http/websocket-frames.js +155 -0
- package/dist/platform/http/websocket-frames.js.map +1 -0
- package/dist/platform/http/websocket.js +259 -0
- package/dist/platform/http/websocket.js.map +1 -0
- package/dist/platform/paths/index.js +1 -1
- package/dist/platform/paths/index.js.map +1 -1
- package/dist/platform/paths/paths.js +6 -0
- package/dist/platform/paths/paths.js.map +1 -1
- package/dist/platform/secrets/command.js +30 -0
- package/dist/platform/secrets/command.js.map +1 -0
- package/dist/platform/secrets/errors.js +16 -0
- package/dist/platform/secrets/errors.js.map +1 -0
- package/dist/platform/secrets/file-key.js +43 -0
- package/dist/platform/secrets/file-key.js.map +1 -0
- package/dist/platform/secrets/file.js +158 -0
- package/dist/platform/secrets/file.js.map +1 -0
- package/dist/platform/secrets/index.js +6 -0
- package/dist/platform/secrets/index.js.map +1 -0
- package/dist/platform/secrets/keyring.js +73 -0
- package/dist/platform/secrets/keyring.js.map +1 -0
- package/dist/platform/secrets/select.js +124 -0
- package/dist/platform/secrets/select.js.map +1 -0
- package/dist/platform/secrets/store.js +2 -0
- package/dist/platform/secrets/store.js.map +1 -0
- package/dist/platform/sqlite/authorship-migration.js +23 -0
- package/dist/platform/sqlite/authorship-migration.js.map +1 -0
- package/dist/platform/sqlite/identity-migration.js +52 -0
- package/dist/platform/sqlite/identity-migration.js.map +1 -0
- package/dist/platform/sqlite/integrations-migration.js +147 -0
- package/dist/platform/sqlite/integrations-migration.js.map +1 -0
- package/dist/platform/sqlite/parts.js +32 -1
- package/dist/platform/sqlite/parts.js.map +1 -1
- package/dist/platform/sqlite/saml-migration.js +9 -0
- package/dist/platform/sqlite/saml-migration.js.map +1 -0
- package/dist/platform/sqlite/sso-migration.js +17 -0
- package/dist/platform/sqlite/sso-migration.js.map +1 -0
- package/dist/platform/sqlite/stats-migration.js +8 -0
- package/dist/platform/sqlite/stats-migration.js.map +1 -1
- package/dist/presentation/cli/commands/daemon.js +5 -3
- package/dist/presentation/cli/commands/daemon.js.map +1 -1
- package/dist/presentation/cli/commands/integration/index.js +3 -0
- package/dist/presentation/cli/commands/integration/index.js.map +1 -0
- package/dist/presentation/cli/commands/integration/integrations.js +239 -0
- package/dist/presentation/cli/commands/integration/integrations.js.map +1 -0
- package/dist/presentation/cli/commands/integration/skills.js +24 -0
- package/dist/presentation/cli/commands/integration/skills.js.map +1 -0
- package/dist/presentation/cli/commands/mcp.js +23 -1
- package/dist/presentation/cli/commands/mcp.js.map +1 -1
- package/dist/presentation/cli/commands/notify/index.js +2 -0
- package/dist/presentation/cli/commands/notify/index.js.map +1 -0
- package/dist/presentation/cli/commands/notify/notify.js +145 -0
- package/dist/presentation/cli/commands/notify/notify.js.map +1 -0
- package/dist/presentation/cli/commands/provider/index.js +2 -0
- package/dist/presentation/cli/commands/provider/index.js.map +1 -0
- package/dist/presentation/cli/commands/provider/provider.js +49 -0
- package/dist/presentation/cli/commands/provider/provider.js.map +1 -0
- package/dist/presentation/cli/commands/queue-edit.js +17 -26
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -1
- package/dist/presentation/cli/commands/queue.js +3 -2
- package/dist/presentation/cli/commands/queue.js.map +1 -1
- package/dist/presentation/cli/commands/run-delivery.js +47 -2
- package/dist/presentation/cli/commands/run-delivery.js.map +1 -1
- package/dist/presentation/cli/commands/run.js +28 -7
- package/dist/presentation/cli/commands/run.js.map +1 -1
- package/dist/presentation/cli/commands/server/access.js +43 -0
- package/dist/presentation/cli/commands/server/access.js.map +1 -0
- package/dist/presentation/cli/commands/server/admin.js +118 -0
- package/dist/presentation/cli/commands/server/admin.js.map +1 -0
- package/dist/presentation/cli/commands/server/apply.js +82 -0
- package/dist/presentation/cli/commands/server/apply.js.map +1 -0
- package/dist/presentation/cli/commands/server/audit.js +38 -0
- package/dist/presentation/cli/commands/server/audit.js.map +1 -0
- package/dist/presentation/cli/commands/server/login.js +141 -0
- package/dist/presentation/cli/commands/server/login.js.map +1 -0
- package/dist/presentation/cli/commands/server/profile.js +38 -0
- package/dist/presentation/cli/commands/server/profile.js.map +1 -0
- package/dist/presentation/cli/commands/server/register.js +12 -0
- package/dist/presentation/cli/commands/server/register.js.map +1 -0
- package/dist/presentation/cli/commands/server/repository.js +34 -0
- package/dist/presentation/cli/commands/server/repository.js.map +1 -0
- package/dist/presentation/cli/commands/stats.js +10 -1
- package/dist/presentation/cli/commands/stats.js.map +1 -1
- package/dist/presentation/cli/commands/web.js +26 -5
- package/dist/presentation/cli/commands/web.js.map +1 -1
- package/dist/presentation/cli/commands/webhook/index.js +2 -0
- package/dist/presentation/cli/commands/webhook/index.js.map +1 -0
- package/dist/presentation/cli/commands/webhook/webhook.js +172 -0
- package/dist/presentation/cli/commands/webhook/webhook.js.map +1 -0
- package/dist/presentation/cli/context.js +34 -2
- package/dist/presentation/cli/context.js.map +1 -1
- package/dist/presentation/cli/help.js +21 -2
- package/dist/presentation/cli/help.js.map +1 -1
- package/dist/presentation/cli/io.js.map +1 -1
- package/dist/presentation/cli/local/config-check-providers.js +47 -0
- package/dist/presentation/cli/local/config-check-providers.js.map +1 -0
- package/dist/presentation/cli/local/config-check.js +24 -9
- package/dist/presentation/cli/local/config-check.js.map +1 -1
- package/dist/presentation/cli/options.js +53 -0
- package/dist/presentation/cli/options.js.map +1 -1
- package/dist/presentation/cli/program.js +10 -0
- package/dist/presentation/cli/program.js.map +1 -1
- package/dist/presentation/cli/queue-add.js +54 -35
- package/dist/presentation/cli/queue-add.js.map +1 -1
- package/dist/presentation/cli/queue-print.js +34 -1
- package/dist/presentation/cli/queue-print.js.map +1 -1
- package/dist/presentation/cli/secret-keys.js +38 -0
- package/dist/presentation/cli/secret-keys.js.map +1 -0
- package/dist/presentation/format/access/access.js +30 -0
- package/dist/presentation/format/access/access.js.map +1 -0
- package/dist/presentation/format/access/index.js +2 -0
- package/dist/presentation/format/access/index.js.map +1 -0
- package/dist/presentation/format/audit/audit.js +29 -0
- package/dist/presentation/format/audit/audit.js.map +1 -0
- package/dist/presentation/format/audit/index.js +2 -0
- package/dist/presentation/format/audit/index.js.map +1 -0
- package/dist/presentation/format/groups.js +13 -0
- package/dist/presentation/format/groups.js.map +1 -1
- package/dist/presentation/format/index.js +6 -0
- package/dist/presentation/format/index.js.map +1 -1
- package/dist/presentation/format/integration/index.js +3 -0
- package/dist/presentation/format/integration/index.js.map +1 -0
- package/dist/presentation/format/integration/integrations.js +95 -0
- package/dist/presentation/format/integration/integrations.js.map +1 -0
- package/dist/presentation/format/integration/skills.js +17 -0
- package/dist/presentation/format/integration/skills.js.map +1 -0
- package/dist/presentation/format/notifications/index.js +2 -0
- package/dist/presentation/format/notifications/index.js.map +1 -0
- package/dist/presentation/format/notifications/notifications.js +44 -0
- package/dist/presentation/format/notifications/notifications.js.map +1 -0
- package/dist/presentation/format/overview.js +2 -1
- package/dist/presentation/format/overview.js.map +1 -1
- package/dist/presentation/format/providers/index.js +3 -0
- package/dist/presentation/format/providers/index.js.map +1 -0
- package/dist/presentation/format/providers/provider-list.js +72 -0
- package/dist/presentation/format/providers/provider-list.js.map +1 -0
- package/dist/presentation/format/providers/providers.js +13 -0
- package/dist/presentation/format/providers/providers.js.map +1 -0
- package/dist/presentation/format/queue.js +8 -3
- package/dist/presentation/format/queue.js.map +1 -1
- package/dist/presentation/format/runs.js +36 -3
- package/dist/presentation/format/runs.js.map +1 -1
- package/dist/presentation/format/stats.js +9 -3
- package/dist/presentation/format/stats.js.map +1 -1
- package/dist/presentation/format/table.js +3 -2
- package/dist/presentation/format/table.js.map +1 -1
- package/dist/presentation/format/webhooks/index.js +2 -0
- package/dist/presentation/format/webhooks/index.js.map +1 -0
- package/dist/presentation/format/webhooks/webhooks.js +59 -0
- package/dist/presentation/format/webhooks/webhooks.js.map +1 -0
- package/dist/presentation/ipc/client/address.js +8 -0
- package/dist/presentation/ipc/client/address.js.map +1 -0
- package/dist/presentation/ipc/client/client.js +23 -6
- package/dist/presentation/ipc/client/client.js.map +1 -1
- package/dist/presentation/ipc/client/index.js +1 -0
- package/dist/presentation/ipc/client/index.js.map +1 -1
- package/dist/presentation/ipc/client/remote.js +85 -0
- package/dist/presentation/ipc/client/remote.js.map +1 -0
- package/dist/presentation/ipc/contract/access/access.js +21 -0
- package/dist/presentation/ipc/contract/access/access.js.map +1 -0
- package/dist/presentation/ipc/contract/access/index.js +2 -0
- package/dist/presentation/ipc/contract/access/index.js.map +1 -0
- package/dist/presentation/ipc/contract/agents.js +7 -10
- package/dist/presentation/ipc/contract/agents.js.map +1 -1
- package/dist/presentation/ipc/contract/config.js +14 -1
- package/dist/presentation/ipc/contract/config.js.map +1 -1
- package/dist/presentation/ipc/contract/envelope.js +90 -6
- package/dist/presentation/ipc/contract/envelope.js.map +1 -1
- package/dist/presentation/ipc/contract/identity/audit.js +21 -0
- package/dist/presentation/ipc/contract/identity/audit.js.map +1 -0
- package/dist/presentation/ipc/contract/identity/identity.js +120 -0
- package/dist/presentation/ipc/contract/identity/identity.js.map +1 -0
- package/dist/presentation/ipc/contract/identity/index.js +3 -0
- package/dist/presentation/ipc/contract/identity/index.js.map +1 -0
- package/dist/presentation/ipc/contract/index.js +6 -0
- package/dist/presentation/ipc/contract/index.js.map +1 -1
- package/dist/presentation/ipc/contract/integrations/integrations.js +85 -0
- package/dist/presentation/ipc/contract/integrations/integrations.js.map +1 -0
- package/dist/presentation/ipc/contract/integrations/remote.js +16 -0
- package/dist/presentation/ipc/contract/integrations/remote.js.map +1 -0
- package/dist/presentation/ipc/contract/notifications/notifications.js +44 -0
- package/dist/presentation/ipc/contract/notifications/notifications.js.map +1 -0
- package/dist/presentation/ipc/contract/notifications/webhooks.js +48 -0
- package/dist/presentation/ipc/contract/notifications/webhooks.js.map +1 -0
- package/dist/presentation/ipc/contract/panel.js +5 -1
- package/dist/presentation/ipc/contract/panel.js.map +1 -1
- package/dist/presentation/ipc/contract/queue.js +48 -3
- package/dist/presentation/ipc/contract/queue.js.map +1 -1
- package/dist/presentation/ipc/contract/repositories.js +4 -0
- package/dist/presentation/ipc/contract/repositories.js.map +1 -1
- package/dist/presentation/ipc/contract/responses/stats.js +3 -0
- package/dist/presentation/ipc/contract/responses/stats.js.map +1 -1
- package/dist/presentation/ipc/contract/runs.js +18 -1
- package/dist/presentation/ipc/contract/runs.js.map +1 -1
- package/dist/presentation/ipc/contract/stats/stats.js +2 -0
- package/dist/presentation/ipc/contract/stats/stats.js.map +1 -1
- package/dist/presentation/ipc/contract/tags.js +9 -1
- package/dist/presentation/ipc/contract/tags.js.map +1 -1
- package/dist/presentation/ipc/handlers/access/access.js +74 -0
- package/dist/presentation/ipc/handlers/access/access.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/author.js +25 -0
- package/dist/presentation/ipc/handlers/access/author.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/guard.js +57 -0
- package/dist/presentation/ipc/handlers/access/guard.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/index.js +5 -0
- package/dist/presentation/ipc/handlers/access/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/method-actions.js +13 -0
- package/dist/presentation/ipc/handlers/access/method-actions.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/method-runs.js +76 -0
- package/dist/presentation/ipc/handlers/access/method-runs.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/method-settings.js +120 -0
- package/dist/presentation/ipc/handlers/access/method-settings.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/resource.js +129 -0
- package/dist/presentation/ipc/handlers/access/resource.js.map +1 -0
- package/dist/presentation/ipc/handlers/access/visible.js +13 -0
- package/dist/presentation/ipc/handlers/access/visible.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-account-actions.js +52 -0
- package/dist/presentation/ipc/handlers/audit/audit-account-actions.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-actions.js +220 -0
- package/dist/presentation/ipc/handlers/audit/audit-actions.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-helpers.js +56 -0
- package/dist/presentation/ipc/handlers/audit/audit-helpers.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-list.js +57 -0
- package/dist/presentation/ipc/handlers/audit/audit-list.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-readers.js +74 -0
- package/dist/presentation/ipc/handlers/audit/audit-readers.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-settings-actions.js +73 -0
- package/dist/presentation/ipc/handlers/audit/audit-settings-actions.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit-table.js +10 -0
- package/dist/presentation/ipc/handlers/audit/audit-table.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/audit.js +101 -0
- package/dist/presentation/ipc/handlers/audit/audit.js.map +1 -0
- package/dist/presentation/ipc/handlers/audit/index.js +5 -0
- package/dist/presentation/ipc/handlers/audit/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/identity/identity.js +182 -0
- package/dist/presentation/ipc/handlers/identity/identity.js.map +1 -0
- package/dist/presentation/ipc/handlers/identity/index.js +2 -0
- package/dist/presentation/ipc/handlers/identity/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/integrations/index.js +6 -0
- package/dist/presentation/ipc/handlers/integrations/index.js.map +1 -0
- package/dist/presentation/ipc/handlers/integrations/integrations.js +114 -0
- package/dist/presentation/ipc/handlers/integrations/integrations.js.map +1 -0
- package/dist/presentation/ipc/handlers/integrations/notifications.js +49 -0
- package/dist/presentation/ipc/handlers/integrations/notifications.js.map +1 -0
- package/dist/presentation/ipc/handlers/integrations/remote.js +35 -0
- package/dist/presentation/ipc/handlers/integrations/remote.js.map +1 -0
- package/dist/presentation/ipc/handlers/integrations/skills.js +18 -0
- package/dist/presentation/ipc/handlers/integrations/skills.js.map +1 -0
- package/dist/presentation/ipc/handlers/integrations/webhooks.js +30 -0
- package/dist/presentation/ipc/handlers/integrations/webhooks.js.map +1 -0
- package/dist/presentation/ipc/handlers/observers.js +10 -2
- package/dist/presentation/ipc/handlers/observers.js.map +1 -1
- package/dist/presentation/ipc/handlers/providers.js +84 -0
- package/dist/presentation/ipc/handlers/providers.js.map +1 -0
- package/dist/presentation/ipc/handlers/queue.js +78 -20
- package/dist/presentation/ipc/handlers/queue.js.map +1 -1
- package/dist/presentation/ipc/handlers/repositories.js +32 -14
- package/dist/presentation/ipc/handlers/repositories.js.map +1 -1
- package/dist/presentation/ipc/handlers/runs.js +14 -5
- package/dist/presentation/ipc/handlers/runs.js.map +1 -1
- package/dist/presentation/ipc/handlers/stats.js +27 -6
- package/dist/presentation/ipc/handlers/stats.js.map +1 -1
- package/dist/presentation/ipc/handlers/system.js +8 -1
- package/dist/presentation/ipc/handlers/system.js.map +1 -1
- package/dist/presentation/ipc/handlers/table.js +20 -3
- package/dist/presentation/ipc/handlers/table.js.map +1 -1
- package/dist/presentation/ipc/log-signals.js +78 -0
- package/dist/presentation/ipc/log-signals.js.map +1 -0
- package/dist/presentation/ipc/publisher.js +20 -3
- package/dist/presentation/ipc/publisher.js.map +1 -1
- package/dist/presentation/ipc/server.js +58 -14
- package/dist/presentation/ipc/server.js.map +1 -1
- package/dist/presentation/ipc/snapshots.js +24 -4
- package/dist/presentation/ipc/snapshots.js.map +1 -1
- package/dist/presentation/ipc/views/global-queue.js +2 -1
- package/dist/presentation/ipc/views/global-queue.js.map +1 -1
- package/dist/presentation/ipc/views/groups.js +13 -0
- package/dist/presentation/ipc/views/groups.js.map +1 -1
- package/dist/presentation/ipc/views/index.js +2 -0
- package/dist/presentation/ipc/views/index.js.map +1 -1
- package/dist/presentation/ipc/views/notifications/notifications.js +7 -0
- package/dist/presentation/ipc/views/notifications/notifications.js.map +1 -0
- package/dist/presentation/ipc/views/notifications/webhooks.js +6 -0
- package/dist/presentation/ipc/views/notifications/webhooks.js.map +1 -0
- package/dist/presentation/ipc/views/queue.js +34 -7
- package/dist/presentation/ipc/views/queue.js.map +1 -1
- package/dist/presentation/ipc/views/runs.js +21 -8
- package/dist/presentation/ipc/views/runs.js.map +1 -1
- package/dist/presentation/ipc/views/stats.js +11 -3
- package/dist/presentation/ipc/views/stats.js.map +1 -1
- package/dist/presentation/mcp/host-kit.js +7 -0
- package/dist/presentation/mcp/host-kit.js.map +1 -1
- package/dist/presentation/mcp/host-queue-control.js +1 -1
- package/dist/presentation/mcp/host-queue-control.js.map +1 -1
- package/dist/presentation/mcp/host-queue.js +25 -21
- package/dist/presentation/mcp/host-queue.js.map +1 -1
- package/dist/presentation/mcp/host-runs.js +24 -16
- package/dist/presentation/mcp/host-runs.js.map +1 -1
- package/dist/presentation/mcp/host.js +2 -1
- package/dist/presentation/mcp/host.js.map +1 -1
- package/dist/presentation/mcp/index.js +1 -0
- package/dist/presentation/mcp/index.js.map +1 -1
- package/dist/presentation/mcp/remote-bridge.js +50 -0
- package/dist/presentation/mcp/remote-bridge.js.map +1 -0
- package/dist/presentation/mcp/tools.js +18 -0
- package/dist/presentation/mcp/tools.js.map +1 -1
- package/dist/presentation/mcp/worker-extra.js +86 -16
- package/dist/presentation/mcp/worker-extra.js.map +1 -1
- package/dist/presentation/mcp/worker-tools.js.map +1 -1
- package/dist/presentation/mcp/worker.js +2 -1
- package/dist/presentation/mcp/worker.js.map +1 -1
- package/dist/presentation/web/access.js +42 -0
- package/dist/presentation/web/access.js.map +1 -0
- package/dist/presentation/web/auth/context.js +3 -0
- package/dist/presentation/web/auth/context.js.map +1 -0
- package/dist/presentation/web/auth/gate.js +33 -0
- package/dist/presentation/web/auth/gate.js.map +1 -0
- package/dist/presentation/web/auth/oidc.js +49 -0
- package/dist/presentation/web/auth/oidc.js.map +1 -0
- package/dist/presentation/web/auth/pages.js +43 -0
- package/dist/presentation/web/auth/pages.js.map +1 -0
- package/dist/presentation/web/auth/proxy.js +54 -0
- package/dist/presentation/web/auth/proxy.js.map +1 -0
- package/dist/presentation/web/auth/routes.js +152 -0
- package/dist/presentation/web/auth/routes.js.map +1 -0
- package/dist/presentation/web/auth/saml.js +65 -0
- package/dist/presentation/web/auth/saml.js.map +1 -0
- package/dist/presentation/web/auth/session.js +53 -0
- package/dist/presentation/web/auth/session.js.map +1 -0
- package/dist/presentation/web/errors.js +18 -1
- package/dist/presentation/web/errors.js.map +1 -1
- package/dist/presentation/web/hub.js +101 -22
- package/dist/presentation/web/hub.js.map +1 -1
- package/dist/presentation/web/live/protocol.js +68 -0
- package/dist/presentation/web/live/protocol.js.map +1 -0
- package/dist/presentation/web/live/read.js +29 -0
- package/dist/presentation/web/live/read.js.map +1 -0
- package/dist/presentation/web/live/socket.js +93 -0
- package/dist/presentation/web/live/socket.js.map +1 -0
- package/dist/presentation/web/live/state-topics.js +127 -0
- package/dist/presentation/web/live/state-topics.js.map +1 -0
- package/dist/presentation/web/live/topics.js +119 -0
- package/dist/presentation/web/live/topics.js.map +1 -0
- package/dist/presentation/web/options.js.map +1 -1
- package/dist/presentation/web/panel/daemon-panel.js +24 -4
- package/dist/presentation/web/panel/daemon-panel.js.map +1 -1
- package/dist/presentation/web/request.js +42 -3
- package/dist/presentation/web/request.js.map +1 -1
- package/dist/presentation/web/routes/access/access.js +14 -0
- package/dist/presentation/web/routes/access/access.js.map +1 -0
- package/dist/presentation/web/routes/audit/audit.js +11 -0
- package/dist/presentation/web/routes/audit/audit.js.map +1 -0
- package/dist/presentation/web/routes/integrations/integrations.js +147 -0
- package/dist/presentation/web/routes/integrations/integrations.js.map +1 -0
- package/dist/presentation/web/routes/integrations/webhooks.js +73 -0
- package/dist/presentation/web/routes/integrations/webhooks.js.map +1 -0
- package/dist/presentation/web/routes/providers/providers.js +64 -0
- package/dist/presentation/web/routes/providers/providers.js.map +1 -0
- package/dist/presentation/web/routes/queue.js +1 -1
- package/dist/presentation/web/routes/queue.js.map +1 -1
- package/dist/presentation/web/routes/runs.js +20 -20
- package/dist/presentation/web/routes/runs.js.map +1 -1
- package/dist/presentation/web/routes/system.js +21 -13
- package/dist/presentation/web/routes/system.js.map +1 -1
- package/dist/presentation/web/routes/tags.js +5 -1
- package/dist/presentation/web/routes/tags.js.map +1 -1
- package/dist/presentation/web/server.js +97 -17
- package/dist/presentation/web/server.js.map +1 -1
- package/dist/presentation/web/visible.js +93 -0
- package/dist/presentation/web/visible.js.map +1 -0
- package/dist/web/assets/EntryList-CMEscRod.js +3 -0
- package/dist/web/assets/FilterField-BQc_UwWN.js +7 -0
- package/dist/web/assets/LinkTabs-v8NyjDyU.js +4 -0
- package/dist/web/assets/SharedPipelinesGroup-BzlZ5U2Y.js +1 -0
- package/dist/web/assets/deliveryModes-CHEVNJxR.js +1 -0
- package/dist/web/assets/empty-Bho47NOE.js +41 -0
- package/dist/web/assets/index-vRNf1iRZ.css +2 -0
- package/dist/web/assets/index-ztjIJ-Ig.js +41 -0
- package/dist/web/assets/locales-BTrmAl7v.js +1 -0
- package/dist/web/assets/pipelines-DVZ7cqyZ.js +14 -0
- package/dist/web/assets/settingFields-iGwxRKJI.js +1 -0
- package/dist/web/assets/settings-DN_KmJBg.js +6 -0
- package/dist/web/assets/stats-4iy1ZRny.js +1 -0
- package/dist/web/assets/tabs-D26rwwNs.js +1 -0
- package/dist/web/assets/toggle-group-D-oIoacR.js +1 -0
- package/dist/web/assets/topology-CaSfGJbk.js +1 -0
- package/dist/web/index.html +10 -7
- package/integrations/claude-code/.claude-plugin/plugin.json +1 -1
- package/package.json +12 -4
- package/dist/feature/runs/services/effects/proxy.js +0 -5
- package/dist/feature/runs/services/effects/proxy.js.map +0 -1
- package/dist/web/assets/FilterColumn-z60UZhkk.js +0 -1
- package/dist/web/assets/SharedPipelinesGroup-CgUJ-sUc.js +0 -1
- package/dist/web/assets/card-4euJkmfJ.js +0 -1
- package/dist/web/assets/deliveryModes-BGIYJzWQ.js +0 -1
- package/dist/web/assets/empty-OZRGgwa5.js +0 -41
- package/dist/web/assets/index-Cg7gL5P8.css +0 -2
- package/dist/web/assets/index-LD1g1Vkm.js +0 -43
- package/dist/web/assets/locales-D85Vnmev.js +0 -1
- package/dist/web/assets/pipelines-Cej37cah.js +0 -14
- package/dist/web/assets/settingFields-gm9TlqxP.js +0 -1
- package/dist/web/assets/settings-CDiTeiYL.js +0 -6
- package/dist/web/assets/specialists-BGKB5BLI.js +0 -4
- package/dist/web/assets/stats-BM-bGkGX.js +0 -1
- package/dist/web/assets/topology-BE6orrOL.js +0 -1
- package/dist/web/assets/trash-xUZ90-AG.js +0 -1
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { isIP } from 'node:net';
|
|
2
|
+
import { addError, join, readBoolean, readEntries, readMapping, readString, readStrings, } from '../validate-context.js';
|
|
3
|
+
import { checkSaml } from './server-saml.js';
|
|
4
|
+
import {} from '../../types/errors.js';
|
|
5
|
+
import { ACCESS_ROLES, isAccessRole } from '../../types/access/index.js';
|
|
6
|
+
import { DEFAULT_OIDC_SCOPES, defaultServer, } from '../../types/settings.js';
|
|
7
|
+
const SERVER_KEYS = [
|
|
8
|
+
'enabled',
|
|
9
|
+
'listen',
|
|
10
|
+
'public_url',
|
|
11
|
+
'trusted_proxies',
|
|
12
|
+
'session_ttl',
|
|
13
|
+
'token_max_ttl',
|
|
14
|
+
'sso',
|
|
15
|
+
'audit_retention',
|
|
16
|
+
'commit_trailer',
|
|
17
|
+
'default_role',
|
|
18
|
+
];
|
|
19
|
+
const SSO_KEYS = ['oidc', 'saml'];
|
|
20
|
+
const OIDC_KEYS = [
|
|
21
|
+
'issuer',
|
|
22
|
+
'client_id',
|
|
23
|
+
'client_secret_env',
|
|
24
|
+
'scopes',
|
|
25
|
+
'label',
|
|
26
|
+
'claims',
|
|
27
|
+
'attributes',
|
|
28
|
+
'allowed_domains',
|
|
29
|
+
];
|
|
30
|
+
const ENV_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
31
|
+
const DOMAIN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i;
|
|
32
|
+
function issuerProblem(value) {
|
|
33
|
+
let url;
|
|
34
|
+
try {
|
|
35
|
+
url = new URL(value);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return 'must be a URL such as `https://sso.example.com/realms/aip`';
|
|
39
|
+
}
|
|
40
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:')
|
|
41
|
+
return 'must use http or https';
|
|
42
|
+
if (url.search !== '' || url.hash !== '')
|
|
43
|
+
return 'must have no query or fragment';
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
function checkClaims(ctx, value, path, oidc) {
|
|
47
|
+
const mapping = readMapping(ctx, value, path);
|
|
48
|
+
if (!mapping)
|
|
49
|
+
return;
|
|
50
|
+
for (const [key, field] of readEntries(ctx, mapping, path, ['email', 'name'])) {
|
|
51
|
+
const text = readString(ctx, field, join(path, key));
|
|
52
|
+
if (text !== null)
|
|
53
|
+
oidc.claims[key] = text;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function checkAttributes(ctx, value, path, oidc) {
|
|
57
|
+
const mapping = readMapping(ctx, value, path);
|
|
58
|
+
if (!mapping)
|
|
59
|
+
return;
|
|
60
|
+
for (const [key, field] of readEntries(ctx, mapping, path, null)) {
|
|
61
|
+
const text = readString(ctx, field, join(path, key));
|
|
62
|
+
if (text !== null)
|
|
63
|
+
oidc.attributes[key] = text;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function checkOidcField(ctx, oidc, key, field, path) {
|
|
67
|
+
if (key === 'issuer') {
|
|
68
|
+
const value = readString(ctx, field, path);
|
|
69
|
+
const problem = value === null ? null : issuerProblem(value);
|
|
70
|
+
if (problem)
|
|
71
|
+
addError(ctx, path, problem);
|
|
72
|
+
else if (value !== null)
|
|
73
|
+
oidc.issuer = value;
|
|
74
|
+
}
|
|
75
|
+
if (key === 'client_id')
|
|
76
|
+
oidc.clientId = readString(ctx, field, path) ?? oidc.clientId;
|
|
77
|
+
if (key === 'client_secret_env') {
|
|
78
|
+
const value = readString(ctx, field, path);
|
|
79
|
+
if (value !== null && !ENV_NAME.test(value)) {
|
|
80
|
+
addError(ctx, path, 'must be the name of an environment variable');
|
|
81
|
+
}
|
|
82
|
+
else if (value !== null)
|
|
83
|
+
oidc.clientSecretEnv = value;
|
|
84
|
+
}
|
|
85
|
+
if (key === 'scopes') {
|
|
86
|
+
const items = readStrings(ctx, field, path);
|
|
87
|
+
if (items.length > 0)
|
|
88
|
+
oidc.scopes = items;
|
|
89
|
+
}
|
|
90
|
+
if (key === 'label')
|
|
91
|
+
oidc.label = readString(ctx, field, path) ?? oidc.label;
|
|
92
|
+
if (key === 'claims')
|
|
93
|
+
checkClaims(ctx, field, path, oidc);
|
|
94
|
+
if (key === 'attributes')
|
|
95
|
+
checkAttributes(ctx, field, path, oidc);
|
|
96
|
+
if (key === 'allowed_domains') {
|
|
97
|
+
const items = readStrings(ctx, field, path);
|
|
98
|
+
items.forEach((item, index) => {
|
|
99
|
+
if (!DOMAIN.test(item))
|
|
100
|
+
addError(ctx, `${path}[${index}]`, 'must be a domain such as corp.com');
|
|
101
|
+
});
|
|
102
|
+
oidc.allowedDomains = items.filter((item) => DOMAIN.test(item)).map((d) => d.toLowerCase());
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function checkOidc(ctx, value, path) {
|
|
106
|
+
const mapping = readMapping(ctx, value, path);
|
|
107
|
+
if (!mapping)
|
|
108
|
+
return null;
|
|
109
|
+
const oidc = {
|
|
110
|
+
issuer: '',
|
|
111
|
+
clientId: '',
|
|
112
|
+
clientSecretEnv: '',
|
|
113
|
+
scopes: [...DEFAULT_OIDC_SCOPES],
|
|
114
|
+
label: 'SSO',
|
|
115
|
+
claims: { email: 'email', name: 'name' },
|
|
116
|
+
attributes: {},
|
|
117
|
+
allowedDomains: [],
|
|
118
|
+
};
|
|
119
|
+
if ('client_secret' in mapping) {
|
|
120
|
+
addError(ctx, join(path, 'client_secret'), 'the client secret must not be stored in settings.yaml; set `client_secret_env` to the name of an environment variable of the daemon');
|
|
121
|
+
}
|
|
122
|
+
const keys = [...OIDC_KEYS, 'client_secret'];
|
|
123
|
+
const before = ctx.errors.length;
|
|
124
|
+
for (const [key, field] of readEntries(ctx, mapping, path, keys)) {
|
|
125
|
+
if (key !== 'client_secret')
|
|
126
|
+
checkOidcField(ctx, oidc, key, field, join(path, key));
|
|
127
|
+
}
|
|
128
|
+
for (const required of ['issuer', 'client_id', 'client_secret_env']) {
|
|
129
|
+
if (!(required in mapping))
|
|
130
|
+
addError(ctx, join(path, required), 'is required');
|
|
131
|
+
}
|
|
132
|
+
return ctx.errors.length === before ? oidc : null;
|
|
133
|
+
}
|
|
134
|
+
function checkSso(ctx, value, server) {
|
|
135
|
+
const path = 'swarm.server.sso';
|
|
136
|
+
const mapping = readMapping(ctx, value, path);
|
|
137
|
+
if (!mapping)
|
|
138
|
+
return;
|
|
139
|
+
for (const [key, field] of readEntries(ctx, mapping, path, SSO_KEYS)) {
|
|
140
|
+
if (key === 'oidc')
|
|
141
|
+
server.sso.oidc = checkOidc(ctx, field, join(path, key));
|
|
142
|
+
if (key === 'saml')
|
|
143
|
+
server.sso.saml = checkSaml(ctx, field, join(path, key));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const SESSION_TTL = /^[1-9]\d*[hd]$/;
|
|
147
|
+
const TOKEN_TTL = /^[1-9]\d*d$/;
|
|
148
|
+
const AUDIT_RETENTION = /^[1-9]\d*d$/;
|
|
149
|
+
/** `Name <email>`: a name without angle brackets, then an address in them. */
|
|
150
|
+
const TRAILER = /^[^<>\r\n]+ <[^<>\s@]+@[^<>\s@]+>$/;
|
|
151
|
+
function listenProblem(value) {
|
|
152
|
+
const match = /^(.+):(\d{1,5})$/.exec(value);
|
|
153
|
+
const port = match ? Number(match[2]) : 0;
|
|
154
|
+
if (!match || port < 1 || port > 65535)
|
|
155
|
+
return 'must be `<address>:<port>`';
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
function publicUrlProblem(value) {
|
|
159
|
+
let url;
|
|
160
|
+
try {
|
|
161
|
+
url = new URL(value);
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return 'must be a URL such as `https://aip.example.com`';
|
|
165
|
+
}
|
|
166
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:')
|
|
167
|
+
return 'must use http or https';
|
|
168
|
+
if (url.pathname !== '/' || url.search !== '' || url.hash !== '')
|
|
169
|
+
return 'must have no path';
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
function checkField(ctx, server, key, field, path) {
|
|
173
|
+
if (key === 'sso')
|
|
174
|
+
checkSso(ctx, field, server);
|
|
175
|
+
if (key === 'enabled')
|
|
176
|
+
server.enabled = readBoolean(ctx, field, path) ?? server.enabled;
|
|
177
|
+
if (key === 'listen') {
|
|
178
|
+
const value = readString(ctx, field, path);
|
|
179
|
+
const problem = value === null ? null : listenProblem(value);
|
|
180
|
+
if (problem)
|
|
181
|
+
addError(ctx, path, problem);
|
|
182
|
+
else if (value !== null)
|
|
183
|
+
server.listen = value;
|
|
184
|
+
}
|
|
185
|
+
if (key === 'public_url') {
|
|
186
|
+
const value = readString(ctx, field, path);
|
|
187
|
+
const problem = value === null ? null : publicUrlProblem(value);
|
|
188
|
+
if (problem)
|
|
189
|
+
addError(ctx, path, problem);
|
|
190
|
+
else if (value !== null)
|
|
191
|
+
server.publicUrl = value.replace(/\/$/, '');
|
|
192
|
+
}
|
|
193
|
+
if (key === 'trusted_proxies') {
|
|
194
|
+
const items = readStrings(ctx, field, path);
|
|
195
|
+
items.forEach((item, index) => {
|
|
196
|
+
if (isIP(item) === 0)
|
|
197
|
+
addError(ctx, `${path}[${index}]`, 'must be an IP address');
|
|
198
|
+
});
|
|
199
|
+
server.trustedProxies = items.filter((item) => isIP(item) !== 0);
|
|
200
|
+
}
|
|
201
|
+
if (key === 'session_ttl') {
|
|
202
|
+
const value = readString(ctx, field, path);
|
|
203
|
+
if (value !== null && !SESSION_TTL.test(value))
|
|
204
|
+
addError(ctx, path, 'must be `<n>h` or `<n>d`');
|
|
205
|
+
else if (value !== null)
|
|
206
|
+
server.sessionTtl = value;
|
|
207
|
+
}
|
|
208
|
+
if (key === 'token_max_ttl') {
|
|
209
|
+
const value = readString(ctx, field, path);
|
|
210
|
+
if (value !== null && !TOKEN_TTL.test(value))
|
|
211
|
+
addError(ctx, path, 'must be `<n>d`');
|
|
212
|
+
else if (value !== null)
|
|
213
|
+
server.tokenMaxTtl = value;
|
|
214
|
+
}
|
|
215
|
+
if (key === 'audit_retention') {
|
|
216
|
+
const value = readString(ctx, field, path);
|
|
217
|
+
if (value !== null && !AUDIT_RETENTION.test(value))
|
|
218
|
+
addError(ctx, path, 'must be `<n>d`');
|
|
219
|
+
else if (value !== null)
|
|
220
|
+
server.auditRetention = value;
|
|
221
|
+
}
|
|
222
|
+
if (key === 'commit_trailer') {
|
|
223
|
+
const value = readString(ctx, field, path)?.trim() ?? null;
|
|
224
|
+
if (value !== null && !TRAILER.test(value))
|
|
225
|
+
addError(ctx, path, 'must be `Name <email>`');
|
|
226
|
+
else if (value !== null)
|
|
227
|
+
server.commitTrailer = value;
|
|
228
|
+
}
|
|
229
|
+
if (key === 'default_role') {
|
|
230
|
+
const value = readString(ctx, field, path);
|
|
231
|
+
if (value !== null && !isAccessRole(value)) {
|
|
232
|
+
addError(ctx, path, `must be one of ${ACCESS_ROLES.join(', ')}`);
|
|
233
|
+
}
|
|
234
|
+
else if (value !== null)
|
|
235
|
+
server.defaultRole = value;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/** Checks `swarm.server`; fills `server` with the valid fields. */
|
|
239
|
+
export function checkServer(ctx, value, server) {
|
|
240
|
+
const mapping = readMapping(ctx, value, 'swarm.server');
|
|
241
|
+
if (!mapping)
|
|
242
|
+
return;
|
|
243
|
+
for (const [key, field] of readEntries(ctx, mapping, 'swarm.server', SERVER_KEYS)) {
|
|
244
|
+
checkField(ctx, server, key, field, join('swarm.server', key));
|
|
245
|
+
}
|
|
246
|
+
if (!server.enabled)
|
|
247
|
+
return;
|
|
248
|
+
if (server.publicUrl === null && !('public_url' in mapping)) {
|
|
249
|
+
addError(ctx, 'swarm.server.public_url', 'is required when server.enabled is true');
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/** Server mode needs the panel and a login: the shared token and `autostart: false` conflict. */
|
|
253
|
+
export function checkServerWeb(ctx, server, web) {
|
|
254
|
+
if (!server.enabled)
|
|
255
|
+
return;
|
|
256
|
+
if (web.auth === 'none') {
|
|
257
|
+
addError(ctx, 'swarm.web.auth', 'must not be `none` when server.enabled is true');
|
|
258
|
+
}
|
|
259
|
+
if (!web.autostart) {
|
|
260
|
+
addError(ctx, 'swarm.web.autostart', 'must not be false when server.enabled is true');
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/** Checks the `server` section alone together with `web`; `value` is the content of `swarm.server`. */
|
|
264
|
+
export function validateServerSection(value, web) {
|
|
265
|
+
const ctx = { errors: [] };
|
|
266
|
+
const server = defaultServer();
|
|
267
|
+
if (value !== undefined)
|
|
268
|
+
checkServer(ctx, value, server);
|
|
269
|
+
checkServerWeb(ctx, server, web);
|
|
270
|
+
return { server, errors: ctx.errors };
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../src/feature/swarm-config/services/sections/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,E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EAAE,MAAM,CAAC,CAAC;IACzD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { homedir } from 'node:os';
|
|
2
|
-
import {
|
|
2
|
+
import { rejected } from '../../../platform/errors/index.js';
|
|
3
|
+
import { ConfigLoadError, pipelineNameOf, providerName, variantNameOf, } from '../types/index.js';
|
|
3
4
|
import { configPaths } from './discover.js';
|
|
4
|
-
import {
|
|
5
|
+
import { serverModeProblem } from './validate-settings.js';
|
|
6
|
+
import { loadAttachmentSettings, loadConfig, loadConfigSources, loadGlobalConfigSources, loadNetworkSettings, loadRuntimeSettings, loadQueueSettings, loadServerSettings, loadStatsSettings, } from './load.js';
|
|
5
7
|
/** The configuration files of the repositories, read from disk on every call. */
|
|
6
8
|
export class ConfigService {
|
|
7
9
|
environment;
|
|
@@ -19,6 +21,14 @@ export class ConfigService {
|
|
|
19
21
|
load(repository) {
|
|
20
22
|
return loadConfig(this.pathsOf(repository));
|
|
21
23
|
}
|
|
24
|
+
/** The merged configuration with the files it was read from; throws `ConfigLoadError`. */
|
|
25
|
+
loadSources(repository) {
|
|
26
|
+
return loadConfigSources(this.pathsOf(repository));
|
|
27
|
+
}
|
|
28
|
+
/** The shared level alone, without the files of the repository; throws `ConfigLoadError`. */
|
|
29
|
+
loadGlobalSources(repository) {
|
|
30
|
+
return loadGlobalConfigSources(this.pathsOf(repository));
|
|
31
|
+
}
|
|
22
32
|
/** `delivery.auto`, `delivery.mode` and pipeline names of the repository now. */
|
|
23
33
|
delivery(repository) {
|
|
24
34
|
try {
|
|
@@ -28,6 +38,7 @@ export class ConfigService {
|
|
|
28
38
|
mode: config.delivery.mode,
|
|
29
39
|
names: (id) => pipelineNameOf(config, id),
|
|
30
40
|
variantNames: (pipeline, variant) => variantNameOf(config, pipeline, variant),
|
|
41
|
+
providerNames: (slug) => providerName(config, slug),
|
|
31
42
|
};
|
|
32
43
|
}
|
|
33
44
|
catch (error) {
|
|
@@ -37,6 +48,7 @@ export class ConfigService {
|
|
|
37
48
|
mode: null,
|
|
38
49
|
names: (id) => id,
|
|
39
50
|
variantNames: (_pipeline, variant) => variant,
|
|
51
|
+
providerNames: () => null,
|
|
40
52
|
};
|
|
41
53
|
throw error;
|
|
42
54
|
}
|
|
@@ -85,6 +97,17 @@ export class ConfigService {
|
|
|
85
97
|
return `invalid swarm.stats: ${error.message}`;
|
|
86
98
|
}
|
|
87
99
|
}
|
|
100
|
+
/** Current `server` of the shared settings.yaml, or the text of the error in it. */
|
|
101
|
+
serverSettings() {
|
|
102
|
+
try {
|
|
103
|
+
return loadServerSettings(this.pathsOf('.'));
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (!(error instanceof ConfigLoadError))
|
|
107
|
+
throw error;
|
|
108
|
+
return `invalid swarm.server: ${error.message}`;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
88
111
|
/** Current `queue` of the shared settings.yaml, or the text of the error in it. */
|
|
89
112
|
queueSettings() {
|
|
90
113
|
try {
|
|
@@ -97,4 +120,15 @@ export class ConfigService {
|
|
|
97
120
|
}
|
|
98
121
|
}
|
|
99
122
|
}
|
|
123
|
+
/** Whether the daemon works in the server mode; `false` when its settings do not load. */
|
|
124
|
+
export function serverModeOn(config) {
|
|
125
|
+
const settings = config.serverSettings();
|
|
126
|
+
return typeof settings !== 'string' && settings.enabled;
|
|
127
|
+
}
|
|
128
|
+
/** In the server mode a task or a delivery in `worktree` or `commit` is refused: only a branch is delivered. */
|
|
129
|
+
export function requireDeliveryMode(config, mode) {
|
|
130
|
+
if (mode === null || mode === undefined || mode === 'branch' || !serverModeOn(config))
|
|
131
|
+
return;
|
|
132
|
+
throw rejected(serverModeProblem(mode));
|
|
133
|
+
}
|
|
100
134
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/services/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/services/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,aAAa,GAWd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EACtB,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAanB,iFAAiF;AACjF,MAAM,OAAO,aAAa;IACP,WAAW,CAAoB;IAEhD,YAAY,YAAgD;QAC1D,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;IAC9C,CAAC;IAED,6EAA6E;IAC7E,IAAI;QACF,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,CAAC,UAAkB;QACxB,OAAO,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC1F,CAAC;IAED,4EAA4E;IAC5E,IAAI,CAAC,UAAkB;QACrB,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CA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,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,eAAe,CAAC;gBAAE,MAAM,KAAK,CAAC;YACrD,OAAO,yBAAyB,KAAK,CAAC,OAAO,EAAE,CAAC;QAClD,CAAC;IACH,CAAC;IAED,mFAAmF;IACnF,aAAa;QACX,IAAI,CAAC;YACH,OAAO,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,eAAe,CAAC;gBAAE,MAAM,KAAK,CAAC;YACrD,OAAO,wBAAwB,KAAK,CAAC,OAAO,EAAE,CAAC;QACjD,CAAC;IACH,CAAC;CACF;AAED,0FAA0F;AAC1F,MAAM,UAAU,YAAY,CAAC,MAA6C;IACxE,MAAM,QAAQ,GAAG,MAAM,CAAC,cAAc,EAAE,CAAC;IACzC,OAAO,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC;AAC1D,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,mBAAmB,CACjC,MAA6C,EAC7C,IAA+B;IAE/B,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;QAAE,OAAO;IAC9F,MAAM,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -2,13 +2,22 @@ import { isAbsolute } from 'node:path';
|
|
|
2
2
|
import { addError, join, readBoolean, readChoice, readEntries, readMapping, readString, readStrings, } from './validate-context.js';
|
|
3
3
|
import { CHAIN_MODES, } from '../types/chain.js';
|
|
4
4
|
import { isValidSlug, SLUG_PATTERN_TEXT } from '../types/lookups.js';
|
|
5
|
+
import { unknownProviderMessage } from '../types/providers/provider.js';
|
|
5
6
|
import {} from '../types/settings.js';
|
|
6
7
|
import { REASONING_EFFORTS, RUNTIMES, modelIdProblem, variantProblem, } from '../types/specialist.js';
|
|
7
8
|
const RUNTIME_COMMAND_KEYS = ['command', 'enabled', 'args', 'env'];
|
|
8
9
|
const ENV_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
9
10
|
export const CHAIN_KEYS = ['name', 'mode', 'runtimes', 'enabled'];
|
|
10
|
-
export const CHAIN_RUNTIME_KEYS = [
|
|
11
|
-
|
|
11
|
+
export const CHAIN_RUNTIME_KEYS = [
|
|
12
|
+
'runtime',
|
|
13
|
+
'model',
|
|
14
|
+
'enabled',
|
|
15
|
+
'variant',
|
|
16
|
+
'reasoning_effort',
|
|
17
|
+
'provider',
|
|
18
|
+
'default',
|
|
19
|
+
];
|
|
20
|
+
export function checkChains(ctx, value, registry) {
|
|
12
21
|
const mapping = readMapping(ctx, value, 'swarm.chains');
|
|
13
22
|
if (!mapping)
|
|
14
23
|
return [];
|
|
@@ -16,11 +25,11 @@ export function checkChains(ctx, value) {
|
|
|
16
25
|
const path = join('swarm.chains', slug);
|
|
17
26
|
if (!isValidSlug(slug))
|
|
18
27
|
addError(ctx, path, `slug must match ${SLUG_PATTERN_TEXT}`);
|
|
19
|
-
const chain = checkChain(ctx, slug, field, path);
|
|
28
|
+
const chain = checkChain(ctx, slug, field, path, registry);
|
|
20
29
|
return chain ? [chain] : [];
|
|
21
30
|
});
|
|
22
31
|
}
|
|
23
|
-
export function checkChain(ctx, slug, value, path) {
|
|
32
|
+
export function checkChain(ctx, slug, value, path, registry) {
|
|
24
33
|
const mapping = readMapping(ctx, value, path);
|
|
25
34
|
if (!mapping)
|
|
26
35
|
return null;
|
|
@@ -41,8 +50,10 @@ export function checkChain(ctx, slug, value, path) {
|
|
|
41
50
|
else if (key === 'enabled')
|
|
42
51
|
chain.enabled = readBoolean(ctx, field, fieldPath) ?? true;
|
|
43
52
|
else if (key === 'runtimes')
|
|
44
|
-
chain.runtimes = checkChainRuntimes(ctx, field, fieldPath);
|
|
53
|
+
chain.runtimes = checkChainRuntimes(ctx, field, fieldPath, registry);
|
|
45
54
|
}
|
|
55
|
+
if (Array.isArray(mapping.runtimes))
|
|
56
|
+
checkTier(ctx, chain, mapping.runtimes, join(path, 'runtimes'));
|
|
46
57
|
if (!('name' in mapping))
|
|
47
58
|
addError(ctx, join(path, 'name'), 'is required');
|
|
48
59
|
if (!('mode' in mapping))
|
|
@@ -51,7 +62,7 @@ export function checkChain(ctx, slug, value, path) {
|
|
|
51
62
|
addError(ctx, join(path, 'runtimes'), 'is required');
|
|
52
63
|
return chain;
|
|
53
64
|
}
|
|
54
|
-
function checkChainRuntimes(ctx, value, path) {
|
|
65
|
+
function checkChainRuntimes(ctx, value, path, registry) {
|
|
55
66
|
if (!Array.isArray(value)) {
|
|
56
67
|
addError(ctx, path, 'must be a list');
|
|
57
68
|
return [];
|
|
@@ -78,6 +89,20 @@ function checkChainRuntimes(ctx, value, path) {
|
|
|
78
89
|
runtimeItem.model = readString(ctx, field, fieldPath);
|
|
79
90
|
else if (key === 'enabled')
|
|
80
91
|
runtimeItem.enabled = readBoolean(ctx, field, fieldPath) ?? true;
|
|
92
|
+
else if (key === 'provider') {
|
|
93
|
+
const provider = readString(ctx, field, fieldPath);
|
|
94
|
+
if (provider === null)
|
|
95
|
+
continue;
|
|
96
|
+
runtimeItem.provider = provider;
|
|
97
|
+
if (!registry.providers.some((item) => item.slug === provider)) {
|
|
98
|
+
addError(ctx, fieldPath, unknownProviderMessage(registry, provider));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (key === 'default') {
|
|
102
|
+
const flag = readBoolean(ctx, field, fieldPath);
|
|
103
|
+
if (flag !== null)
|
|
104
|
+
runtimeItem.default = flag;
|
|
105
|
+
}
|
|
81
106
|
}
|
|
82
107
|
if (!('runtime' in mapping))
|
|
83
108
|
addError(ctx, join(itemPath, 'runtime'), 'is required');
|
|
@@ -89,6 +114,35 @@ function checkChainRuntimes(ctx, value, path) {
|
|
|
89
114
|
}
|
|
90
115
|
return items;
|
|
91
116
|
}
|
|
117
|
+
/** `provider` and `default` of the items: required, unique and single in a `by_provider` chain. */
|
|
118
|
+
function checkTier(ctx, chain, raw, path) {
|
|
119
|
+
const tier = chain.mode === 'by_provider';
|
|
120
|
+
const seen = new Set();
|
|
121
|
+
let defaults = 0;
|
|
122
|
+
raw.forEach((entry, index) => {
|
|
123
|
+
if (typeof entry !== 'object' || entry === null || Array.isArray(entry))
|
|
124
|
+
return;
|
|
125
|
+
const mapping = entry;
|
|
126
|
+
const itemPath = `${path}[${index}]`;
|
|
127
|
+
if (!tier) {
|
|
128
|
+
if ('default' in mapping) {
|
|
129
|
+
addError(ctx, join(itemPath, 'default'), 'is supported by the by_provider mode only');
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (!('provider' in mapping))
|
|
134
|
+
addError(ctx, join(itemPath, 'provider'), 'is required');
|
|
135
|
+
const provider = typeof mapping.provider === 'string' ? mapping.provider : null;
|
|
136
|
+
if (provider !== null && isValidSlug(provider)) {
|
|
137
|
+
if (seen.has(provider))
|
|
138
|
+
addError(ctx, join(itemPath, 'provider'), `duplicate provider \`${provider}\``);
|
|
139
|
+
seen.add(provider);
|
|
140
|
+
}
|
|
141
|
+
if (mapping.default === true && ++defaults > 1) {
|
|
142
|
+
addError(ctx, join(itemPath, 'default'), 'only one item may be the default');
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
92
146
|
function checkChainRuntimeOpencode(ctx, mapping, path, item) {
|
|
93
147
|
for (const key of ['variant', 'reasoning_effort']) {
|
|
94
148
|
if (!(key in mapping))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-runtimes.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/services/validate-runtimes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAEL,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAwB,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,QAAQ,EAER,cAAc,EACd,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,MAAM,oBAAoB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAEnE,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"validate-runtimes.js","sourceRoot":"","sources":["../../../../src/feature/swarm-config/services/validate-runtimes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAEL,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAyB,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC/F,OAAO,EAAwB,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,QAAQ,EAER,cAAc,EACd,c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G,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC;IAC5B,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACpD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,+BAA+B,CAAC,CAAC;YAC1D,SAAS;QACX,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;;YACvE,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC5B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -11,9 +11,12 @@ const DELIVERY_KEYS = [
|
|
|
11
11
|
'resolver_rounds',
|
|
12
12
|
'message_prompt',
|
|
13
13
|
'resolver_prompt',
|
|
14
|
+
'push',
|
|
15
|
+
'remote',
|
|
16
|
+
'base_branch',
|
|
14
17
|
];
|
|
15
18
|
const WORKSPACE_KEYS = ['base', 'include'];
|
|
16
|
-
const WEB_KEYS = ['autostart', 'auth', 'port', 'host'];
|
|
19
|
+
const WEB_KEYS = ['autostart', 'auth', 'port', 'host', 'public_url'];
|
|
17
20
|
const WEB_PORT_RANGE = [1, 65535];
|
|
18
21
|
const NETWORK_KEYS = ['enabled', 'targets', 'interfaces', 'proxy', 'interval', 'timeout'];
|
|
19
22
|
const NETWORK_INTERVAL_RANGE = [5, 3600];
|
|
@@ -40,14 +43,32 @@ function includeProblem(entry, workspaceDir) {
|
|
|
40
43
|
}
|
|
41
44
|
return null;
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
/** Why the server mode does not deliver in `mode`: the clone of the server has no working tree to write to. */
|
|
47
|
+
export function serverModeProblem(mode) {
|
|
48
|
+
return `\`${mode}\` is not allowed in the server mode: the result is delivered as a branch (\`branch\`); apply it on your machine with \`aip run apply\``;
|
|
49
|
+
}
|
|
50
|
+
export function checkDelivery(ctx, value, delivery, known, serverMode = false) {
|
|
44
51
|
const mapping = readMapping(ctx, value, 'swarm.delivery');
|
|
45
52
|
if (!mapping)
|
|
46
53
|
return;
|
|
47
54
|
for (const [key, field] of readEntries(ctx, mapping, 'swarm.delivery', DELIVERY_KEYS)) {
|
|
48
55
|
const path = join('swarm.delivery', key);
|
|
49
56
|
if (key === 'mode') {
|
|
50
|
-
|
|
57
|
+
const mode = readChoice(ctx, field, path, DELIVERY_MODES);
|
|
58
|
+
if (mode !== null && serverMode && mode !== 'branch') {
|
|
59
|
+
addError(ctx, path, serverModeProblem(mode));
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
delivery.mode = mode ?? delivery.mode;
|
|
63
|
+
}
|
|
64
|
+
if (key === 'push')
|
|
65
|
+
delivery.push = readBoolean(ctx, field, path) ?? delivery.push;
|
|
66
|
+
if (key === 'remote')
|
|
67
|
+
delivery.remote = readString(ctx, field, path) ?? delivery.remote;
|
|
68
|
+
if (key === 'base_branch') {
|
|
69
|
+
const branch = readString(ctx, field, path);
|
|
70
|
+
if (branch !== null)
|
|
71
|
+
delivery.baseBranch = branch;
|
|
51
72
|
}
|
|
52
73
|
if (key === 'auto')
|
|
53
74
|
delivery.auto = readBoolean(ctx, field, path) ?? delivery.auto;
|
|
@@ -90,7 +111,34 @@ export function checkWeb(ctx, value, web) {
|
|
|
90
111
|
web.port = readInteger(ctx, field, path, WEB_PORT_RANGE) ?? web.port;
|
|
91
112
|
if (key === 'host')
|
|
92
113
|
web.host = readChoice(ctx, field, path, WEB_HOSTS) ?? web.host;
|
|
114
|
+
if (key === 'public_url')
|
|
115
|
+
web.publicUrl = readPublicUrl(ctx, field, path) ?? web.publicUrl;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/** An absolute http(s) address without login, query and fragment, kept without the trailing `/`. */
|
|
119
|
+
function readPublicUrl(ctx, value, path) {
|
|
120
|
+
const text = readString(ctx, value, path);
|
|
121
|
+
if (text === null)
|
|
122
|
+
return null;
|
|
123
|
+
const refuse = (message) => {
|
|
124
|
+
addError(ctx, path, message);
|
|
125
|
+
return null;
|
|
126
|
+
};
|
|
127
|
+
let url;
|
|
128
|
+
try {
|
|
129
|
+
url = new URL(text.trim());
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return refuse('must be an absolute http:// or https:// address');
|
|
133
|
+
}
|
|
134
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
|
|
135
|
+
return refuse('must start with http:// or https://');
|
|
93
136
|
}
|
|
137
|
+
if (url.username !== '' || url.password !== '')
|
|
138
|
+
return refuse('must not contain a login or a password');
|
|
139
|
+
if (text.includes('?') || text.includes('#'))
|
|
140
|
+
return refuse('must not contain a query or a fragment');
|
|
141
|
+
return `${url.origin}${url.pathname}`.replace(/\/+$/, '');
|
|
94
142
|
}
|
|
95
143
|
export function checkNaming(ctx, value, naming) {
|
|
96
144
|
const mapping = readMapping(ctx, value, 'swarm.naming');
|