@hoknie/aip 0.4.0 → 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/application.js +71 -56
- 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/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/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/runtime.js +1 -0
- package/dist/feature/agents/clients/cline/runtime.js.map +1 -1
- package/dist/feature/agents/clients/codex/runtime.js +1 -0
- package/dist/feature/agents/clients/codex/runtime.js.map +1 -1
- package/dist/feature/agents/clients/copilot/runtime.js +1 -0
- package/dist/feature/agents/clients/copilot/runtime.js.map +1 -1
- package/dist/feature/agents/clients/kilo/runtime.js +1 -0
- package/dist/feature/agents/clients/kilo/runtime.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/services/skills.js +4 -1
- package/dist/feature/agents/services/skills.js.map +1 -1
- package/dist/feature/agents/services/supervisor.js +7 -3
- package/dist/feature/agents/services/supervisor.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/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 +6 -4
- package/dist/feature/queue/repositories/queues.js.map +1 -1
- package/dist/feature/queue/services/advance.js +2 -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 +2 -0
- package/dist/feature/queue/services/edit.js.map +1 -1
- package/dist/feature/queue/services/items.js +26 -47
- package/dist/feature/queue/services/items.js.map +1 -1
- package/dist/feature/queue/services/projects.js +22 -6
- package/dist/feature/queue/services/projects.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/duplicates.js +46 -0
- package/dist/feature/queue/types/duplicates.js.map +1 -0
- package/dist/feature/queue/types/edit.js +2 -0
- package/dist/feature/queue/types/edit.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 +2 -0
- package/dist/feature/queue/types/limit-hits.js.map +1 -1
- package/dist/feature/queue/types/returns.js +2 -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 +3 -0
- package/dist/feature/runs/machine/delivery-flow.js.map +1 -1
- 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/transition.js +21 -2
- package/dist/feature/runs/machine/transition.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 +9 -0
- package/dist/feature/runs/repositories/rows.js.map +1 -1
- package/dist/feature/runs/repositories/write.js +4 -4
- 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 +44 -54
- 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 +159 -1
- package/dist/feature/runs/services/effects/conversations.js.map +1 -1
- 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 +15 -2
- package/dist/feature/runs/services/effects/git.js.map +1 -1
- package/dist/feature/runs/services/effects/runtime-check.js +24 -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 +1 -1
- package/dist/feature/runs/services/index.js.map +1 -1
- package/dist/feature/runs/services/reads.js +21 -1
- package/dist/feature/runs/services/reads.js.map +1 -1
- package/dist/feature/runs/services/requests.js +14 -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/constants.js +1 -1
- package/dist/feature/runs/types/constants.js.map +1 -1
- package/dist/feature/runs/types/create.js +5 -3
- package/dist/feature/runs/types/create.js.map +1 -1
- package/dist/feature/runs/types/index.js +1 -0
- package/dist/feature/runs/types/index.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/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 +32 -1
- 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 +10 -1
- 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/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 +25 -1
- package/dist/feature/swarm-config/services/settings.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 +30 -2
- 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/index.js +2 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -1
- package/dist/feature/swarm-config/types/providers/provider.js +9 -0
- package/dist/feature/swarm-config/types/providers/provider.js.map +1 -1
- package/dist/feature/swarm-config/types/settings.js +31 -7
- 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 +2 -0
- 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/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-settings.js +2 -1
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -1
- package/dist/feature/swarm-edit/services/references.js +2 -0
- package/dist/feature/swarm-edit/services/references.js.map +1 -1
- package/dist/feature/swarm-edit/types/editor.js.map +1 -1
- package/dist/feature/swarm-edit/types/setting-fields.js +1 -0
- package/dist/feature/swarm-edit/types/setting-fields.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 +27 -0
- 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/queue-edit.js +0 -24
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -1
- package/dist/presentation/cli/commands/queue.js +3 -3
- package/dist/presentation/cli/commands/queue.js.map +1 -1
- package/dist/presentation/cli/commands/run-delivery.js +23 -2
- package/dist/presentation/cli/commands/run-delivery.js.map +1 -1
- package/dist/presentation/cli/commands/run.js +26 -8
- 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 +20 -1
- 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 +11 -0
- package/dist/presentation/cli/local/config-check-providers.js.map +1 -1
- package/dist/presentation/cli/local/config-check.js +16 -8
- 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 +8 -0
- package/dist/presentation/cli/program.js.map +1 -1
- package/dist/presentation/cli/queue-add.js +53 -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/index.js +5 -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/provider-list.js +4 -1
- package/dist/presentation/format/providers/provider-list.js.map +1 -1
- package/dist/presentation/format/queue.js +2 -1
- package/dist/presentation/format/queue.js.map +1 -1
- package/dist/presentation/format/runs.js +30 -2
- 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/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/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 +46 -5
- 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 +12 -2
- 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/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 +9 -1
- package/dist/presentation/ipc/handlers/providers.js.map +1 -1
- package/dist/presentation/ipc/handlers/queue.js +70 -18
- package/dist/presentation/ipc/handlers/queue.js.map +1 -1
- package/dist/presentation/ipc/handlers/repositories.js +28 -13
- package/dist/presentation/ipc/handlers/repositories.js.map +1 -1
- package/dist/presentation/ipc/handlers/runs.js +13 -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 +18 -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 +22 -3
- package/dist/presentation/ipc/snapshots.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 +3 -0
- package/dist/presentation/ipc/views/queue.js.map +1 -1
- package/dist/presentation/ipc/views/runs.js +18 -7
- 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 +2 -1
- package/dist/presentation/mcp/host-kit.js.map +1 -1
- package/dist/presentation/mcp/host-queue.js +19 -13
- package/dist/presentation/mcp/host-queue.js.map +1 -1
- package/dist/presentation/mcp/host-runs.js +10 -14
- package/dist/presentation/mcp/host-runs.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 +77 -5
- 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/queue.js +1 -1
- package/dist/presentation/web/routes/queue.js.map +1 -1
- package/dist/presentation/web/routes/runs.js +5 -1
- 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/server.js +95 -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 -10
- package/integrations/claude-code/.claude-plugin/plugin.json +1 -1
- package/package.json +12 -4
- package/dist/web/assets/EntryList-Cyc9PxYQ.js +0 -3
- package/dist/web/assets/FilterField-DOat7bHi.js +0 -7
- package/dist/web/assets/LinkTabs-V5hVhmkv.js +0 -4
- package/dist/web/assets/SharedPipelinesGroup-CMV55Qri.js +0 -1
- package/dist/web/assets/card-DDDwEBup.js +0 -1
- package/dist/web/assets/deliveryModes-OVH1wAmC.js +0 -1
- package/dist/web/assets/empty-CF7EgKd2.js +0 -41
- package/dist/web/assets/index-7lFvzi1k.js +0 -41
- package/dist/web/assets/index-BJYNhfGR.css +0 -2
- package/dist/web/assets/locales-3BQ5tRcZ.js +0 -1
- package/dist/web/assets/pipelines-BLhOZXCy.js +0 -14
- package/dist/web/assets/settingFields-C8-XJpPl.js +0 -1
- package/dist/web/assets/settings-96DThDqz.js +0 -6
- package/dist/web/assets/stats-B1imf_Vj.js +0 -1
- package/dist/web/assets/tabs-DyEM16mP.js +0 -1
- package/dist/web/assets/topology-Dyq425Mw.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DELIVERY_MODES } from '../../feature/swarm-config/types/index.js';
|
|
3
|
-
import { attempt } from './tools.js';
|
|
3
|
+
import { ALLOW_DUPLICATE, attempt, hintDuplicate, HOST_DUPLICATE_HINT } from './tools.js';
|
|
4
4
|
import { withData } from './host-kit.js';
|
|
5
5
|
import { linkInputs, present } from './host-links.js';
|
|
6
6
|
export function registerQueue(kit) {
|
|
@@ -11,24 +11,28 @@ export function registerQueue(kit) {
|
|
|
11
11
|
inputSchema: { repo },
|
|
12
12
|
}, ({ repo: where }) => attempt(() => showQueue('queue', {}, where)));
|
|
13
13
|
}
|
|
14
|
+
/** How a new task is delivered: both follow the configuration when omitted. */
|
|
15
|
+
export const deliveryFields = {
|
|
16
|
+
autoDeliver: z
|
|
17
|
+
.boolean()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Deliver merged groups automatically; omit to follow delivery.auto of the configuration'),
|
|
20
|
+
deliveryMode: z
|
|
21
|
+
.enum(DELIVERY_MODES)
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('How the merged result is delivered (worktree, commit or branch); omit to follow delivery.mode of the configuration'),
|
|
24
|
+
};
|
|
14
25
|
export function registerQueueAdd(kit) {
|
|
15
26
|
const { server, tags, parent, variant, skip, after, attachments, repo, queueGroups, showQueue } = kit;
|
|
16
27
|
server.registerTool('swarm_queue_add', {
|
|
17
28
|
title: 'Add a task to the queue',
|
|
18
|
-
description: 'Put a task at the end of the repository queue. Pass either task or groups. It does not start the queue: call swarm_queue_start.',
|
|
29
|
+
description: 'Put a task at the end of the repository queue. Pass either task or groups. It does not start the queue: call swarm_queue_start. A copy of a task that already waits in the queue is refused: the error names the waiting task.',
|
|
19
30
|
inputSchema: {
|
|
20
31
|
pipeline: z.string().describe('Pipeline id from swarm.yaml'),
|
|
21
32
|
task: z.string().optional().describe('One task text'),
|
|
22
33
|
groups: queueGroups.optional(),
|
|
23
34
|
title: z.string().optional().describe('Title of the run, at most 60 characters'),
|
|
24
|
-
|
|
25
|
-
.boolean()
|
|
26
|
-
.optional()
|
|
27
|
-
.describe('Deliver merged groups automatically; omit to follow delivery.auto of the configuration'),
|
|
28
|
-
deliveryMode: z
|
|
29
|
-
.enum(DELIVERY_MODES)
|
|
30
|
-
.optional()
|
|
31
|
-
.describe('How the merged result is delivered (worktree, commit or branch); omit to follow delivery.mode of the configuration'),
|
|
35
|
+
...deliveryFields,
|
|
32
36
|
tags,
|
|
33
37
|
parent,
|
|
34
38
|
variant,
|
|
@@ -41,9 +45,10 @@ export function registerQueueAdd(kit) {
|
|
|
41
45
|
.boolean()
|
|
42
46
|
.optional()
|
|
43
47
|
.describe('true: a running queue does not take the task until you clear the flag'),
|
|
48
|
+
allowDuplicate: z.boolean().optional().describe(ALLOW_DUPLICATE),
|
|
44
49
|
repo,
|
|
45
50
|
},
|
|
46
|
-
}, ({ pipeline, variant: variantId, provider: providerId, task, groups, title, autoDeliver, deliveryMode, tags: tagNames, parent: parentRef, skip: skipSteps, after: afterIds, links: taskLinks, attachments: files, postponed, repo: where, }) => attempt(() => showQueue('queue_add', {
|
|
51
|
+
}, ({ pipeline, variant: variantId, provider: providerId, task, groups, title, autoDeliver, deliveryMode, tags: tagNames, parent: parentRef, skip: skipSteps, after: afterIds, links: taskLinks, attachments: files, postponed, allowDuplicate, repo: where, }) => attempt(() => hintDuplicate(HOST_DUPLICATE_HINT, () => showQueue('queue_add', {
|
|
47
52
|
pipeline,
|
|
48
53
|
...present({ variant: variantId, provider: providerId }),
|
|
49
54
|
...present({ task, groups, title }),
|
|
@@ -54,7 +59,8 @@ export function registerQueueAdd(kit) {
|
|
|
54
59
|
...present({ skip: skipSteps, after: afterIds, links: taskLinks }),
|
|
55
60
|
...(files !== undefined ? { attachments: files.map((path) => ({ path })) } : {}),
|
|
56
61
|
...(postponed !== undefined ? { postponed } : {}),
|
|
57
|
-
|
|
62
|
+
...(allowDuplicate !== undefined ? { allowDuplicate } : {}),
|
|
63
|
+
}, where))));
|
|
58
64
|
}
|
|
59
65
|
const postponedEdit = z
|
|
60
66
|
.boolean()
|
|
@@ -69,7 +75,7 @@ export function registerQueueEdit(kit) {
|
|
|
69
75
|
item,
|
|
70
76
|
pipeline: z.string().optional(),
|
|
71
77
|
variant,
|
|
72
|
-
provider: kit.provider
|
|
78
|
+
provider: kit.provider,
|
|
73
79
|
task: z.string().optional(),
|
|
74
80
|
groups: queueGroups.optional(),
|
|
75
81
|
title: z.string().nullable().optional().describe('null removes the title'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-queue.js","sourceRoot":"","sources":["../../../src/presentation/mcp/host-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,Y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AQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAC5B,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAC7F,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { DELIVERY_MODES } from '../../feature/swarm-config/types/index.js';
|
|
3
2
|
import { formatApply, formatGroup, formatRunQueued, formatRunList } from '../format/index.js';
|
|
4
3
|
import { repositoryArgument } from '../ipc/client/index.js';
|
|
5
|
-
import { attempt } from './tools.js';
|
|
4
|
+
import { ALLOW_DUPLICATE, attempt, hintDuplicate, HOST_DUPLICATE_HINT } from './tools.js';
|
|
6
5
|
import { withData } from './host-kit.js';
|
|
6
|
+
import { deliveryFields } from './host-queue.js';
|
|
7
7
|
import { linkInputs, present } from './host-links.js';
|
|
8
8
|
export function registerRun(kit) {
|
|
9
9
|
const { options, server, tags, parent, variant, skip, after, attachments, repo } = kit;
|
|
10
10
|
server.registerTool('swarm_run', {
|
|
11
11
|
title: 'Queue a swarm task',
|
|
12
|
-
description: 'Queue a pipeline from the aip/ configuration in a git repository: the task goes to the end of the repository queue, a stopped queue is started, and the run is created when the queue takes the task (the answer says whether it already exists). Pass either task (one text; the pipeline may split it into groups) or groups (explicit list). The run works in its own branches; your working copy is not changed.',
|
|
12
|
+
description: 'Queue a pipeline from the aip/ configuration in a git repository: the task goes to the end of the repository queue, a stopped queue is started, and the run is created when the queue takes the task (the answer says whether it already exists). Pass either task (one text; the pipeline may split it into groups) or groups (explicit list). The run works in its own branches; your working copy is not changed. A copy of a task that already waits in the queue is refused: the error names the waiting task.',
|
|
13
13
|
inputSchema: {
|
|
14
14
|
pipeline: z.string().describe('Pipeline id from the aip/ configuration'),
|
|
15
15
|
task: z.string().optional().describe('One task text'),
|
|
@@ -22,14 +22,7 @@ export function registerRun(kit) {
|
|
|
22
22
|
.string()
|
|
23
23
|
.optional()
|
|
24
24
|
.describe('Short title of the run, at most 60 characters; otherwise a model names it'),
|
|
25
|
-
|
|
26
|
-
.boolean()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Deliver merged groups automatically; omit to follow delivery.auto of the configuration'),
|
|
29
|
-
deliveryMode: z
|
|
30
|
-
.enum(DELIVERY_MODES)
|
|
31
|
-
.optional()
|
|
32
|
-
.describe('How the merged result is delivered (worktree, commit or branch); omit to follow delivery.mode of the configuration'),
|
|
25
|
+
...deliveryFields,
|
|
33
26
|
tags,
|
|
34
27
|
parent,
|
|
35
28
|
variant,
|
|
@@ -38,9 +31,10 @@ export function registerRun(kit) {
|
|
|
38
31
|
after,
|
|
39
32
|
links: linkInputs,
|
|
40
33
|
attachments,
|
|
34
|
+
allowDuplicate: z.boolean().optional().describe(ALLOW_DUPLICATE),
|
|
41
35
|
},
|
|
42
|
-
}, ({ pipeline, variant: variantId, provider: providerId, task, groups, repo, title, autoDeliver, deliveryMode, tags: tagNames, parent: parentRef, skip: skipSteps, after: afterIds, links: taskLinks, attachments: files, }) => attempt(async () => {
|
|
43
|
-
const
|
|
36
|
+
}, ({ pipeline, variant: variantId, provider: providerId, task, groups, repo, title, autoDeliver, deliveryMode, tags: tagNames, parent: parentRef, skip: skipSteps, after: afterIds, links: taskLinks, attachments: files, allowDuplicate, }) => attempt(async () => {
|
|
37
|
+
const send = () => options.send('run', {
|
|
44
38
|
repository: repo === undefined ? options.cwd : repositoryArgument(repo, options.cwd),
|
|
45
39
|
pipeline,
|
|
46
40
|
...present({ variant: variantId, provider: providerId }),
|
|
@@ -55,7 +49,9 @@ export function registerRun(kit) {
|
|
|
55
49
|
...(afterIds !== undefined ? { after: afterIds } : {}),
|
|
56
50
|
...(taskLinks !== undefined ? { links: taskLinks } : {}),
|
|
57
51
|
...(files !== undefined ? { attachments: files.map((path) => ({ path })) } : {}),
|
|
58
|
-
|
|
52
|
+
...(allowDuplicate !== undefined ? { allowDuplicate } : {}),
|
|
53
|
+
});
|
|
54
|
+
const queued = (await hintDuplicate(HOST_DUPLICATE_HINT, send));
|
|
59
55
|
return withData(formatRunQueued(queued), queued);
|
|
60
56
|
}));
|
|
61
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-runs.js","sourceRoot":"","sources":["../../../src/presentation/mcp/host-runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"host-runs.js","sourceRoot":"","sources":["../../../src/presentation/mcp/host-runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAgB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC;IACvF,MAAM,CAAC,YAAY,CACjB,WAAW,EACX;QACE,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,qfAAqf;QACvf,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EA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C,CAAC,EAAE,CAAC;SAC9B,CAAC,CAAgB,CAAC;QACnB,OAAO,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAoB,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAsB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAoB,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAsB,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,eAAe,EAA4B,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline';
|
|
2
|
+
/** A JSON-RPC error with a static code: the agent learns what kind of failure it was, nothing more. */
|
|
3
|
+
function failure(id, code, number = -32000) {
|
|
4
|
+
return JSON.stringify({ jsonrpc: '2.0', id: id ?? null, error: { code: number, message: code } });
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Relays the JSON-RPC lines of an agent (newline-delimited, as MCP over stdio) to the daemon and
|
|
8
|
+
* writes what comes back. It does not interpret MCP: authority, the address of the registry and the
|
|
9
|
+
* secret stay in the daemon. Ends when the input ends and every answer is written.
|
|
10
|
+
*/
|
|
11
|
+
export async function runRemoteBridge(options) {
|
|
12
|
+
const { token, server, input, output, send } = options;
|
|
13
|
+
const pending = new Set();
|
|
14
|
+
const write = (line) => void output.write(`${line}\n`);
|
|
15
|
+
const relay = async (line) => {
|
|
16
|
+
let message;
|
|
17
|
+
try {
|
|
18
|
+
message = JSON.parse(line);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
write(failure(null, 'parse_error', -32700));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (typeof message !== 'object' || message === null || Array.isArray(message)) {
|
|
25
|
+
write(failure(null, 'invalid_request', -32600));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const id = message.id;
|
|
29
|
+
try {
|
|
30
|
+
const answer = (await send('mcp_remote_forward', { token, server, message }));
|
|
31
|
+
if (answer.message !== null && answer.message !== undefined) {
|
|
32
|
+
write(JSON.stringify(answer.message));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// A notification has no one to tell; a request gets the static code.
|
|
37
|
+
if (id !== undefined && id !== null)
|
|
38
|
+
write(failure(id, 'daemon_unavailable'));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const lines = createInterface({ input, crlfDelay: Infinity });
|
|
42
|
+
for await (const line of lines) {
|
|
43
|
+
if (line.trim() === '')
|
|
44
|
+
continue;
|
|
45
|
+
const work = relay(line).finally(() => pending.delete(work));
|
|
46
|
+
pending.add(work);
|
|
47
|
+
}
|
|
48
|
+
await Promise.all(pending);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=remote-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-bridge.js","sourceRoot":"","sources":["../../../src/presentation/mcp/remote-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAYhD,uGAAuG;AACvG,SAAS,OAAO,CAAC,EAAW,EAAE,IAAY,EAAE,MAAM,GAAG,CAAC,KAAK;IACzD,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,IAAI,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,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C;QACH,CAAC;QAAC,MAAM,CAAC;YACP,qEAAqE;YACrE,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,IAAI;gBAAE,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;QAChF,CAAC;IACH,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9D,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,SAAS;QACjC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { DUPLICATE_TASK_CODE } from '../../feature/queue/types/index.js';
|
|
1
2
|
import { errorMessage } from '../../platform/errors/index.js';
|
|
3
|
+
import { IpcError } from '../ipc/client/index.js';
|
|
2
4
|
export function text(value) {
|
|
3
5
|
return { content: [{ type: 'text', text: value }] };
|
|
4
6
|
}
|
|
@@ -16,4 +18,20 @@ export async function attempt(work) {
|
|
|
16
18
|
return failure(error);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
21
|
+
/** The parameter of the host tools that adds a task whose copy already waits in the queue. */
|
|
22
|
+
export const ALLOW_DUPLICATE = 'true: add the task even when the same one (pipeline, variant, provider and text or groups) already waits in the queue; without it such a copy is refused';
|
|
23
|
+
/** Runs `work`; the refusal of a task that already waits in the queue gets `hint`, the way out. */
|
|
24
|
+
export async function hintDuplicate(hint, work) {
|
|
25
|
+
try {
|
|
26
|
+
return await work();
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof IpcError && error.remoteCode === DUPLICATE_TASK_CODE) {
|
|
30
|
+
throw new IpcError(`${error.message}; ${hint}`, { code: error.remoteCode });
|
|
31
|
+
}
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** The way out for a host: the copy is added when it is asked for. */
|
|
36
|
+
export const HOST_DUPLICATE_HINT = 'pass allowDuplicate: true to add it again';
|
|
19
37
|
//# sourceMappingURL=tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/presentation/mcp/tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/presentation/mcp/tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIlD,MAAM,UAAU,IAAI,CAAC,KAAa;IAChC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACtD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAA2B;IACvD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED,8FAA8F;AAC9F,MAAM,CAAC,MAAM,eAAe,GAC1B,0JAA0J,CAAC;AAE7J,mGAAmG;AACnG,MAAM,CAAC,KAAK,UAAU,aAAa,CAAI,IAAY,EAAE,IAAsB;IACzE,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,QAAQ,IAAI,KAAK,CAAC,UAAU,KAAK,mBAAmB,EAAE,CAAC;YAC1E,MAAM,IAAI,QAAQ,CAAC,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;QAC9E,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,2CAA2C,CAAC"}
|
|
@@ -3,13 +3,14 @@ import { DELIVERY_MODES } from '../../feature/swarm-config/types/index.js';
|
|
|
3
3
|
import { FEEDBACK_LIMIT } from '../../feature/runs/types/index.js';
|
|
4
4
|
import { RUN_TITLE_LIMIT, WORKER_TOOLS } from '../../feature/agents/types/index.js';
|
|
5
5
|
import { invalid } from '../../platform/errors/index.js';
|
|
6
|
-
import { attempt } from './tools.js';
|
|
6
|
+
import { attempt, hintDuplicate } from './tools.js';
|
|
7
7
|
import { linkInputs, present } from './host-links.js';
|
|
8
8
|
/** The provider of a task a specialist adds: its own, never the one of the run. */
|
|
9
9
|
const providerField = z
|
|
10
10
|
.string()
|
|
11
|
+
.nullable()
|
|
11
12
|
.optional()
|
|
12
|
-
.describe('Id of a provider of the tiers; omit for none: the task does not inherit the provider of this run');
|
|
13
|
+
.describe('Id of a provider of the tiers; omit for the default provider of the project; null for none: the task does not inherit the provider of this run');
|
|
13
14
|
export function registerSplit(kit) {
|
|
14
15
|
const { options, server } = kit;
|
|
15
16
|
if (options.split) {
|
|
@@ -33,7 +34,7 @@ export function registerQueueAdd(kit) {
|
|
|
33
34
|
if (options.queue) {
|
|
34
35
|
server.registerTool(WORKER_TOOLS.queue, {
|
|
35
36
|
title: 'Add a task to the queue',
|
|
36
|
-
description: 'Put a task at the end of the queue of the repository this run belongs to, to be started later as its own run. Pass either task or groups; pass after with ids to order dependent tasks: ids returned by earlier calls, waiting items of the queues of any project or runs of any repository. The answer contains the id of the new item. It does not start the queue. Call swarm_report afterwards as usual.',
|
|
37
|
+
description: 'Put a task at the end of the queue of the repository this run belongs to, to be started later as its own run. Pass either task or groups; pass after with ids to order dependent tasks: ids returned by earlier calls, waiting items of the queues of any project or runs of any repository. The answer contains the id of the new item. A copy of a task that already waits in the queue is refused: to correct a task you queued, change it with swarm_queue_edit or remove it with swarm_queue_remove. It does not start the queue. Call swarm_report afterwards as usual.',
|
|
37
38
|
inputSchema: {
|
|
38
39
|
pipeline: z.string().min(1).describe('Pipeline id of the configuration, e.g. feature'),
|
|
39
40
|
task: z.string().trim().min(1).optional().describe('One task text'),
|
|
@@ -76,15 +77,86 @@ export function registerQueueAdd(kit) {
|
|
|
76
77
|
if ((fields.task === undefined) === (fields.groups === undefined)) {
|
|
77
78
|
throw invalid('mcp.invalid_arguments', 'pass either task or groups');
|
|
78
79
|
}
|
|
79
|
-
const result = (await options.send('worker_queue_add', {
|
|
80
|
+
const result = (await hintDuplicate(WORKER_DUPLICATE_HINT, () => options.send('worker_queue_add', {
|
|
80
81
|
token: options.token,
|
|
81
82
|
pipeline,
|
|
82
83
|
...present(fields),
|
|
83
|
-
}));
|
|
84
|
+
})));
|
|
84
85
|
return `Queued ${result.item ?? 'the task'} for pipeline ${pipeline}. It starts when the queue runs.`;
|
|
85
86
|
}));
|
|
86
87
|
}
|
|
87
88
|
}
|
|
89
|
+
/** The way out for a specialist: the waiting task is corrected, no copy is added. */
|
|
90
|
+
const WORKER_DUPLICATE_HINT = 'change the waiting task with swarm_queue_edit or remove it with swarm_queue_remove instead of adding a copy';
|
|
91
|
+
const ownItem = z
|
|
92
|
+
.string()
|
|
93
|
+
.min(1)
|
|
94
|
+
.describe('Id of a waiting task this run queued, as swarm_queue_add returned it');
|
|
95
|
+
/** The fields of a queued task a specialist may change; `null` resets a field to its default. */
|
|
96
|
+
const editFields = {
|
|
97
|
+
pipeline: z.string().min(1).optional().describe('Pipeline id of the configuration'),
|
|
98
|
+
task: z.string().trim().min(1).optional().describe('One task text; replaces the groups'),
|
|
99
|
+
groups: z
|
|
100
|
+
.array(z.object({ title: z.string().trim().min(1), task: z.string().trim().min(1) }))
|
|
101
|
+
.min(1)
|
|
102
|
+
.optional()
|
|
103
|
+
.describe('Explicit groups; replace the task text'),
|
|
104
|
+
title: z
|
|
105
|
+
.string()
|
|
106
|
+
.trim()
|
|
107
|
+
.min(1)
|
|
108
|
+
.max(RUN_TITLE_LIMIT)
|
|
109
|
+
.nullable()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe(`Title of the run, at most ${RUN_TITLE_LIMIT} characters; null: none`),
|
|
112
|
+
autoDeliver: z
|
|
113
|
+
.boolean()
|
|
114
|
+
.nullable()
|
|
115
|
+
.optional()
|
|
116
|
+
.describe('Deliver merged groups automatically; null: follow delivery.auto'),
|
|
117
|
+
deliveryMode: z
|
|
118
|
+
.enum(DELIVERY_MODES)
|
|
119
|
+
.nullable()
|
|
120
|
+
.optional()
|
|
121
|
+
.describe('worktree, commit or branch; null: follow delivery.mode'),
|
|
122
|
+
variant: z.string().optional().describe('Id of a variant of the pipeline'),
|
|
123
|
+
provider: z.string().nullable().optional().describe('Id of a provider of the tiers; null: none'),
|
|
124
|
+
skip: z.array(z.string()).optional().describe('Ids of pipeline steps to skip; replaces the list'),
|
|
125
|
+
after: z
|
|
126
|
+
.array(z.string().min(1))
|
|
127
|
+
.optional()
|
|
128
|
+
.describe('Ids that must be done first; replaces the list, [] clears it'),
|
|
129
|
+
links: linkInputs,
|
|
130
|
+
};
|
|
131
|
+
/** `swarm_queue_edit` and `swarm_queue_remove`: a specialist corrects the tasks its run queued. */
|
|
132
|
+
export function registerQueueFix(kit) {
|
|
133
|
+
const { options, server } = kit;
|
|
134
|
+
if (!options.queue)
|
|
135
|
+
return;
|
|
136
|
+
server.registerTool(WORKER_TOOLS.queueEdit, {
|
|
137
|
+
title: 'Change a task this run queued',
|
|
138
|
+
description: 'Change a waiting task this run put into the queue: its text or groups, title, pipeline, variant, provider, delivery, skipped steps, after or links. Pass item and at least one field; a field that is not passed stays. Use it to correct a task instead of adding a copy. A task of another run or of a person, and a task that already became a run, is refused. The parent of the task stays this run. It does not start the queue. Call swarm_report afterwards as usual.',
|
|
139
|
+
inputSchema: { item: ownItem, ...editFields },
|
|
140
|
+
}, ({ item, ...fields }) => attempt(async () => {
|
|
141
|
+
const changes = Object.fromEntries(Object.entries(fields).filter(([, value]) => value !== undefined));
|
|
142
|
+
if (Object.keys(changes).length === 0) {
|
|
143
|
+
throw invalid('mcp.invalid_arguments', 'pass at least one field to change');
|
|
144
|
+
}
|
|
145
|
+
if (fields.task !== undefined && fields.groups !== undefined) {
|
|
146
|
+
throw invalid('mcp.invalid_arguments', 'pass either task or groups');
|
|
147
|
+
}
|
|
148
|
+
await options.send('worker_queue_edit', { token: options.token, item, ...changes });
|
|
149
|
+
return `Changed ${item}. Call swarm_report when you are done.`;
|
|
150
|
+
}));
|
|
151
|
+
server.registerTool(WORKER_TOOLS.queueRemove, {
|
|
152
|
+
title: 'Remove a task this run queued',
|
|
153
|
+
description: 'Remove a waiting task this run put into the queue; the tasks that waited for it no longer do. A task of another run or of a person, and a task that already became a run, is refused. Call swarm_report afterwards as usual.',
|
|
154
|
+
inputSchema: { item: ownItem },
|
|
155
|
+
}, ({ item }) => attempt(async () => {
|
|
156
|
+
await options.send('worker_queue_remove', { token: options.token, item });
|
|
157
|
+
return `Removed ${item}. Call swarm_report when you are done.`;
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
88
160
|
export function registerRepair(kit) {
|
|
89
161
|
const { options, server } = kit;
|
|
90
162
|
if (options.repair) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-extra.js","sourceRoot":"","sources":["../../../src/presentation/mcp/worker-extra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"worker-extra.js","sourceRoot":"","sources":["../../../src/presentation/mcp/worker-extra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGtD,mFAAmF;AACnF,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,EAAE;KACV,QAAQ,CACP,gJAAgJ,CACjJ,CAAC;AAEJ,MAAM,UAAU,aAAa,CAAC,GAAc;IAC1C,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,G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IAAI,CAAC,eAAe,EAAE;gBAClC,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzC,MAAM;aACP,CAAC,CAAC;YACH,OAAO,4BAA4B,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,wCAAwC,CAAC;QACvH,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-tools.js","sourceRoot":"","sources":["../../../src/presentation/mcp/worker-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,OAAO,EAAa,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"worker-tools.js","sourceRoot":"","sources":["../../../src/presentation/mcp/worker-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO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E;YACrD,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,QAAQ,EAAE,SAAS;YACnB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxC,CAAC,CAAoB,CAAC;QACvB,OAAO,qBAAqB,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,SAAS,yCAAyC,CAAC;IACrG,CAAC,CAAC,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerQueueAdd, registerRepair, registerSplit } from './worker-extra.js';
|
|
1
|
+
import { registerQueueAdd, registerQueueFix, registerRepair, registerSplit, } from './worker-extra.js';
|
|
2
2
|
import { registerRunShow } from './worker-read.js';
|
|
3
3
|
import { registerArtifact, registerReport, workerKit } from './worker-tools.js';
|
|
4
4
|
export function createWorkerServer(options) {
|
|
@@ -8,6 +8,7 @@ export function createWorkerServer(options) {
|
|
|
8
8
|
registerRunShow(kit);
|
|
9
9
|
registerSplit(kit);
|
|
10
10
|
registerQueueAdd(kit);
|
|
11
|
+
registerQueueFix(kit);
|
|
11
12
|
registerRepair(kit);
|
|
12
13
|
return kit.server;
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/presentation/mcp/worker.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/presentation/mcp/worker.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAsB,MAAM,mBAAmB,CAAC;AAIpG,MAAM,UAAU,kBAAkB,CAAC,OAAsB;IACvD,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/B,cAAc,CAAC,GAAG,CAAC,CAAC;IACpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,eAAe,CAAC,GAAG,CAAC,CAAC;IACrB,aAAa,CAAC,GAAG,CAAC,CAAC;IACnB,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,cAAc,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { serverHostAllowed, serverOriginAllowed } from './auth/proxy.js';
|
|
2
|
+
import { panel } from './errors.js';
|
|
3
|
+
import { cookieToken, hostAllowed, sameToken } from './http.js';
|
|
4
|
+
/** The local panel answers only its own host and origin. */
|
|
5
|
+
export function assertLocalHost(incoming, port) {
|
|
6
|
+
if (!hostAllowed(incoming, port))
|
|
7
|
+
throw panel('forbidden', 'forbidden host or origin');
|
|
8
|
+
}
|
|
9
|
+
/** The access token of the local panel, in the header or in the cookie; nothing to check without one. */
|
|
10
|
+
export function assertToken(incoming, token) {
|
|
11
|
+
if (token === null)
|
|
12
|
+
return;
|
|
13
|
+
const given = incoming.headers['x-aip-token'] ?? cookieToken(incoming.headers.cookie);
|
|
14
|
+
if (!sameToken(given, token))
|
|
15
|
+
throw panel('unauthorized', 'missing or invalid token');
|
|
16
|
+
}
|
|
17
|
+
/** Server mode: the host and the origin of `public_url`. */
|
|
18
|
+
export function assertServerHost(incoming, gate, exempt = false, skipOrigin = false) {
|
|
19
|
+
if (!serverHostAllowed(incoming, gate.options))
|
|
20
|
+
throw panel('forbidden', 'forbidden host');
|
|
21
|
+
if (!skipOrigin && !serverOriginAllowed(incoming, gate.options, exempt)) {
|
|
22
|
+
throw panel('forbidden', 'forbidden origin');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** The checks of a request of the API, for a request that opens a long connection. */
|
|
26
|
+
export async function connectionIdentity(access, incoming) {
|
|
27
|
+
const { gate } = access;
|
|
28
|
+
if (gate === null) {
|
|
29
|
+
assertLocalHost(incoming, access.port);
|
|
30
|
+
assertToken(incoming, access.token);
|
|
31
|
+
return { actor: undefined, recheck: null };
|
|
32
|
+
}
|
|
33
|
+
assertServerHost(incoming, gate);
|
|
34
|
+
const user = await gate.auth.identify(incoming);
|
|
35
|
+
if (user === null)
|
|
36
|
+
throw panel('unauthorized', 'sign in or send a personal token');
|
|
37
|
+
return {
|
|
38
|
+
actor: user.id,
|
|
39
|
+
recheck: async () => (await gate.auth.identify(incoming)) !== null,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../../src/presentation/web/access.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEhE,4DAA4D;AAC5D,MAAM,UAAU,eAAe,CAAC,QAAyB,EAAE,IAAY;IACrE,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC;QAAE,MAAM,KAAK,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC;AACzF,CAAC;AAED,yGAAyG;AACzG,MAAM,UAAU,WAAW,CAAC,QAAyB,EAAE,KAAoB;IACzE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AC;IAChD,IAAI,IAAI,KAAK,IAAI;QAAE,MAAM,KAAK,CAAC,cAAc,EAAE,kCAAkC,CAAC,CAAC;IACnF,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,EAAE;QACd,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI;KACnE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/presentation/web/auth/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,iBAAiB,EAAkB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { request, IpcError } from '../../ipc/client/index.js';
|
|
2
|
+
import {} from '../../ipc/contract/index.js';
|
|
3
|
+
import { isSecure } from './proxy.js';
|
|
4
|
+
import { Authenticator, SESSION_COOKIE } from './session.js';
|
|
5
|
+
export function createGate(socket, options) {
|
|
6
|
+
const resolve = async (credential) => {
|
|
7
|
+
const result = (await request(socket, 'auth_resolve', credential));
|
|
8
|
+
return result.user;
|
|
9
|
+
};
|
|
10
|
+
return { options, socket, auth: new Authenticator(resolve) };
|
|
11
|
+
}
|
|
12
|
+
/** A call to the daemon as the system, or as a user. */
|
|
13
|
+
export function call(gate, method, params, actor) {
|
|
14
|
+
return request(gate.socket, method, params, 30_000, actor);
|
|
15
|
+
}
|
|
16
|
+
export function cookie(gate, value, maxAgeSeconds) {
|
|
17
|
+
const secure = isSecure(gate.options) ? '; Secure' : '';
|
|
18
|
+
return `${SESSION_COOKIE}=${value}; Path=/; HttpOnly; SameSite=Lax; Max-Age=${maxAgeSeconds}${secure}`;
|
|
19
|
+
}
|
|
20
|
+
export function redirect(response, location, headers = {}) {
|
|
21
|
+
response.writeHead(302, { location, 'cache-control': 'no-store', ...headers });
|
|
22
|
+
response.end();
|
|
23
|
+
}
|
|
24
|
+
export function statusOf(error) {
|
|
25
|
+
if (error instanceof IpcError) {
|
|
26
|
+
if (error.remoteKind === 'forbidden')
|
|
27
|
+
return 403;
|
|
28
|
+
if (error.remoteKind === 'unauthorized')
|
|
29
|
+
return 401;
|
|
30
|
+
}
|
|
31
|
+
return 400;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../../../../src/presentation/web/auth/gate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAA6C,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,QAAQ,EAA0B,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAS7D,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,OAA0B;IACnE,MAAM,OAAO,GAAG,KAAK,EAAE,UAAgD,EAAE,EAAE;QACzE,MAAM,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,CAAC,CAA8B,CAAC;QAChG,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,IAAI,CAClB,IAAgB,EAChB,MAAS,EACT,MAAmB,EACnB,KAAc;IAEd,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAgB,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