@hotmeshio/long-tail 0.1.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/LICENSE +202 -0
- package/README.md +262 -0
- package/build/examples/external-mcp-server/server.d.ts +17 -0
- package/build/examples/external-mcp-server/server.js +116 -0
- package/build/examples/index.d.ts +2 -0
- package/build/examples/index.js +7 -0
- package/build/examples/seed.d.ts +5 -0
- package/build/examples/seed.js +221 -0
- package/build/examples/types/envelopes.d.ts +34 -0
- package/build/examples/types/envelopes.js +8 -0
- package/build/examples/types/index.d.ts +10 -0
- package/build/examples/types/index.js +9 -0
- package/build/examples/types/resolvers.d.ts +27 -0
- package/build/examples/types/resolvers.js +9 -0
- package/build/examples/workers.d.ts +10 -0
- package/build/examples/workers.js +49 -0
- package/build/examples/workflows/basic-echo/activities.d.ts +20 -0
- package/build/examples/workflows/basic-echo/activities.js +55 -0
- package/build/examples/workflows/basic-echo/index.d.ts +14 -0
- package/build/examples/workflows/basic-echo/index.js +66 -0
- package/build/examples/workflows/kitchen-sink/activities.d.ts +40 -0
- package/build/examples/workflows/kitchen-sink/activities.js +46 -0
- package/build/examples/workflows/kitchen-sink/index.d.ts +22 -0
- package/build/examples/workflows/kitchen-sink/index.js +123 -0
- package/build/examples/workflows/review-content/activities.d.ts +10 -0
- package/build/examples/workflows/review-content/activities.js +44 -0
- package/build/examples/workflows/review-content/index.d.ts +10 -0
- package/build/examples/workflows/review-content/index.js +95 -0
- package/build/examples/workflows/review-content/types.d.ts +28 -0
- package/build/examples/workflows/review-content/types.js +2 -0
- package/build/index.d.ts +37 -0
- package/build/index.js +151 -0
- package/build/modules/auth.d.ts +58 -0
- package/build/modules/auth.js +163 -0
- package/build/modules/config.d.ts +19 -0
- package/build/modules/config.js +26 -0
- package/build/modules/defaults.d.ts +58 -0
- package/build/modules/defaults.js +95 -0
- package/build/modules/ltconfig.d.ts +21 -0
- package/build/modules/ltconfig.js +110 -0
- package/build/modules/maintenance.d.ts +18 -0
- package/build/modules/maintenance.js +47 -0
- package/build/routes/auth.d.ts +2 -0
- package/build/routes/auth.js +48 -0
- package/build/routes/bot-accounts.d.ts +2 -0
- package/build/routes/bot-accounts.js +280 -0
- package/build/routes/controlplane.d.ts +2 -0
- package/build/routes/controlplane.js +144 -0
- package/build/routes/dba.d.ts +2 -0
- package/build/routes/dba.js +86 -0
- package/build/routes/delegation.d.ts +2 -0
- package/build/routes/delegation.js +81 -0
- package/build/routes/escalations/bulk.d.ts +2 -0
- package/build/routes/escalations/bulk.js +324 -0
- package/build/routes/escalations/helpers.d.ts +5 -0
- package/build/routes/escalations/helpers.js +48 -0
- package/build/routes/escalations/index.d.ts +2 -0
- package/build/routes/escalations/index.js +20 -0
- package/build/routes/escalations/list.d.ts +2 -0
- package/build/routes/escalations/list.js +140 -0
- package/build/routes/escalations/resolve.d.ts +2 -0
- package/build/routes/escalations/resolve.js +240 -0
- package/build/routes/escalations/single.d.ts +2 -0
- package/build/routes/escalations/single.js +195 -0
- package/build/routes/exports.d.ts +2 -0
- package/build/routes/exports.js +163 -0
- package/build/routes/files.d.ts +2 -0
- package/build/routes/files.js +47 -0
- package/build/routes/index.d.ts +2 -0
- package/build/routes/index.js +52 -0
- package/build/routes/insight.d.ts +2 -0
- package/build/routes/insight.js +58 -0
- package/build/routes/maintenance.d.ts +2 -0
- package/build/routes/maintenance.js +38 -0
- package/build/routes/mcp-runs.d.ts +2 -0
- package/build/routes/mcp-runs.js +85 -0
- package/build/routes/mcp.d.ts +2 -0
- package/build/routes/mcp.js +264 -0
- package/build/routes/namespaces.d.ts +2 -0
- package/build/routes/namespaces.js +71 -0
- package/build/routes/oauth.d.ts +7 -0
- package/build/routes/oauth.js +217 -0
- package/build/routes/resolve.d.ts +9 -0
- package/build/routes/resolve.js +19 -0
- package/build/routes/roles.d.ts +2 -0
- package/build/routes/roles.js +195 -0
- package/build/routes/settings.d.ts +2 -0
- package/build/routes/settings.js +35 -0
- package/build/routes/tasks.d.ts +2 -0
- package/build/routes/tasks.js +133 -0
- package/build/routes/users.d.ts +2 -0
- package/build/routes/users.js +206 -0
- package/build/routes/workflows/config.d.ts +2 -0
- package/build/routes/workflows/config.js +123 -0
- package/build/routes/workflows/discovery.d.ts +2 -0
- package/build/routes/workflows/discovery.js +146 -0
- package/build/routes/workflows/index.d.ts +2 -0
- package/build/routes/workflows/index.js +18 -0
- package/build/routes/workflows/invocation.d.ts +2 -0
- package/build/routes/workflows/invocation.js +162 -0
- package/build/routes/yaml-workflows/crud.d.ts +2 -0
- package/build/routes/yaml-workflows/crud.js +276 -0
- package/build/routes/yaml-workflows/deployment.d.ts +2 -0
- package/build/routes/yaml-workflows/deployment.js +179 -0
- package/build/routes/yaml-workflows/helpers.d.ts +2 -0
- package/build/routes/yaml-workflows/helpers.js +8 -0
- package/build/routes/yaml-workflows/index.d.ts +2 -0
- package/build/routes/yaml-workflows/index.js +21 -0
- package/build/routes/yaml-workflows/versions.d.ts +2 -0
- package/build/routes/yaml-workflows/versions.js +116 -0
- package/build/scripts/process-helpers.d.ts +11 -0
- package/build/scripts/process-helpers.js +59 -0
- package/build/scripts/process.d.ts +18 -0
- package/build/scripts/process.js +191 -0
- package/build/scripts/token.d.ts +13 -0
- package/build/scripts/token.js +42 -0
- package/build/services/auth/bot-api-key.d.ts +32 -0
- package/build/services/auth/bot-api-key.js +112 -0
- package/build/services/auth/delegation.d.ts +20 -0
- package/build/services/auth/delegation.js +53 -0
- package/build/services/auth/service-token.d.ts +23 -0
- package/build/services/auth/service-token.js +105 -0
- package/build/services/config/cache.d.ts +2 -0
- package/build/services/config/cache.js +24 -0
- package/build/services/config/index.d.ts +4 -0
- package/build/services/config/index.js +13 -0
- package/build/services/config/provider.d.ts +2 -0
- package/build/services/config/provider.js +30 -0
- package/build/services/config/read.d.ts +3 -0
- package/build/services/config/read.js +68 -0
- package/build/services/config/sql.d.ts +14 -0
- package/build/services/config/sql.js +58 -0
- package/build/services/config/write.d.ts +5 -0
- package/build/services/config/write.js +61 -0
- package/build/services/controlplane/index.d.ts +47 -0
- package/build/services/controlplane/index.js +124 -0
- package/build/services/controlplane/quorum-bridge.d.ts +15 -0
- package/build/services/controlplane/quorum-bridge.js +62 -0
- package/build/services/controlplane/sql.d.ts +21 -0
- package/build/services/controlplane/sql.js +70 -0
- package/build/services/controlplane/types.d.ts +13 -0
- package/build/services/controlplane/types.js +3 -0
- package/build/services/cron/index.d.ts +46 -0
- package/build/services/cron/index.js +199 -0
- package/build/services/db/index.d.ts +3 -0
- package/build/services/db/index.js +19 -0
- package/build/services/db/migrate.d.ts +1 -0
- package/build/services/db/migrate.js +78 -0
- package/build/services/dba.d.ts +28 -0
- package/build/services/dba.js +32 -0
- package/build/services/escalation/bulk.d.ts +27 -0
- package/build/services/escalation/bulk.js +57 -0
- package/build/services/escalation/crud.d.ts +47 -0
- package/build/services/escalation/crud.js +150 -0
- package/build/services/escalation/index.d.ts +4 -0
- package/build/services/escalation/index.js +20 -0
- package/build/services/escalation/queries.d.ts +37 -0
- package/build/services/escalation/queries.js +163 -0
- package/build/services/escalation/sql.d.ts +21 -0
- package/build/services/escalation/sql.js +135 -0
- package/build/services/escalation/types.d.ts +43 -0
- package/build/services/escalation/types.js +13 -0
- package/build/services/escalation-strategy/default.d.ts +12 -0
- package/build/services/escalation-strategy/default.js +17 -0
- package/build/services/escalation-strategy/index.d.ts +21 -0
- package/build/services/escalation-strategy/index.js +32 -0
- package/build/services/escalation-strategy/mcp.d.ts +13 -0
- package/build/services/escalation-strategy/mcp.js +51 -0
- package/build/services/events/index.d.ts +37 -0
- package/build/services/events/index.js +64 -0
- package/build/services/events/memory.d.ts +27 -0
- package/build/services/events/memory.js +40 -0
- package/build/services/events/nats.d.ts +29 -0
- package/build/services/events/nats.js +50 -0
- package/build/services/events/publish.d.ts +72 -0
- package/build/services/events/publish.js +106 -0
- package/build/services/events/socketio.d.ts +33 -0
- package/build/services/events/socketio.js +70 -0
- package/build/services/export/client.d.ts +2 -0
- package/build/services/export/client.js +16 -0
- package/build/services/export/index.d.ts +39 -0
- package/build/services/export/index.js +158 -0
- package/build/services/export/post-process.d.ts +16 -0
- package/build/services/export/post-process.js +133 -0
- package/build/services/export/types.d.ts +25 -0
- package/build/services/export/types.js +2 -0
- package/build/services/hotmesh-utils.d.ts +61 -0
- package/build/services/hotmesh-utils.js +204 -0
- package/build/services/iam/activity.d.ts +52 -0
- package/build/services/iam/activity.js +59 -0
- package/build/services/iam/bots.d.ts +83 -0
- package/build/services/iam/bots.js +157 -0
- package/build/services/iam/context.d.ts +14 -0
- package/build/services/iam/context.js +61 -0
- package/build/services/iam/credentials.d.ts +42 -0
- package/build/services/iam/credentials.js +86 -0
- package/build/services/iam/envelope.d.ts +10 -0
- package/build/services/iam/envelope.js +32 -0
- package/build/services/iam/ephemeral.d.ts +50 -0
- package/build/services/iam/ephemeral.js +131 -0
- package/build/services/iam/index.d.ts +19 -0
- package/build/services/iam/index.js +37 -0
- package/build/services/iam/principal.d.ts +12 -0
- package/build/services/iam/principal.js +53 -0
- package/build/services/iam/resolve.d.ts +48 -0
- package/build/services/iam/resolve.js +89 -0
- package/build/services/insight/index.d.ts +30 -0
- package/build/services/insight/index.js +81 -0
- package/build/services/insight/prompts.d.ts +4 -0
- package/build/services/insight/prompts.js +15 -0
- package/build/services/interceptor/activities/config.d.ts +21 -0
- package/build/services/interceptor/activities/config.js +26 -0
- package/build/services/interceptor/activities/escalation.d.ts +58 -0
- package/build/services/interceptor/activities/escalation.js +110 -0
- package/build/services/interceptor/activities/index.d.ts +4 -0
- package/build/services/interceptor/activities/index.js +23 -0
- package/build/services/interceptor/activities/task.d.ts +65 -0
- package/build/services/interceptor/activities/task.js +168 -0
- package/build/services/interceptor/activities/workflow.d.ts +26 -0
- package/build/services/interceptor/activities/workflow.js +41 -0
- package/build/services/interceptor/activity-interceptor.d.ts +32 -0
- package/build/services/interceptor/activity-interceptor.js +86 -0
- package/build/services/interceptor/completion.d.ts +16 -0
- package/build/services/interceptor/completion.js +149 -0
- package/build/services/interceptor/context.d.ts +11 -0
- package/build/services/interceptor/context.js +20 -0
- package/build/services/interceptor/escalation.d.ts +26 -0
- package/build/services/interceptor/escalation.js +150 -0
- package/build/services/interceptor/index.d.ts +45 -0
- package/build/services/interceptor/index.js +160 -0
- package/build/services/interceptor/lifecycle.d.ts +44 -0
- package/build/services/interceptor/lifecycle.js +174 -0
- package/build/services/interceptor/state.d.ts +22 -0
- package/build/services/interceptor/state.js +36 -0
- package/build/services/interceptor/types.d.ts +43 -0
- package/build/services/interceptor/types.js +3 -0
- package/build/services/llm/detect.d.ts +16 -0
- package/build/services/llm/detect.js +33 -0
- package/build/services/llm/index.d.ts +34 -0
- package/build/services/llm/index.js +106 -0
- package/build/services/llm/providers/anthropic.d.ts +11 -0
- package/build/services/llm/providers/anthropic.js +85 -0
- package/build/services/llm/providers/openai.d.ts +9 -0
- package/build/services/llm/providers/openai.js +46 -0
- package/build/services/llm/translate.d.ts +66 -0
- package/build/services/llm/translate.js +192 -0
- package/build/services/llm/types.d.ts +64 -0
- package/build/services/llm/types.js +8 -0
- package/build/services/logger/index.d.ts +32 -0
- package/build/services/logger/index.js +69 -0
- package/build/services/logger/pino.d.ts +24 -0
- package/build/services/logger/pino.js +59 -0
- package/build/services/maintenance/index.d.ts +43 -0
- package/build/services/maintenance/index.js +183 -0
- package/build/services/mcp/adapter.d.ts +23 -0
- package/build/services/mcp/adapter.js +119 -0
- package/build/services/mcp/client/connection.d.ts +46 -0
- package/build/services/mcp/client/connection.js +280 -0
- package/build/services/mcp/client/index.d.ts +2 -0
- package/build/services/mcp/client/index.js +16 -0
- package/build/services/mcp/client/tools.d.ts +22 -0
- package/build/services/mcp/client/tools.js +118 -0
- package/build/services/mcp/db-server/index.d.ts +25 -0
- package/build/services/mcp/db-server/index.js +49 -0
- package/build/services/mcp/db-server/schemas.d.ts +52 -0
- package/build/services/mcp/db-server/schemas.js +34 -0
- package/build/services/mcp/db-server/tools.d.ts +5 -0
- package/build/services/mcp/db-server/tools.js +224 -0
- package/build/services/mcp/db.d.ts +26 -0
- package/build/services/mcp/db.js +141 -0
- package/build/services/mcp/index.d.ts +25 -0
- package/build/services/mcp/index.js +47 -0
- package/build/services/mcp/playwright-server/index.d.ts +14 -0
- package/build/services/mcp/playwright-server/index.js +25 -0
- package/build/services/mcp/playwright-server/lifecycle.d.ts +7 -0
- package/build/services/mcp/playwright-server/lifecycle.js +63 -0
- package/build/services/mcp/playwright-server/schemas.d.ts +81 -0
- package/build/services/mcp/playwright-server/schemas.js +48 -0
- package/build/services/mcp/playwright-server/tools.d.ts +2 -0
- package/build/services/mcp/playwright-server/tools.js +224 -0
- package/build/services/mcp/server.d.ts +26 -0
- package/build/services/mcp/server.js +286 -0
- package/build/services/mcp/sql.d.ts +12 -0
- package/build/services/mcp/sql.js +59 -0
- package/build/services/mcp/types.d.ts +17 -0
- package/build/services/mcp/types.js +3 -0
- package/build/services/mcp/vision-server.d.ts +15 -0
- package/build/services/mcp/vision-server.js +214 -0
- package/build/services/mcp/workflow-compiler-server.d.ts +15 -0
- package/build/services/mcp/workflow-compiler-server.js +206 -0
- package/build/services/mcp/workflow-server.d.ts +24 -0
- package/build/services/mcp/workflow-server.js +230 -0
- package/build/services/mcp-runs/enrichment.d.ts +12 -0
- package/build/services/mcp-runs/enrichment.js +39 -0
- package/build/services/mcp-runs/events.d.ts +6 -0
- package/build/services/mcp-runs/events.js +126 -0
- package/build/services/mcp-runs/execution-builder.d.ts +12 -0
- package/build/services/mcp-runs/execution-builder.js +100 -0
- package/build/services/mcp-runs/index.d.ts +4 -0
- package/build/services/mcp-runs/index.js +8 -0
- package/build/services/mcp-runs/queries.d.ts +28 -0
- package/build/services/mcp-runs/queries.js +71 -0
- package/build/services/mcp-runs/sql.d.ts +4 -0
- package/build/services/mcp-runs/sql.js +17 -0
- package/build/services/mcp-runs/types.d.ts +65 -0
- package/build/services/mcp-runs/types.js +2 -0
- package/build/services/namespace/index.d.ts +17 -0
- package/build/services/namespace/index.js +41 -0
- package/build/services/namespace/sql.d.ts +4 -0
- package/build/services/namespace/sql.js +23 -0
- package/build/services/namespace/types.d.ts +11 -0
- package/build/services/namespace/types.js +3 -0
- package/build/services/oauth/crypto.d.ts +19 -0
- package/build/services/oauth/crypto.js +95 -0
- package/build/services/oauth/db.d.ts +20 -0
- package/build/services/oauth/db.js +140 -0
- package/build/services/oauth/index.d.ts +12 -0
- package/build/services/oauth/index.js +77 -0
- package/build/services/oauth/providers/anthropic.d.ts +3 -0
- package/build/services/oauth/providers/anthropic.js +111 -0
- package/build/services/oauth/providers/github.d.ts +3 -0
- package/build/services/oauth/providers/github.js +46 -0
- package/build/services/oauth/providers/google.d.ts +3 -0
- package/build/services/oauth/providers/google.js +44 -0
- package/build/services/oauth/providers/index.d.ts +2 -0
- package/build/services/oauth/providers/index.js +7 -0
- package/build/services/oauth/providers/microsoft.d.ts +3 -0
- package/build/services/oauth/providers/microsoft.js +46 -0
- package/build/services/oauth/providers/mock.d.ts +3 -0
- package/build/services/oauth/providers/mock.js +76 -0
- package/build/services/oauth/providers/registry.d.ts +8 -0
- package/build/services/oauth/providers/registry.js +46 -0
- package/build/services/oauth/providers/types.d.ts +13 -0
- package/build/services/oauth/providers/types.js +2 -0
- package/build/services/oauth/state.d.ts +30 -0
- package/build/services/oauth/state.js +83 -0
- package/build/services/orchestrator/index.d.ts +23 -0
- package/build/services/orchestrator/index.js +156 -0
- package/build/services/orchestrator/types.d.ts +15 -0
- package/build/services/orchestrator/types.js +3 -0
- package/build/services/role/index.d.ts +47 -0
- package/build/services/role/index.js +136 -0
- package/build/services/role/sql.d.ts +14 -0
- package/build/services/role/sql.js +80 -0
- package/build/services/role/types.d.ts +11 -0
- package/build/services/role/types.js +3 -0
- package/build/services/storage/index.d.ts +12 -0
- package/build/services/storage/index.js +31 -0
- package/build/services/storage/local.d.ts +26 -0
- package/build/services/storage/local.js +129 -0
- package/build/services/storage/s3.d.ts +31 -0
- package/build/services/storage/s3.js +180 -0
- package/build/services/storage/types.d.ts +41 -0
- package/build/services/storage/types.js +2 -0
- package/build/services/task/crud.d.ts +21 -0
- package/build/services/task/crud.js +123 -0
- package/build/services/task/index.d.ts +4 -0
- package/build/services/task/index.js +20 -0
- package/build/services/task/process.d.ts +14 -0
- package/build/services/task/process.js +98 -0
- package/build/services/task/resolve.d.ts +12 -0
- package/build/services/task/resolve.js +49 -0
- package/build/services/task/sql.d.ts +19 -0
- package/build/services/task/sql.js +92 -0
- package/build/services/task/types.d.ts +56 -0
- package/build/services/task/types.js +9 -0
- package/build/services/telemetry/honeycomb.d.ts +53 -0
- package/build/services/telemetry/honeycomb.js +79 -0
- package/build/services/telemetry/index.d.ts +46 -0
- package/build/services/telemetry/index.js +68 -0
- package/build/services/user/auth.d.ts +7 -0
- package/build/services/user/auth.js +26 -0
- package/build/services/user/crud.d.ts +19 -0
- package/build/services/user/crud.js +151 -0
- package/build/services/user/index.d.ts +5 -0
- package/build/services/user/index.js +26 -0
- package/build/services/user/rbac.d.ts +15 -0
- package/build/services/user/rbac.js +32 -0
- package/build/services/user/roles.d.ts +7 -0
- package/build/services/user/roles.js +42 -0
- package/build/services/user/sql.d.ts +22 -0
- package/build/services/user/sql.js +45 -0
- package/build/services/user/types.d.ts +23 -0
- package/build/services/user/types.js +4 -0
- package/build/services/workers/registry.d.ts +10 -0
- package/build/services/workers/registry.js +26 -0
- package/build/services/workflow-invocation.d.ts +46 -0
- package/build/services/workflow-invocation.js +184 -0
- package/build/services/yaml-workflow/db-utils.d.ts +25 -0
- package/build/services/yaml-workflow/db-utils.js +93 -0
- package/build/services/yaml-workflow/db.d.ts +27 -0
- package/build/services/yaml-workflow/db.js +196 -0
- package/build/services/yaml-workflow/deployer-helpers.d.ts +13 -0
- package/build/services/yaml-workflow/deployer-helpers.js +133 -0
- package/build/services/yaml-workflow/deployer.d.ts +54 -0
- package/build/services/yaml-workflow/deployer.js +203 -0
- package/build/services/yaml-workflow/generator.d.ts +21 -0
- package/build/services/yaml-workflow/generator.js +117 -0
- package/build/services/yaml-workflow/index.d.ts +4 -0
- package/build/services/yaml-workflow/index.js +20 -0
- package/build/services/yaml-workflow/input-analyzer-helpers.d.ts +48 -0
- package/build/services/yaml-workflow/input-analyzer-helpers.js +183 -0
- package/build/services/yaml-workflow/input-analyzer.d.ts +30 -0
- package/build/services/yaml-workflow/input-analyzer.js +109 -0
- package/build/services/yaml-workflow/pattern-detector/array-source.d.ts +22 -0
- package/build/services/yaml-workflow/pattern-detector/array-source.js +120 -0
- package/build/services/yaml-workflow/pattern-detector/collapse.d.ts +27 -0
- package/build/services/yaml-workflow/pattern-detector/collapse.js +92 -0
- package/build/services/yaml-workflow/pattern-detector/index.d.ts +18 -0
- package/build/services/yaml-workflow/pattern-detector/index.js +22 -0
- package/build/services/yaml-workflow/pattern-detector/run-detection.d.ts +28 -0
- package/build/services/yaml-workflow/pattern-detector/run-detection.js +81 -0
- package/build/services/yaml-workflow/pattern-detector/types.d.ts +29 -0
- package/build/services/yaml-workflow/pattern-detector/types.js +8 -0
- package/build/services/yaml-workflow/pipeline/analyze.d.ts +11 -0
- package/build/services/yaml-workflow/pipeline/analyze.js +64 -0
- package/build/services/yaml-workflow/pipeline/build/dag.d.ts +25 -0
- package/build/services/yaml-workflow/pipeline/build/dag.js +254 -0
- package/build/services/yaml-workflow/pipeline/build/index.d.ts +20 -0
- package/build/services/yaml-workflow/pipeline/build/index.js +115 -0
- package/build/services/yaml-workflow/pipeline/build/iteration.d.ts +25 -0
- package/build/services/yaml-workflow/pipeline/build/iteration.js +231 -0
- package/build/services/yaml-workflow/pipeline/build/metadata.d.ts +15 -0
- package/build/services/yaml-workflow/pipeline/build/metadata.js +126 -0
- package/build/services/yaml-workflow/pipeline/build/transform.d.ts +17 -0
- package/build/services/yaml-workflow/pipeline/build/transform.js +94 -0
- package/build/services/yaml-workflow/pipeline/build/utils.d.ts +22 -0
- package/build/services/yaml-workflow/pipeline/build/utils.js +129 -0
- package/build/services/yaml-workflow/pipeline/build/wiring.d.ts +9 -0
- package/build/services/yaml-workflow/pipeline/build/wiring.js +148 -0
- package/build/services/yaml-workflow/pipeline/compile/index.d.ts +17 -0
- package/build/services/yaml-workflow/pipeline/compile/index.js +64 -0
- package/build/services/yaml-workflow/pipeline/compile/llm-call.d.ts +14 -0
- package/build/services/yaml-workflow/pipeline/compile/llm-call.js +153 -0
- package/build/services/yaml-workflow/pipeline/compile/parse-plan.d.ts +12 -0
- package/build/services/yaml-workflow/pipeline/compile/parse-plan.js +88 -0
- package/build/services/yaml-workflow/pipeline/compile/summarize.d.ts +39 -0
- package/build/services/yaml-workflow/pipeline/compile/summarize.js +174 -0
- package/build/services/yaml-workflow/pipeline/extract-helpers.d.ts +42 -0
- package/build/services/yaml-workflow/pipeline/extract-helpers.js +88 -0
- package/build/services/yaml-workflow/pipeline/extract.d.ts +24 -0
- package/build/services/yaml-workflow/pipeline/extract.js +235 -0
- package/build/services/yaml-workflow/pipeline/prompts.d.ts +15 -0
- package/build/services/yaml-workflow/pipeline/prompts.js +254 -0
- package/build/services/yaml-workflow/pipeline/validate.d.ts +12 -0
- package/build/services/yaml-workflow/pipeline/validate.js +111 -0
- package/build/services/yaml-workflow/sql.d.ts +19 -0
- package/build/services/yaml-workflow/sql.js +83 -0
- package/build/services/yaml-workflow/types.d.ts +223 -0
- package/build/services/yaml-workflow/types.js +8 -0
- package/build/services/yaml-workflow/workers/callbacks.d.ts +17 -0
- package/build/services/yaml-workflow/workers/callbacks.js +194 -0
- package/build/services/yaml-workflow/workers/events.d.ts +7 -0
- package/build/services/yaml-workflow/workers/events.js +49 -0
- package/build/services/yaml-workflow/workers/index.d.ts +4 -0
- package/build/services/yaml-workflow/workers/index.js +15 -0
- package/build/services/yaml-workflow/workers/register.d.ts +15 -0
- package/build/services/yaml-workflow/workers/register.js +233 -0
- package/build/services/yaml-workflow/workers/scope.d.ts +13 -0
- package/build/services/yaml-workflow/workers/scope.js +37 -0
- package/build/start/adapters.d.ts +6 -0
- package/build/start/adapters.js +80 -0
- package/build/start/config.d.ts +10 -0
- package/build/start/config.js +88 -0
- package/build/start/index.d.ts +21 -0
- package/build/start/index.js +87 -0
- package/build/start/server.d.ts +6 -0
- package/build/start/server.js +46 -0
- package/build/start/workers.d.ts +32 -0
- package/build/start/workers.js +144 -0
- package/build/system/activities/claude-code.d.ts +56 -0
- package/build/system/activities/claude-code.js +258 -0
- package/build/system/activities/file-storage.d.ts +31 -0
- package/build/system/activities/file-storage.js +71 -0
- package/build/system/activities/http.d.ts +27 -0
- package/build/system/activities/http.js +56 -0
- package/build/system/activities/oauth.d.ts +39 -0
- package/build/system/activities/oauth.js +33 -0
- package/build/system/activities/triage/cache.d.ts +7 -0
- package/build/system/activities/triage/cache.js +10 -0
- package/build/system/activities/triage/context.d.ts +21 -0
- package/build/system/activities/triage/context.js +92 -0
- package/build/system/activities/triage/discovery.d.ts +25 -0
- package/build/system/activities/triage/discovery.js +170 -0
- package/build/system/activities/triage/index.d.ts +5 -0
- package/build/system/activities/triage/index.js +22 -0
- package/build/system/activities/triage/llm.d.ts +9 -0
- package/build/system/activities/triage/llm.js +34 -0
- package/build/system/activities/triage/tools.d.ts +24 -0
- package/build/system/activities/triage/tools.js +178 -0
- package/build/system/index.d.ts +16 -0
- package/build/system/index.js +100 -0
- package/build/system/mcp-servers/claude-code.d.ts +17 -0
- package/build/system/mcp-servers/claude-code.js +110 -0
- package/build/system/mcp-servers/db-query/index.d.ts +25 -0
- package/build/system/mcp-servers/db-query/index.js +49 -0
- package/build/system/mcp-servers/db-query/schemas.d.ts +52 -0
- package/build/system/mcp-servers/db-query/schemas.js +34 -0
- package/build/system/mcp-servers/db-query/tools.d.ts +5 -0
- package/build/system/mcp-servers/db-query/tools.js +224 -0
- package/build/system/mcp-servers/document-vision.d.ts +15 -0
- package/build/system/mcp-servers/document-vision.js +228 -0
- package/build/system/mcp-servers/file-storage.d.ts +4 -0
- package/build/system/mcp-servers/file-storage.js +101 -0
- package/build/system/mcp-servers/http-fetch.d.ts +4 -0
- package/build/system/mcp-servers/http-fetch.js +100 -0
- package/build/system/mcp-servers/human-queue.d.ts +26 -0
- package/build/system/mcp-servers/human-queue.js +287 -0
- package/build/system/mcp-servers/oauth.d.ts +11 -0
- package/build/system/mcp-servers/oauth.js +100 -0
- package/build/system/mcp-servers/playwright/browser-lifecycle.d.ts +26 -0
- package/build/system/mcp-servers/playwright/browser-lifecycle.js +125 -0
- package/build/system/mcp-servers/playwright/index.d.ts +25 -0
- package/build/system/mcp-servers/playwright/index.js +42 -0
- package/build/system/mcp-servers/playwright/schemas.d.ts +383 -0
- package/build/system/mcp-servers/playwright/schemas.js +87 -0
- package/build/system/mcp-servers/playwright/tools-atomic.d.ts +2 -0
- package/build/system/mcp-servers/playwright/tools-atomic.js +9 -0
- package/build/system/mcp-servers/playwright/tools-navigation.d.ts +2 -0
- package/build/system/mcp-servers/playwright/tools-navigation.js +140 -0
- package/build/system/mcp-servers/playwright/tools-page-interaction.d.ts +2 -0
- package/build/system/mcp-servers/playwright/tools-page-interaction.js +162 -0
- package/build/system/mcp-servers/playwright/tools-run-script.d.ts +2 -0
- package/build/system/mcp-servers/playwright/tools-run-script.js +190 -0
- package/build/system/mcp-servers/playwright/types.d.ts +8 -0
- package/build/system/mcp-servers/playwright/types.js +30 -0
- package/build/system/mcp-servers/playwright-cli/helpers.d.ts +11 -0
- package/build/system/mcp-servers/playwright-cli/helpers.js +20 -0
- package/build/system/mcp-servers/playwright-cli/index.d.ts +4 -0
- package/build/system/mcp-servers/playwright-cli/index.js +15 -0
- package/build/system/mcp-servers/playwright-cli/schemas.d.ts +219 -0
- package/build/system/mcp-servers/playwright-cli/schemas.js +75 -0
- package/build/system/mcp-servers/playwright-cli/tools-auth.d.ts +2 -0
- package/build/system/mcp-servers/playwright-cli/tools-auth.js +183 -0
- package/build/system/mcp-servers/playwright-cli/tools-capture.d.ts +2 -0
- package/build/system/mcp-servers/playwright-cli/tools-capture.js +267 -0
- package/build/system/mcp-servers/prompts.d.ts +4 -0
- package/build/system/mcp-servers/prompts.js +10 -0
- package/build/system/mcp-servers/workflow-compiler.d.ts +15 -0
- package/build/system/mcp-servers/workflow-compiler.js +230 -0
- package/build/system/mcp-servers/workflow.d.ts +24 -0
- package/build/system/mcp-servers/workflow.js +231 -0
- package/build/system/seed/index.d.ts +7 -0
- package/build/system/seed/index.js +36 -0
- package/build/system/seed/server-definitions.d.ts +1460 -0
- package/build/system/seed/server-definitions.js +160 -0
- package/build/system/seed/tool-manifests-browser.d.ts +577 -0
- package/build/system/seed/tool-manifests-browser.js +158 -0
- package/build/system/seed/tool-manifests-data.d.ts +322 -0
- package/build/system/seed/tool-manifests-data.js +173 -0
- package/build/system/seed/tool-manifests-escalation.d.ts +173 -0
- package/build/system/seed/tool-manifests-escalation.js +76 -0
- package/build/system/seed/tool-manifests-workflows.d.ts +211 -0
- package/build/system/seed/tool-manifests-workflows.js +136 -0
- package/build/system/workflows/mcp-deterministic/activities.d.ts +6 -0
- package/build/system/workflows/mcp-deterministic/activities.js +56 -0
- package/build/system/workflows/mcp-deterministic/index.d.ts +9 -0
- package/build/system/workflows/mcp-deterministic/index.js +72 -0
- package/build/system/workflows/mcp-query/activities/caches.d.ts +7 -0
- package/build/system/workflows/mcp-query/activities/caches.js +10 -0
- package/build/system/workflows/mcp-query/activities/discovery.d.ts +31 -0
- package/build/system/workflows/mcp-query/activities/discovery.js +172 -0
- package/build/system/workflows/mcp-query/activities/index.d.ts +4 -0
- package/build/system/workflows/mcp-query/activities/index.js +13 -0
- package/build/system/workflows/mcp-query/activities/llm.d.ts +8 -0
- package/build/system/workflows/mcp-query/activities/llm.js +33 -0
- package/build/system/workflows/mcp-query/activities/tool-executor.d.ts +5 -0
- package/build/system/workflows/mcp-query/activities/tool-executor.js +112 -0
- package/build/system/workflows/mcp-query/activities/tool-loader.d.ts +14 -0
- package/build/system/workflows/mcp-query/activities/tool-loader.js +93 -0
- package/build/system/workflows/mcp-query/index.d.ts +14 -0
- package/build/system/workflows/mcp-query/index.js +227 -0
- package/build/system/workflows/mcp-query/prompts.d.ts +4 -0
- package/build/system/workflows/mcp-query/prompts.js +101 -0
- package/build/system/workflows/mcp-query/strategy-advisors.d.ts +14 -0
- package/build/system/workflows/mcp-query/strategy-advisors.js +109 -0
- package/build/system/workflows/mcp-query/types.d.ts +10 -0
- package/build/system/workflows/mcp-query/types.js +3 -0
- package/build/system/workflows/mcp-query-router/activities.d.ts +6 -0
- package/build/system/workflows/mcp-query-router/activities.js +12 -0
- package/build/system/workflows/mcp-query-router/index.d.ts +13 -0
- package/build/system/workflows/mcp-query-router/index.js +107 -0
- package/build/system/workflows/mcp-query-router/prompts.d.ts +1 -0
- package/build/system/workflows/mcp-query-router/prompts.js +8 -0
- package/build/system/workflows/mcp-triage/index.d.ts +31 -0
- package/build/system/workflows/mcp-triage/index.js +222 -0
- package/build/system/workflows/mcp-triage/prompts.d.ts +7 -0
- package/build/system/workflows/mcp-triage/prompts.js +159 -0
- package/build/system/workflows/mcp-triage/response-builders.d.ts +17 -0
- package/build/system/workflows/mcp-triage/response-builders.js +96 -0
- package/build/system/workflows/mcp-triage/response.d.ts +8 -0
- package/build/system/workflows/mcp-triage/response.js +157 -0
- package/build/system/workflows/mcp-triage/types.d.ts +20 -0
- package/build/system/workflows/mcp-triage/types.js +3 -0
- package/build/system/workflows/mcp-triage-deterministic/activities.d.ts +4 -0
- package/build/system/workflows/mcp-triage-deterministic/activities.js +8 -0
- package/build/system/workflows/mcp-triage-deterministic/index.d.ts +12 -0
- package/build/system/workflows/mcp-triage-deterministic/index.js +83 -0
- package/build/system/workflows/mcp-triage-router/activities.d.ts +9 -0
- package/build/system/workflows/mcp-triage-router/activities.js +15 -0
- package/build/system/workflows/mcp-triage-router/index.d.ts +13 -0
- package/build/system/workflows/mcp-triage-router/index.js +122 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types/auth.d.ts +34 -0
- package/build/types/auth.js +2 -0
- package/build/types/config.d.ts +48 -0
- package/build/types/config.js +2 -0
- package/build/types/delegation.d.ts +41 -0
- package/build/types/delegation.js +2 -0
- package/build/types/discovery.d.ts +12 -0
- package/build/types/discovery.js +3 -0
- package/build/types/envelope.d.ts +53 -0
- package/build/types/envelope.js +2 -0
- package/build/types/escalation-strategy.d.ts +37 -0
- package/build/types/escalation-strategy.js +2 -0
- package/build/types/escalation.d.ts +39 -0
- package/build/types/escalation.js +21 -0
- package/build/types/events.d.ts +65 -0
- package/build/types/events.js +2 -0
- package/build/types/export.d.ts +78 -0
- package/build/types/export.js +11 -0
- package/build/types/index.d.ts +21 -0
- package/build/types/index.js +6 -0
- package/build/types/logger.d.ts +26 -0
- package/build/types/logger.js +2 -0
- package/build/types/maintenance.d.ts +24 -0
- package/build/types/maintenance.js +2 -0
- package/build/types/mcp.d.ts +80 -0
- package/build/types/mcp.js +2 -0
- package/build/types/oauth.d.ts +74 -0
- package/build/types/oauth.js +2 -0
- package/build/types/startup.d.ts +110 -0
- package/build/types/startup.js +2 -0
- package/build/types/task.d.ts +39 -0
- package/build/types/task.js +2 -0
- package/build/types/telemetry.d.ts +32 -0
- package/build/types/telemetry.js +2 -0
- package/build/types/tool-context.d.ts +68 -0
- package/build/types/tool-context.js +14 -0
- package/build/types/user.d.ts +18 -0
- package/build/types/user.js +2 -0
- package/build/types/workflow.d.ts +35 -0
- package/build/types/workflow.js +2 -0
- package/build/types/yaml-workflow.d.ts +101 -0
- package/build/types/yaml-workflow.js +5 -0
- package/build/vitest.config.d.ts +2 -0
- package/build/vitest.config.js +32 -0
- package/build/vitest.integration.config.d.ts +2 -0
- package/build/vitest.integration.config.js +25 -0
- package/build/workers/index.d.ts +6 -0
- package/build/workers/index.js +20 -0
- package/dashboard/dist/assets/AdminDashboard-jfacvOC7.js +2 -0
- package/dashboard/dist/assets/AdminDashboard-jfacvOC7.js.map +1 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-BglLDoT8.js +2 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-BglLDoT8.js.map +1 -0
- package/dashboard/dist/assets/BotPicker-D6FYW1Gt.js +2 -0
- package/dashboard/dist/assets/BotPicker-D6FYW1Gt.js.map +1 -0
- package/dashboard/dist/assets/CollapsibleSection-Cxk4wvjT.js +2 -0
- package/dashboard/dist/assets/CollapsibleSection-Cxk4wvjT.js.map +1 -0
- package/dashboard/dist/assets/ConfirmDeleteModal-FSXyKjaB.js +2 -0
- package/dashboard/dist/assets/ConfirmDeleteModal-FSXyKjaB.js.map +1 -0
- package/dashboard/dist/assets/CopyableId-CBdxWfp8.js +2 -0
- package/dashboard/dist/assets/CopyableId-CBdxWfp8.js.map +1 -0
- package/dashboard/dist/assets/CredentialsPage-Ikzsot0w.js +2 -0
- package/dashboard/dist/assets/CredentialsPage-Ikzsot0w.js.map +1 -0
- package/dashboard/dist/assets/CustomDurationPicker-CAninCbl.js +2 -0
- package/dashboard/dist/assets/CustomDurationPicker-CAninCbl.js.map +1 -0
- package/dashboard/dist/assets/DataTable-BDn1WBHS.js +2 -0
- package/dashboard/dist/assets/DataTable-BDn1WBHS.js.map +1 -0
- package/dashboard/dist/assets/EmptyState-2CmV-IaS.js +2 -0
- package/dashboard/dist/assets/EmptyState-2CmV-IaS.js.map +1 -0
- package/dashboard/dist/assets/EscalationsOverview-GXYFPASS.js +2 -0
- package/dashboard/dist/assets/EscalationsOverview-GXYFPASS.js.map +1 -0
- package/dashboard/dist/assets/EventTable-B01oJf6Y.js +2 -0
- package/dashboard/dist/assets/EventTable-B01oJf6Y.js.map +1 -0
- package/dashboard/dist/assets/Field-DuFBAYhu.js +2 -0
- package/dashboard/dist/assets/Field-DuFBAYhu.js.map +1 -0
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +2 -0
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js.map +1 -0
- package/dashboard/dist/assets/McpOverview-JkvRcX2e.js +2 -0
- package/dashboard/dist/assets/McpOverview-JkvRcX2e.js.map +1 -0
- package/dashboard/dist/assets/McpQueryDetailPage-CUMqhQdS.js +2 -0
- package/dashboard/dist/assets/McpQueryDetailPage-CUMqhQdS.js.map +1 -0
- package/dashboard/dist/assets/McpQueryPage-DRRhw4nN.js +2 -0
- package/dashboard/dist/assets/McpQueryPage-DRRhw4nN.js.map +1 -0
- package/dashboard/dist/assets/McpRunDetailPage-CmPs5EvE.js +2 -0
- package/dashboard/dist/assets/McpRunDetailPage-CmPs5EvE.js.map +1 -0
- package/dashboard/dist/assets/McpRunsPage-Dl5Y2u6k.js +2 -0
- package/dashboard/dist/assets/McpRunsPage-Dl5Y2u6k.js.map +1 -0
- package/dashboard/dist/assets/Modal-B4rbIVAn.js +2 -0
- package/dashboard/dist/assets/Modal-B4rbIVAn.js.map +1 -0
- package/dashboard/dist/assets/OperatorDashboard-B56il28q.js +2 -0
- package/dashboard/dist/assets/OperatorDashboard-B56il28q.js.map +1 -0
- package/dashboard/dist/assets/PageHeader-CpWFly5S.js +2 -0
- package/dashboard/dist/assets/PageHeader-CpWFly5S.js.map +1 -0
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +2 -0
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js.map +1 -0
- package/dashboard/dist/assets/ProcessDetailPage-CMLq4M7D.js +2 -0
- package/dashboard/dist/assets/ProcessDetailPage-CMLq4M7D.js.map +1 -0
- package/dashboard/dist/assets/ProcessesListPage-CZ_HF06v.js +2 -0
- package/dashboard/dist/assets/ProcessesListPage-CZ_HF06v.js.map +1 -0
- package/dashboard/dist/assets/RolePill-BTPa8L-P.js +2 -0
- package/dashboard/dist/assets/RolePill-BTPa8L-P.js.map +1 -0
- package/dashboard/dist/assets/RolesPage-9grZW7yR.js +2 -0
- package/dashboard/dist/assets/RolesPage-9grZW7yR.js.map +1 -0
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +2 -0
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js.map +1 -0
- package/dashboard/dist/assets/SimpleMarkdown-CBlvaWP4.js +4 -0
- package/dashboard/dist/assets/SimpleMarkdown-CBlvaWP4.js.map +1 -0
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js +2 -0
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js.map +1 -0
- package/dashboard/dist/assets/StatusBadge-TlC4jiig.js +2 -0
- package/dashboard/dist/assets/StatusBadge-TlC4jiig.js.map +1 -0
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +2 -0
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js.map +1 -0
- package/dashboard/dist/assets/SwimlaneTimeline-7SiwATsZ.js +2 -0
- package/dashboard/dist/assets/SwimlaneTimeline-7SiwATsZ.js.map +1 -0
- package/dashboard/dist/assets/TaskDetailPage-CbPVTakt.js +2 -0
- package/dashboard/dist/assets/TaskDetailPage-CbPVTakt.js.map +1 -0
- package/dashboard/dist/assets/TaskQueuePill-awmtb0qw.js +2 -0
- package/dashboard/dist/assets/TaskQueuePill-awmtb0qw.js.map +1 -0
- package/dashboard/dist/assets/TasksListPage-C_QF23c1.js +2 -0
- package/dashboard/dist/assets/TasksListPage-C_QF23c1.js.map +1 -0
- package/dashboard/dist/assets/TimeAgo-UPG6DoH8.js +2 -0
- package/dashboard/dist/assets/TimeAgo-UPG6DoH8.js.map +1 -0
- package/dashboard/dist/assets/TimestampCell-DoWMKg6w.js +2 -0
- package/dashboard/dist/assets/TimestampCell-DoWMKg6w.js.map +1 -0
- package/dashboard/dist/assets/UserName-DaP4YAKr.js +2 -0
- package/dashboard/dist/assets/UserName-DaP4YAKr.js.map +1 -0
- package/dashboard/dist/assets/VersionHistory-Bt7WBr6m.js +5 -0
- package/dashboard/dist/assets/VersionHistory-Bt7WBr6m.js.map +1 -0
- package/dashboard/dist/assets/WorkflowExecutionPage-DjtAQ3hy.js +2 -0
- package/dashboard/dist/assets/WorkflowExecutionPage-DjtAQ3hy.js.map +1 -0
- package/dashboard/dist/assets/WorkflowPill-CCDSVaQj.js +2 -0
- package/dashboard/dist/assets/WorkflowPill-CCDSVaQj.js.map +1 -0
- package/dashboard/dist/assets/WorkflowsDashboard-D8z9uBNB.js +2 -0
- package/dashboard/dist/assets/WorkflowsDashboard-D8z9uBNB.js.map +1 -0
- package/dashboard/dist/assets/WorkflowsOverview-D9OzzQqw.js +2 -0
- package/dashboard/dist/assets/WorkflowsOverview-D9OzzQqw.js.map +1 -0
- package/dashboard/dist/assets/YamlWorkflowDetailPage-DrDvvP62.js +3 -0
- package/dashboard/dist/assets/YamlWorkflowDetailPage-DrDvvP62.js.map +1 -0
- package/dashboard/dist/assets/YamlWorkflowsPage-COqiNCQK.js +2 -0
- package/dashboard/dist/assets/YamlWorkflowsPage-COqiNCQK.js.map +1 -0
- package/dashboard/dist/assets/bots-BkKVMbUW.js +2 -0
- package/dashboard/dist/assets/bots-BkKVMbUW.js.map +1 -0
- package/dashboard/dist/assets/constants-CgaZfe5d.js +2 -0
- package/dashboard/dist/assets/constants-CgaZfe5d.js.map +1 -0
- package/dashboard/dist/assets/escalation-columns-D6aqStaY.js +2 -0
- package/dashboard/dist/assets/escalation-columns-D6aqStaY.js.map +1 -0
- package/dashboard/dist/assets/escalation-qalymbKB.js +2 -0
- package/dashboard/dist/assets/escalation-qalymbKB.js.map +1 -0
- package/dashboard/dist/assets/format-gXZXQ-HJ.js +2 -0
- package/dashboard/dist/assets/format-gXZXQ-HJ.js.map +1 -0
- package/dashboard/dist/assets/helpers-0gSleuzT.js +2 -0
- package/dashboard/dist/assets/helpers-0gSleuzT.js.map +1 -0
- package/dashboard/dist/assets/index-BWvMHed7.js +6 -0
- package/dashboard/dist/assets/index-BWvMHed7.js.map +1 -0
- package/dashboard/dist/assets/index-BaszoPO_.css +1 -0
- package/dashboard/dist/assets/index-Cn2jyj9A.js +2 -0
- package/dashboard/dist/assets/index-Cn2jyj9A.js.map +1 -0
- package/dashboard/dist/assets/index-D8VH6K8B.js +54 -0
- package/dashboard/dist/assets/index-D8VH6K8B.js.map +1 -0
- package/dashboard/dist/assets/index-D9SYwJsi.js +3 -0
- package/dashboard/dist/assets/index-D9SYwJsi.js.map +1 -0
- package/dashboard/dist/assets/index-DTPzZr_X.js +2 -0
- package/dashboard/dist/assets/index-DTPzZr_X.js.map +1 -0
- package/dashboard/dist/assets/index-D_6AB5BE.js +2 -0
- package/dashboard/dist/assets/index-D_6AB5BE.js.map +1 -0
- package/dashboard/dist/assets/index-S9Ks2Lj2.js +2 -0
- package/dashboard/dist/assets/index-S9Ks2Lj2.js.map +1 -0
- package/dashboard/dist/assets/index-X85K5bHC.js +17 -0
- package/dashboard/dist/assets/index-X85K5bHC.js.map +1 -0
- package/dashboard/dist/assets/index-rjmgHlSH.js +2 -0
- package/dashboard/dist/assets/index-rjmgHlSH.js.map +1 -0
- package/dashboard/dist/assets/mcp-blCW6IL7.js +2 -0
- package/dashboard/dist/assets/mcp-blCW6IL7.js.map +1 -0
- package/dashboard/dist/assets/mcp-query-DoAyPbjC.js +2 -0
- package/dashboard/dist/assets/mcp-query-DoAyPbjC.js.map +1 -0
- package/dashboard/dist/assets/mcp-runs-ChPbpvXK.js +2 -0
- package/dashboard/dist/assets/mcp-runs-ChPbpvXK.js.map +1 -0
- package/dashboard/dist/assets/namespaces-BgbaC3ow.js +2 -0
- package/dashboard/dist/assets/namespaces-BgbaC3ow.js.map +1 -0
- package/dashboard/dist/assets/roles-ZNrqqnQl.js +2 -0
- package/dashboard/dist/assets/roles-ZNrqqnQl.js.map +1 -0
- package/dashboard/dist/assets/settings-eBRSE0mQ.js +2 -0
- package/dashboard/dist/assets/settings-eBRSE0mQ.js.map +1 -0
- package/dashboard/dist/assets/tasks-tRqClPns.js +2 -0
- package/dashboard/dist/assets/tasks-tRqClPns.js.map +1 -0
- package/dashboard/dist/assets/useFilterParams-BaXUAkYK.js +2 -0
- package/dashboard/dist/assets/useFilterParams-BaXUAkYK.js.map +1 -0
- package/dashboard/dist/assets/useNatsEvents-Xr43X1fG.js +2 -0
- package/dashboard/dist/assets/useNatsEvents-Xr43X1fG.js.map +1 -0
- package/dashboard/dist/assets/useYamlActivityEvents-BO51u8tm.js +2 -0
- package/dashboard/dist/assets/useYamlActivityEvents-BO51u8tm.js.map +1 -0
- package/dashboard/dist/assets/users-tMvNyOo8.js +2 -0
- package/dashboard/dist/assets/users-tMvNyOo8.js.map +1 -0
- package/dashboard/dist/assets/vendor-icons-ZTAKVwGc.js +292 -0
- package/dashboard/dist/assets/vendor-icons-ZTAKVwGc.js.map +1 -0
- package/dashboard/dist/assets/vendor-query-B2UbickB.js +18 -0
- package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +1 -0
- package/dashboard/dist/assets/vendor-react-Cw8Gy8NJ.js +22 -0
- package/dashboard/dist/assets/vendor-react-Cw8Gy8NJ.js.map +1 -0
- package/dashboard/dist/assets/workflows-Cc4VHcrp.js +2 -0
- package/dashboard/dist/assets/workflows-Cc4VHcrp.js.map +1 -0
- package/dashboard/dist/assets/yaml-workflows-BL4V5CQy.js +2 -0
- package/dashboard/dist/assets/yaml-workflows-BL4V5CQy.js.map +1 -0
- package/dashboard/dist/index.html +20 -0
- package/dashboard/dist/logo512.png +0 -0
- package/package.json +96 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"Commons Clause" License Condition v1.0
|
|
2
|
+
|
|
3
|
+
The Software is provided to you by the Licensor under the License, as
|
|
4
|
+
defined below, subject to the following condition.
|
|
5
|
+
|
|
6
|
+
Without limiting other conditions in the License, the grant of rights
|
|
7
|
+
under the License will not include, and the License does not grant to
|
|
8
|
+
you, the right to Sell the Software.
|
|
9
|
+
|
|
10
|
+
For purposes of the foregoing, "Sell" means practicing any or all of
|
|
11
|
+
the rights granted to you under the License to provide to third parties,
|
|
12
|
+
for a fee or other consideration (including without limitation fees for
|
|
13
|
+
hosting or consulting/support services related to the Software), a
|
|
14
|
+
product or service whose value derives, entirely or substantially, from
|
|
15
|
+
the functionality of the Software. Any license notice or attribution
|
|
16
|
+
required by the License must also include this Commons Clause License
|
|
17
|
+
Condition notice.
|
|
18
|
+
|
|
19
|
+
Software: HotMesh LongTail
|
|
20
|
+
|
|
21
|
+
License: Apache 2.0
|
|
22
|
+
|
|
23
|
+
Licensor: HotMeshIO
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
Apache License
|
|
28
|
+
Version 2.0, January 2004
|
|
29
|
+
http://www.apache.org/licenses/
|
|
30
|
+
|
|
31
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
32
|
+
|
|
33
|
+
1. Definitions.
|
|
34
|
+
|
|
35
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
36
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
37
|
+
|
|
38
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
39
|
+
the copyright owner that is granting the License.
|
|
40
|
+
|
|
41
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
42
|
+
other entities that control, are controlled by, or are under common
|
|
43
|
+
control with that entity. For the purposes of this definition,
|
|
44
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
45
|
+
direction or management of such entity, whether by contract or
|
|
46
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
47
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
48
|
+
|
|
49
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
50
|
+
exercising permissions granted by this License.
|
|
51
|
+
|
|
52
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
53
|
+
including but not limited to software source code, documentation
|
|
54
|
+
source, and configuration files.
|
|
55
|
+
|
|
56
|
+
"Object" form shall mean any form resulting from mechanical
|
|
57
|
+
transformation or translation of a Source form, including but
|
|
58
|
+
not limited to compiled object code, generated documentation,
|
|
59
|
+
and conversions to other media types.
|
|
60
|
+
|
|
61
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
62
|
+
Object form, made available under the License, as indicated by a
|
|
63
|
+
copyright notice that is included in or attached to the work
|
|
64
|
+
(an example is provided in the Appendix below).
|
|
65
|
+
|
|
66
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
67
|
+
form, that is based on (or derived from) the Work and for which the
|
|
68
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
69
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
70
|
+
of this License, Derivative Works shall not include works that remain
|
|
71
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
72
|
+
the Work and Derivative Works thereof.
|
|
73
|
+
|
|
74
|
+
"Contribution" shall mean any work of authorship, including
|
|
75
|
+
the original version of the Work and any modifications or additions
|
|
76
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
77
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
78
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
79
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
80
|
+
means any form of electronic, verbal, or written communication sent
|
|
81
|
+
to the Licensor or its representatives, including but not limited to
|
|
82
|
+
communication on electronic mailing lists, source code control systems,
|
|
83
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
84
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
85
|
+
excluding communication that is conspicuously marked or otherwise
|
|
86
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
87
|
+
|
|
88
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
89
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
90
|
+
subsequently incorporated within the Work.
|
|
91
|
+
|
|
92
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
93
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
94
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
95
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
96
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
97
|
+
Work and such Derivative Works in Source or Object form.
|
|
98
|
+
|
|
99
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
100
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
101
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
102
|
+
(except as stated in this section) patent license to make, have made,
|
|
103
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
104
|
+
where such license applies only to those patent claims licensable
|
|
105
|
+
by such Contributor that are necessarily infringed by their
|
|
106
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
107
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
108
|
+
institute patent litigation against any entity (including a
|
|
109
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
110
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
111
|
+
or contributory patent infringement, then any patent licenses
|
|
112
|
+
granted to You under this License for that Work shall terminate
|
|
113
|
+
as of the date such litigation is filed.
|
|
114
|
+
|
|
115
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
116
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
117
|
+
modifications, and in Source or Object form, provided that You
|
|
118
|
+
meet the following conditions:
|
|
119
|
+
|
|
120
|
+
(a) You must give any other recipients of the Work or
|
|
121
|
+
Derivative Works a copy of this License; and
|
|
122
|
+
|
|
123
|
+
(b) You must cause any modified files to carry prominent notices
|
|
124
|
+
stating that You changed the files; and
|
|
125
|
+
|
|
126
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
127
|
+
that You distribute, all copyright, patent, trademark, and
|
|
128
|
+
attribution notices from the Source form of the Work,
|
|
129
|
+
excluding those notices that do not pertain to any part of
|
|
130
|
+
the Derivative Works; and
|
|
131
|
+
|
|
132
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
133
|
+
distribution, then any Derivative Works that You distribute must
|
|
134
|
+
include a readable copy of the attribution notices contained
|
|
135
|
+
within such NOTICE file, excluding those notices that do not
|
|
136
|
+
pertain to any part of the Derivative Works, in at least one
|
|
137
|
+
of the following places: within a NOTICE text file distributed
|
|
138
|
+
as part of the Derivative Works; within the Source form or
|
|
139
|
+
documentation, if provided along with the Derivative Works; or,
|
|
140
|
+
within a display generated by the Derivative Works, if and
|
|
141
|
+
wherever such third-party notices normally appear. The contents
|
|
142
|
+
of the NOTICE file are for informational purposes only and
|
|
143
|
+
do not modify the License. You may add Your own attribution
|
|
144
|
+
notices within Derivative Works that You distribute, alongside
|
|
145
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
146
|
+
that such additional attribution notices cannot be construed
|
|
147
|
+
as modifying the License.
|
|
148
|
+
|
|
149
|
+
You may add Your own copyright statement to Your modifications and
|
|
150
|
+
may provide additional or different license terms and conditions
|
|
151
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
152
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
153
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
154
|
+
the conditions stated in this License.
|
|
155
|
+
|
|
156
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
157
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
158
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
159
|
+
this License, without any additional terms or conditions.
|
|
160
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
161
|
+
the terms of any separate license agreement you may have executed
|
|
162
|
+
with Licensor regarding such Contributions.
|
|
163
|
+
|
|
164
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
165
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
166
|
+
except as required for reasonable and customary use in describing the
|
|
167
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
168
|
+
|
|
169
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
170
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
171
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
172
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
173
|
+
implied, including, without limitation, any warranties or conditions
|
|
174
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
175
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
176
|
+
appropriateness of using or redistributing the Work and assume any
|
|
177
|
+
risks associated with Your exercise of permissions under this License.
|
|
178
|
+
|
|
179
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
180
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
181
|
+
unless required by applicable law (such as deliberate and grossly
|
|
182
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
183
|
+
liable to You for damages, including any direct, indirect, special,
|
|
184
|
+
incidental, or consequential damages of any character arising as a
|
|
185
|
+
result of this License or out of the use or inability to use the
|
|
186
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
187
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
188
|
+
other commercial damages or losses), even if such Contributor
|
|
189
|
+
has been advised of the possibility of such damages.
|
|
190
|
+
|
|
191
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
192
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
193
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
194
|
+
or other liability obligations and/or rights consistent with this
|
|
195
|
+
License. However, in accepting such obligations, You may act only
|
|
196
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
197
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
198
|
+
defend, and hold each Contributor harmless for any liability
|
|
199
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
200
|
+
of your accepting any such warranty or additional liability.
|
|
201
|
+
|
|
202
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Long Tail
|
|
2
|
+
|
|
3
|
+
Long Tail treats uncertainty as part of the workflow — not as an error, but as an undiscovered pathway. When confidence is low, the task escalates. When a human can't fix it, AI triages with the tools at hand. When AI finds the fix, the solution is compiled into a deterministic workflow so the next occurrence runs automatically — no LLM, no human, no cost.
|
|
4
|
+
|
|
5
|
+
The system works because everything is treated as a **tool**.
|
|
6
|
+
|
|
7
|
+
Activities, AI models, human reviewers, and compiled workflows all expose the same interface. A workflow doesn't need to know whether its next step is code, a model, or a person waiting on a screen. The protocol is the same. This is what makes handoffs seamless and what lets the system compose solutions from parts it already has.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/hotmeshio/long-tail.git
|
|
13
|
+
cd long-tail
|
|
14
|
+
docker compose up -d --build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) once healthy (~10s). Four workflows seed the dashboard.
|
|
18
|
+
|
|
19
|
+
| User | Password | Role |
|
|
20
|
+
|------|----------|------|
|
|
21
|
+
| `superadmin` | `l0ngt@1l` | superadmin |
|
|
22
|
+
| `admin` | `l0ngt@1l` | admin |
|
|
23
|
+
| `engineer` | `l0ngt@1l` | engineer |
|
|
24
|
+
| `reviewer` | `l0ngt@1l` | reviewer |
|
|
25
|
+
|
|
26
|
+
To reset: `docker compose down -v && docker compose up -d --build`
|
|
27
|
+
|
|
28
|
+
## Write a Workflow
|
|
29
|
+
|
|
30
|
+
A **workflow** is a deterministic function. It receives an envelope, makes decisions, and returns a result. If the process crashes mid-execution, the workflow replays from its last checkpoint — no work is lost, no step runs twice.
|
|
31
|
+
|
|
32
|
+
Register it with Long Tail and it becomes a **certified workflow**. The interceptor wraps every execution in an escalation chain: sub-workflows that would normally throw instead escalate, humans and AI collaborate to resolve, and the original workflow resumes with the answer. A certified workflow cannot silently fail — every error is either handled or surfaced.
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { Durable } from '@hotmeshio/hotmesh';
|
|
36
|
+
import type { LTEnvelope, LTReturn, LTEscalation } from '@hotmeshio/long-tail';
|
|
37
|
+
import * as activities from './activities';
|
|
38
|
+
|
|
39
|
+
const { analyzeContent } = Durable.workflow.proxyActivities<typeof activities>({
|
|
40
|
+
activities,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export async function reviewContent(
|
|
44
|
+
envelope: LTEnvelope,
|
|
45
|
+
): Promise<LTReturn | LTEscalation> {
|
|
46
|
+
|
|
47
|
+
// A resolved escalation re-enters here with the human's decision
|
|
48
|
+
if (envelope.resolver) {
|
|
49
|
+
return {
|
|
50
|
+
type: 'return',
|
|
51
|
+
data: {
|
|
52
|
+
...envelope.data,
|
|
53
|
+
resolution: envelope.resolver,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const analysis = await analyzeContent(envelope.data.content);
|
|
59
|
+
|
|
60
|
+
if (analysis.confidence >= 0.85) {
|
|
61
|
+
return {
|
|
62
|
+
type: 'return',
|
|
63
|
+
data: { approved: true, analysis },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Low confidence — escalate to a human reviewer
|
|
68
|
+
return {
|
|
69
|
+
type: 'escalation',
|
|
70
|
+
data: {
|
|
71
|
+
content: envelope.data.content,
|
|
72
|
+
analysis,
|
|
73
|
+
},
|
|
74
|
+
message: `Review needed (confidence: ${analysis.confidence})`,
|
|
75
|
+
role: 'reviewer',
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Side effects — API calls, LLM invocations, database queries — live in **activity** functions. The `proxyActivities` call wraps them so the workflow engine can checkpoint each result. If a crash occurs, activities replay from cache rather than re-executing.
|
|
81
|
+
|
|
82
|
+
## Every Activity is a Tool
|
|
83
|
+
|
|
84
|
+
The `proxyActivities` call in the workflow above does more than checkpoint `analyzeContent` — it also registers it as an **MCP tool**. The function you write is both a durable workflow step and a tool that any agent, workflow, or compiled pipeline can invoke.
|
|
85
|
+
|
|
86
|
+
The same is true in reverse: register an MCP server and its tools become proxy activities automatically.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
// This function is BOTH an activity AND a tool.
|
|
90
|
+
// Called by a workflow via proxyActivities, it's checkpointed.
|
|
91
|
+
// Exposed via MCP, it's discoverable by agents and other workflows.
|
|
92
|
+
export async function classify(args: { content: string }) {
|
|
93
|
+
const response = await llm.analyze(args.content);
|
|
94
|
+
return { category: response.category, confidence: response.confidence };
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Humans are tools too. Long Tail exposes its escalation queue as an MCP server (`long-tail-human-queue`). Compiled workflows are tools. An agent can call a human the same way it calls a database. A human can kick a task to AI the same way they'd assign it to a colleague. The protocol doesn't care who's on either end.
|
|
99
|
+
|
|
100
|
+
This uniformity is what makes the system composable — and it's what closes the loop from uncertainty to automation.
|
|
101
|
+
|
|
102
|
+
See the [Architecture Guide](docs/architecture.md) for project structure, conventions, built-in servers, and tag-based tool discovery. See the [MCP Guide](docs/mcp.md) for server registration, tool calls, and the human queue protocol.
|
|
103
|
+
|
|
104
|
+
## Workflow Function Registration and Startup
|
|
105
|
+
|
|
106
|
+
Register and start. MCP Servers initialize, workers start, and the API listens. The only infrastructure is PostgreSQL.
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
import { start } from '@hotmeshio/long-tail';
|
|
110
|
+
import * as myWorkflow from './workflows/my-workflow';
|
|
111
|
+
|
|
112
|
+
const lt = await start({
|
|
113
|
+
database: {
|
|
114
|
+
host: 'localhost',
|
|
115
|
+
port: 5432,
|
|
116
|
+
user: 'postgres',
|
|
117
|
+
password: 'password',
|
|
118
|
+
database: 'mydb',
|
|
119
|
+
},
|
|
120
|
+
workers: [{
|
|
121
|
+
taskQueue: 'my-queue',
|
|
122
|
+
workflow: myWorkflow.reviewContent,
|
|
123
|
+
}],
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const handle = await lt.client.workflow.start({
|
|
127
|
+
args: [{
|
|
128
|
+
data: { content: 'Review this' },
|
|
129
|
+
metadata: {},
|
|
130
|
+
}],
|
|
131
|
+
taskQueue: 'my-queue',
|
|
132
|
+
workflowName: 'reviewContent',
|
|
133
|
+
workflowId: `review-${Date.now()}`,
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
See the full [Workflows Guide](docs/workflows.md) for activities, the interceptor, escalation lifecycle, composition, and testing.
|
|
138
|
+
|
|
139
|
+
## How the System Evolves
|
|
140
|
+
|
|
141
|
+
The escalation in the workflow above — `{ type: 'escalation' }` — is where the system starts learning. Four layers work together, each one feeding the next.
|
|
142
|
+
|
|
143
|
+
### 1. Escalation
|
|
144
|
+
|
|
145
|
+
When AI isn't confident, the workflow returns `{ type: 'escalation' }`. The interceptor creates a record with full context — what the AI tried, what it saw, why it wasn't sure. A human claims the work through the dashboard or API, resolves it, and the workflow re-runs with their decision.
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
POST /api/escalations/esc-abc123/resolve
|
|
149
|
+
{ "resolverPayload": { "approved": true, "notes": "Content is fine" } }
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Most escalations end here. The human had the judgment the AI lacked. But sometimes the human *can't* fix it — the problem isn't a judgment call, it's a process gap.
|
|
153
|
+
|
|
154
|
+
### 2. Triage
|
|
155
|
+
|
|
156
|
+
An upside-down page, a document in the wrong language, a missing API credential — the human flags `needsTriage` with a hint, and an AI triage agent takes over.
|
|
157
|
+
|
|
158
|
+
Because every activity is a tool, the triage agent already has what it needs. It queries the escalation history, discovers available tools by tag, and runs an agentic loop — rotate the page, re-extract data, call an external API, validate against a database. Every tool call is checkpointed. If the agent can't fix it either, it escalates to an engineer with a full diagnosis. The engineer might install a missing tool, fix a configuration, then send it back. The handoff is always bidirectional — human to AI, AI to human, human to different human — until the problem is resolved and the original workflow gets its answer.
|
|
159
|
+
|
|
160
|
+
### 3. Compilation — Dynamic to Deterministic
|
|
161
|
+
|
|
162
|
+
Every dynamic execution — whether from triage, an MCP query, or any agentic workflow — produces a recording of which tools were called, in what order, with what data flow between them. The workflow compiler analyzes that recording and converts it into a deterministic YAML pipeline:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
Dynamic execution (LLM-driven) Compiled workflow (deterministic)
|
|
166
|
+
navigate_to(url) step 1: navigate_to
|
|
167
|
+
extract_links(page) → step 2: extract_links
|
|
168
|
+
screenshot(link) × N step 3: screenshot (iterates over step 2 output)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The compiler detects iteration patterns, traces data provenance between steps, classifies which inputs are dynamic (user-provided) versus fixed (implementation details), and generates a parameterized input schema. A dashboard wizard walks through the full lifecycle: review the original execution, profile the tool pipeline, configure inputs and tags, deploy, test side-by-side against the original, and verify end-to-end.
|
|
172
|
+
|
|
173
|
+
The compiled workflow deploys as a new MCP tool — tagged for discovery, versioned, and invocable by any agent, workflow, or API call. See the [Compilation Pipeline Guide](docs/compilation.md) for a detailed walkthrough with screenshots.
|
|
174
|
+
|
|
175
|
+
### 4. Routing — The Loop Closes
|
|
176
|
+
|
|
177
|
+
Once deployed, the system routes automatically. Every request passes through the `mcpQueryRouter`, which checks: has this problem been solved before?
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
User prompt → Router → Discovery (FTS + tags) → LLM Judge (scope match?)
|
|
181
|
+
│ │
|
|
182
|
+
│ confidence ≥ 0.7 │ no match
|
|
183
|
+
▼ ▼
|
|
184
|
+
mcpDeterministic mcpQuery
|
|
185
|
+
(compiled YAML, no LLM) (dynamic, LLM agentic loop)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The deterministic path skips LLM reasoning entirely — it extracts structured inputs from the prompt, maps them to the compiled workflow's schema, and executes the YAML pipeline directly. What took minutes with an LLM now runs in seconds. What cost tokens now costs nothing.
|
|
189
|
+
|
|
190
|
+
The dynamic path still works exactly as before — and every dynamic execution is a candidate for compilation. The system accumulates deterministic solutions over time. The inventory of tools grows. The need for LLM reasoning shrinks. Problems that once required a human, then required an AI, eventually require neither.
|
|
191
|
+
|
|
192
|
+
## Developer API
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
import { start } from '@hotmeshio/long-tail';
|
|
196
|
+
|
|
197
|
+
const lt = await start({
|
|
198
|
+
database: { connectionString: process.env.DATABASE_URL },
|
|
199
|
+
workers: [{ taskQueue: 'my-queue', workflow: myWorkflow.reviewContent }],
|
|
200
|
+
|
|
201
|
+
// Everything below is optional
|
|
202
|
+
examples: true, // seed demo workflows
|
|
203
|
+
mcp: { server: { enabled: true } }, // MCP server + clients
|
|
204
|
+
escalation: { strategy: 'mcp' }, // AI triage on escalation
|
|
205
|
+
auth: { secret: process.env.JWT_SECRET }, // JWT auth + IAM identity context
|
|
206
|
+
telemetry: { honeycomb: { apiKey: process.env.HNY } }, // OpenTelemetry
|
|
207
|
+
events: { nats: { url: 'nats://localhost:4222' } }, // real-time events
|
|
208
|
+
logging: { pino: { level: 'info' } }, // structured logging
|
|
209
|
+
maintenance: true, // scheduled cleanup
|
|
210
|
+
});
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Every cross-cutting concern follows the same pattern: implement a typed interface, register at startup, done. Every workflow executes with identity context — who initiated the request, which user or bot it runs as, and what credentials it holds. Escalations carry the same context, so reviewers see exactly who triggered the work and what permissions were in play. See the [Docs](#docs) section for the full list of guides.
|
|
214
|
+
|
|
215
|
+
## Deployment
|
|
216
|
+
|
|
217
|
+
Two container types from the same codebase — one serves the API, the other executes workflows:
|
|
218
|
+
|
|
219
|
+
```typescript
|
|
220
|
+
// api.ts — REST endpoints, no workflow execution
|
|
221
|
+
await start({ database: { connectionString: process.env.DATABASE_URL } });
|
|
222
|
+
|
|
223
|
+
// worker.ts — workflow execution, no HTTP server
|
|
224
|
+
await start({
|
|
225
|
+
database: { connectionString: process.env.DATABASE_URL },
|
|
226
|
+
server: { enabled: false },
|
|
227
|
+
workers: [{ taskQueue: 'my-queue', workflow: reviewContent.reviewContent }],
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Both share PostgreSQL and scale independently. See [Cloud Deployment](docs/cloud.md).
|
|
232
|
+
|
|
233
|
+
## Docs
|
|
234
|
+
|
|
235
|
+
| Guide | What it covers |
|
|
236
|
+
|-------|---------------|
|
|
237
|
+
| [Compilation Pipeline](docs/compilation.md) | Dynamic → deterministic: full wizard walkthrough with screenshots |
|
|
238
|
+
| [Workflows](docs/workflows.md) | Activities, interceptor, escalation lifecycle, composition, testing |
|
|
239
|
+
| [Architecture](docs/architecture.md) | Project structure, conventions, built-in MCP servers, tag-based discovery |
|
|
240
|
+
| [MCP](docs/mcp.md) | Server registration, tool calls, human queue, compiled workflows as tools |
|
|
241
|
+
| [Escalation Strategies](docs/escalation-strategies.md) | Default, MCP triage, and custom escalation handlers |
|
|
242
|
+
| [Cloud Deployment](docs/cloud.md) | AWS ECS, GCP Cloud Run, Docker configurations |
|
|
243
|
+
| [Data Model](docs/data.md) | Database schema and tables |
|
|
244
|
+
| [Contributing](docs/contributing.md) | Development setup and guidelines |
|
|
245
|
+
|
|
246
|
+
### Adapter Guides
|
|
247
|
+
|
|
248
|
+
[Auth](docs/auth.md) | [Events](docs/events.md) | [Telemetry](docs/telemetry.md) | [Logging](docs/logging.md) | [Maintenance](docs/maintenance.md)
|
|
249
|
+
|
|
250
|
+
### API Reference
|
|
251
|
+
|
|
252
|
+
[Workflows](docs/api/workflows.md) | [Tasks](docs/api/tasks.md) | [Escalations](docs/api/escalations.md) | [YAML Workflows](docs/api/yaml-workflows.md) | [Users](docs/api/users.md) | [Roles](docs/api/roles.md) | [MCP Servers](docs/api/mcp-servers.md) | [MCP Runs](docs/api/mcp-runs.md) | [Namespaces](docs/api/namespaces.md) | [Settings](docs/api/settings.md) | [Maintenance](docs/api/maintenance.md) | [DBA](docs/api/dba.md) | [Exports](docs/api/exports.md)
|
|
253
|
+
|
|
254
|
+
## Install
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npm install @hotmeshio/long-tail @hotmeshio/hotmesh
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## License
|
|
261
|
+
|
|
262
|
+
See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example External MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates how an external MCP server authenticates to Long Tail,
|
|
5
|
+
* receives delegation tokens via tool args, and fetches user-scoped
|
|
6
|
+
* OAuth credentials through the delegation API.
|
|
7
|
+
*
|
|
8
|
+
* This server exposes an SSE-based MCP interface with one tool:
|
|
9
|
+
* fetch_external_data — simulates fetching data from an external API
|
|
10
|
+
* using the user's OAuth credentials.
|
|
11
|
+
*
|
|
12
|
+
* Environment:
|
|
13
|
+
* LT_API_URL — Long Tail API base URL (e.g., http://long-tail:3000)
|
|
14
|
+
* LT_SERVICE_TOKEN — Service token for authenticating back to Long Tail
|
|
15
|
+
* PORT — Port to listen on (default: 9090)
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Example External MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Demonstrates how an external MCP server authenticates to Long Tail,
|
|
6
|
+
* receives delegation tokens via tool args, and fetches user-scoped
|
|
7
|
+
* OAuth credentials through the delegation API.
|
|
8
|
+
*
|
|
9
|
+
* This server exposes an SSE-based MCP interface with one tool:
|
|
10
|
+
* fetch_external_data — simulates fetching data from an external API
|
|
11
|
+
* using the user's OAuth credentials.
|
|
12
|
+
*
|
|
13
|
+
* Environment:
|
|
14
|
+
* LT_API_URL — Long Tail API base URL (e.g., http://long-tail:3000)
|
|
15
|
+
* LT_SERVICE_TOKEN — Service token for authenticating back to Long Tail
|
|
16
|
+
* PORT — Port to listen on (default: 9090)
|
|
17
|
+
*/
|
|
18
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const express_1 = __importDefault(require("express"));
|
|
23
|
+
const app = (0, express_1.default)();
|
|
24
|
+
app.use(express_1.default.json());
|
|
25
|
+
const PORT = parseInt(process.env.PORT || '9090', 10);
|
|
26
|
+
const LT_API_URL = process.env.LT_API_URL || 'http://localhost:3000';
|
|
27
|
+
const LT_SERVICE_TOKEN = process.env.LT_SERVICE_TOKEN || '';
|
|
28
|
+
/**
|
|
29
|
+
* Validate a delegation token against Long Tail.
|
|
30
|
+
*/
|
|
31
|
+
async function validateDelegation(token) {
|
|
32
|
+
const res = await fetch(`${LT_API_URL}/api/delegation/validate`, {
|
|
33
|
+
method: 'POST',
|
|
34
|
+
headers: {
|
|
35
|
+
'Content-Type': 'application/json',
|
|
36
|
+
Authorization: `Bearer ${LT_SERVICE_TOKEN}`,
|
|
37
|
+
},
|
|
38
|
+
body: JSON.stringify({ token }),
|
|
39
|
+
});
|
|
40
|
+
return res.json();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get a user's OAuth access token via the delegation API.
|
|
44
|
+
*/
|
|
45
|
+
async function getUserOAuthToken(delegationToken, provider) {
|
|
46
|
+
const res = await fetch(`${LT_API_URL}/api/delegation/oauth/${provider}/token`, {
|
|
47
|
+
headers: { Authorization: `Bearer ${delegationToken}` },
|
|
48
|
+
});
|
|
49
|
+
if (!res.ok) {
|
|
50
|
+
const err = await res.json();
|
|
51
|
+
throw new Error(err.error || `Failed to get OAuth token: ${res.status}`);
|
|
52
|
+
}
|
|
53
|
+
return res.json();
|
|
54
|
+
}
|
|
55
|
+
// ── MCP Tool: fetch_external_data ────────────────────────────────────────────
|
|
56
|
+
/**
|
|
57
|
+
* Simulates an external MCP tool that needs user-scoped credentials.
|
|
58
|
+
*
|
|
59
|
+
* In a real server, this would:
|
|
60
|
+
* 1. Extract the delegation token from _auth.token
|
|
61
|
+
* 2. Call the delegation API to get a fresh OAuth access token
|
|
62
|
+
* 3. Use that token to call an external API (Google Calendar, GitHub, etc.)
|
|
63
|
+
* 4. Return the results
|
|
64
|
+
*/
|
|
65
|
+
app.post('/tools/fetch_external_data', async (req, res) => {
|
|
66
|
+
const { provider, query, _auth } = req.body;
|
|
67
|
+
if (!_auth?.token) {
|
|
68
|
+
res.status(400).json({
|
|
69
|
+
error: 'No delegation token provided. This tool requires user authorization.',
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
// 1. Validate the delegation token
|
|
75
|
+
const validation = await validateDelegation(_auth.token);
|
|
76
|
+
if (!validation.valid) {
|
|
77
|
+
res.status(403).json({ error: `Invalid delegation: ${validation.error}` });
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
// 2. Get the user's OAuth token for the requested provider
|
|
81
|
+
const oauth = await getUserOAuthToken(_auth.token, provider || 'google');
|
|
82
|
+
// 3. Simulate calling an external API with the OAuth token
|
|
83
|
+
// In production, this would be a real API call like:
|
|
84
|
+
// const data = await fetch('https://api.example.com/data', {
|
|
85
|
+
// headers: { Authorization: `Bearer ${oauth.access_token}` }
|
|
86
|
+
// });
|
|
87
|
+
res.json({
|
|
88
|
+
success: true,
|
|
89
|
+
userId: validation.userId,
|
|
90
|
+
provider: provider || 'google',
|
|
91
|
+
query,
|
|
92
|
+
result: {
|
|
93
|
+
message: `Successfully fetched data for user ${validation.userId} using ${provider || 'google'} OAuth token`,
|
|
94
|
+
token_preview: `${oauth.access_token.slice(0, 10)}...`,
|
|
95
|
+
expires_at: oauth.expires_at,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
res.status(500).json({ error: err.message });
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
// ── Health check ─────────────────────────────────────────────────────────────
|
|
104
|
+
app.get('/health', (_req, res) => {
|
|
105
|
+
res.json({
|
|
106
|
+
status: 'ok',
|
|
107
|
+
service: 'external-mcp-server',
|
|
108
|
+
lt_api: LT_API_URL,
|
|
109
|
+
has_service_token: !!LT_SERVICE_TOKEN,
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
app.listen(PORT, () => {
|
|
113
|
+
console.log(`[external-mcp] listening on :${PORT}`);
|
|
114
|
+
console.log(`[external-mcp] Long Tail API: ${LT_API_URL}`);
|
|
115
|
+
console.log(`[external-mcp] Service token: ${LT_SERVICE_TOKEN ? 'configured' : 'NOT SET'}`);
|
|
116
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.seedExamples = exports.exampleWorkers = void 0;
|
|
4
|
+
var workers_1 = require("./workers");
|
|
5
|
+
Object.defineProperty(exports, "exampleWorkers", { enumerable: true, get: function () { return workers_1.exampleWorkers; } });
|
|
6
|
+
var seed_1 = require("./seed");
|
|
7
|
+
Object.defineProperty(exports, "seedExamples", { enumerable: true, get: function () { return seed_1.seedExamples; } });
|