@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,63 @@
|
|
|
1
|
+
import { RegistryFailure, registryBase, serviceRegistryDescriptor, } from '../types/index.js';
|
|
2
|
+
export const PROTOCOL_VERSION = '2025-06-18';
|
|
3
|
+
function hasError(message) {
|
|
4
|
+
return message === null || 'error' in message;
|
|
5
|
+
}
|
|
6
|
+
/** `initialize` and `tools/list` over one session; the result is a code or a count of tools. */
|
|
7
|
+
async function checkRegistry(request, { transport, proxyFor }) {
|
|
8
|
+
const base = registryBase(request.params.url);
|
|
9
|
+
if (base === null)
|
|
10
|
+
return { ok: false, code: 'unreachable' };
|
|
11
|
+
let token;
|
|
12
|
+
try {
|
|
13
|
+
token = await request.secrets.read('token');
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return { ok: false, code: 'secret_unavailable' };
|
|
17
|
+
}
|
|
18
|
+
const endpoint = { base, token, proxyFor, signal: request.signal };
|
|
19
|
+
try {
|
|
20
|
+
const opened = await transport.post(endpoint, {
|
|
21
|
+
jsonrpc: '2.0',
|
|
22
|
+
id: 1,
|
|
23
|
+
method: 'initialize',
|
|
24
|
+
params: {
|
|
25
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
26
|
+
capabilities: {},
|
|
27
|
+
clientInfo: { name: 'aip', version: '1' },
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
if (hasError(opened.message))
|
|
31
|
+
return { ok: false, code: 'protocol' };
|
|
32
|
+
endpoint.sessionId = opened.sessionId;
|
|
33
|
+
try {
|
|
34
|
+
await transport.post(endpoint, { jsonrpc: '2.0', method: 'notifications/initialized' });
|
|
35
|
+
const listed = await transport.post(endpoint, {
|
|
36
|
+
jsonrpc: '2.0',
|
|
37
|
+
id: 2,
|
|
38
|
+
method: 'tools/list',
|
|
39
|
+
});
|
|
40
|
+
const result = listed.message?.result;
|
|
41
|
+
const tools = result?.tools;
|
|
42
|
+
if (hasError(listed.message) || !Array.isArray(tools))
|
|
43
|
+
return { ok: false, code: 'protocol' };
|
|
44
|
+
return { ok: true, count: tools.length };
|
|
45
|
+
}
|
|
46
|
+
finally {
|
|
47
|
+
await transport.close(endpoint);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
return { ok: false, code: error instanceof RegistryFailure ? error.code : 'unreachable' };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** The adapter of the integrations for the kind: the descriptor and the connection check. */
|
|
55
|
+
export function serviceRegistryAdapter(dependencies) {
|
|
56
|
+
return {
|
|
57
|
+
descriptor: serviceRegistryDescriptor,
|
|
58
|
+
check: {
|
|
59
|
+
check: (request) => checkRegistry(request, dependencies),
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/feature/service-registry/services/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,GAE1B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,gBAA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
|
1
|
+
import { RegistryFailure, registryBase } from '../types/index.js';
|
|
2
|
+
import { PROTOCOL_VERSION } from './adapter.js';
|
|
3
|
+
/** The registry answered the call with an error of the tool itself (the project does not exist, say). */
|
|
4
|
+
export class ToolRefused extends Error {
|
|
5
|
+
constructor() {
|
|
6
|
+
super('tool refused');
|
|
7
|
+
this.name = 'ToolRefused';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** The structured answer of a tool: `structuredContent`, or the JSON of its first text part. */
|
|
11
|
+
function resultOf(message) {
|
|
12
|
+
if (message === null || 'error' in message)
|
|
13
|
+
throw new RegistryFailure('protocol');
|
|
14
|
+
const result = message.result;
|
|
15
|
+
if (typeof result !== 'object' || result === null)
|
|
16
|
+
throw new RegistryFailure('protocol');
|
|
17
|
+
const { isError, structuredContent, content } = result;
|
|
18
|
+
if (isError === true)
|
|
19
|
+
throw new ToolRefused();
|
|
20
|
+
if (structuredContent !== undefined)
|
|
21
|
+
return structuredContent;
|
|
22
|
+
if (Array.isArray(content)) {
|
|
23
|
+
for (const part of content) {
|
|
24
|
+
if (part?.type === 'text' && typeof part.text === 'string') {
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(part.text);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
throw new RegistryFailure('protocol');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
throw new RegistryFailure('protocol');
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* One call of a tool of a registry over a session of its own, opened for it and closed after it.
|
|
38
|
+
* A failure is a `RegistryFailure` (static code) or a `ToolRefused`.
|
|
39
|
+
*/
|
|
40
|
+
export class RegistryCalls {
|
|
41
|
+
dependencies;
|
|
42
|
+
constructor(dependencies) {
|
|
43
|
+
this.dependencies = dependencies;
|
|
44
|
+
}
|
|
45
|
+
async call(connection, token, tool, args, timeoutMs, signal) {
|
|
46
|
+
const base = registryBase(connection.params.url);
|
|
47
|
+
if (base === null)
|
|
48
|
+
throw new RegistryFailure('unreachable');
|
|
49
|
+
const { transport, proxyFor } = this.dependencies;
|
|
50
|
+
const endpoint = {
|
|
51
|
+
base,
|
|
52
|
+
token,
|
|
53
|
+
proxyFor,
|
|
54
|
+
timeoutMs,
|
|
55
|
+
...(signal === undefined ? {} : { signal }),
|
|
56
|
+
};
|
|
57
|
+
const opened = await transport.post(endpoint, {
|
|
58
|
+
jsonrpc: '2.0',
|
|
59
|
+
id: 1,
|
|
60
|
+
method: 'initialize',
|
|
61
|
+
params: {
|
|
62
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
63
|
+
capabilities: {},
|
|
64
|
+
clientInfo: { name: 'aip', version: '1' },
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
if (opened.message === null || 'error' in opened.message) {
|
|
68
|
+
throw new RegistryFailure('protocol');
|
|
69
|
+
}
|
|
70
|
+
endpoint.sessionId = opened.sessionId;
|
|
71
|
+
try {
|
|
72
|
+
await transport.post(endpoint, { jsonrpc: '2.0', method: 'notifications/initialized' });
|
|
73
|
+
const reply = await transport.post(endpoint, {
|
|
74
|
+
jsonrpc: '2.0',
|
|
75
|
+
id: 2,
|
|
76
|
+
method: 'tools/call',
|
|
77
|
+
params: { name: tool, arguments: args },
|
|
78
|
+
});
|
|
79
|
+
return resultOf(reply.message);
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
await transport.close(endpoint);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=calls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calls.js","sourceRoot":"","sources":["../../../../src/feature/service-registry/services/calls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,yGAAyG;AACzG,MAAM,OAAO,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EAAE;gBAC3C,OAAO,EAAE,KAAK;gBACd,EAAE,EAAE,CAAC;gBACL,MAAM,EAAE,YAAY;gBACpB,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;aACxC,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;gBAAS,CAAC;YACT,MAAM,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { normalizeRemote } from '../../repos/types/index.js';
|
|
2
|
+
import { LIST_PAGES_LIMIT, PROJECT_LIST_PAGE_SIZE } from '../types/index.js';
|
|
3
|
+
/** The longest one call of the matching waits for the registry. */
|
|
4
|
+
export const LINK_CALL_TIMEOUT_MS = 15_000;
|
|
5
|
+
function isObject(value) {
|
|
6
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The paths of the projects of the registry whose `repo_url` is `wanted` in the normal form, read
|
|
10
|
+
* page by page through `list_projects` (at most `LIST_PAGES_LIMIT` pages). `truncated`: the
|
|
11
|
+
* catalog was not read to its end. A failure of the registry is thrown as it is.
|
|
12
|
+
*/
|
|
13
|
+
export async function scanCatalog(calls, connection, token, wanted) {
|
|
14
|
+
const paths = [];
|
|
15
|
+
let cursor = null;
|
|
16
|
+
let offset = 0;
|
|
17
|
+
let lastFirst;
|
|
18
|
+
for (let page = 0;; page += 1) {
|
|
19
|
+
if (page >= LIST_PAGES_LIMIT)
|
|
20
|
+
return { paths, truncated: true };
|
|
21
|
+
const answer = await calls.call(connection, token, 'list_projects', {
|
|
22
|
+
limit: PROJECT_LIST_PAGE_SIZE,
|
|
23
|
+
...(cursor !== null ? { cursor } : offset > 0 ? { offset } : {}),
|
|
24
|
+
}, LINK_CALL_TIMEOUT_MS);
|
|
25
|
+
const items = isObject(answer) && Array.isArray(answer.items) ? answer.items : [];
|
|
26
|
+
for (const item of items) {
|
|
27
|
+
if (!isObject(item) || typeof item.path !== 'string')
|
|
28
|
+
continue;
|
|
29
|
+
const url = typeof item.repo_url === 'string' ? normalizeRemote(item.repo_url) : null;
|
|
30
|
+
if (url === wanted)
|
|
31
|
+
paths.push(item.path);
|
|
32
|
+
}
|
|
33
|
+
const next = isObject(answer) ? (answer.next_cursor ?? answer.nextCursor) : undefined;
|
|
34
|
+
const first = items.length > 0 && isObject(items[0]) ? items[0].path : undefined;
|
|
35
|
+
if (typeof next === 'string' && next !== '') {
|
|
36
|
+
cursor = next;
|
|
37
|
+
}
|
|
38
|
+
else if (items.length > 0 && !(first !== undefined && first === lastFirst)) {
|
|
39
|
+
// a registry that gives no cursor is read by offset until an empty page
|
|
40
|
+
cursor = null;
|
|
41
|
+
offset += items.length;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return { paths, truncated: false };
|
|
45
|
+
}
|
|
46
|
+
lastFirst = first;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=catalog-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-scan.js","sourceRoot":"","sources":["../../../../src/feature/service-registry/services/catalog-scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAI7E,mEAAmE;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE3C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,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C;QACD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACtF,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACjF,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAC5C,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;aAAM,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,CAAC,EAAE,CAAC;YAC7E,wEAAwE;YACxE,MAAM,GAAG,IAAI,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QACrC,CAAC;QACD,SAAS,GAAG,KAAK,CAAC;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { LinkRepository } from '../repositories/index.js';
|
|
3
|
+
import { serviceRegistryAdapter } from './adapter.js';
|
|
4
|
+
import { RegistryCalls } from './calls.js';
|
|
5
|
+
import { Forwarder } from './forwarder.js';
|
|
6
|
+
import { RegistryLinks } from './links.js';
|
|
7
|
+
import { SkillService } from './skills.js';
|
|
8
|
+
/** The feature: its pieces over the proxy rule of the daemon, which the composition root supplies. */
|
|
9
|
+
export function createServiceRegistryServices(dependencies) {
|
|
10
|
+
return {
|
|
11
|
+
adapter: serviceRegistryAdapter(dependencies),
|
|
12
|
+
forwarder: new Forwarder(dependencies),
|
|
13
|
+
skills: new SkillService({
|
|
14
|
+
transport: dependencies.transport,
|
|
15
|
+
proxyFor: dependencies.proxyFor,
|
|
16
|
+
integrations: dependencies.integrations,
|
|
17
|
+
cacheDirectory: join(dependencies.stateDirectory, 'service-registry', 'skills'),
|
|
18
|
+
now: dependencies.now,
|
|
19
|
+
}),
|
|
20
|
+
links: new RegistryLinks({
|
|
21
|
+
links: new LinkRepository(dependencies.database),
|
|
22
|
+
origins: dependencies.projects,
|
|
23
|
+
repositories: dependencies.repositories,
|
|
24
|
+
integrations: dependencies.integrations,
|
|
25
|
+
calls: new RegistryCalls(dependencies),
|
|
26
|
+
now: dependencies.now,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/feature/service-registry/services/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOjC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgC3C,sGAAsG;AACtG,MAAM,UAAU,6BAA6B,CAC3C,YAAyC;IAEzC,OAAO;QACL,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC;QAC7C,SAAS,EAAE,IAAI,SAAS,CAAC,YAAY,CAAC;QACtC,MAAM,EAAE,IAAI,YAAY,CAAC;YACvB,SAAS,EAAE,YAAY,CAAC,SAAS;YACjC,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAC/B,YAAY,EAAE,YAAY,CAAC,YAAY;YACvC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,kBAAkB,EAAE,QAAQ,CAAC;YAC/E,GAAG,EAAE,YAAY,CAAC,GAAG;SACtB,CAAC;QACF,KAAK,EAAE,IAAI,aAAa,CAAC;YACvB,KAAK,EAAE,IAAI,cAAc,CAAC,YAAY,CAAC,QAAQ,CAAC;YAChD,OAAO,EAAE,YAAY,CAAC,QAAQ;YAC9B,YAAY,EAAE,YAAY,CAAC,YAAY;YACvC,YAAY,EAAE,YAAY,CAAC,YAAY;YACvC,KAAK,EAAE,IAAI,aAAa,CAAC,YAAY,CAAC;YACtC,GAAG,EAAE,YAAY,CAAC,GAAG;SACtB,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { RegistryFailure, SERVICE_REGISTRY_KIND, registryBase, } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Carries the messages of the bridges to the registries: reads the secret for the time of one
|
|
4
|
+
* request, keeps the `Mcp-Session-Id` of the registry per attempt and closes it at the end of the
|
|
5
|
+
* attempt. A refusal or a failure is a static code, never a text of the registry.
|
|
6
|
+
*/
|
|
7
|
+
export class Forwarder {
|
|
8
|
+
dependencies;
|
|
9
|
+
sessions = new Map();
|
|
10
|
+
keyOf = (token, server) => `${token}\u0000${server}`;
|
|
11
|
+
constructor(dependencies) {
|
|
12
|
+
this.dependencies = dependencies;
|
|
13
|
+
}
|
|
14
|
+
/** Whether a connection of this name serves the project now, without reading a secret. */
|
|
15
|
+
resolve(project, name) {
|
|
16
|
+
const { access } = this.dependencies.integrations();
|
|
17
|
+
const connection = access.named(SERVICE_REGISTRY_KIND, name, project);
|
|
18
|
+
if (connection === undefined)
|
|
19
|
+
return 'unavailable';
|
|
20
|
+
try {
|
|
21
|
+
access.authorize(connection.id, project);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return 'disabled';
|
|
25
|
+
}
|
|
26
|
+
return access.complete(connection) ? 'ok' : 'disabled';
|
|
27
|
+
}
|
|
28
|
+
/** The answer of the registry (null for a notification); a failure throws a `RegistryFailure`. */
|
|
29
|
+
async forward(request) {
|
|
30
|
+
const { access, secrets } = this.dependencies.integrations();
|
|
31
|
+
const { message } = request;
|
|
32
|
+
if (typeof message !== 'object' || message === null || Array.isArray(message)) {
|
|
33
|
+
throw new RegistryFailure('protocol');
|
|
34
|
+
}
|
|
35
|
+
const connection = access.named(SERVICE_REGISTRY_KIND, request.connection, request.project);
|
|
36
|
+
if (connection === undefined)
|
|
37
|
+
throw new RegistryFailure('connection_disabled');
|
|
38
|
+
try {
|
|
39
|
+
access.authorize(connection.id, request.project);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
throw new RegistryFailure('connection_disabled');
|
|
43
|
+
}
|
|
44
|
+
const base = registryBase(connection.params.url);
|
|
45
|
+
if (base === null || !access.complete(connection)) {
|
|
46
|
+
throw new RegistryFailure(base === null ? 'unreachable' : 'connection_disabled');
|
|
47
|
+
}
|
|
48
|
+
let token;
|
|
49
|
+
try {
|
|
50
|
+
token = await secrets.read(connection.id, 'token');
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new RegistryFailure('secret_unavailable');
|
|
54
|
+
}
|
|
55
|
+
const key = this.keyOf(request.session, request.server);
|
|
56
|
+
let session = this.sessions.get(key);
|
|
57
|
+
if (session === undefined || session.connectionId !== connection.id) {
|
|
58
|
+
session = { connectionId: connection.id, sessionId: null };
|
|
59
|
+
this.sessions.set(key, session);
|
|
60
|
+
}
|
|
61
|
+
const endpoint = {
|
|
62
|
+
base,
|
|
63
|
+
token,
|
|
64
|
+
sessionId: session.sessionId,
|
|
65
|
+
proxyFor: this.dependencies.proxyFor,
|
|
66
|
+
};
|
|
67
|
+
const reply = await this.dependencies.transport.post(endpoint, message);
|
|
68
|
+
if (reply.sessionId !== null)
|
|
69
|
+
session.sessionId = reply.sessionId;
|
|
70
|
+
return reply.message;
|
|
71
|
+
}
|
|
72
|
+
/** The attempt ended: every session of it in the registry is closed, best effort. */
|
|
73
|
+
async close(session) {
|
|
74
|
+
const prefix = `${session}\u0000`;
|
|
75
|
+
const kept = [];
|
|
76
|
+
for (const [key, value] of [...this.sessions]) {
|
|
77
|
+
if (!key.startsWith(prefix))
|
|
78
|
+
continue;
|
|
79
|
+
this.sessions.delete(key);
|
|
80
|
+
kept.push(value);
|
|
81
|
+
}
|
|
82
|
+
await Promise.all(kept.map((one) => this.closeOne(one)));
|
|
83
|
+
}
|
|
84
|
+
async closeOne(kept) {
|
|
85
|
+
if (kept.sessionId == null)
|
|
86
|
+
return;
|
|
87
|
+
const { access, secrets } = this.dependencies.integrations();
|
|
88
|
+
try {
|
|
89
|
+
const connection = access.find(kept.connectionId);
|
|
90
|
+
const base = registryBase(connection.params.url);
|
|
91
|
+
if (base === null)
|
|
92
|
+
return;
|
|
93
|
+
const token = await secrets.read(connection.id, 'token');
|
|
94
|
+
await this.dependencies.transport.close({
|
|
95
|
+
base,
|
|
96
|
+
token,
|
|
97
|
+
sessionId: kept.sessionId,
|
|
98
|
+
proxyFor: this.dependencies.proxyFor,
|
|
99
|
+
timeoutMs: 5000,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// the registry drops an idle session on its own
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=forwarder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forwarder.js","sourceRoot":"","sources":["../../../../src/feature/service-registry/services/forwarder.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,YAAY,GAEb,MAAM,mBAAmB,CAAC;AA6B3B;;;;GAIG;AACH,MAAM,OAAO,SAAS;IACH,YAAY,CAAwB;IACpC,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IACtC,KAAK,G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MAAM,IAAI,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjD,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAO;YAC1B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;YACzD,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC;gBACtC,IAAI;gBACJ,KAAK;gBACL,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ;gBACpC,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,gDAAgD;QAClD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/feature/service-registry/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAA4C,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { rejected } from '../../../platform/errors/index.js';
|
|
2
|
+
import { connectionServes, refusal } from '../../integrations/types/index.js';
|
|
3
|
+
import { normalizeRemote } from '../../repos/types/index.js';
|
|
4
|
+
import { AUTO_LINK_INTERVAL_MS, REGISTRY_PATH_LIMIT, RegistryFailure, SERVICE_REGISTRY_KIND, } from '../types/index.js';
|
|
5
|
+
import { ToolRefused } from './calls.js';
|
|
6
|
+
import { LINK_CALL_TIMEOUT_MS, scanCatalog } from './catalog-scan.js';
|
|
7
|
+
/** The most candidates an `ambiguous` link names. */
|
|
8
|
+
const CANDIDATES_LIMIT = 20;
|
|
9
|
+
function isObject(value) {
|
|
10
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
11
|
+
}
|
|
12
|
+
/** The text a refusal of a failed registry call carries: static, never a text of the registry. */
|
|
13
|
+
function failureText(code) {
|
|
14
|
+
return code === 'unauthorized'
|
|
15
|
+
? 'the service registry refused the token of the connection'
|
|
16
|
+
: 'the service registry is unreachable';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The links of the projects of aip to the projects of a service registry: the automatic matching
|
|
20
|
+
* by `origin`, the manual link, the clearing, and what an attempt learns from them.
|
|
21
|
+
*/
|
|
22
|
+
export class RegistryLinks {
|
|
23
|
+
dependencies;
|
|
24
|
+
/** The matchings that run now: a pair is matched by one call at a time. */
|
|
25
|
+
running = new Map();
|
|
26
|
+
constructor(dependencies) {
|
|
27
|
+
this.dependencies = dependencies;
|
|
28
|
+
}
|
|
29
|
+
/** The rows of a project, or of all projects. */
|
|
30
|
+
list(project) {
|
|
31
|
+
return this.dependencies.links.all(project);
|
|
32
|
+
}
|
|
33
|
+
find(project, connectionId) {
|
|
34
|
+
return this.dependencies.links.find(project, connectionId);
|
|
35
|
+
}
|
|
36
|
+
/** The links of a project that moved follow it. */
|
|
37
|
+
moveProject(from, to) {
|
|
38
|
+
this.dependencies.links.moveProject(from, to);
|
|
39
|
+
}
|
|
40
|
+
/** A project that left aip: the links of shared connections to it go. */
|
|
41
|
+
forgetProject(project) {
|
|
42
|
+
this.dependencies.links.forgetProject(project);
|
|
43
|
+
}
|
|
44
|
+
/** Forgets the link of a pair and switches the automatic matching of it off until `--auto`. */
|
|
45
|
+
clear(project, connectionId) {
|
|
46
|
+
this.connectionOf(project, connectionId, false);
|
|
47
|
+
const row = this.row(project, connectionId, 'disabled', null, null, []);
|
|
48
|
+
this.dependencies.links.put(row);
|
|
49
|
+
return row;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Links the pair to `path` after the registry confirmed it through `get_project`; a path the
|
|
53
|
+
* registry does not know, or a registry that does not answer, changes nothing.
|
|
54
|
+
*/
|
|
55
|
+
async manualLink(project, connectionId, path) {
|
|
56
|
+
const trimmed = path.trim();
|
|
57
|
+
// eslint-disable-next-line no-control-regex
|
|
58
|
+
if (trimmed === '' || trimmed.length > REGISTRY_PATH_LIMIT || /[\u0000-\u001f]/.test(trimmed)) {
|
|
59
|
+
throw rejected('the path of a registry project is empty, too long or has control characters');
|
|
60
|
+
}
|
|
61
|
+
const connection = this.connectionOf(project, connectionId, true);
|
|
62
|
+
const token = await this.tokenOf(connection);
|
|
63
|
+
let answer;
|
|
64
|
+
try {
|
|
65
|
+
answer = await this.dependencies.calls.call(connection, token, 'get_project', { project: trimmed }, LINK_CALL_TIMEOUT_MS);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (error instanceof ToolRefused) {
|
|
69
|
+
throw rejected(`project ${trimmed} is not found in the service registry`);
|
|
70
|
+
}
|
|
71
|
+
throw rejected(failureText(error instanceof RegistryFailure ? error.code : 'unreachable'));
|
|
72
|
+
}
|
|
73
|
+
if (!isObject(answer))
|
|
74
|
+
throw rejected(`project ${trimmed} is not found in the service registry`);
|
|
75
|
+
const canonical = typeof answer.path === 'string' && answer.path !== '' ? answer.path : trimmed;
|
|
76
|
+
const row = this.row(project, connectionId, 'linked', canonical, 'manual', []);
|
|
77
|
+
this.dependencies.links.put(row);
|
|
78
|
+
return row;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Matches the pair by `origin`. A manual link stays; a cleared pair stays cleared unless the
|
|
82
|
+
* owner asks (`command`); a pair without a link is not asked about again within an hour unless
|
|
83
|
+
* the owner asks. A registry that fails leaves the link it has as it is.
|
|
84
|
+
*/
|
|
85
|
+
autoLink(project, connectionId, trigger) {
|
|
86
|
+
const key = `${project}\u0000${connectionId}`;
|
|
87
|
+
const running = this.running.get(key);
|
|
88
|
+
if (running !== undefined)
|
|
89
|
+
return running;
|
|
90
|
+
const work = this.matching(project, connectionId, trigger).finally(() => this.running.delete(key));
|
|
91
|
+
this.running.set(key, work);
|
|
92
|
+
return work;
|
|
93
|
+
}
|
|
94
|
+
/** After the enabling of a connection: every project it serves is matched. */
|
|
95
|
+
async autoLinkServed(connectionId) {
|
|
96
|
+
const { access } = this.dependencies.integrations();
|
|
97
|
+
let connection;
|
|
98
|
+
try {
|
|
99
|
+
connection = access.find(connectionId);
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (connection.kind !== SERVICE_REGISTRY_KIND)
|
|
105
|
+
return;
|
|
106
|
+
const projects = connection.projectPath !== null
|
|
107
|
+
? [connection.projectPath]
|
|
108
|
+
: this.dependencies.repositories
|
|
109
|
+
.entries()
|
|
110
|
+
.filter((entry) => entry.enabled !== false)
|
|
111
|
+
.map((entry) => entry.path);
|
|
112
|
+
for (const project of projects) {
|
|
113
|
+
try {
|
|
114
|
+
await this.autoLink(project, connectionId, 'enable');
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
// a project that cannot be matched now is matched when an attempt starts
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The project of the registry for an attempt of `project` whose specialist has servers through
|
|
123
|
+
* connections of these names; the first server that has a link. A pair with no link is matched
|
|
124
|
+
* when the rules of the trigger `attempt` allow it. Never throws: no answer is null.
|
|
125
|
+
*/
|
|
126
|
+
async projectFor(project, servers) {
|
|
127
|
+
const { access } = this.dependencies.integrations();
|
|
128
|
+
for (const { server, connection: name } of servers) {
|
|
129
|
+
try {
|
|
130
|
+
const connection = access.named(SERVICE_REGISTRY_KIND, name, project);
|
|
131
|
+
if (connection === undefined)
|
|
132
|
+
continue;
|
|
133
|
+
access.authorize(connection.id, project);
|
|
134
|
+
let link = this.dependencies.links.find(project, connection.id);
|
|
135
|
+
if (link?.status !== 'linked')
|
|
136
|
+
link = await this.autoLink(project, connection.id, 'attempt');
|
|
137
|
+
if (link.status === 'linked' && link.registryPath !== null) {
|
|
138
|
+
return { path: link.registryPath, server };
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
// a connection that cannot be used gives no line; the attempt starts without it
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
async matching(project, connectionId, trigger) {
|
|
148
|
+
const { links, now } = this.dependencies;
|
|
149
|
+
const existing = links.find(project, connectionId);
|
|
150
|
+
if (existing?.source === 'manual')
|
|
151
|
+
return existing;
|
|
152
|
+
if (existing !== undefined && trigger !== 'command') {
|
|
153
|
+
if (existing.status === 'disabled')
|
|
154
|
+
return existing;
|
|
155
|
+
const fresh = now() - existing.matchedAt < AUTO_LINK_INTERVAL_MS;
|
|
156
|
+
if (existing.status === 'linked' || (fresh && trigger === 'attempt'))
|
|
157
|
+
return existing;
|
|
158
|
+
}
|
|
159
|
+
const connection = this.connectionOf(project, connectionId, true);
|
|
160
|
+
const origin = await this.dependencies.origins.originOf(project);
|
|
161
|
+
const wanted = origin === null ? null : normalizeRemote(origin);
|
|
162
|
+
// Without an origin there is nothing to compare: a link that was found stays, as after a failure.
|
|
163
|
+
if (wanted === null)
|
|
164
|
+
return this.keep(existing, project, connectionId, 'no_match');
|
|
165
|
+
let token;
|
|
166
|
+
try {
|
|
167
|
+
token = await this.tokenOf(connection);
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
if (trigger === 'command')
|
|
171
|
+
throw error;
|
|
172
|
+
return this.keep(existing, project, connectionId, 'unreachable');
|
|
173
|
+
}
|
|
174
|
+
let scanned;
|
|
175
|
+
try {
|
|
176
|
+
scanned = await scanCatalog(this.dependencies.calls, connection, token, wanted);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
const code = error instanceof RegistryFailure && error.code === 'unauthorized'
|
|
180
|
+
? 'unauthorized'
|
|
181
|
+
: 'unreachable';
|
|
182
|
+
const meanwhile = this.settledMeanwhile(project, connectionId, trigger);
|
|
183
|
+
if (meanwhile !== undefined)
|
|
184
|
+
return meanwhile;
|
|
185
|
+
return this.keep(existing, project, connectionId, code);
|
|
186
|
+
}
|
|
187
|
+
const found = scanned.paths;
|
|
188
|
+
const truncated = scanned.truncated;
|
|
189
|
+
const meanwhile = this.settledMeanwhile(project, connectionId, trigger);
|
|
190
|
+
if (meanwhile !== undefined)
|
|
191
|
+
return meanwhile;
|
|
192
|
+
const unique = [...new Set(found)];
|
|
193
|
+
if (unique.length === 1) {
|
|
194
|
+
return this.settle(project, connectionId, 'linked', unique[0], []);
|
|
195
|
+
}
|
|
196
|
+
if (unique.length > 1) {
|
|
197
|
+
return this.settle(project, connectionId, 'ambiguous', null, unique.slice(0, CANDIDATES_LIMIT));
|
|
198
|
+
}
|
|
199
|
+
return this.settle(project, connectionId, truncated ? 'truncated' : 'no_match', null, []);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The row the pair got while the registry was asked, when it must stay: a manual link or a
|
|
203
|
+
* clearing made meanwhile is not overwritten by an answer that was already on its way.
|
|
204
|
+
*/
|
|
205
|
+
settledMeanwhile(project, connectionId, trigger) {
|
|
206
|
+
const current = this.dependencies.links.find(project, connectionId);
|
|
207
|
+
if (current?.source === 'manual')
|
|
208
|
+
return current;
|
|
209
|
+
if (current?.status === 'disabled' && trigger !== 'command')
|
|
210
|
+
return current;
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
/** A failed matching: the link the pair has stays, a pair without one records why. */
|
|
214
|
+
keep(existing, project, connectionId, status) {
|
|
215
|
+
if (existing?.status === 'linked')
|
|
216
|
+
return existing;
|
|
217
|
+
return this.settle(project, connectionId, status, null, []);
|
|
218
|
+
}
|
|
219
|
+
settle(project, connectionId, status, registryPath, candidates) {
|
|
220
|
+
const row = this.row(project, connectionId, status, registryPath, registryPath === null ? null : 'auto', candidates);
|
|
221
|
+
this.dependencies.links.put(row);
|
|
222
|
+
return row;
|
|
223
|
+
}
|
|
224
|
+
row(project, connectionId, status, registryPath, source, candidates) {
|
|
225
|
+
return {
|
|
226
|
+
project,
|
|
227
|
+
connectionId,
|
|
228
|
+
registryPath,
|
|
229
|
+
source,
|
|
230
|
+
status,
|
|
231
|
+
candidates,
|
|
232
|
+
matchedAt: this.dependencies.now(),
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/** The connection of the pair: a registry that serves the project (and, to call it, is usable). */
|
|
236
|
+
connectionOf(project, connectionId, usable) {
|
|
237
|
+
const { access } = this.dependencies.integrations();
|
|
238
|
+
const connection = access.find(connectionId);
|
|
239
|
+
if (connection.kind !== SERVICE_REGISTRY_KIND) {
|
|
240
|
+
throw rejected('the connection is not a service registry');
|
|
241
|
+
}
|
|
242
|
+
if (!connectionServes(connection, project))
|
|
243
|
+
throw refusal('scope_denied');
|
|
244
|
+
return usable ? access.authorize(connectionId, project) : connection;
|
|
245
|
+
}
|
|
246
|
+
async tokenOf(connection) {
|
|
247
|
+
const { secrets } = this.dependencies.integrations();
|
|
248
|
+
try {
|
|
249
|
+
return await secrets.read(connection.id, 'token');
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
throw rejected('the token of the service registry connection is not available');
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=links.js.map
|