@loompad/cli 0.1.0 → 1.1.1
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/ARCHITECTURE.md +96 -11
- package/CHANGELOG.md +1042 -0
- package/README.md +1473 -44
- package/THIRD_PARTY_NOTICES.md +275 -0
- package/dist/adapters/antigravity-cli.d.ts +62 -0
- package/dist/adapters/antigravity-cli.js +258 -0
- package/dist/adapters/antigravity-cli.js.map +1 -0
- package/dist/adapters/base.d.ts +61 -9
- package/dist/adapters/base.js +266 -15
- package/dist/adapters/base.js.map +1 -1
- package/dist/adapters/bridges/antigravity.d.ts +9 -12
- package/dist/adapters/bridges/antigravity.js +9 -12
- package/dist/adapters/bridges/antigravity.js.map +1 -1
- package/dist/adapters/echo.d.ts +1 -0
- package/dist/adapters/echo.js +59 -3
- package/dist/adapters/echo.js.map +1 -1
- package/dist/adapters/grok.d.ts +7 -0
- package/dist/adapters/grok.js +20 -10
- package/dist/adapters/grok.js.map +1 -1
- package/dist/adapters/index.d.ts +5 -1
- package/dist/adapters/index.js +53 -7
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/model.d.ts +137 -0
- package/dist/adapters/model.js +527 -0
- package/dist/adapters/model.js.map +1 -0
- package/dist/adapters/opencode.d.ts +101 -1
- package/dist/adapters/opencode.js +874 -98
- package/dist/adapters/opencode.js.map +1 -1
- package/dist/cli/doctor.d.ts +32 -0
- package/dist/cli/doctor.js +89 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.js +2651 -87
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui-model.js +3 -1
- package/dist/cli/tui-model.js.map +1 -1
- package/dist/cli/tui.js +44 -1
- package/dist/cli/tui.js.map +1 -1
- package/dist/cli/ui.d.ts +2 -0
- package/dist/cli/ui.js +13 -0
- package/dist/cli/ui.js.map +1 -1
- package/dist/core/ades.d.ts +32 -16
- package/dist/core/ades.js +57 -20
- package/dist/core/ades.js.map +1 -1
- package/dist/core/agent-state.d.ts +14 -0
- package/dist/core/agent-state.js +32 -0
- package/dist/core/agent-state.js.map +1 -0
- package/dist/core/approvals.d.ts +33 -0
- package/dist/core/approvals.js +29 -0
- package/dist/core/approvals.js.map +1 -0
- package/dist/core/backup.d.ts +19 -0
- package/dist/core/backup.js +86 -0
- package/dist/core/backup.js.map +1 -0
- package/dist/core/baton.d.ts +2 -2
- package/dist/core/baton.js.map +1 -1
- package/dist/core/brain-extract.d.ts +17 -0
- package/dist/core/brain-extract.js +28 -2
- package/dist/core/brain-extract.js.map +1 -1
- package/dist/core/brain-index.d.ts +71 -0
- package/dist/core/brain-index.js +204 -5
- package/dist/core/brain-index.js.map +1 -1
- package/dist/core/brain.d.ts +58 -2
- package/dist/core/brain.js +79 -1
- package/dist/core/brain.js.map +1 -1
- package/dist/core/chat-import.d.ts +71 -0
- package/dist/core/chat-import.js +419 -0
- package/dist/core/chat-import.js.map +1 -0
- package/dist/core/checkpoint.d.ts +107 -0
- package/dist/core/checkpoint.js +259 -0
- package/dist/core/checkpoint.js.map +1 -0
- package/dist/core/claude-cli.js +1 -1
- package/dist/core/claude-cli.js.map +1 -1
- package/dist/core/continuity/artifacts.d.ts +14 -0
- package/dist/core/continuity/artifacts.js +118 -0
- package/dist/core/continuity/artifacts.js.map +1 -0
- package/dist/core/continuity/capabilities.d.ts +65 -0
- package/dist/core/continuity/capabilities.js +129 -0
- package/dist/core/continuity/capabilities.js.map +1 -0
- package/dist/core/continuity/contracts.d.ts +352 -0
- package/dist/core/continuity/contracts.js +117 -0
- package/dist/core/continuity/contracts.js.map +1 -0
- package/dist/core/continuity/engine.d.ts +55 -0
- package/dist/core/continuity/engine.js +504 -0
- package/dist/core/continuity/engine.js.map +1 -0
- package/dist/core/continuity/store.d.ts +73 -0
- package/dist/core/continuity/store.js +438 -0
- package/dist/core/continuity/store.js.map +1 -0
- package/dist/core/conversations.d.ts +19 -0
- package/dist/core/conversations.js +87 -0
- package/dist/core/conversations.js.map +1 -0
- package/dist/core/crew-coordination.d.ts +6 -0
- package/dist/core/crew-coordination.js +24 -0
- package/dist/core/crew-coordination.js.map +1 -0
- package/dist/core/crew-policy.d.ts +18 -0
- package/dist/core/crew-policy.js +40 -0
- package/dist/core/crew-policy.js.map +1 -0
- package/dist/core/crew-protocol.d.ts +64 -0
- package/dist/core/crew-protocol.js +146 -0
- package/dist/core/crew-protocol.js.map +1 -0
- package/dist/core/crew-requests.d.ts +14 -0
- package/dist/core/crew-requests.js +22 -0
- package/dist/core/crew-requests.js.map +1 -0
- package/dist/core/crew.d.ts +395 -0
- package/dist/core/crew.js +1857 -0
- package/dist/core/crew.js.map +1 -0
- package/dist/core/digest.d.ts +40 -0
- package/dist/core/digest.js +94 -0
- package/dist/core/digest.js.map +1 -0
- package/dist/core/distill.js +3 -5
- package/dist/core/distill.js.map +1 -1
- package/dist/core/eventlog.d.ts +27 -25
- package/dist/core/eventlog.js +97 -150
- package/dist/core/eventlog.js.map +1 -1
- package/dist/core/events/contracts.d.ts +51 -0
- package/dist/core/events/contracts.js +2 -0
- package/dist/core/events/contracts.js.map +1 -0
- package/dist/core/events/jsonl-store.d.ts +23 -0
- package/dist/core/events/jsonl-store.js +90 -0
- package/dist/core/events/jsonl-store.js.map +1 -0
- package/dist/core/events/sqlite-store.d.ts +37 -0
- package/dist/core/events/sqlite-store.js +215 -0
- package/dist/core/events/sqlite-store.js.map +1 -0
- package/dist/core/forecast.d.ts +44 -0
- package/dist/core/forecast.js +46 -0
- package/dist/core/forecast.js.map +1 -0
- package/dist/core/free-pool.d.ts +65 -0
- package/dist/core/free-pool.js +171 -0
- package/dist/core/free-pool.js.map +1 -0
- package/dist/core/git.d.ts +30 -0
- package/dist/core/git.js +50 -2
- package/dist/core/git.js.map +1 -1
- package/dist/core/github-events.d.ts +53 -0
- package/dist/core/github-events.js +227 -0
- package/dist/core/github-events.js.map +1 -0
- package/dist/core/goal-lanes.d.ts +53 -0
- package/dist/core/goal-lanes.js +99 -0
- package/dist/core/goal-lanes.js.map +1 -0
- package/dist/core/hosted.d.ts +27 -0
- package/dist/core/hosted.js +50 -0
- package/dist/core/hosted.js.map +1 -0
- package/dist/core/http-server.d.ts +5 -0
- package/dist/core/http-server.js +8 -0
- package/dist/core/http-server.js.map +1 -0
- package/dist/core/invite-link.d.ts +31 -0
- package/dist/core/invite-link.js +45 -0
- package/dist/core/invite-link.js.map +1 -0
- package/dist/core/loops.d.ts +37 -0
- package/dist/core/loops.js +81 -0
- package/dist/core/loops.js.map +1 -0
- package/dist/core/mcp-catalog.d.ts +182 -0
- package/dist/core/mcp-catalog.js +431 -0
- package/dist/core/mcp-catalog.js.map +1 -0
- package/dist/core/mcp.d.ts +87 -0
- package/dist/core/mcp.js +181 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/memory.d.ts +1 -0
- package/dist/core/memory.js +5 -2
- package/dist/core/memory.js.map +1 -1
- package/dist/core/model-tools.d.ts +97 -0
- package/dist/core/model-tools.js +388 -0
- package/dist/core/model-tools.js.map +1 -0
- package/dist/core/notify.js +19 -1
- package/dist/core/notify.js.map +1 -1
- package/dist/core/orchestra.d.ts +635 -0
- package/dist/core/orchestra.js +2120 -0
- package/dist/core/orchestra.js.map +1 -0
- package/dist/core/permissions.d.ts +56 -0
- package/dist/core/permissions.js +122 -0
- package/dist/core/permissions.js.map +1 -0
- package/dist/core/preview-proxy.d.ts +70 -0
- package/dist/core/preview-proxy.js +563 -0
- package/dist/core/preview-proxy.js.map +1 -0
- package/dist/core/preview-shot.d.ts +46 -0
- package/dist/core/preview-shot.js +109 -0
- package/dist/core/preview-shot.js.map +1 -0
- package/dist/core/process.d.ts +36 -0
- package/dist/core/process.js +168 -0
- package/dist/core/process.js.map +1 -0
- package/dist/core/prompt-queue.d.ts +136 -0
- package/dist/core/prompt-queue.js +269 -0
- package/dist/core/prompt-queue.js.map +1 -0
- package/dist/core/prompts.d.ts +53 -0
- package/dist/core/prompts.js +127 -0
- package/dist/core/prompts.js.map +1 -0
- package/dist/core/proof.d.ts +82 -0
- package/dist/core/proof.js +216 -0
- package/dist/core/proof.js.map +1 -0
- package/dist/core/provider-text.d.ts +23 -0
- package/dist/core/provider-text.js +66 -0
- package/dist/core/provider-text.js.map +1 -0
- package/dist/core/providers.d.ts +152 -0
- package/dist/core/providers.js +343 -0
- package/dist/core/providers.js.map +1 -0
- package/dist/core/quota.d.ts +33 -0
- package/dist/core/quota.js +74 -0
- package/dist/core/quota.js.map +1 -0
- package/dist/core/recipes.d.ts +50 -0
- package/dist/core/recipes.js +99 -0
- package/dist/core/recipes.js.map +1 -0
- package/dist/core/registry.d.ts +54 -0
- package/dist/core/registry.js +62 -5
- package/dist/core/registry.js.map +1 -1
- package/dist/core/relay-client.d.ts +67 -0
- package/dist/core/relay-client.js +184 -0
- package/dist/core/relay-client.js.map +1 -0
- package/dist/core/relay-protocol.d.ts +140 -0
- package/dist/core/relay-protocol.js +189 -0
- package/dist/core/relay-protocol.js.map +1 -0
- package/dist/core/replay.d.ts +18 -0
- package/dist/core/replay.js +191 -0
- package/dist/core/replay.js.map +1 -0
- package/dist/core/review-triage.d.ts +41 -0
- package/dist/core/review-triage.js +124 -0
- package/dist/core/review-triage.js.map +1 -0
- package/dist/core/router.js +2 -2
- package/dist/core/router.js.map +1 -1
- package/dist/core/routes.d.ts +39 -3
- package/dist/core/routes.js +137 -4
- package/dist/core/routes.js.map +1 -1
- package/dist/core/run-command.d.ts +14 -0
- package/dist/core/run-command.js +45 -0
- package/dist/core/run-command.js.map +1 -0
- package/dist/core/runner-setup.d.ts +36 -0
- package/dist/core/runner-setup.js +114 -0
- package/dist/core/runner-setup.js.map +1 -0
- package/dist/core/search.js +0 -0
- package/dist/core/search.js.map +1 -1
- package/dist/core/semantic.d.ts +92 -0
- package/dist/core/semantic.js +227 -0
- package/dist/core/semantic.js.map +1 -0
- package/dist/core/servers.d.ts +115 -0
- package/dist/core/servers.js +305 -0
- package/dist/core/servers.js.map +1 -0
- package/dist/core/setup.js +64 -6
- package/dist/core/setup.js.map +1 -1
- package/dist/core/shield.d.ts +17 -0
- package/dist/core/shield.js +81 -0
- package/dist/core/shield.js.map +1 -0
- package/dist/core/shift.d.ts +69 -0
- package/dist/core/shift.js +120 -0
- package/dist/core/shift.js.map +1 -0
- package/dist/core/skill-install.d.ts +125 -0
- package/dist/core/skill-install.js +328 -0
- package/dist/core/skill-install.js.map +1 -0
- package/dist/core/skills.d.ts +116 -0
- package/dist/core/skills.js +223 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/step-conditions.d.ts +65 -0
- package/dist/core/step-conditions.js +102 -0
- package/dist/core/step-conditions.js.map +1 -0
- package/dist/core/subagents.d.ts +45 -0
- package/dist/core/subagents.js +90 -0
- package/dist/core/subagents.js.map +1 -0
- package/dist/core/team-canon.d.ts +42 -0
- package/dist/core/team-canon.js +121 -0
- package/dist/core/team-canon.js.map +1 -0
- package/dist/core/team-crypto.d.ts +97 -0
- package/dist/core/team-crypto.js +175 -0
- package/dist/core/team-crypto.js.map +1 -0
- package/dist/core/team-hub.d.ts +514 -0
- package/dist/core/team-hub.js +964 -0
- package/dist/core/team-hub.js.map +1 -0
- package/dist/core/team-landing.d.ts +239 -0
- package/dist/core/team-landing.js +504 -0
- package/dist/core/team-landing.js.map +1 -0
- package/dist/core/team-leases.d.ts +44 -0
- package/dist/core/team-leases.js +145 -0
- package/dist/core/team-leases.js.map +1 -0
- package/dist/core/team-memory.d.ts +42 -0
- package/dist/core/team-memory.js +84 -0
- package/dist/core/team-memory.js.map +1 -0
- package/dist/core/team-policy.d.ts +85 -0
- package/dist/core/team-policy.js +191 -0
- package/dist/core/team-policy.js.map +1 -0
- package/dist/core/thread-md.d.ts +6 -0
- package/dist/core/thread-md.js +42 -0
- package/dist/core/thread-md.js.map +1 -0
- package/dist/core/turn-stats.d.ts +61 -0
- package/dist/core/turn-stats.js +124 -0
- package/dist/core/turn-stats.js.map +1 -0
- package/dist/core/updater.d.ts +73 -0
- package/dist/core/updater.js +153 -0
- package/dist/core/updater.js.map +1 -0
- package/dist/core/usage.d.ts +75 -0
- package/dist/core/usage.js +163 -0
- package/dist/core/usage.js.map +1 -0
- package/dist/core/windows-jobs.d.ts +15 -0
- package/dist/core/windows-jobs.js +170 -0
- package/dist/core/windows-jobs.js.map +1 -0
- package/dist/core/worktree-merge.d.ts +57 -0
- package/dist/core/worktree-merge.js +123 -0
- package/dist/core/worktree-merge.js.map +1 -0
- package/dist/core/worktree.d.ts +5 -0
- package/dist/core/worktree.js +45 -5
- package/dist/core/worktree.js.map +1 -1
- package/dist/core/worktrees.d.ts +6 -0
- package/dist/core/worktrees.js +21 -0
- package/dist/core/worktrees.js.map +1 -0
- package/dist/daemon/app-page.d.ts +0 -17
- package/dist/daemon/app-page.js +10 -6346
- package/dist/daemon/app-page.js.map +1 -1
- package/dist/daemon/auth.d.ts +24 -3
- package/dist/daemon/auth.js +66 -7
- package/dist/daemon/auth.js.map +1 -1
- package/dist/daemon/board.d.ts +7 -0
- package/dist/daemon/board.js +12 -1
- package/dist/daemon/board.js.map +1 -1
- package/dist/daemon/brand-icons.d.ts +6 -1
- package/dist/daemon/brand-icons.js +11 -3
- package/dist/daemon/brand-icons.js.map +1 -1
- package/dist/daemon/client.d.ts +665 -1
- package/dist/daemon/client.js +381 -3
- package/dist/daemon/client.js.map +1 -1
- package/dist/daemon/delivery.d.ts +34 -0
- package/dist/daemon/delivery.js +63 -0
- package/dist/daemon/delivery.js.map +1 -0
- package/dist/daemon/deploys.d.ts +62 -0
- package/dist/daemon/deploys.js +159 -0
- package/dist/daemon/deploys.js.map +1 -0
- package/dist/daemon/landing.d.ts +192 -0
- package/dist/daemon/landing.js +992 -0
- package/dist/daemon/landing.js.map +1 -0
- package/dist/daemon/onboard.d.ts +150 -0
- package/dist/daemon/onboard.js +390 -0
- package/dist/daemon/onboard.js.map +1 -0
- package/dist/daemon/proof.d.ts +70 -0
- package/dist/daemon/proof.js +172 -0
- package/dist/daemon/proof.js.map +1 -0
- package/dist/daemon/push.d.ts +19 -1
- package/dist/daemon/push.js +90 -3
- package/dist/daemon/push.js.map +1 -1
- package/dist/daemon/relay.d.ts +82 -0
- package/dist/daemon/relay.js +351 -0
- package/dist/daemon/relay.js.map +1 -0
- package/dist/daemon/routes/agent-discovery.d.ts +4 -0
- package/dist/daemon/routes/agent-discovery.js +29 -0
- package/dist/daemon/routes/agent-discovery.js.map +1 -0
- package/dist/daemon/routes/agent-settings.d.ts +4 -0
- package/dist/daemon/routes/agent-settings.js +94 -0
- package/dist/daemon/routes/agent-settings.js.map +1 -0
- package/dist/daemon/routes/agents.d.ts +4 -0
- package/dist/daemon/routes/agents.js +105 -0
- package/dist/daemon/routes/agents.js.map +1 -0
- package/dist/daemon/routes/alerts.d.ts +4 -0
- package/dist/daemon/routes/alerts.js +137 -0
- package/dist/daemon/routes/alerts.js.map +1 -0
- package/dist/daemon/routes/approvals.d.ts +4 -0
- package/dist/daemon/routes/approvals.js +40 -0
- package/dist/daemon/routes/approvals.js.map +1 -0
- package/dist/daemon/routes/assets.d.ts +3 -0
- package/dist/daemon/routes/assets.js +64 -0
- package/dist/daemon/routes/assets.js.map +1 -0
- package/dist/daemon/routes/board.d.ts +4 -0
- package/dist/daemon/routes/board.js +147 -0
- package/dist/daemon/routes/board.js.map +1 -0
- package/dist/daemon/routes/brain.d.ts +4 -0
- package/dist/daemon/routes/brain.js +270 -0
- package/dist/daemon/routes/brain.js.map +1 -0
- package/dist/daemon/routes/chats.d.ts +4 -0
- package/dist/daemon/routes/chats.js +249 -0
- package/dist/daemon/routes/chats.js.map +1 -0
- package/dist/daemon/routes/clients.d.ts +4 -0
- package/dist/daemon/routes/clients.js +49 -0
- package/dist/daemon/routes/clients.js.map +1 -0
- package/dist/daemon/routes/cloud.d.ts +4 -0
- package/dist/daemon/routes/cloud.js +46 -0
- package/dist/daemon/routes/cloud.js.map +1 -0
- package/dist/daemon/routes/config.d.ts +4 -0
- package/dist/daemon/routes/config.js +35 -0
- package/dist/daemon/routes/config.js.map +1 -0
- package/dist/daemon/routes/context.d.ts +51 -0
- package/dist/daemon/routes/context.js +2 -0
- package/dist/daemon/routes/context.js.map +1 -0
- package/dist/daemon/routes/crews.d.ts +4 -0
- package/dist/daemon/routes/crews.js +149 -0
- package/dist/daemon/routes/crews.js.map +1 -0
- package/dist/daemon/routes/files.d.ts +3 -0
- package/dist/daemon/routes/files.js +253 -0
- package/dist/daemon/routes/files.js.map +1 -0
- package/dist/daemon/routes/git.d.ts +4 -0
- package/dist/daemon/routes/git.js +96 -0
- package/dist/daemon/routes/git.js.map +1 -0
- package/dist/daemon/routes/history.d.ts +4 -0
- package/dist/daemon/routes/history.js +101 -0
- package/dist/daemon/routes/history.js.map +1 -0
- package/dist/daemon/routes/integrations-project.d.ts +3 -0
- package/dist/daemon/routes/integrations-project.js +103 -0
- package/dist/daemon/routes/integrations-project.js.map +1 -0
- package/dist/daemon/routes/integrations.d.ts +3 -0
- package/dist/daemon/routes/integrations.js +111 -0
- package/dist/daemon/routes/integrations.js.map +1 -0
- package/dist/daemon/routes/logs.d.ts +3 -0
- package/dist/daemon/routes/logs.js +40 -0
- package/dist/daemon/routes/logs.js.map +1 -0
- package/dist/daemon/routes/messages.d.ts +4 -0
- package/dist/daemon/routes/messages.js +60 -0
- package/dist/daemon/routes/messages.js.map +1 -0
- package/dist/daemon/routes/observability.d.ts +4 -0
- package/dist/daemon/routes/observability.js +247 -0
- package/dist/daemon/routes/observability.js.map +1 -0
- package/dist/daemon/routes/onboard.d.ts +12 -0
- package/dist/daemon/routes/onboard.js +67 -0
- package/dist/daemon/routes/onboard.js.map +1 -0
- package/dist/daemon/routes/orchestra.d.ts +4 -0
- package/dist/daemon/routes/orchestra.js +110 -0
- package/dist/daemon/routes/orchestra.js.map +1 -0
- package/dist/daemon/routes/pairing.d.ts +4 -0
- package/dist/daemon/routes/pairing.js +155 -0
- package/dist/daemon/routes/pairing.js.map +1 -0
- package/dist/daemon/routes/preview.d.ts +24 -0
- package/dist/daemon/routes/preview.js +122 -0
- package/dist/daemon/routes/preview.js.map +1 -0
- package/dist/daemon/routes/project-actions.d.ts +4 -0
- package/dist/daemon/routes/project-actions.js +53 -0
- package/dist/daemon/routes/project-actions.js.map +1 -0
- package/dist/daemon/routes/project-team.d.ts +4 -0
- package/dist/daemon/routes/project-team.js +201 -0
- package/dist/daemon/routes/project-team.js.map +1 -0
- package/dist/daemon/routes/projects.d.ts +14 -0
- package/dist/daemon/routes/projects.js +138 -0
- package/dist/daemon/routes/projects.js.map +1 -0
- package/dist/daemon/routes/prompts.d.ts +4 -0
- package/dist/daemon/routes/prompts.js +44 -0
- package/dist/daemon/routes/prompts.js.map +1 -0
- package/dist/daemon/routes/proof.d.ts +4 -0
- package/dist/daemon/routes/proof.js +22 -0
- package/dist/daemon/routes/proof.js.map +1 -0
- package/dist/daemon/routes/providers.d.ts +3 -0
- package/dist/daemon/routes/providers.js +60 -0
- package/dist/daemon/routes/providers.js.map +1 -0
- package/dist/daemon/routes/public.d.ts +4 -0
- package/dist/daemon/routes/public.js +64 -0
- package/dist/daemon/routes/public.js.map +1 -0
- package/dist/daemon/routes/queue.d.ts +4 -0
- package/dist/daemon/routes/queue.js +140 -0
- package/dist/daemon/routes/queue.js.map +1 -0
- package/dist/daemon/routes/routing.d.ts +4 -0
- package/dist/daemon/routes/routing.js +61 -0
- package/dist/daemon/routes/routing.js.map +1 -0
- package/dist/daemon/routes/runtime-handler.d.ts +2 -0
- package/dist/daemon/routes/runtime-handler.js +63 -0
- package/dist/daemon/routes/runtime-handler.js.map +1 -0
- package/dist/daemon/routes/search.d.ts +4 -0
- package/dist/daemon/routes/search.js +17 -0
- package/dist/daemon/routes/search.js.map +1 -0
- package/dist/daemon/routes/servers.d.ts +4 -0
- package/dist/daemon/routes/servers.js +133 -0
- package/dist/daemon/routes/servers.js.map +1 -0
- package/dist/daemon/routes/setup.d.ts +3 -0
- package/dist/daemon/routes/setup.js +50 -0
- package/dist/daemon/routes/setup.js.map +1 -0
- package/dist/daemon/routes/shift.d.ts +4 -0
- package/dist/daemon/routes/shift.js +30 -0
- package/dist/daemon/routes/shift.js.map +1 -0
- package/dist/daemon/routes/specs.d.ts +4 -0
- package/dist/daemon/routes/specs.js +57 -0
- package/dist/daemon/routes/specs.js.map +1 -0
- package/dist/daemon/routes/task-delivery.d.ts +4 -0
- package/dist/daemon/routes/task-delivery.js +38 -0
- package/dist/daemon/routes/task-delivery.js.map +1 -0
- package/dist/daemon/routes/team.d.ts +4 -0
- package/dist/daemon/routes/team.js +193 -0
- package/dist/daemon/routes/team.js.map +1 -0
- package/dist/daemon/routes/terminals.d.ts +4 -0
- package/dist/daemon/routes/terminals.js +87 -0
- package/dist/daemon/routes/terminals.js.map +1 -0
- package/dist/daemon/routes/tools.d.ts +4 -0
- package/dist/daemon/routes/tools.js +180 -0
- package/dist/daemon/routes/tools.js.map +1 -0
- package/dist/daemon/routes/updates.d.ts +4 -0
- package/dist/daemon/routes/updates.js +89 -0
- package/dist/daemon/routes/updates.js.map +1 -0
- package/dist/daemon/routes/voice.d.ts +4 -0
- package/dist/daemon/routes/voice.js +53 -0
- package/dist/daemon/routes/voice.js.map +1 -0
- package/dist/daemon/runner.d.ts +186 -0
- package/dist/daemon/runner.js +612 -0
- package/dist/daemon/runner.js.map +1 -0
- package/dist/daemon/runtime/accounting.d.ts +130 -0
- package/dist/daemon/runtime/accounting.js +303 -0
- package/dist/daemon/runtime/accounting.js.map +1 -0
- package/dist/daemon/runtime/agents.d.ts +16 -0
- package/dist/daemon/runtime/agents.js +71 -0
- package/dist/daemon/runtime/agents.js.map +1 -0
- package/dist/daemon/runtime/briefings.d.ts +134 -0
- package/dist/daemon/runtime/briefings.js +329 -0
- package/dist/daemon/runtime/briefings.js.map +1 -0
- package/dist/daemon/runtime/native-usage.d.ts +21 -0
- package/dist/daemon/runtime/native-usage.js +71 -0
- package/dist/daemon/runtime/native-usage.js.map +1 -0
- package/dist/daemon/runtime/queue.d.ts +94 -0
- package/dist/daemon/runtime/queue.js +222 -0
- package/dist/daemon/runtime/queue.js.map +1 -0
- package/dist/daemon/runtime/relay.d.ts +93 -0
- package/dist/daemon/runtime/relay.js +240 -0
- package/dist/daemon/runtime/relay.js.map +1 -0
- package/dist/daemon/runtime/turns.d.ts +202 -0
- package/dist/daemon/runtime/turns.js +663 -0
- package/dist/daemon/runtime/turns.js.map +1 -0
- package/dist/daemon/runtime-support.d.ts +76 -0
- package/dist/daemon/runtime-support.js +134 -0
- package/dist/daemon/runtime-support.js.map +1 -0
- package/dist/daemon/runtime.d.ts +739 -70
- package/dist/daemon/runtime.js +2751 -470
- package/dist/daemon/runtime.js.map +1 -1
- package/dist/daemon/server.d.ts +82 -55
- package/dist/daemon/server.js +674 -1435
- package/dist/daemon/server.js.map +1 -1
- package/dist/daemon/shift.d.ts +70 -0
- package/dist/daemon/shift.js +170 -0
- package/dist/daemon/shift.js.map +1 -0
- package/dist/daemon/specs.d.ts +92 -0
- package/dist/daemon/specs.js +285 -0
- package/dist/daemon/specs.js.map +1 -0
- package/dist/daemon/system.d.ts +208 -0
- package/dist/daemon/system.js +557 -0
- package/dist/daemon/system.js.map +1 -0
- package/dist/daemon/tasks.js +1 -1
- package/dist/daemon/team-brain.d.ts +136 -0
- package/dist/daemon/team-brain.js +659 -0
- package/dist/daemon/team-brain.js.map +1 -0
- package/dist/daemon/team-coordinator.d.ts +78 -0
- package/dist/daemon/team-coordinator.js +408 -0
- package/dist/daemon/team-coordinator.js.map +1 -0
- package/dist/daemon/team.d.ts +339 -0
- package/dist/daemon/team.js +1433 -0
- package/dist/daemon/team.js.map +1 -0
- package/dist/daemon/terminals.d.ts +22 -3
- package/dist/daemon/terminals.js +236 -16
- package/dist/daemon/terminals.js.map +1 -1
- package/dist/hub/client.d.ts +120 -0
- package/dist/hub/client.js +228 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/hub/server.d.ts +32 -0
- package/dist/hub/server.js +180 -0
- package/dist/hub/server.js.map +1 -0
- package/dist/hub/supabase-client.d.ts +220 -0
- package/dist/hub/supabase-client.js +843 -0
- package/dist/hub/supabase-client.js.map +1 -0
- package/dist/observability/ask.d.ts +91 -0
- package/dist/observability/ask.js +179 -0
- package/dist/observability/ask.js.map +1 -0
- package/dist/observability/clickhouse.d.ts +33 -0
- package/dist/observability/clickhouse.js +48 -0
- package/dist/observability/clickhouse.js.map +1 -0
- package/dist/observability/decisions.d.ts +176 -0
- package/dist/observability/decisions.js +377 -0
- package/dist/observability/decisions.js.map +1 -0
- package/dist/observability/index.d.ts +89 -0
- package/dist/observability/index.js +348 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/insights.d.ts +151 -0
- package/dist/observability/insights.js +319 -0
- package/dist/observability/insights.js.map +1 -0
- package/dist/observability/logs-query.d.ts +82 -0
- package/dist/observability/logs-query.js +102 -0
- package/dist/observability/logs-query.js.map +1 -0
- package/dist/observability/logs.d.ts +72 -0
- package/dist/observability/logs.js +295 -0
- package/dist/observability/logs.js.map +1 -0
- package/dist/observability/metrics.d.ts +86 -0
- package/dist/observability/metrics.js +303 -0
- package/dist/observability/metrics.js.map +1 -0
- package/dist/observability/otlp.d.ts +127 -0
- package/dist/observability/otlp.js +242 -0
- package/dist/observability/otlp.js.map +1 -0
- package/dist/observability/snapshots.d.ts +43 -0
- package/dist/observability/snapshots.js +129 -0
- package/dist/observability/snapshots.js.map +1 -0
- package/dist/observability/triage.d.ts +49 -0
- package/dist/observability/triage.js +284 -0
- package/dist/observability/triage.js.map +1 -0
- package/dist/providers/adapter.d.ts +50 -0
- package/dist/providers/adapter.js +38 -0
- package/dist/providers/adapter.js.map +1 -0
- package/dist/providers/agent.d.ts +110 -0
- package/dist/providers/agent.js +487 -0
- package/dist/providers/agent.js.map +1 -0
- package/dist/providers/approvals.d.ts +24 -0
- package/dist/providers/approvals.js +78 -0
- package/dist/providers/approvals.js.map +1 -0
- package/dist/providers/attachments.d.ts +20 -0
- package/dist/providers/attachments.js +51 -0
- package/dist/providers/attachments.js.map +1 -0
- package/dist/providers/claude/adapter.d.ts +99 -0
- package/dist/providers/claude/adapter.js +790 -0
- package/dist/providers/claude/adapter.js.map +1 -0
- package/dist/providers/codex/adapter.d.ts +113 -0
- package/dist/providers/codex/adapter.js +881 -0
- package/dist/providers/codex/adapter.js.map +1 -0
- package/dist/providers/codex/instructions.d.ts +11 -0
- package/dist/providers/codex/instructions.js +154 -0
- package/dist/providers/codex/instructions.js.map +1 -0
- package/dist/providers/codex/rpc.d.ts +36 -0
- package/dist/providers/codex/rpc.js +104 -0
- package/dist/providers/codex/rpc.js.map +1 -0
- package/dist/providers/contracts.d.ts +339 -0
- package/dist/providers/contracts.js +19 -0
- package/dist/providers/contracts.js.map +1 -0
- package/dist/providers/directory.d.ts +70 -0
- package/dist/providers/directory.js +95 -0
- package/dist/providers/directory.js.map +1 -0
- package/dist/providers/errors.d.ts +47 -0
- package/dist/providers/errors.js +24 -0
- package/dist/providers/errors.js.map +1 -0
- package/dist/providers/index.d.ts +18 -0
- package/dist/providers/index.js +19 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/ingestion.d.ts +80 -0
- package/dist/providers/ingestion.js +330 -0
- package/dist/providers/ingestion.js.map +1 -0
- package/dist/providers/live.d.ts +22 -0
- package/dist/providers/live.js +56 -0
- package/dist/providers/live.js.map +1 -0
- package/dist/providers/process.d.ts +29 -0
- package/dist/providers/process.js +71 -0
- package/dist/providers/process.js.map +1 -0
- package/dist/providers/reaper.d.ts +33 -0
- package/dist/providers/reaper.js +65 -0
- package/dist/providers/reaper.js.map +1 -0
- package/dist/providers/service.d.ts +87 -0
- package/dist/providers/service.js +256 -0
- package/dist/providers/service.js.map +1 -0
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +1 -1
- package/dist/sdk.js.map +1 -1
- package/dist/types.d.ts +385 -6
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +7 -0
- package/dist/version.js +16 -0
- package/dist/version.js.map +1 -0
- package/dist/web/app.css +4643 -0
- package/dist/web/app.js +22640 -0
- package/dist/web/app.js.map +7 -0
- package/dist/web/shell.html +39 -0
- package/docs/README.md +21 -0
- package/docs/SETUP.md +10 -0
- package/docs/adapters.md +21 -8
- package/docs/brain-continuity.md +186 -0
- package/docs/cloud.md +108 -0
- package/docs/crews.md +62 -0
- package/docs/design-system.md +31 -2
- package/docs/integration-notes.md +128 -20
- package/docs/loompad.md +105 -0
- package/docs/observability.md +220 -0
- package/docs/play-store.md +123 -0
- package/docs/proposals/agent-teams.md +249 -0
- package/docs/proposals/brain-continuity-implementation.md +468 -0
- package/docs/proposals/brain-session-continuity.md +623 -0
- package/docs/proposals/t3code-port.md +81 -0
- package/docs/proposals/t3code-reference.md +95 -0
- package/docs/refactoring/AGENT-TEAMS-PROGRESS.md +88 -0
- package/docs/refactoring/BOUNDARIES.md +120 -0
- package/docs/refactoring/BRAIN-AUDIT.md +176 -0
- package/docs/refactoring/BRAIN-NOTES.md +390 -0
- package/docs/refactoring/BRAIN-TODO.md +214 -0
- package/docs/refactoring/NOTES.md +129 -0
- package/docs/refactoring/T3-PORT-NOTES.md +165 -0
- package/docs/refactoring/T3-PORT-TODO.md +123 -0
- package/docs/refactoring/TODO.md +46 -0
- package/docs/refactoring/brain-benchmark-2026-09-28.json +48 -0
- package/docs/refactoring/brain-benchmark-audit-2026-09-28.json +48 -0
- package/docs/release-notes/v0.2.0.md +35 -0
- package/docs/release-notes/v0.2.1.md +59 -0
- package/docs/release-notes/v0.2.3.md +77 -0
- package/docs/release-notes/v0.2.4.md +128 -0
- package/docs/release-notes/v0.2.5.md +153 -0
- package/docs/release-notes/v0.2.6.md +62 -0
- package/docs/release-notes/v1.0.0.md +120 -0
- package/docs/release-notes/v1.0.1.md +77 -0
- package/docs/release-notes/v1.1.0.md +71 -0
- package/docs/release-notes/v1.1.1.md +38 -0
- package/docs/teams-architecture.md +697 -0
- package/docs/teams.md +171 -0
- package/docs/windows.md +85 -0
- package/package.json +22 -9
- package/dist/adapters/claude-code.d.ts +0 -26
- package/dist/adapters/claude-code.js +0 -209
- package/dist/adapters/claude-code.js.map +0 -1
- package/dist/adapters/codex.d.ts +0 -51
- package/dist/adapters/codex.js +0 -291
- package/dist/adapters/codex.js.map +0 -1
- package/docs/img/board-linear.png +0 -0
- package/docs/img/board-projects.png +0 -0
- package/docs/img/brain.png +0 -0
- package/docs/img/settings.png +0 -0
- package/docs/img/workspace.png +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hosted Loom Team Hub (Supabase) that ships in the build.
|
|
3
|
+
*
|
|
4
|
+
* The publishable key is public by design: it only identifies the project.
|
|
5
|
+
* Every read is row-level-security checked against the signed-in user's JWT,
|
|
6
|
+
* and every write goes through a rule function (supabase/migrations).
|
|
7
|
+
* LOOM_SUPABASE_URL / LOOM_SUPABASE_PUBLISHABLE_KEY point a build elsewhere.
|
|
8
|
+
*/
|
|
9
|
+
export declare const HOSTED_SUPABASE_URL = "https://ufpkfpzspfzzxabklyec.supabase.co";
|
|
10
|
+
export declare const HOSTED_SUPABASE_PUBLISHABLE_KEY = "sb_publishable_DBiS9r-XDdqlgjt_bdpC2w_JdXqEvb1";
|
|
11
|
+
/** How a hosted hub is written in team.json and invite links: `supabase:<project url>`. */
|
|
12
|
+
export declare const HOSTED_HUB_PREFIX = "supabase:";
|
|
13
|
+
export interface HostedTarget {
|
|
14
|
+
supabaseUrl: string;
|
|
15
|
+
publishableKey: string;
|
|
16
|
+
}
|
|
17
|
+
/** The hosted project in effect: env overrides first, then the built-in one. */
|
|
18
|
+
export declare function hostedTarget(env?: NodeJS.ProcessEnv): HostedTarget;
|
|
19
|
+
/**
|
|
20
|
+
* The Supabase project URL a hub string names, or null when it's a self-hosted
|
|
21
|
+
* `loom hub`. Empty / "hosted" mean the hosted project in effect; so does its
|
|
22
|
+
* bare URL; `supabase:<url>` names one explicitly.
|
|
23
|
+
*/
|
|
24
|
+
export declare function hostedSupabaseUrl(hub: string | undefined | null, env?: NodeJS.ProcessEnv): string | null;
|
|
25
|
+
export declare function hostedHubUrl(supabaseUrl: string): string;
|
|
26
|
+
/** The publishable key for a Supabase project URL: the env/built-in one (a key is per project). */
|
|
27
|
+
export declare function publishableKeyFor(supabaseUrl: string, env?: NodeJS.ProcessEnv): string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hosted Loom Team Hub (Supabase) that ships in the build.
|
|
3
|
+
*
|
|
4
|
+
* The publishable key is public by design: it only identifies the project.
|
|
5
|
+
* Every read is row-level-security checked against the signed-in user's JWT,
|
|
6
|
+
* and every write goes through a rule function (supabase/migrations).
|
|
7
|
+
* LOOM_SUPABASE_URL / LOOM_SUPABASE_PUBLISHABLE_KEY point a build elsewhere.
|
|
8
|
+
*/
|
|
9
|
+
export const HOSTED_SUPABASE_URL = "https://ufpkfpzspfzzxabklyec.supabase.co";
|
|
10
|
+
export const HOSTED_SUPABASE_PUBLISHABLE_KEY = "sb_publishable_DBiS9r-XDdqlgjt_bdpC2w_JdXqEvb1";
|
|
11
|
+
/** How a hosted hub is written in team.json and invite links: `supabase:<project url>`. */
|
|
12
|
+
export const HOSTED_HUB_PREFIX = "supabase:";
|
|
13
|
+
/** The hosted project in effect: env overrides first, then the built-in one. */
|
|
14
|
+
export function hostedTarget(env = process.env) {
|
|
15
|
+
return {
|
|
16
|
+
supabaseUrl: (env.LOOM_SUPABASE_URL || HOSTED_SUPABASE_URL).replace(/\/$/, ""),
|
|
17
|
+
publishableKey: env.LOOM_SUPABASE_PUBLISHABLE_KEY || HOSTED_SUPABASE_PUBLISHABLE_KEY,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The Supabase project URL a hub string names, or null when it's a self-hosted
|
|
22
|
+
* `loom hub`. Empty / "hosted" mean the hosted project in effect; so does its
|
|
23
|
+
* bare URL; `supabase:<url>` names one explicitly.
|
|
24
|
+
*/
|
|
25
|
+
export function hostedSupabaseUrl(hub, env = process.env) {
|
|
26
|
+
const h = (hub ?? "").trim().replace(/\/$/, "");
|
|
27
|
+
const target = hostedTarget(env).supabaseUrl;
|
|
28
|
+
if (!h || h.toLowerCase() === "hosted")
|
|
29
|
+
return target;
|
|
30
|
+
if (h.startsWith(HOSTED_HUB_PREFIX))
|
|
31
|
+
return h.slice(HOSTED_HUB_PREFIX.length).replace(/\/$/, "") || target;
|
|
32
|
+
if (h.startsWith(target))
|
|
33
|
+
return target;
|
|
34
|
+
if (h.startsWith(HOSTED_SUPABASE_URL))
|
|
35
|
+
return HOSTED_SUPABASE_URL;
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
export function hostedHubUrl(supabaseUrl) {
|
|
39
|
+
return HOSTED_HUB_PREFIX + supabaseUrl.replace(/\/$/, "");
|
|
40
|
+
}
|
|
41
|
+
/** The publishable key for a Supabase project URL: the env/built-in one (a key is per project). */
|
|
42
|
+
export function publishableKeyFor(supabaseUrl, env = process.env) {
|
|
43
|
+
const t = hostedTarget(env);
|
|
44
|
+
if (supabaseUrl.replace(/\/$/, "") === t.supabaseUrl)
|
|
45
|
+
return t.publishableKey;
|
|
46
|
+
if (supabaseUrl.replace(/\/$/, "") === HOSTED_SUPABASE_URL)
|
|
47
|
+
return HOSTED_SUPABASE_PUBLISHABLE_KEY;
|
|
48
|
+
return t.publishableKey;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=hosted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted.js","sourceRoot":"","sources":["../../src/core/hosted.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,MAAM,CAAC,MAAM,+BAA+B,GAAG,gDAAgD,CAAC;AAEhG,2FAA2F;AAC3F,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAO7C,gFAAgF;AAChF,MAAM,UAAU,YAAY,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC/D,OAAO;QACL,WAA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K,CAAC,CAAC,WAAW;QAAE,OAAO,CAAC,CAAC,cAAc,CAAC;IAC9E,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,mBAAmB;QAAE,OAAO,+BAA+B,CAAC;IACnG,OAAO,CAAC,CAAC,cAAc,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Server } from "node:http";
|
|
2
|
+
/** A client can be blocked in synchronous Git/CLI work longer than Node's
|
|
3
|
+
* five-second idle default. Keep its pooled socket alive through that work
|
|
4
|
+
* so the next request cannot race a delayed close notification on Windows. */
|
|
5
|
+
export declare function configureHttpServer(server: Server): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** A client can be blocked in synchronous Git/CLI work longer than Node's
|
|
2
|
+
* five-second idle default. Keep its pooled socket alive through that work
|
|
3
|
+
* so the next request cannot race a delayed close notification on Windows. */
|
|
4
|
+
export function configureHttpServer(server) {
|
|
5
|
+
server.keepAliveTimeout = 65_000;
|
|
6
|
+
server.headersTimeout = 70_000;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=http-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-server.js","sourceRoot":"","sources":["../../src/core/http-server.ts"],"names":[],"mappings":"AAEA;;8EAE8E;AAC9E,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One link to join a team (daemon/onboard.ts).
|
|
3
|
+
*
|
|
4
|
+
* An invite is an https URL, so it opens from WhatsApp, Slack or email like
|
|
5
|
+
* any link. The page it opens (site/join/) is static: it reads the #fragment
|
|
6
|
+
* in the browser and hands it to the Loom on that machine, or shows the one
|
|
7
|
+
* command that installs Loom and joins. The fragment never reaches a server —
|
|
8
|
+
* browsers don't send it — and it is the whole invite: team key, hub, repo.
|
|
9
|
+
*
|
|
10
|
+
* Every older or local form still works anywhere a link is accepted:
|
|
11
|
+
* `loom://team/join#…`, `http://localhost:7420/app#join=…`, or the bare
|
|
12
|
+
* fragment.
|
|
13
|
+
*/
|
|
14
|
+
/** Where invite links point. LOOM_JOIN_URL moves it (a fork, a self-hosted page). */
|
|
15
|
+
export declare const DEFAULT_JOIN_URL = "https://nickthelegend.github.io/loom/join/";
|
|
16
|
+
export declare function joinBase(env?: NodeJS.ProcessEnv): string;
|
|
17
|
+
export declare function inviteLink(fragment: string, env?: NodeJS.ProcessEnv): string;
|
|
18
|
+
/** The invite fragment out of any form of the link. */
|
|
19
|
+
export declare function inviteFragment(link: string): string;
|
|
20
|
+
/** What a link would set up, without redeeming anything — for "Join Acme?". */
|
|
21
|
+
export declare function previewInvite(link: string): {
|
|
22
|
+
team: string | null;
|
|
23
|
+
teamId: string | null;
|
|
24
|
+
repo: string | null;
|
|
25
|
+
from: string | null;
|
|
26
|
+
project: string | null;
|
|
27
|
+
hub: string;
|
|
28
|
+
crews: string[];
|
|
29
|
+
/** Carries its inviter's device signature (checked after joining). */
|
|
30
|
+
signed: boolean;
|
|
31
|
+
} | null;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One link to join a team (daemon/onboard.ts).
|
|
3
|
+
*
|
|
4
|
+
* An invite is an https URL, so it opens from WhatsApp, Slack or email like
|
|
5
|
+
* any link. The page it opens (site/join/) is static: it reads the #fragment
|
|
6
|
+
* in the browser and hands it to the Loom on that machine, or shows the one
|
|
7
|
+
* command that installs Loom and joins. The fragment never reaches a server —
|
|
8
|
+
* browsers don't send it — and it is the whole invite: team key, hub, repo.
|
|
9
|
+
*
|
|
10
|
+
* Every older or local form still works anywhere a link is accepted:
|
|
11
|
+
* `loom://team/join#…`, `http://localhost:7420/app#join=…`, or the bare
|
|
12
|
+
* fragment.
|
|
13
|
+
*/
|
|
14
|
+
import { unpackInvite } from "./team-crypto.js";
|
|
15
|
+
/** Where invite links point. LOOM_JOIN_URL moves it (a fork, a self-hosted page). */
|
|
16
|
+
export const DEFAULT_JOIN_URL = "https://nickthelegend.github.io/loom/join/";
|
|
17
|
+
export function joinBase(env = process.env) {
|
|
18
|
+
return (env.LOOM_JOIN_URL || DEFAULT_JOIN_URL).replace(/#.*$/, "");
|
|
19
|
+
}
|
|
20
|
+
export function inviteLink(fragment, env = process.env) {
|
|
21
|
+
return `${joinBase(env)}#${fragment}`;
|
|
22
|
+
}
|
|
23
|
+
/** The invite fragment out of any form of the link. */
|
|
24
|
+
export function inviteFragment(link) {
|
|
25
|
+
const s = link.trim().replace(/^['"<]+|['">]+$/g, "");
|
|
26
|
+
const hash = s.includes("#") ? s.slice(s.indexOf("#") + 1) : s;
|
|
27
|
+
return hash.replace(/^join=/, "").replace(/^\/?/, "");
|
|
28
|
+
}
|
|
29
|
+
/** What a link would set up, without redeeming anything — for "Join Acme?". */
|
|
30
|
+
export function previewInvite(link) {
|
|
31
|
+
const inv = unpackInvite(inviteFragment(link));
|
|
32
|
+
if (!inv)
|
|
33
|
+
return null;
|
|
34
|
+
return {
|
|
35
|
+
team: inv.team ?? null,
|
|
36
|
+
teamId: inv.teamId ?? null,
|
|
37
|
+
repo: inv.repo ?? null,
|
|
38
|
+
from: inv.from ?? null,
|
|
39
|
+
signed: Boolean(inv.sig && inv.dev),
|
|
40
|
+
project: inv.project ?? null,
|
|
41
|
+
hub: inv.hub,
|
|
42
|
+
crews: (inv.crews ?? []).map((c) => c.name),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=invite-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite-link.js","sourceRoot":"","sources":["../../src/core/invite-link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAuB,MAAM,kBAAkB,CAAC;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B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC;QACnC,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,IAAI;QAC5B,GAAG,EAAE,GAAG,CAAC,GAAG;QACZ,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop watch: an agent stuck re-running the same thing.
|
|
3
|
+
*
|
|
4
|
+
* The expensive failure isn't the error — it's the agent that hits the same
|
|
5
|
+
* failing test eight times, or runs the same command in a circle, burning
|
|
6
|
+
* tokens while you're away. Within one turn this counts each command (or tool
|
|
7
|
+
* call) by what it is, and says so once when:
|
|
8
|
+
*
|
|
9
|
+
* failing the same command has failed 3 times
|
|
10
|
+
* repeating the exact same call has been made 5 times
|
|
11
|
+
*
|
|
12
|
+
* Pure: the runtime feeds it events and decides what to do (watchdog config).
|
|
13
|
+
*/
|
|
14
|
+
import type { LoomEvent } from "../types.js";
|
|
15
|
+
export interface Loop {
|
|
16
|
+
agentId: string;
|
|
17
|
+
chat: string;
|
|
18
|
+
kind: "failing" | "repeating";
|
|
19
|
+
/** The command or call, as the thread shows it. */
|
|
20
|
+
call: string;
|
|
21
|
+
count: number;
|
|
22
|
+
/** The last failure's output, when there was one. */
|
|
23
|
+
output?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const FAILING_AT = 3;
|
|
26
|
+
export declare const REPEATING_AT = 5;
|
|
27
|
+
/** "npm test -- --run" and "npm test -- --run" are the same call; so are two reads of one file. */
|
|
28
|
+
export declare function signature(p: Record<string, unknown>): string | null;
|
|
29
|
+
export declare class LoopWatch {
|
|
30
|
+
private turns;
|
|
31
|
+
/** One event; returns a loop the first time this turn crosses a line, else null. */
|
|
32
|
+
observe(e: LoomEvent): Loop | null;
|
|
33
|
+
/** A person spoke in the chat: every agent's count there starts over. */
|
|
34
|
+
reset(chat: string): void;
|
|
35
|
+
}
|
|
36
|
+
/** What Loom tells a stuck agent when it nudges it. */
|
|
37
|
+
export declare function nudgeText(loop: Loop): string;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop watch: an agent stuck re-running the same thing.
|
|
3
|
+
*
|
|
4
|
+
* The expensive failure isn't the error — it's the agent that hits the same
|
|
5
|
+
* failing test eight times, or runs the same command in a circle, burning
|
|
6
|
+
* tokens while you're away. Within one turn this counts each command (or tool
|
|
7
|
+
* call) by what it is, and says so once when:
|
|
8
|
+
*
|
|
9
|
+
* failing the same command has failed 3 times
|
|
10
|
+
* repeating the exact same call has been made 5 times
|
|
11
|
+
*
|
|
12
|
+
* Pure: the runtime feeds it events and decides what to do (watchdog config).
|
|
13
|
+
*/
|
|
14
|
+
export const FAILING_AT = 3;
|
|
15
|
+
export const REPEATING_AT = 5;
|
|
16
|
+
/** "npm test -- --run" and "npm test -- --run" are the same call; so are two reads of one file. */
|
|
17
|
+
export function signature(p) {
|
|
18
|
+
const command = typeof p.command === "string" ? p.command
|
|
19
|
+
: String(p.tool ?? "").toLowerCase() === "shell" || String(p.tool ?? "").toLowerCase() === "bash"
|
|
20
|
+
? String(p.input?.command ?? "") : "";
|
|
21
|
+
if (command.trim())
|
|
22
|
+
return command.replace(/\s+/g, " ").trim().slice(0, 300);
|
|
23
|
+
const tool = String(p.tool ?? p.name ?? "").trim();
|
|
24
|
+
if (!tool)
|
|
25
|
+
return null;
|
|
26
|
+
return `${tool}: ${String(p.summary ?? "").replace(/\s+/g, " ").trim().slice(0, 200)}`;
|
|
27
|
+
}
|
|
28
|
+
export class LoopWatch {
|
|
29
|
+
turns = new Map();
|
|
30
|
+
/** One event; returns a loop the first time this turn crosses a line, else null. */
|
|
31
|
+
observe(e) {
|
|
32
|
+
if (!e.agentId)
|
|
33
|
+
return null;
|
|
34
|
+
const chat = e.chat ?? "main";
|
|
35
|
+
const key = `${e.agentId}\u0000${chat}`;
|
|
36
|
+
if (e.kind === "run_complete" || (e.kind === "status" && (e.payload.state === "interrupted" || e.payload.state === "stopped"))) {
|
|
37
|
+
this.turns.delete(key);
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
if (e.kind !== "tool_call")
|
|
41
|
+
return null;
|
|
42
|
+
const p = e.payload;
|
|
43
|
+
const sig = signature(p);
|
|
44
|
+
if (!sig)
|
|
45
|
+
return null;
|
|
46
|
+
let turn = this.turns.get(key);
|
|
47
|
+
if (!turn) {
|
|
48
|
+
turn = { calls: new Map(), said: new Set() };
|
|
49
|
+
this.turns.set(key, turn);
|
|
50
|
+
}
|
|
51
|
+
const c = turn.calls.get(sig) ?? { n: 0, failed: 0 };
|
|
52
|
+
c.n++;
|
|
53
|
+
const failed = (typeof p.exitCode === "number" && p.exitCode !== 0) || p.ok === false;
|
|
54
|
+
if (failed)
|
|
55
|
+
c.failed++;
|
|
56
|
+
turn.calls.set(sig, c);
|
|
57
|
+
const output = [p.output, p.preview, p.error].filter((x) => typeof x === "string" && !!x.trim()).join("\n").slice(-1500) || undefined;
|
|
58
|
+
if (failed && c.failed === FAILING_AT && !turn.said.has(`f:${sig}`)) {
|
|
59
|
+
turn.said.add(`f:${sig}`);
|
|
60
|
+
return { agentId: e.agentId, chat, kind: "failing", call: sig, count: c.failed, ...(output ? { output } : {}) };
|
|
61
|
+
}
|
|
62
|
+
if (c.n === REPEATING_AT && !turn.said.has(`f:${sig}`) && !turn.said.has(`r:${sig}`)) {
|
|
63
|
+
turn.said.add(`r:${sig}`);
|
|
64
|
+
return { agentId: e.agentId, chat, kind: "repeating", call: sig, count: c.n };
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
/** A person spoke in the chat: every agent's count there starts over. */
|
|
69
|
+
reset(chat) {
|
|
70
|
+
for (const k of [...this.turns.keys()])
|
|
71
|
+
if (k.endsWith(`\u0000${chat}`))
|
|
72
|
+
this.turns.delete(k);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** What Loom tells a stuck agent when it nudges it. */
|
|
76
|
+
export function nudgeText(loop) {
|
|
77
|
+
return loop.kind === "failing"
|
|
78
|
+
? `[Loom] You've run \`${loop.call}\` ${loop.count} times this turn and it failed each time. Stop repeating it. Say in one or two sentences what is actually failing and why your fixes haven't worked, then try a different approach — or ask if you need something from me.`
|
|
79
|
+
: `[Loom] You've made the same call (\`${loop.call}\`) ${loop.count} times this turn. Step back: say what you're trying to find out, and take a different route to it.`;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=loops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loops.js","sourceRoot":"","sources":["../../src/core/loops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAI9B,qGAAqG;AACrG,MAAM,UAAU,SAAS,CAAC,CAA0B;IAClD,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO;QACvD,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM;YAC/F,CAAC,CAAC,MAAM,CAAE,CAAC,CAAC,KAA6C,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,IAAI,OAAO,CAAC,IAAI,EAAE;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CA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AuC,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,KAAK,oGAAoG,CAAC;AAC5K,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP catalog — where a server comes from before it is a row in config.
|
|
3
|
+
*
|
|
4
|
+
* core/mcp.ts is the back half of this story: it takes the servers a project has
|
|
5
|
+
* configured and puts them in front of an agent. This is the front half, and it
|
|
6
|
+
* is the half that didn't exist. Until now the only way to add a server was to
|
|
7
|
+
* know its URL and type it into a prompt — so the composer shipped six hardcoded
|
|
8
|
+
* rows with empty urls (GitHub, Slack, Supabase, …) which looked like
|
|
9
|
+
* integrations and were placeholders. A logo is not an integration, and neither
|
|
10
|
+
* is a name with nothing behind it.
|
|
11
|
+
*
|
|
12
|
+
* Two sources, and the difference between them is the whole design:
|
|
13
|
+
*
|
|
14
|
+
* 1. **The official registry** (registry.modelcontextprotocol.io). Thousands
|
|
15
|
+
* of servers, searchable, maintained by somebody else. Everything in here
|
|
16
|
+
* is normalised from what the registry actually returned — nothing is
|
|
17
|
+
* filled in, and an entry that is installable by neither a URL nor a
|
|
18
|
+
* package is dropped rather than shown as a row that can't be clicked.
|
|
19
|
+
*
|
|
20
|
+
* 2. **A curated shortlist** of well-known providers, for the empty state,
|
|
21
|
+
* because "search 4000 servers" is a bad first screen and the registry's
|
|
22
|
+
* ranking is not ours to reinterpret. Every URL and command in that list
|
|
23
|
+
* was verified against the vendor's own documentation and, where it is a
|
|
24
|
+
* remote, probed for a live response. The ones that could NOT be pinned to
|
|
25
|
+
* a single correct endpoint carry `needsUrl` so the UI asks the user
|
|
26
|
+
* instead of us guessing — a hosted telemetry backend whose hostname
|
|
27
|
+
* contains the account's own region is not knowable from here.
|
|
28
|
+
*
|
|
29
|
+
* ## Why the cache exists
|
|
30
|
+
*
|
|
31
|
+
* The catalog modal searches as you type. Without a cache that is one HTTP
|
|
32
|
+
* request per keystroke against somebody else's public service, which is rude
|
|
33
|
+
* at best and rate-limited at worst. A short TTL is enough — the registry does
|
|
34
|
+
* not change between two keystrokes, and 60 seconds of staleness in a browse
|
|
35
|
+
* list costs nothing.
|
|
36
|
+
*
|
|
37
|
+
* ## Why a failed fetch is `degraded` and not an error
|
|
38
|
+
*
|
|
39
|
+
* A laptop on a plane still deserves the curated list. Returning an empty array
|
|
40
|
+
* would read as "there are no MCP servers", which is false; throwing would take
|
|
41
|
+
* the modal down over a network blip. `degraded: true` says exactly what
|
|
42
|
+
* happened — the registry did not answer, this is what we know without it — and
|
|
43
|
+
* the UI can say so out loud.
|
|
44
|
+
*/
|
|
45
|
+
/** How a server is spoken to. `streamable-http` from the registry maps to http. */
|
|
46
|
+
export type CatalogTransport = "http" | "sse" | "stdio";
|
|
47
|
+
/** One installable server, normalised out of a registry entry. */
|
|
48
|
+
export interface CatalogServer {
|
|
49
|
+
/** The registry's fully-qualified name — unique and stable, e.g. `app.linear/linear`. */
|
|
50
|
+
id: string;
|
|
51
|
+
/** The same fully-qualified name. Kept because that is what the registry calls it. */
|
|
52
|
+
name: string;
|
|
53
|
+
/** A human label: the entry's own title, or the last segment of the name. */
|
|
54
|
+
title: string;
|
|
55
|
+
description: string;
|
|
56
|
+
/** The source repository, when the entry declares one. */
|
|
57
|
+
homepage?: string;
|
|
58
|
+
transport: CatalogTransport;
|
|
59
|
+
/** Set for a remote server. */
|
|
60
|
+
url?: string;
|
|
61
|
+
/** Set for a local one, derived from the published package. */
|
|
62
|
+
command?: string;
|
|
63
|
+
args?: string[];
|
|
64
|
+
/** The published version this was derived from, when the entry declares one. */
|
|
65
|
+
version?: string;
|
|
66
|
+
source: "registry";
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* One hand-verified provider for the featured shelf.
|
|
70
|
+
*
|
|
71
|
+
* Every field here is a claim somebody checked. `maintainer` is part of that:
|
|
72
|
+
* "official" means the vendor publishes this server, "community" means somebody
|
|
73
|
+
* else does — a real and important difference that the row should show, because
|
|
74
|
+
* pointing a database server at production is not a decision to make on the
|
|
75
|
+
* assumption that Postgres wrote it.
|
|
76
|
+
*/
|
|
77
|
+
export interface CuratedProvider {
|
|
78
|
+
/** Stable key for a bundled logo. Never changes; the display name might. */
|
|
79
|
+
slug: string;
|
|
80
|
+
/** Display name, and the name the server is installed under. */
|
|
81
|
+
name: string;
|
|
82
|
+
description: string;
|
|
83
|
+
/** The vendor's documentation for this server. */
|
|
84
|
+
homepage: string;
|
|
85
|
+
transport: CatalogTransport;
|
|
86
|
+
url?: string;
|
|
87
|
+
command?: string;
|
|
88
|
+
args?: string[];
|
|
89
|
+
/**
|
|
90
|
+
* True when the endpoint depends on the user's own account, region, or
|
|
91
|
+
* deployment and so cannot be known here. The UI must ask; it must NOT
|
|
92
|
+
* install a default. A wrong URL is worse than an empty field: it fails at
|
|
93
|
+
* handshake time with an auth error that looks like the user's fault.
|
|
94
|
+
*/
|
|
95
|
+
needsUrl?: boolean;
|
|
96
|
+
/** A documented URL with the unknown part left in, to prefill what `needsUrl` asks for. */
|
|
97
|
+
urlTemplate?: string;
|
|
98
|
+
/** What the user must still supply for this server to start, in one line. */
|
|
99
|
+
requires?: string;
|
|
100
|
+
/** Does the vendor publish this server, or does somebody else? */
|
|
101
|
+
maintainer: "official" | "community";
|
|
102
|
+
source: "curated";
|
|
103
|
+
}
|
|
104
|
+
export interface CatalogResult {
|
|
105
|
+
/** Registry hits for the query. Empty when `degraded`. */
|
|
106
|
+
servers: CatalogServer[];
|
|
107
|
+
/** The verified shortlist. Always present — it needs no network. */
|
|
108
|
+
featured: CuratedProvider[];
|
|
109
|
+
/** True when the registry did not answer and `servers` is therefore empty. */
|
|
110
|
+
degraded: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Well-known providers, verified against vendor documentation.
|
|
114
|
+
*
|
|
115
|
+
* Each remote below was confirmed twice: it appears in the vendor's own docs (or
|
|
116
|
+
* in the official registry under the vendor's namespace), and a live MCP
|
|
117
|
+
* `initialize` to it answered — 401 for the ones that need auth, which is a
|
|
118
|
+
* server saying "not without credentials" and therefore proof the endpoint is
|
|
119
|
+
* real. A DNS failure or a 404 would have disqualified an entry.
|
|
120
|
+
*
|
|
121
|
+
* Three entries are worth reading the comment on rather than trusting the shape:
|
|
122
|
+
* SigNoz (region in the hostname), Postgres (no official server exists at all),
|
|
123
|
+
* and Cloudflare (sixteen servers, not one).
|
|
124
|
+
*/
|
|
125
|
+
export declare const CURATED_MCPS: CuratedProvider[];
|
|
126
|
+
/** Drop everything cached. Exported for tests, which must not inherit a result. */
|
|
127
|
+
export declare function clearCatalogCache(): void;
|
|
128
|
+
/** The raw shapes the registry returns, named so the normaliser reads honestly. */
|
|
129
|
+
interface RegistryRemote {
|
|
130
|
+
type?: string;
|
|
131
|
+
url?: string;
|
|
132
|
+
}
|
|
133
|
+
interface RegistryPackage {
|
|
134
|
+
registryType?: string;
|
|
135
|
+
identifier?: string;
|
|
136
|
+
version?: string;
|
|
137
|
+
runtimeHint?: string;
|
|
138
|
+
}
|
|
139
|
+
interface RegistryServer {
|
|
140
|
+
name?: string;
|
|
141
|
+
title?: string;
|
|
142
|
+
description?: string;
|
|
143
|
+
version?: string;
|
|
144
|
+
repository?: {
|
|
145
|
+
url?: string;
|
|
146
|
+
};
|
|
147
|
+
remotes?: RegistryRemote[] | null;
|
|
148
|
+
packages?: RegistryPackage[] | null;
|
|
149
|
+
}
|
|
150
|
+
interface RegistryEnvelope {
|
|
151
|
+
servers?: Array<{
|
|
152
|
+
server?: RegistryServer;
|
|
153
|
+
_meta?: Record<string, {
|
|
154
|
+
isLatest?: boolean;
|
|
155
|
+
}>;
|
|
156
|
+
}> | null;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Search the official registry, falling back to the curated shelf.
|
|
160
|
+
*
|
|
161
|
+
* `query` is passed through as the registry's own `search` parameter — its
|
|
162
|
+
* matching is its business, and reimplementing it here would give different
|
|
163
|
+
* answers than the registry's website for the same words.
|
|
164
|
+
*/
|
|
165
|
+
export declare function searchCatalog(query?: string, limit?: number): Promise<CatalogResult>;
|
|
166
|
+
/**
|
|
167
|
+
* Registry entries → installable rows.
|
|
168
|
+
*
|
|
169
|
+
* Two things happen here that the raw response doesn't do for you:
|
|
170
|
+
*
|
|
171
|
+
* - **Deduplication.** The registry returns every published version of a
|
|
172
|
+
* server as its own entry, so an unfiltered list shows "inference.sh" three
|
|
173
|
+
* times. Entries are collapsed by name, preferring the one the registry
|
|
174
|
+
* marks `isLatest` and otherwise the last seen (the list is version-ordered).
|
|
175
|
+
*
|
|
176
|
+
* - **Dropping the uninstallable.** `remotes` and `packages` are both nullable
|
|
177
|
+
* and an entry can have neither — it is a name in a directory, not something
|
|
178
|
+
* you can connect to. Those are removed rather than rendered as a row whose
|
|
179
|
+
* Install button would have nothing to write.
|
|
180
|
+
*/
|
|
181
|
+
export declare function normalizeRegistry(body: RegistryEnvelope): CatalogServer[];
|
|
182
|
+
export {};
|