nomoreide 0.2.0 → 0.3.2
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/README.md +12 -9
- package/bin/nomoreide.js +82 -0
- package/package.json +24 -132
- package/dist/cli/agents.d.ts +0 -2
- package/dist/cli/agents.js +0 -43
- package/dist/cli/agents.js.map +0 -1
- package/dist/cli/commands.d.ts +0 -11
- package/dist/cli/commands.js +0 -235
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/daemon.d.ts +0 -15
- package/dist/cli/daemon.js +0 -139
- package/dist/cli/daemon.js.map +0 -1
- package/dist/cli/database.d.ts +0 -2
- package/dist/cli/database.js +0 -145
- package/dist/cli/database.js.map +0 -1
- package/dist/cli/errors.d.ts +0 -2
- package/dist/cli/errors.js +0 -3
- package/dist/cli/errors.js.map +0 -1
- package/dist/cli/flags.d.ts +0 -1
- package/dist/cli/flags.js +0 -19
- package/dist/cli/flags.js.map +0 -1
- package/dist/cli/git.d.ts +0 -2
- package/dist/cli/git.js +0 -113
- package/dist/cli/git.js.map +0 -1
- package/dist/cli/profile.d.ts +0 -2
- package/dist/cli/profile.js +0 -171
- package/dist/cli/profile.js.map +0 -1
- package/dist/core/agent-context.d.ts +0 -9
- package/dist/core/agent-context.js +0 -43
- package/dist/core/agent-context.js.map +0 -1
- package/dist/core/agent-env/antigravity-reader.d.ts +0 -7
- package/dist/core/agent-env/antigravity-reader.js +0 -86
- package/dist/core/agent-env/antigravity-reader.js.map +0 -1
- package/dist/core/agent-env/availability.d.ts +0 -6
- package/dist/core/agent-env/availability.js +0 -79
- package/dist/core/agent-env/availability.js.map +0 -1
- package/dist/core/agent-env/claude-reader.d.ts +0 -7
- package/dist/core/agent-env/claude-reader.js +0 -101
- package/dist/core/agent-env/claude-reader.js.map +0 -1
- package/dist/core/agent-env/codex-reader.d.ts +0 -11
- package/dist/core/agent-env/codex-reader.js +0 -164
- package/dist/core/agent-env/codex-reader.js.map +0 -1
- package/dist/core/agent-env/index.d.ts +0 -9
- package/dist/core/agent-env/index.js +0 -29
- package/dist/core/agent-env/index.js.map +0 -1
- package/dist/core/agent-env/managed-plugins.d.ts +0 -18
- package/dist/core/agent-env/managed-plugins.js +0 -68
- package/dist/core/agent-env/managed-plugins.js.map +0 -1
- package/dist/core/agent-env/plugin-reader.d.ts +0 -9
- package/dist/core/agent-env/plugin-reader.js +0 -174
- package/dist/core/agent-env/plugin-reader.js.map +0 -1
- package/dist/core/agent-env/shared.d.ts +0 -26
- package/dist/core/agent-env/shared.js +0 -116
- package/dist/core/agent-env/shared.js.map +0 -1
- package/dist/core/agent-env/types.d.ts +0 -66
- package/dist/core/agent-env/types.js +0 -7
- package/dist/core/agent-env/types.js.map +0 -1
- package/dist/core/agent-env-actions.d.ts +0 -117
- package/dist/core/agent-env-actions.js +0 -273
- package/dist/core/agent-env-actions.js.map +0 -1
- package/dist/core/agent-env-plugin-uninstall.d.ts +0 -11
- package/dist/core/agent-env-plugin-uninstall.js +0 -189
- package/dist/core/agent-env-plugin-uninstall.js.map +0 -1
- package/dist/core/agent-env-writers.d.ts +0 -71
- package/dist/core/agent-env-writers.js +0 -632
- package/dist/core/agent-env-writers.js.map +0 -1
- package/dist/core/agent-profiles/apply.d.ts +0 -57
- package/dist/core/agent-profiles/apply.js +0 -209
- package/dist/core/agent-profiles/apply.js.map +0 -1
- package/dist/core/agent-profiles/builtin.d.ts +0 -8
- package/dist/core/agent-profiles/builtin.js +0 -33
- package/dist/core/agent-profiles/builtin.js.map +0 -1
- package/dist/core/agent-profiles/credentials.d.ts +0 -26
- package/dist/core/agent-profiles/credentials.js +0 -151
- package/dist/core/agent-profiles/credentials.js.map +0 -1
- package/dist/core/agent-profiles/debug-setup.d.ts +0 -18
- package/dist/core/agent-profiles/debug-setup.js +0 -237
- package/dist/core/agent-profiles/debug-setup.js.map +0 -1
- package/dist/core/agent-profiles/index.d.ts +0 -18
- package/dist/core/agent-profiles/index.js +0 -19
- package/dist/core/agent-profiles/index.js.map +0 -1
- package/dist/core/agent-profiles/plugin-apply.d.ts +0 -16
- package/dist/core/agent-profiles/plugin-apply.js +0 -383
- package/dist/core/agent-profiles/plugin-apply.js.map +0 -1
- package/dist/core/agent-profiles/plugin-bundle.d.ts +0 -6
- package/dist/core/agent-profiles/plugin-bundle.js +0 -32
- package/dist/core/agent-profiles/plugin-bundle.js.map +0 -1
- package/dist/core/agent-profiles/publication.d.ts +0 -105
- package/dist/core/agent-profiles/publication.js +0 -126
- package/dist/core/agent-profiles/publication.js.map +0 -1
- package/dist/core/agent-profiles/registry-auth.d.ts +0 -25
- package/dist/core/agent-profiles/registry-auth.js +0 -78
- package/dist/core/agent-profiles/registry-auth.js.map +0 -1
- package/dist/core/agent-profiles/registry-client.d.ts +0 -98
- package/dist/core/agent-profiles/registry-client.js +0 -109
- package/dist/core/agent-profiles/registry-client.js.map +0 -1
- package/dist/core/agent-profiles/registry-config.d.ts +0 -62
- package/dist/core/agent-profiles/registry-config.js +0 -221
- package/dist/core/agent-profiles/registry-config.js.map +0 -1
- package/dist/core/agent-profiles/registry-transfer.d.ts +0 -42
- package/dist/core/agent-profiles/registry-transfer.js +0 -133
- package/dist/core/agent-profiles/registry-transfer.js.map +0 -1
- package/dist/core/agent-profiles/store.d.ts +0 -62
- package/dist/core/agent-profiles/store.js +0 -479
- package/dist/core/agent-profiles/store.js.map +0 -1
- package/dist/core/agent-profiles/transfer.d.ts +0 -27
- package/dist/core/agent-profiles/transfer.js +0 -359
- package/dist/core/agent-profiles/transfer.js.map +0 -1
- package/dist/core/agent-profiles/types.d.ts +0 -364
- package/dist/core/agent-profiles/types.js +0 -79
- package/dist/core/agent-profiles/types.js.map +0 -1
- package/dist/core/agent-runtime.d.ts +0 -114
- package/dist/core/agent-runtime.js +0 -494
- package/dist/core/agent-runtime.js.map +0 -1
- package/dist/core/agent-sessions.d.ts +0 -46
- package/dist/core/agent-sessions.js +0 -109
- package/dist/core/agent-sessions.js.map +0 -1
- package/dist/core/agent-settings.d.ts +0 -31
- package/dist/core/agent-settings.js +0 -129
- package/dist/core/agent-settings.js.map +0 -1
- package/dist/core/agent-terminal.d.ts +0 -22
- package/dist/core/agent-terminal.js +0 -62
- package/dist/core/agent-terminal.js.map +0 -1
- package/dist/core/agent-transcripts.d.ts +0 -29
- package/dist/core/agent-transcripts.js +0 -281
- package/dist/core/agent-transcripts.js.map +0 -1
- package/dist/core/app-settings.d.ts +0 -74
- package/dist/core/app-settings.js +0 -118
- package/dist/core/app-settings.js.map +0 -1
- package/dist/core/app-version.d.ts +0 -2
- package/dist/core/app-version.js +0 -16
- package/dist/core/app-version.js.map +0 -1
- package/dist/core/approval-broker.d.ts +0 -29
- package/dist/core/approval-broker.js +0 -48
- package/dist/core/approval-broker.js.map +0 -1
- package/dist/core/claude-settings.d.ts +0 -18
- package/dist/core/claude-settings.js +0 -48
- package/dist/core/claude-settings.js.map +0 -1
- package/dist/core/cloudflare-actions.d.ts +0 -90
- package/dist/core/cloudflare-actions.js +0 -178
- package/dist/core/cloudflare-actions.js.map +0 -1
- package/dist/core/cloudflare-auth.d.ts +0 -61
- package/dist/core/cloudflare-auth.js +0 -149
- package/dist/core/cloudflare-auth.js.map +0 -1
- package/dist/core/cloudflare-context.d.ts +0 -2
- package/dist/core/cloudflare-context.js +0 -106
- package/dist/core/cloudflare-context.js.map +0 -1
- package/dist/core/cloudflare-manager.d.ts +0 -258
- package/dist/core/cloudflare-manager.js +0 -414
- package/dist/core/cloudflare-manager.js.map +0 -1
- package/dist/core/cloudflare-provider.d.ts +0 -64
- package/dist/core/cloudflare-provider.js +0 -348
- package/dist/core/cloudflare-provider.js.map +0 -1
- package/dist/core/config-files.d.ts +0 -27
- package/dist/core/config-files.js +0 -154
- package/dist/core/config-files.js.map +0 -1
- package/dist/core/config-store.d.ts +0 -181
- package/dist/core/config-store.js +0 -1026
- package/dist/core/config-store.js.map +0 -1
- package/dist/core/context-library.d.ts +0 -53
- package/dist/core/context-library.js +0 -605
- package/dist/core/context-library.js.map +0 -1
- package/dist/core/context-types.d.ts +0 -83
- package/dist/core/context-types.js +0 -9
- package/dist/core/context-types.js.map +0 -1
- package/dist/core/daemon-client.d.ts +0 -84
- package/dist/core/daemon-client.js +0 -156
- package/dist/core/daemon-client.js.map +0 -1
- package/dist/core/daemon-lifecycle.d.ts +0 -59
- package/dist/core/daemon-lifecycle.js +0 -147
- package/dist/core/daemon-lifecycle.js.map +0 -1
- package/dist/core/db/catalog.d.ts +0 -57
- package/dist/core/db/catalog.js +0 -38
- package/dist/core/db/catalog.js.map +0 -1
- package/dist/core/db/data-masking.d.ts +0 -3
- package/dist/core/db/data-masking.js +0 -14
- package/dist/core/db/data-masking.js.map +0 -1
- package/dist/core/db/driver.d.ts +0 -151
- package/dist/core/db/driver.js +0 -209
- package/dist/core/db/driver.js.map +0 -1
- package/dist/core/db/export.d.ts +0 -17
- package/dist/core/db/export.js +0 -67
- package/dist/core/db/export.js.map +0 -1
- package/dist/core/db/mysql-driver.d.ts +0 -33
- package/dist/core/db/mysql-driver.js +0 -364
- package/dist/core/db/mysql-driver.js.map +0 -1
- package/dist/core/db/postgres-driver.d.ts +0 -34
- package/dist/core/db/postgres-driver.js +0 -430
- package/dist/core/db/postgres-driver.js.map +0 -1
- package/dist/core/db/sqlite-driver.d.ts +0 -30
- package/dist/core/db/sqlite-driver.js +0 -301
- package/dist/core/db/sqlite-driver.js.map +0 -1
- package/dist/core/db-peek.d.ts +0 -99
- package/dist/core/db-peek.js +0 -322
- package/dist/core/db-peek.js.map +0 -1
- package/dist/core/db-write.d.ts +0 -45
- package/dist/core/db-write.js +0 -190
- package/dist/core/db-write.js.map +0 -1
- package/dist/core/docker-inspect.d.ts +0 -34
- package/dist/core/docker-inspect.js +0 -108
- package/dist/core/docker-inspect.js.map +0 -1
- package/dist/core/docker-resources.d.ts +0 -28
- package/dist/core/docker-resources.js +0 -59
- package/dist/core/docker-resources.js.map +0 -1
- package/dist/core/docker-service-runner.d.ts +0 -21
- package/dist/core/docker-service-runner.js +0 -80
- package/dist/core/docker-service-runner.js.map +0 -1
- package/dist/core/docker-stats.d.ts +0 -24
- package/dist/core/docker-stats.js +0 -76
- package/dist/core/docker-stats.js.map +0 -1
- package/dist/core/docker.d.ts +0 -75
- package/dist/core/docker.js +0 -219
- package/dist/core/docker.js.map +0 -1
- package/dist/core/env-file.d.ts +0 -24
- package/dist/core/env-file.js +0 -123
- package/dist/core/env-file.js.map +0 -1
- package/dist/core/env-runtime.d.ts +0 -32
- package/dist/core/env-runtime.js +0 -42
- package/dist/core/env-runtime.js.map +0 -1
- package/dist/core/error-inbox.d.ts +0 -91
- package/dist/core/error-inbox.js +0 -292
- package/dist/core/error-inbox.js.map +0 -1
- package/dist/core/extensions.d.ts +0 -78
- package/dist/core/extensions.js +0 -41
- package/dist/core/extensions.js.map +0 -1
- package/dist/core/external-terminal.d.ts +0 -60
- package/dist/core/external-terminal.js +0 -429
- package/dist/core/external-terminal.js.map +0 -1
- package/dist/core/fix-loop.d.ts +0 -55
- package/dist/core/fix-loop.js +0 -73
- package/dist/core/fix-loop.js.map +0 -1
- package/dist/core/git-actions.d.ts +0 -69
- package/dist/core/git-actions.js +0 -161
- package/dist/core/git-actions.js.map +0 -1
- package/dist/core/git-graph-layout.d.ts +0 -34
- package/dist/core/git-graph-layout.js +0 -94
- package/dist/core/git-graph-layout.js.map +0 -1
- package/dist/core/git-identity.d.ts +0 -78
- package/dist/core/git-identity.js +0 -178
- package/dist/core/git-identity.js.map +0 -1
- package/dist/core/git-manager.d.ts +0 -129
- package/dist/core/git-manager.js +0 -509
- package/dist/core/git-manager.js.map +0 -1
- package/dist/core/git-worktrees.d.ts +0 -35
- package/dist/core/git-worktrees.js +0 -142
- package/dist/core/git-worktrees.js.map +0 -1
- package/dist/core/github-auth.d.ts +0 -28
- package/dist/core/github-auth.js +0 -134
- package/dist/core/github-auth.js.map +0 -1
- package/dist/core/github-context.d.ts +0 -12
- package/dist/core/github-context.js +0 -36
- package/dist/core/github-context.js.map +0 -1
- package/dist/core/github-manager.d.ts +0 -230
- package/dist/core/github-manager.js +0 -324
- package/dist/core/github-manager.js.map +0 -1
- package/dist/core/host-metrics.d.ts +0 -41
- package/dist/core/host-metrics.js +0 -93
- package/dist/core/host-metrics.js.map +0 -1
- package/dist/core/http-inspector.d.ts +0 -20
- package/dist/core/http-inspector.js +0 -106
- package/dist/core/http-inspector.js.map +0 -1
- package/dist/core/jetbrains-import.d.ts +0 -85
- package/dist/core/jetbrains-import.js +0 -599
- package/dist/core/jetbrains-import.js.map +0 -1
- package/dist/core/log-sources.d.ts +0 -21
- package/dist/core/log-sources.js +0 -219
- package/dist/core/log-sources.js.map +0 -1
- package/dist/core/log-store.d.ts +0 -33
- package/dist/core/log-store.js +0 -94
- package/dist/core/log-store.js.map +0 -1
- package/dist/core/log-volume.d.ts +0 -41
- package/dist/core/log-volume.js +0 -81
- package/dist/core/log-volume.js.map +0 -1
- package/dist/core/mcp-auth.d.ts +0 -27
- package/dist/core/mcp-auth.js +0 -90
- package/dist/core/mcp-auth.js.map +0 -1
- package/dist/core/metrics-store.d.ts +0 -74
- package/dist/core/metrics-store.js +0 -187
- package/dist/core/metrics-store.js.map +0 -1
- package/dist/core/one-time-skills.d.ts +0 -27
- package/dist/core/one-time-skills.js +0 -185
- package/dist/core/one-time-skills.js.map +0 -1
- package/dist/core/port-utils.d.ts +0 -23
- package/dist/core/port-utils.js +0 -83
- package/dist/core/port-utils.js.map +0 -1
- package/dist/core/process-manager.d.ts +0 -99
- package/dist/core/process-manager.js +0 -738
- package/dist/core/process-manager.js.map +0 -1
- package/dist/core/process-tree.d.ts +0 -17
- package/dist/core/process-tree.js +0 -64
- package/dist/core/process-tree.js.map +0 -1
- package/dist/core/project-overview.d.ts +0 -52
- package/dist/core/project-overview.js +0 -122
- package/dist/core/project-overview.js.map +0 -1
- package/dist/core/providers/api-base.d.ts +0 -24
- package/dist/core/providers/api-base.js +0 -44
- package/dist/core/providers/api-base.js.map +0 -1
- package/dist/core/providers/credentials.d.ts +0 -93
- package/dist/core/providers/credentials.js +0 -88
- package/dist/core/providers/credentials.js.map +0 -1
- package/dist/core/providers/deploy-provider.d.ts +0 -327
- package/dist/core/providers/deploy-provider.js +0 -25
- package/dist/core/providers/deploy-provider.js.map +0 -1
- package/dist/core/providers/egress.d.ts +0 -58
- package/dist/core/providers/egress.js +0 -124
- package/dist/core/providers/egress.js.map +0 -1
- package/dist/core/providers/host-bridge.d.ts +0 -20
- package/dist/core/providers/host-bridge.js +0 -57
- package/dist/core/providers/host-bridge.js.map +0 -1
- package/dist/core/providers/host-provider.d.ts +0 -160
- package/dist/core/providers/host-provider.js +0 -2
- package/dist/core/providers/host-provider.js.map +0 -1
- package/dist/core/providers/oauth.d.ts +0 -97
- package/dist/core/providers/oauth.js +0 -238
- package/dist/core/providers/oauth.js.map +0 -1
- package/dist/core/providers/project-resolution.d.ts +0 -81
- package/dist/core/providers/project-resolution.js +0 -101
- package/dist/core/providers/project-resolution.js.map +0 -1
- package/dist/core/providers/registry.d.ts +0 -73
- package/dist/core/providers/registry.js +0 -53
- package/dist/core/providers/registry.js.map +0 -1
- package/dist/core/providers/strings.d.ts +0 -95
- package/dist/core/providers/strings.js +0 -59
- package/dist/core/providers/strings.js.map +0 -1
- package/dist/core/public-config.d.ts +0 -18
- package/dist/core/public-config.js +0 -76
- package/dist/core/public-config.js.map +0 -1
- package/dist/core/read-only-files.d.ts +0 -28
- package/dist/core/read-only-files.js +0 -93
- package/dist/core/read-only-files.js.map +0 -1
- package/dist/core/repo-create.d.ts +0 -11
- package/dist/core/repo-create.js +0 -54
- package/dist/core/repo-create.js.map +0 -1
- package/dist/core/repo-match.d.ts +0 -12
- package/dist/core/repo-match.js +0 -40
- package/dist/core/repo-match.js.map +0 -1
- package/dist/core/repo-onboard.d.ts +0 -297
- package/dist/core/repo-onboard.js +0 -667
- package/dist/core/repo-onboard.js.map +0 -1
- package/dist/core/repro-bundle.d.ts +0 -30
- package/dist/core/repro-bundle.js +0 -116
- package/dist/core/repro-bundle.js.map +0 -1
- package/dist/core/service-graph.d.ts +0 -50
- package/dist/core/service-graph.js +0 -143
- package/dist/core/service-graph.js.map +0 -1
- package/dist/core/service-health.d.ts +0 -10
- package/dist/core/service-health.js +0 -46
- package/dist/core/service-health.js.map +0 -1
- package/dist/core/service-log-source.d.ts +0 -9
- package/dist/core/service-log-source.js +0 -49
- package/dist/core/service-log-source.js.map +0 -1
- package/dist/core/service-registry.d.ts +0 -52
- package/dist/core/service-registry.js +0 -101
- package/dist/core/service-registry.js.map +0 -1
- package/dist/core/snapshot-manager.d.ts +0 -62
- package/dist/core/snapshot-manager.js +0 -219
- package/dist/core/snapshot-manager.js.map +0 -1
- package/dist/core/ssh-servers.d.ts +0 -89
- package/dist/core/ssh-servers.js +0 -251
- package/dist/core/ssh-servers.js.map +0 -1
- package/dist/core/ssh-service-runner.d.ts +0 -7
- package/dist/core/ssh-service-runner.js +0 -36
- package/dist/core/ssh-service-runner.js.map +0 -1
- package/dist/core/ssh-setup.d.ts +0 -11
- package/dist/core/ssh-setup.js +0 -49
- package/dist/core/ssh-setup.js.map +0 -1
- package/dist/core/system-processes.d.ts +0 -29
- package/dist/core/system-processes.js +0 -119
- package/dist/core/system-processes.js.map +0 -1
- package/dist/core/terminal-manager.d.ts +0 -123
- package/dist/core/terminal-manager.js +0 -470
- package/dist/core/terminal-manager.js.map +0 -1
- package/dist/core/terminal-session.d.ts +0 -122
- package/dist/core/terminal-session.js +0 -242
- package/dist/core/terminal-session.js.map +0 -1
- package/dist/core/terminal-spawn.d.ts +0 -26
- package/dist/core/terminal-spawn.js +0 -63
- package/dist/core/terminal-spawn.js.map +0 -1
- package/dist/core/test-runner.d.ts +0 -69
- package/dist/core/test-runner.js +0 -199
- package/dist/core/test-runner.js.map +0 -1
- package/dist/core/timeline-store.d.ts +0 -20
- package/dist/core/timeline-store.js +0 -36
- package/dist/core/timeline-store.js.map +0 -1
- package/dist/core/tool-call-store.d.ts +0 -25
- package/dist/core/tool-call-store.js +0 -62
- package/dist/core/tool-call-store.js.map +0 -1
- package/dist/core/types.d.ts +0 -312
- package/dist/core/types.js +0 -2
- package/dist/core/types.js.map +0 -1
- package/dist/core/usage-history.d.ts +0 -81
- package/dist/core/usage-history.js +0 -149
- package/dist/core/usage-history.js.map +0 -1
- package/dist/core/vercel-actions.d.ts +0 -71
- package/dist/core/vercel-actions.js +0 -109
- package/dist/core/vercel-actions.js.map +0 -1
- package/dist/core/vercel-auth.d.ts +0 -40
- package/dist/core/vercel-auth.js +0 -88
- package/dist/core/vercel-auth.js.map +0 -1
- package/dist/core/vercel-context.d.ts +0 -2
- package/dist/core/vercel-context.js +0 -97
- package/dist/core/vercel-context.js.map +0 -1
- package/dist/core/vercel-manager.d.ts +0 -268
- package/dist/core/vercel-manager.js +0 -401
- package/dist/core/vercel-manager.js.map +0 -1
- package/dist/core/vercel-oauth.d.ts +0 -37
- package/dist/core/vercel-oauth.js +0 -57
- package/dist/core/vercel-oauth.js.map +0 -1
- package/dist/core/vercel-provider.d.ts +0 -23
- package/dist/core/vercel-provider.js +0 -276
- package/dist/core/vercel-provider.js.map +0 -1
- package/dist/core/vultr-actions.d.ts +0 -52
- package/dist/core/vultr-actions.js +0 -62
- package/dist/core/vultr-actions.js.map +0 -1
- package/dist/core/vultr-auth.d.ts +0 -32
- package/dist/core/vultr-auth.js +0 -54
- package/dist/core/vultr-auth.js.map +0 -1
- package/dist/core/vultr-context.d.ts +0 -2
- package/dist/core/vultr-context.js +0 -55
- package/dist/core/vultr-context.js.map +0 -1
- package/dist/core/vultr-manager.d.ts +0 -113
- package/dist/core/vultr-manager.js +0 -170
- package/dist/core/vultr-manager.js.map +0 -1
- package/dist/core/vultr-provider.d.ts +0 -69
- package/dist/core/vultr-provider.js +0 -226
- package/dist/core/vultr-provider.js.map +0 -1
- package/dist/core/workflow-triggers.d.ts +0 -139
- package/dist/core/workflow-triggers.js +0 -208
- package/dist/core/workflow-triggers.js.map +0 -1
- package/dist/core/workflows.d.ts +0 -290
- package/dist/core/workflows.js +0 -190
- package/dist/core/workflows.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -66
- package/dist/index.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -37
- package/dist/mcp/server.js +0 -84
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/tools/agent-env.d.ts +0 -9
- package/dist/mcp/tools/agent-env.js +0 -160
- package/dist/mcp/tools/agent-env.js.map +0 -1
- package/dist/mcp/tools/agent-profiles.d.ts +0 -9
- package/dist/mcp/tools/agent-profiles.js +0 -197
- package/dist/mcp/tools/agent-profiles.js.map +0 -1
- package/dist/mcp/tools/agent-registry.d.ts +0 -9
- package/dist/mcp/tools/agent-registry.js +0 -81
- package/dist/mcp/tools/agent-registry.js.map +0 -1
- package/dist/mcp/tools/agent.d.ts +0 -4
- package/dist/mcp/tools/agent.js +0 -29
- package/dist/mcp/tools/agent.js.map +0 -1
- package/dist/mcp/tools/context.d.ts +0 -36
- package/dist/mcp/tools/context.js +0 -69
- package/dist/mcp/tools/context.js.map +0 -1
- package/dist/mcp/tools/database.d.ts +0 -9
- package/dist/mcp/tools/database.js +0 -166
- package/dist/mcp/tools/database.js.map +0 -1
- package/dist/mcp/tools/docs.d.ts +0 -29
- package/dist/mcp/tools/docs.js +0 -134
- package/dist/mcp/tools/docs.js.map +0 -1
- package/dist/mcp/tools/errors.d.ts +0 -12
- package/dist/mcp/tools/errors.js +0 -47
- package/dist/mcp/tools/errors.js.map +0 -1
- package/dist/mcp/tools/git.d.ts +0 -4
- package/dist/mcp/tools/git.js +0 -209
- package/dist/mcp/tools/git.js.map +0 -1
- package/dist/mcp/tools/github.d.ts +0 -4
- package/dist/mcp/tools/github.js +0 -196
- package/dist/mcp/tools/github.js.map +0 -1
- package/dist/mcp/tools/index.d.ts +0 -36
- package/dist/mcp/tools/index.js +0 -61
- package/dist/mcp/tools/index.js.map +0 -1
- package/dist/mcp/tools/onboard.d.ts +0 -10
- package/dist/mcp/tools/onboard.js +0 -30
- package/dist/mcp/tools/onboard.js.map +0 -1
- package/dist/mcp/tools/provider.d.ts +0 -16
- package/dist/mcp/tools/provider.js +0 -110
- package/dist/mcp/tools/provider.js.map +0 -1
- package/dist/mcp/tools/services.d.ts +0 -13
- package/dist/mcp/tools/services.js +0 -204
- package/dist/mcp/tools/services.js.map +0 -1
- package/dist/mcp/tools/snapshots.d.ts +0 -8
- package/dist/mcp/tools/snapshots.js +0 -37
- package/dist/mcp/tools/snapshots.js.map +0 -1
- package/dist/mcp/tools/terminal.d.ts +0 -4
- package/dist/mcp/tools/terminal.js +0 -38
- package/dist/mcp/tools/terminal.js.map +0 -1
- package/dist/tui/app.d.ts +0 -22
- package/dist/tui/app.js +0 -138
- package/dist/tui/app.js.map +0 -1
- package/dist/web/agent-info.d.ts +0 -82
- package/dist/web/agent-info.js +0 -775
- package/dist/web/agent-info.js.map +0 -1
- package/dist/web/client/assets/SymbolsNerdFontMono-Regular-DDncdh2F.ttf +0 -0
- package/dist/web/client/assets/code-editor-TE0sjFGO.js +0 -30
- package/dist/web/client/assets/context-graph-B9MnBpp6.js +0 -7
- package/dist/web/client/assets/core-DhEqZVGG.js +0 -1
- package/dist/web/client/assets/event-BK_86lmQ.js +0 -1
- package/dist/web/client/assets/index-BhDAhmA1.js +0 -1
- package/dist/web/client/assets/index-CSo__8A6.css +0 -1
- package/dist/web/client/assets/index-DAJvBqn9.js +0 -352
- package/dist/web/client/assets/nomoreide-favicon-Ds7Tgj9p.svg +0 -24
- package/dist/web/client/assets/system-process-table-DetWu0Gj.js +0 -1
- package/dist/web/client/assets/window-DlR023_X.js +0 -1
- package/dist/web/client/index.html +0 -44
- package/dist/web/dashboard.d.ts +0 -61
- package/dist/web/dashboard.js +0 -221
- package/dist/web/dashboard.js.map +0 -1
- package/dist/web/directories.d.ts +0 -27
- package/dist/web/directories.js +0 -81
- package/dist/web/directories.js.map +0 -1
- package/dist/web/http-utils.d.ts +0 -13
- package/dist/web/http-utils.js +0 -72
- package/dist/web/http-utils.js.map +0 -1
- package/dist/web/routes/agent-chat-routes.d.ts +0 -3
- package/dist/web/routes/agent-chat-routes.js +0 -186
- package/dist/web/routes/agent-chat-routes.js.map +0 -1
- package/dist/web/routes/agent-env-routes.d.ts +0 -9
- package/dist/web/routes/agent-env-routes.js +0 -86
- package/dist/web/routes/agent-env-routes.js.map +0 -1
- package/dist/web/routes/agent-profile-routes.d.ts +0 -8
- package/dist/web/routes/agent-profile-routes.js +0 -211
- package/dist/web/routes/agent-profile-routes.js.map +0 -1
- package/dist/web/routes/agent-registry-routes.d.ts +0 -2
- package/dist/web/routes/agent-registry-routes.js +0 -375
- package/dist/web/routes/agent-registry-routes.js.map +0 -1
- package/dist/web/routes/agent-routes.d.ts +0 -3
- package/dist/web/routes/agent-routes.js +0 -73
- package/dist/web/routes/agent-routes.js.map +0 -1
- package/dist/web/routes/agent-settings-routes.d.ts +0 -8
- package/dist/web/routes/agent-settings-routes.js +0 -67
- package/dist/web/routes/agent-settings-routes.js.map +0 -1
- package/dist/web/routes/context-library-routes.d.ts +0 -2
- package/dist/web/routes/context-library-routes.js +0 -139
- package/dist/web/routes/context-library-routes.js.map +0 -1
- package/dist/web/routes/context.d.ts +0 -73
- package/dist/web/routes/context.js +0 -48
- package/dist/web/routes/context.js.map +0 -1
- package/dist/web/routes/dashboard-routes.d.ts +0 -3
- package/dist/web/routes/dashboard-routes.js +0 -47
- package/dist/web/routes/dashboard-routes.js.map +0 -1
- package/dist/web/routes/database-routes.d.ts +0 -3
- package/dist/web/routes/database-routes.js +0 -341
- package/dist/web/routes/database-routes.js.map +0 -1
- package/dist/web/routes/docker-routes.d.ts +0 -7
- package/dist/web/routes/docker-routes.js +0 -122
- package/dist/web/routes/docker-routes.js.map +0 -1
- package/dist/web/routes/errors-routes.d.ts +0 -3
- package/dist/web/routes/errors-routes.js +0 -77
- package/dist/web/routes/errors-routes.js.map +0 -1
- package/dist/web/routes/extensions-routes.d.ts +0 -14
- package/dist/web/routes/extensions-routes.js +0 -21
- package/dist/web/routes/extensions-routes.js.map +0 -1
- package/dist/web/routes/git-routes.d.ts +0 -3
- package/dist/web/routes/git-routes.js +0 -598
- package/dist/web/routes/git-routes.js.map +0 -1
- package/dist/web/routes/github-context.d.ts +0 -11
- package/dist/web/routes/github-context.js +0 -34
- package/dist/web/routes/github-context.js.map +0 -1
- package/dist/web/routes/github-routes.d.ts +0 -2
- package/dist/web/routes/github-routes.js +0 -699
- package/dist/web/routes/github-routes.js.map +0 -1
- package/dist/web/routes/host-routes.d.ts +0 -2
- package/dist/web/routes/host-routes.js +0 -188
- package/dist/web/routes/host-routes.js.map +0 -1
- package/dist/web/routes/index.d.ts +0 -10
- package/dist/web/routes/index.js +0 -72
- package/dist/web/routes/index.js.map +0 -1
- package/dist/web/routes/jetbrains-import-routes.d.ts +0 -2
- package/dist/web/routes/jetbrains-import-routes.js +0 -121
- package/dist/web/routes/jetbrains-import-routes.js.map +0 -1
- package/dist/web/routes/log-sources-routes.d.ts +0 -6
- package/dist/web/routes/log-sources-routes.js +0 -102
- package/dist/web/routes/log-sources-routes.js.map +0 -1
- package/dist/web/routes/metrics-routes.d.ts +0 -3
- package/dist/web/routes/metrics-routes.js +0 -60
- package/dist/web/routes/metrics-routes.js.map +0 -1
- package/dist/web/routes/onboard-routes.d.ts +0 -9
- package/dist/web/routes/onboard-routes.js +0 -146
- package/dist/web/routes/onboard-routes.js.map +0 -1
- package/dist/web/routes/overview-routes.d.ts +0 -2
- package/dist/web/routes/overview-routes.js +0 -36
- package/dist/web/routes/overview-routes.js.map +0 -1
- package/dist/web/routes/provider-routes.d.ts +0 -2
- package/dist/web/routes/provider-routes.js +0 -558
- package/dist/web/routes/provider-routes.js.map +0 -1
- package/dist/web/routes/service-routes.d.ts +0 -3
- package/dist/web/routes/service-routes.js +0 -511
- package/dist/web/routes/service-routes.js.map +0 -1
- package/dist/web/routes/settings-routes.d.ts +0 -2
- package/dist/web/routes/settings-routes.js +0 -151
- package/dist/web/routes/settings-routes.js.map +0 -1
- package/dist/web/routes/shell-routes.d.ts +0 -22
- package/dist/web/routes/shell-routes.js +0 -75
- package/dist/web/routes/shell-routes.js.map +0 -1
- package/dist/web/routes/skills-routes.d.ts +0 -2
- package/dist/web/routes/skills-routes.js +0 -49
- package/dist/web/routes/skills-routes.js.map +0 -1
- package/dist/web/routes/snapshot-routes.d.ts +0 -8
- package/dist/web/routes/snapshot-routes.js +0 -194
- package/dist/web/routes/snapshot-routes.js.map +0 -1
- package/dist/web/routes/ssh-server-routes.d.ts +0 -10
- package/dist/web/routes/ssh-server-routes.js +0 -163
- package/dist/web/routes/ssh-server-routes.js.map +0 -1
- package/dist/web/routes/terminal-routes.d.ts +0 -7
- package/dist/web/routes/terminal-routes.js +0 -313
- package/dist/web/routes/terminal-routes.js.map +0 -1
- package/dist/web/routes/workflow-routes.d.ts +0 -8
- package/dist/web/routes/workflow-routes.js +0 -45
- package/dist/web/routes/workflow-routes.js.map +0 -1
- package/dist/web/routes/workflow-trigger-routes.d.ts +0 -9
- package/dist/web/routes/workflow-trigger-routes.js +0 -78
- package/dist/web/routes/workflow-trigger-routes.js.map +0 -1
- package/dist/web/server.d.ts +0 -31
- package/dist/web/server.js +0 -325
- package/dist/web/server.js.map +0 -1
- package/dist/web/service-tester.d.ts +0 -16
- package/dist/web/service-tester.js +0 -107
- package/dist/web/service-tester.js.map +0 -1
- package/dist/web/static-assets.d.ts +0 -9
- package/dist/web/static-assets.js +0 -77
- package/dist/web/static-assets.js.map +0 -1
- package/dist/web/usage-info.d.ts +0 -56
- package/dist/web/usage-info.js +0 -265
- package/dist/web/usage-info.js.map +0 -1
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read-safe Vultr API v2 client — the observable half of the integration.
|
|
3
|
-
*
|
|
4
|
-
* Like `git-manager.ts` and `cloudflare-manager.ts`, this module deliberately
|
|
5
|
-
* contains no operation that changes a machine. Start / halt / reboot live in
|
|
6
|
-
* `vultr-actions.ts`, and destructive operations (delete, reinstall, restore)
|
|
7
|
-
* are not implemented at all — the same line `GitManager` draws around
|
|
8
|
-
* `reset --hard`.
|
|
9
|
-
*
|
|
10
|
-
* Every field and path below comes from Vultr's official Go SDK
|
|
11
|
-
* (`github.com/vultr/govultr`), which is generated against the same API the
|
|
12
|
-
* docs describe.
|
|
13
|
-
*/
|
|
14
|
-
import type { ProviderFetch } from "./providers/egress.js";
|
|
15
|
-
/** Vultr's `status` — the account-level lifecycle of the machine. */
|
|
16
|
-
export type VultrInstanceStatus = "active" | "pending" | "suspended" | "resizing";
|
|
17
|
-
export interface VultrAccount {
|
|
18
|
-
name: string;
|
|
19
|
-
email: string;
|
|
20
|
-
/** What this API key is permitted to do — `manage_users`, `subscriptions`, … */
|
|
21
|
-
acls: string[];
|
|
22
|
-
}
|
|
23
|
-
export interface VultrInstance {
|
|
24
|
-
id: string;
|
|
25
|
-
label: string;
|
|
26
|
-
hostname: string;
|
|
27
|
-
status: VultrInstanceStatus;
|
|
28
|
-
/** `running` / `stopped`. Empty until the instance finishes provisioning. */
|
|
29
|
-
powerStatus: string;
|
|
30
|
-
/** `none` / `locked` / `installingbooting` / `ok`. */
|
|
31
|
-
serverStatus: string;
|
|
32
|
-
/** Empty string while the instance has no address yet, normalized to undefined. */
|
|
33
|
-
mainIp?: string;
|
|
34
|
-
v6MainIp?: string;
|
|
35
|
-
internalIp?: string;
|
|
36
|
-
region: string;
|
|
37
|
-
plan: string;
|
|
38
|
-
os: string;
|
|
39
|
-
vcpuCount: number;
|
|
40
|
-
/** Vultr reports RAM in MB and disk in GB. */
|
|
41
|
-
ramMb: number;
|
|
42
|
-
diskGb: number;
|
|
43
|
-
tags: string[];
|
|
44
|
-
createdAt?: number;
|
|
45
|
-
/**
|
|
46
|
-
* Which login the instance was built with: `root`, or `limited` for the
|
|
47
|
-
* unprivileged `linuxuser` account Vultr creates instead. This is the one
|
|
48
|
-
* field that decides whether an adopted SSH target can actually connect.
|
|
49
|
-
*/
|
|
50
|
-
userScheme: string;
|
|
51
|
-
}
|
|
52
|
-
export declare class VultrApiError extends Error {
|
|
53
|
-
readonly status: number;
|
|
54
|
-
readonly path: string;
|
|
55
|
-
constructor(message: string, status: number, path: string);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Vultr's API root, overridable onto loopback so a parity gate can stand in for
|
|
59
|
-
* the vendor. Loopback-only, and for the same reason as the other providers:
|
|
60
|
-
* every request carries a bearer token, and an override free to name any host
|
|
61
|
-
* would turn one environment variable into a way to post the user's credential
|
|
62
|
-
* somewhere else.
|
|
63
|
-
*/
|
|
64
|
-
export declare function vultrApiBase(): string;
|
|
65
|
-
export declare class VultrManager {
|
|
66
|
-
private readonly token;
|
|
67
|
-
private readonly baseUrl;
|
|
68
|
-
/** The provider's scoped `fetch`; global `fetch` when built outside the registry. */
|
|
69
|
-
private readonly fetchImpl?;
|
|
70
|
-
constructor(token: string, baseUrl?: string,
|
|
71
|
-
/** The provider's scoped `fetch`; global `fetch` when built outside the registry. */
|
|
72
|
-
fetchImpl?: ProviderFetch | undefined);
|
|
73
|
-
/**
|
|
74
|
-
* The account this API key belongs to.
|
|
75
|
-
*
|
|
76
|
-
* Vultr gives an account no id — the email is what identifies one — so that
|
|
77
|
-
* is what the neutral `ProviderAccount.id` carries.
|
|
78
|
-
*/
|
|
79
|
-
account(): Promise<VultrAccount>;
|
|
80
|
-
/**
|
|
81
|
-
* Every instance on the account, following Vultr's cursor pagination.
|
|
82
|
-
*
|
|
83
|
-
* The whole list rather than a page: the caller is building an SSH server
|
|
84
|
-
* list, and a partial one would silently hide machines.
|
|
85
|
-
*/
|
|
86
|
-
listInstances(opts?: {
|
|
87
|
-
label?: string;
|
|
88
|
-
tag?: string;
|
|
89
|
-
region?: string;
|
|
90
|
-
}): Promise<VultrInstance[]>;
|
|
91
|
-
getInstance(id: string): Promise<VultrInstance>;
|
|
92
|
-
private request;
|
|
93
|
-
}
|
|
94
|
-
export interface VultrRequestAuth {
|
|
95
|
-
token: string;
|
|
96
|
-
baseUrl?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The provider's scoped `fetch` (see `providers/egress.ts`). Absent means
|
|
99
|
-
* global `fetch` — the case for a manager built directly in a test. Production
|
|
100
|
-
* clients come from `vultr-context.ts`, which always supplies one.
|
|
101
|
-
*/
|
|
102
|
-
fetch?: ProviderFetch;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The one place a Vultr API call is made. Shared with `vultr-actions.ts` so
|
|
106
|
-
* auth and error shaping stay identical across the read and write halves — the
|
|
107
|
-
* read/write boundary is which module exposes an operation, not which one can
|
|
108
|
-
* reach the network.
|
|
109
|
-
*/
|
|
110
|
-
export declare function vultrRequest<T>(auth: VultrRequestAuth, path: string, opts?: {
|
|
111
|
-
method?: string;
|
|
112
|
-
body?: unknown;
|
|
113
|
-
}): Promise<T>;
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read-safe Vultr API v2 client — the observable half of the integration.
|
|
3
|
-
*
|
|
4
|
-
* Like `git-manager.ts` and `cloudflare-manager.ts`, this module deliberately
|
|
5
|
-
* contains no operation that changes a machine. Start / halt / reboot live in
|
|
6
|
-
* `vultr-actions.ts`, and destructive operations (delete, reinstall, restore)
|
|
7
|
-
* are not implemented at all — the same line `GitManager` draws around
|
|
8
|
-
* `reset --hard`.
|
|
9
|
-
*
|
|
10
|
-
* Every field and path below comes from Vultr's official Go SDK
|
|
11
|
-
* (`github.com/vultr/govultr`), which is generated against the same API the
|
|
12
|
-
* docs describe.
|
|
13
|
-
*/
|
|
14
|
-
import { providerApiBase } from "./providers/api-base.js";
|
|
15
|
-
export class VultrApiError extends Error {
|
|
16
|
-
status;
|
|
17
|
-
path;
|
|
18
|
-
constructor(message, status, path) {
|
|
19
|
-
super(message);
|
|
20
|
-
this.status = status;
|
|
21
|
-
this.path = path;
|
|
22
|
-
this.name = "VultrApiError";
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/** Vultr caps `per_page` at 500; one page covers any realistic account. */
|
|
26
|
-
const PER_PAGE = 500;
|
|
27
|
-
/** A hard stop on cursor following, so a pathological account cannot hang a request. */
|
|
28
|
-
const MAX_PAGES = 10;
|
|
29
|
-
/**
|
|
30
|
-
* Vultr's API root, overridable onto loopback so a parity gate can stand in for
|
|
31
|
-
* the vendor. Loopback-only, and for the same reason as the other providers:
|
|
32
|
-
* every request carries a bearer token, and an override free to name any host
|
|
33
|
-
* would turn one environment variable into a way to post the user's credential
|
|
34
|
-
* somewhere else.
|
|
35
|
-
*/
|
|
36
|
-
export function vultrApiBase() {
|
|
37
|
-
return providerApiBase("NOMOREIDE_VULTR_API_BASE", "https://api.vultr.com/v2");
|
|
38
|
-
}
|
|
39
|
-
export class VultrManager {
|
|
40
|
-
token;
|
|
41
|
-
baseUrl;
|
|
42
|
-
fetchImpl;
|
|
43
|
-
constructor(token, baseUrl = vultrApiBase(),
|
|
44
|
-
/** The provider's scoped `fetch`; global `fetch` when built outside the registry. */
|
|
45
|
-
fetchImpl) {
|
|
46
|
-
this.token = token;
|
|
47
|
-
this.baseUrl = baseUrl;
|
|
48
|
-
this.fetchImpl = fetchImpl;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* The account this API key belongs to.
|
|
52
|
-
*
|
|
53
|
-
* Vultr gives an account no id — the email is what identifies one — so that
|
|
54
|
-
* is what the neutral `ProviderAccount.id` carries.
|
|
55
|
-
*/
|
|
56
|
-
async account() {
|
|
57
|
-
const { account } = await this.request("/account");
|
|
58
|
-
return {
|
|
59
|
-
name: account.name ?? "",
|
|
60
|
-
email: account.email ?? "",
|
|
61
|
-
acls: account.acls ?? [],
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Every instance on the account, following Vultr's cursor pagination.
|
|
66
|
-
*
|
|
67
|
-
* The whole list rather than a page: the caller is building an SSH server
|
|
68
|
-
* list, and a partial one would silently hide machines.
|
|
69
|
-
*/
|
|
70
|
-
async listInstances(opts = {}) {
|
|
71
|
-
const instances = [];
|
|
72
|
-
let cursor;
|
|
73
|
-
for (let page = 0; page < MAX_PAGES; page += 1) {
|
|
74
|
-
const query = new URLSearchParams({ per_page: String(PER_PAGE) });
|
|
75
|
-
if (opts.label)
|
|
76
|
-
query.set("label", opts.label);
|
|
77
|
-
if (opts.tag)
|
|
78
|
-
query.set("tag", opts.tag);
|
|
79
|
-
if (opts.region)
|
|
80
|
-
query.set("region", opts.region);
|
|
81
|
-
if (cursor)
|
|
82
|
-
query.set("cursor", cursor);
|
|
83
|
-
const body = await this.request(`/instances?${query.toString()}`);
|
|
84
|
-
instances.push(...(body.instances ?? []).map(normalizeInstance));
|
|
85
|
-
cursor = body.meta?.links?.next || undefined;
|
|
86
|
-
if (!cursor)
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
return instances;
|
|
90
|
-
}
|
|
91
|
-
async getInstance(id) {
|
|
92
|
-
const { instance } = await this.request(`/instances/${encodeURIComponent(id)}`);
|
|
93
|
-
return normalizeInstance(instance);
|
|
94
|
-
}
|
|
95
|
-
request(path, opts) {
|
|
96
|
-
return vultrRequest({ token: this.token, baseUrl: this.baseUrl, fetch: this.fetchImpl }, path, opts);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* The one place a Vultr API call is made. Shared with `vultr-actions.ts` so
|
|
101
|
-
* auth and error shaping stay identical across the read and write halves — the
|
|
102
|
-
* read/write boundary is which module exposes an operation, not which one can
|
|
103
|
-
* reach the network.
|
|
104
|
-
*/
|
|
105
|
-
export async function vultrRequest(auth, path, opts) {
|
|
106
|
-
const url = path.startsWith("http") ? path : `${auth.baseUrl ?? vultrApiBase()}${path}`;
|
|
107
|
-
const headers = {
|
|
108
|
-
Authorization: `Bearer ${auth.token}`,
|
|
109
|
-
Accept: "application/json",
|
|
110
|
-
};
|
|
111
|
-
const init = { method: opts?.method ?? "GET", headers };
|
|
112
|
-
if (opts?.body !== undefined) {
|
|
113
|
-
headers["Content-Type"] = "application/json";
|
|
114
|
-
init.body = JSON.stringify(opts.body);
|
|
115
|
-
}
|
|
116
|
-
const response = await (auth.fetch ?? fetch)(url, init);
|
|
117
|
-
// Power actions answer 204 with no body, so the body is only read when there
|
|
118
|
-
// is one to read.
|
|
119
|
-
const text = await response.text().catch(() => "");
|
|
120
|
-
if (!response.ok) {
|
|
121
|
-
const failure = safeParse(text);
|
|
122
|
-
throw new VultrApiError(failure?.error || `Vultr returned ${response.status} for ${path}`, response.status, path);
|
|
123
|
-
}
|
|
124
|
-
return (safeParse(text) ?? {});
|
|
125
|
-
}
|
|
126
|
-
function safeParse(text) {
|
|
127
|
-
if (!text.trim())
|
|
128
|
-
return undefined;
|
|
129
|
-
try {
|
|
130
|
-
return JSON.parse(text);
|
|
131
|
-
}
|
|
132
|
-
catch {
|
|
133
|
-
return undefined;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Vultr writes "no address" as the empty string rather than omitting the field,
|
|
138
|
-
* and `0.0.0.0` while an instance is still being built. Both mean the same
|
|
139
|
-
* thing to a caller trying to reach the machine.
|
|
140
|
-
*/
|
|
141
|
-
function address(value) {
|
|
142
|
-
const trimmed = value?.trim();
|
|
143
|
-
if (!trimmed || trimmed === "0.0.0.0" || trimmed === "::")
|
|
144
|
-
return undefined;
|
|
145
|
-
return trimmed;
|
|
146
|
-
}
|
|
147
|
-
function normalizeInstance(instance) {
|
|
148
|
-
const createdAt = Date.parse(instance.date_created ?? "");
|
|
149
|
-
return {
|
|
150
|
-
id: instance.id,
|
|
151
|
-
label: instance.label ?? "",
|
|
152
|
-
hostname: instance.hostname ?? "",
|
|
153
|
-
status: instance.status ?? "pending",
|
|
154
|
-
powerStatus: instance.power_status ?? "",
|
|
155
|
-
serverStatus: instance.server_status ?? "",
|
|
156
|
-
mainIp: address(instance.main_ip),
|
|
157
|
-
v6MainIp: address(instance.v6_main_ip),
|
|
158
|
-
internalIp: address(instance.internal_ip),
|
|
159
|
-
region: instance.region ?? "",
|
|
160
|
-
plan: instance.plan ?? "",
|
|
161
|
-
os: instance.os ?? "",
|
|
162
|
-
vcpuCount: instance.vcpu_count ?? 0,
|
|
163
|
-
ramMb: instance.ram ?? 0,
|
|
164
|
-
diskGb: instance.disk ?? 0,
|
|
165
|
-
tags: instance.tags ?? [],
|
|
166
|
-
createdAt: Number.isNaN(createdAt) ? undefined : createdAt,
|
|
167
|
-
userScheme: instance.user_scheme ?? "root",
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
//# sourceMappingURL=vultr-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vultr-manager.js","sourceRoot":"","sources":["../../src/core/vultr-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA2C1D,MAAM,OAAO,aAAc,SAAQ,KAAK;IAGpB;IACA;IAHlB,YACE,OAAe,EACC,MAAc,EACd,IAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QAG5B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,2EAA2E;AAC3E,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,wFAAwF;AACxF,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;;GAMG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAAC;AACjF,CAAC;AAED,MAAM,OAAO,YAAY;IAEJ;IACA;IAEA;IAJnB,YACmB,KAAa,EACb,UAAU,YAAY,EAAE;IACzC,qFAAqF;IACpE,SAAyB;QAHzB,UAAK,GAAL,KAAK,CAAQ;QACb,YAAO,GAAP,OAAO,CAAiB;QAExB,cAAS,GAAT,SAAS,CAAgB;IACzC,CAAC;IAEJ;;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AAE,CAAC,CAAC;IAC1D,OAAO;QACL,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,EAAE;QAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,EAAE;QACjC,MAAM,EAAG,QAAQ,CAAC,MAA8B,IAAI,SAAS;QAC7D,WAAW,EAAE,QAAQ,CAAC,YAAY,IAAI,EAAE;QACxC,YAAY,EAAE,QAAQ,CAAC,aAAa,IAAI,EAAE;QAC1C,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;QACjC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;QACtC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;QACzC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,EAAE;QAC7B,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE;QACzB,EAAE,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE;QACrB,SAAS,EAAE,QAAQ,CAAC,UAAU,IAAI,CAAC;QACnC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC;QACxB,MAAM,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC;QAC1B,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC1D,UAAU,EAAE,QAAQ,CAAC,WAAW,IAAI,MAAM;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { HostInstance, HostInstanceState, HostProvider, HostProviderActions, HostProviderManifest, HostSshTarget } from "./providers/host-provider.js";
|
|
2
|
-
import { type VultrActions } from "./vultr-actions.js";
|
|
3
|
-
import { type VultrInstance, type VultrManager } from "./vultr-manager.js";
|
|
4
|
-
/**
|
|
5
|
-
* Vultr as `HostProvider` implementation #1 — the provider that tests whether
|
|
6
|
-
* the *second* contract was shaped by the problem or by the first one.
|
|
7
|
-
*
|
|
8
|
-
* A pure adapter, like `vercel-provider.ts` and `cloudflare-provider.ts`: every
|
|
9
|
-
* method delegates to `VultrManager` or `VultrActions` and only reshapes the
|
|
10
|
-
* result.
|
|
11
|
-
*
|
|
12
|
-
* What writing it surfaced:
|
|
13
|
-
*
|
|
14
|
-
* 1. **A host provider is not repo-scoped.** `DeployProvider` needs a working
|
|
15
|
-
* directory to answer anything, because a deployment belongs to the project
|
|
16
|
-
* a repository is linked to. An instance belongs to an account. So there is
|
|
17
|
-
* no project-resolution ladder here, no link file, no `repoUrl` hook — the
|
|
18
|
-
* whole of `providers/project-resolution.ts` is simply not part of this
|
|
19
|
-
* contract, which is why the split into two contracts was right.
|
|
20
|
-
* 2. **`toSshTarget` needs the machine's login, not just its address.** Hence
|
|
21
|
-
* `HostInstance.defaultUser`: Vultr builds an instance with either `root` or
|
|
22
|
-
* an unprivileged `linuxuser`, and a target that omits it is one `ssh` tries
|
|
23
|
-
* as the *local* username, which fails for every Vultr instance.
|
|
24
|
-
* 3. **The shared credential layer carried over untouched.** Vultr reuses
|
|
25
|
-
* `providers/credentials.ts` exactly, despite being neither a deploy
|
|
26
|
-
* platform nor an OAuth one — the first evidence that layer generalized
|
|
27
|
-
* beyond the contract it was extracted from.
|
|
28
|
-
*/
|
|
29
|
-
export declare const VULTR_MANIFEST: HostProviderManifest;
|
|
30
|
-
/**
|
|
31
|
-
* Vultr's three-field state onto the five neutral ones.
|
|
32
|
-
*
|
|
33
|
-
* Vultr describes a machine with `status` (the subscription's lifecycle),
|
|
34
|
-
* `power_status` (whether the VM is switched on) and `server_status` (how far
|
|
35
|
-
* the OS install has got). Only their combination says whether the machine can
|
|
36
|
-
* be reached: an `active` instance that is `running` is still unreachable while
|
|
37
|
-
* `server_status` is `installingbooting`.
|
|
38
|
-
*
|
|
39
|
-
* `suspended` has no neutral equivalent — it is Vultr locking the machine, and
|
|
40
|
-
* the user has to go and deal with it — so it maps to `error` and survives
|
|
41
|
-
* verbatim in `rawState`, the same pressure valve `skipped` used on Cloudflare.
|
|
42
|
-
*/
|
|
43
|
-
export declare function toInstanceState(instance: VultrInstance): HostInstanceState;
|
|
44
|
-
/**
|
|
45
|
-
* The word Vultr's own dashboard shows, so `rawState` reads as something the
|
|
46
|
-
* user recognizes rather than as a field dump: the lifecycle status while the
|
|
47
|
-
* instance is not yet `active`, then the install stage, then the power state.
|
|
48
|
-
*/
|
|
49
|
-
export declare function toRawState(instance: VultrInstance): string;
|
|
50
|
-
/**
|
|
51
|
-
* Vultr's `user_scheme` onto the account name actually present on the machine.
|
|
52
|
-
* `limited` provisions a sudo-capable `linuxuser` instead of enabling `root`.
|
|
53
|
-
*/
|
|
54
|
-
export declare function toDefaultUser(instance: VultrInstance): string;
|
|
55
|
-
export declare function toHostInstance(instance: VultrInstance): HostInstance;
|
|
56
|
-
/**
|
|
57
|
-
* The instance as an SSH host — the payoff this contract exists for.
|
|
58
|
-
*
|
|
59
|
-
* Exported and pure so the mapping is testable on its own, and shared by the
|
|
60
|
-
* provider below.
|
|
61
|
-
*/
|
|
62
|
-
export declare function toVultrSshTarget(instance: HostInstance): HostSshTarget | null;
|
|
63
|
-
/** The read-safe half, over an already-authenticated `VultrManager`. */
|
|
64
|
-
export declare function createVultrHostProvider(manager: VultrManager): HostProvider;
|
|
65
|
-
/**
|
|
66
|
-
* The write-capable half. Kept a separate factory, resolved separately, and
|
|
67
|
-
* never handed to an MCP tool — the same boundary `VultrActions` has.
|
|
68
|
-
*/
|
|
69
|
-
export declare function createVultrHostActions(actions: VultrActions): HostProviderActions;
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { PRODUCTION_AFFECTING_ACTIONS, VULTR_ACTIONS, } from "./vultr-actions.js";
|
|
2
|
-
import { VULTR_PROVIDER_ID } from "./vultr-auth.js";
|
|
3
|
-
import { providerApiHost } from "./providers/api-base.js";
|
|
4
|
-
import { vultrApiBase } from "./vultr-manager.js";
|
|
5
|
-
/**
|
|
6
|
-
* Vultr as `HostProvider` implementation #1 — the provider that tests whether
|
|
7
|
-
* the *second* contract was shaped by the problem or by the first one.
|
|
8
|
-
*
|
|
9
|
-
* A pure adapter, like `vercel-provider.ts` and `cloudflare-provider.ts`: every
|
|
10
|
-
* method delegates to `VultrManager` or `VultrActions` and only reshapes the
|
|
11
|
-
* result.
|
|
12
|
-
*
|
|
13
|
-
* What writing it surfaced:
|
|
14
|
-
*
|
|
15
|
-
* 1. **A host provider is not repo-scoped.** `DeployProvider` needs a working
|
|
16
|
-
* directory to answer anything, because a deployment belongs to the project
|
|
17
|
-
* a repository is linked to. An instance belongs to an account. So there is
|
|
18
|
-
* no project-resolution ladder here, no link file, no `repoUrl` hook — the
|
|
19
|
-
* whole of `providers/project-resolution.ts` is simply not part of this
|
|
20
|
-
* contract, which is why the split into two contracts was right.
|
|
21
|
-
* 2. **`toSshTarget` needs the machine's login, not just its address.** Hence
|
|
22
|
-
* `HostInstance.defaultUser`: Vultr builds an instance with either `root` or
|
|
23
|
-
* an unprivileged `linuxuser`, and a target that omits it is one `ssh` tries
|
|
24
|
-
* as the *local* username, which fails for every Vultr instance.
|
|
25
|
-
* 3. **The shared credential layer carried over untouched.** Vultr reuses
|
|
26
|
-
* `providers/credentials.ts` exactly, despite being neither a deploy
|
|
27
|
-
* platform nor an OAuth one — the first evidence that layer generalized
|
|
28
|
-
* beyond the contract it was extracted from.
|
|
29
|
-
*/
|
|
30
|
-
export const VULTR_MANIFEST = {
|
|
31
|
-
id: VULTR_PROVIDER_ID,
|
|
32
|
-
name: "Vultr",
|
|
33
|
-
kind: "host",
|
|
34
|
-
// Three action names that share not one word with either deploy provider,
|
|
35
|
-
// which is the clearest evidence for why these strings belong to the plugin:
|
|
36
|
-
// no host catalogue written for Vercel could ever have contained "halt".
|
|
37
|
-
// No `scope.label` — a host provider has no scopes.
|
|
38
|
-
strings: {
|
|
39
|
-
en: {
|
|
40
|
-
"action.start": "Start",
|
|
41
|
-
"action.start.done": "Instance starting.",
|
|
42
|
-
"action.halt": "Stop",
|
|
43
|
-
"action.halt.done": "Instance stopping.",
|
|
44
|
-
"action.halt.confirmTitle": "Stop this instance?",
|
|
45
|
-
"action.halt.confirm": "The machine powers off immediately. Anything running on it stops.",
|
|
46
|
-
"action.reboot": "Reboot",
|
|
47
|
-
"action.reboot.done": "Instance rebooting.",
|
|
48
|
-
"action.reboot.confirmTitle": "Reboot this instance?",
|
|
49
|
-
"action.reboot.confirm": "The machine restarts immediately. Anything running on it stops.",
|
|
50
|
-
},
|
|
51
|
-
zh: {
|
|
52
|
-
"action.start": "启动",
|
|
53
|
-
"action.start.done": "实例正在启动。",
|
|
54
|
-
"action.halt": "停止",
|
|
55
|
-
"action.halt.done": "实例正在停止。",
|
|
56
|
-
"action.halt.confirmTitle": "停止该实例?",
|
|
57
|
-
"action.halt.confirm": "机器将立即关机,其上运行的一切都会停止。",
|
|
58
|
-
"action.reboot": "重启",
|
|
59
|
-
"action.reboot.done": "实例正在重启。",
|
|
60
|
-
"action.reboot.confirmTitle": "重启该实例?",
|
|
61
|
-
"action.reboot.confirm": "机器将立即重启,其上运行的一切都会停止。",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
actions: [...VULTR_ACTIONS],
|
|
65
|
-
productionAffecting: [...PRODUCTION_AFFECTING_ACTIONS],
|
|
66
|
-
// The API only. An adopted instance is reached over SSH by `ssh-servers.ts`,
|
|
67
|
-
// which is the host's own transport and never goes through this fetch — so no
|
|
68
|
-
// instance address belongs here.
|
|
69
|
-
api: { hosts: [providerApiHost(vultrApiBase())] },
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Vultr's three-field state onto the five neutral ones.
|
|
73
|
-
*
|
|
74
|
-
* Vultr describes a machine with `status` (the subscription's lifecycle),
|
|
75
|
-
* `power_status` (whether the VM is switched on) and `server_status` (how far
|
|
76
|
-
* the OS install has got). Only their combination says whether the machine can
|
|
77
|
-
* be reached: an `active` instance that is `running` is still unreachable while
|
|
78
|
-
* `server_status` is `installingbooting`.
|
|
79
|
-
*
|
|
80
|
-
* `suspended` has no neutral equivalent — it is Vultr locking the machine, and
|
|
81
|
-
* the user has to go and deal with it — so it maps to `error` and survives
|
|
82
|
-
* verbatim in `rawState`, the same pressure valve `skipped` used on Cloudflare.
|
|
83
|
-
*/
|
|
84
|
-
export function toInstanceState(instance) {
|
|
85
|
-
switch (instance.status) {
|
|
86
|
-
case "pending":
|
|
87
|
-
case "resizing":
|
|
88
|
-
return "provisioning";
|
|
89
|
-
case "suspended":
|
|
90
|
-
return "error";
|
|
91
|
-
case "active":
|
|
92
|
-
break;
|
|
93
|
-
default:
|
|
94
|
-
return "unknown";
|
|
95
|
-
}
|
|
96
|
-
if (instance.serverStatus === "installingbooting")
|
|
97
|
-
return "provisioning";
|
|
98
|
-
if (instance.serverStatus === "locked")
|
|
99
|
-
return "provisioning";
|
|
100
|
-
if (instance.powerStatus === "running")
|
|
101
|
-
return "running";
|
|
102
|
-
if (instance.powerStatus === "stopped")
|
|
103
|
-
return "stopped";
|
|
104
|
-
return "unknown";
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* The word Vultr's own dashboard shows, so `rawState` reads as something the
|
|
108
|
-
* user recognizes rather than as a field dump: the lifecycle status while the
|
|
109
|
-
* instance is not yet `active`, then the install stage, then the power state.
|
|
110
|
-
*/
|
|
111
|
-
export function toRawState(instance) {
|
|
112
|
-
if (instance.status !== "active")
|
|
113
|
-
return instance.status;
|
|
114
|
-
if (instance.serverStatus === "installingbooting")
|
|
115
|
-
return "installing";
|
|
116
|
-
if (instance.serverStatus === "locked")
|
|
117
|
-
return "locked";
|
|
118
|
-
return instance.powerStatus || "unknown";
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Vultr's `user_scheme` onto the account name actually present on the machine.
|
|
122
|
-
* `limited` provisions a sudo-capable `linuxuser` instead of enabling `root`.
|
|
123
|
-
*/
|
|
124
|
-
export function toDefaultUser(instance) {
|
|
125
|
-
return instance.userScheme === "limited" ? "linuxuser" : "root";
|
|
126
|
-
}
|
|
127
|
-
export function toHostInstance(instance) {
|
|
128
|
-
return {
|
|
129
|
-
id: instance.id,
|
|
130
|
-
// A Vultr instance may be created with no label at all, in which case its
|
|
131
|
-
// hostname is the only human-readable thing about it.
|
|
132
|
-
label: instance.label || instance.hostname || instance.id,
|
|
133
|
-
state: toInstanceState(instance),
|
|
134
|
-
rawState: toRawState(instance),
|
|
135
|
-
ipv4: instance.mainIp,
|
|
136
|
-
ipv6: instance.v6MainIp,
|
|
137
|
-
hostname: instance.hostname || undefined,
|
|
138
|
-
region: instance.region || undefined,
|
|
139
|
-
plan: instance.plan || undefined,
|
|
140
|
-
os: instance.os || undefined,
|
|
141
|
-
specs: {
|
|
142
|
-
vcpus: instance.vcpuCount || undefined,
|
|
143
|
-
memoryMb: instance.ramMb || undefined,
|
|
144
|
-
diskGb: instance.diskGb || undefined,
|
|
145
|
-
},
|
|
146
|
-
tags: instance.tags,
|
|
147
|
-
createdAt: instance.createdAt,
|
|
148
|
-
defaultUser: toDefaultUser(instance),
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* The instance as an SSH host — the payoff this contract exists for.
|
|
153
|
-
*
|
|
154
|
-
* Exported and pure so the mapping is testable on its own, and shared by the
|
|
155
|
-
* provider below.
|
|
156
|
-
*/
|
|
157
|
-
export function toVultrSshTarget(instance) {
|
|
158
|
-
// IPv4 first: a v6-only target only works from a v6-capable client, and an
|
|
159
|
-
// instance without either address is still being built.
|
|
160
|
-
const address = instance.ipv4 ?? instance.ipv6;
|
|
161
|
-
if (!address)
|
|
162
|
-
return null;
|
|
163
|
-
return {
|
|
164
|
-
host: instance.defaultUser ? `${instance.defaultUser}@${address}` : address,
|
|
165
|
-
name: instance.label,
|
|
166
|
-
// `environment` is deliberately left unset. Vultr tags are free-form and
|
|
167
|
-
// mean whatever the account owner decided, so inferring "Production" from
|
|
168
|
-
// one would eventually put that label on the wrong machine. A user-saved
|
|
169
|
-
// value wins in the merge anyway, so this is a blank the user can fill.
|
|
170
|
-
instance: {
|
|
171
|
-
providerId: VULTR_PROVIDER_ID,
|
|
172
|
-
providerName: VULTR_MANIFEST.name,
|
|
173
|
-
instanceId: instance.id,
|
|
174
|
-
state: instance.state,
|
|
175
|
-
rawState: instance.rawState,
|
|
176
|
-
region: instance.region,
|
|
177
|
-
},
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
/** The read-safe half, over an already-authenticated `VultrManager`. */
|
|
181
|
-
export function createVultrHostProvider(manager) {
|
|
182
|
-
return {
|
|
183
|
-
async account() {
|
|
184
|
-
const account = await manager.account();
|
|
185
|
-
return {
|
|
186
|
-
// Vultr gives an account no id of its own; the email is what identifies
|
|
187
|
-
// one, and is what its dashboard shows.
|
|
188
|
-
id: account.email,
|
|
189
|
-
username: account.email,
|
|
190
|
-
name: account.name || null,
|
|
191
|
-
email: account.email || null,
|
|
192
|
-
};
|
|
193
|
-
},
|
|
194
|
-
async listInstances() {
|
|
195
|
-
return (await manager.listInstances()).map(toHostInstance);
|
|
196
|
-
},
|
|
197
|
-
async getInstance(id) {
|
|
198
|
-
return toHostInstance(await manager.getInstance(id));
|
|
199
|
-
},
|
|
200
|
-
toSshTarget: toVultrSshTarget,
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* The write-capable half. Kept a separate factory, resolved separately, and
|
|
205
|
-
* never handed to an MCP tool — the same boundary `VultrActions` has.
|
|
206
|
-
*/
|
|
207
|
-
export function createVultrHostActions(actions) {
|
|
208
|
-
return {
|
|
209
|
-
async run(action, instanceId) {
|
|
210
|
-
switch (action) {
|
|
211
|
-
case "start":
|
|
212
|
-
await actions.start(instanceId);
|
|
213
|
-
return;
|
|
214
|
-
case "halt":
|
|
215
|
-
await actions.halt(instanceId);
|
|
216
|
-
return;
|
|
217
|
-
case "reboot":
|
|
218
|
-
await actions.reboot(instanceId);
|
|
219
|
-
return;
|
|
220
|
-
default:
|
|
221
|
-
throw new Error(`Vultr does not support the action "${action}".`);
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
//# sourceMappingURL=vultr-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vultr-provider.js","sourceRoot":"","sources":["../../src/core/vultr-provider.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,4BAA4B,EAC5B,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAyC,MAAM,oBAAoB,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,MAAM;IACZ,0EAA0E;IAC1E,6EAA6E;IAC7E,yEAAyE;IACzE,oDAAoD;IACpD,OAAO,EAAE;QACP,EAAE,EAAE;YACF,cAAc,EAAE,OAAO;YACvB,mBAAmB,EAAE,oBAAoB;YACzC,aAAa,EAAE,MAAM;YACrB,kBAAkB,EAAE,oBAAoB;YACxC,0BAA0B,EAAE,qBAAqB;YACjD,qBAAqB,EACnB,mEAAmE;YACrE,eAAe,EAAE,QAAQ;YACzB,oBAAoB,EAAE,qBAAqB;YAC3C,4BAA4B,EAAE,uBAAuB;YACrD,uBAAuB,EACrB,iEAAiE;SACpE;QACD,EAAE,EAAE;YACF,cAAc,EAAE,IAAI;YACpB,mBAAmB,EAAE,SAAS;YAC9B,aAAa,EAAE,IAAI;YACnB,kBAAkB,EAAE,SAAS;YAC7B,0BAA0B,EAAE,QAAQ;YACpC,qBAAqB,EAA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