Documentation
¶
Index ¶
- Constants
- type VaultsImpl
- func (v *VaultsImpl) AcceptInvite(ctx context.Context, req *pb.AcceptInvite_Request) (*pb.AcceptInvite_Response, error)
- func (v *VaultsImpl) AddMember(ctx context.Context, req *pb.AddMember_Request) (*pb.AddMember_Response, error)
- func (v *VaultsImpl) CloseWorkbenchTerminalTab(ctx context.Context, req *pb.CloseWorkbenchTerminalTab_Request) (*pb.CloseWorkbenchTerminalTab_Response, error)
- func (v *VaultsImpl) CreateInviteLink(ctx context.Context, req *pb.CreateInviteLink_Request) (*pb.CreateInviteLink_Response, error)
- func (v *VaultsImpl) CreateVault(ctx context.Context, req *pb.CreateVault_Request) (*pb.CreateVault_Response, error)
- func (v *VaultsImpl) CreateWorkbench(ctx context.Context, req *pb.CreateWorkbench_Request) (*pb.CreateWorkbench_Response, error)
- func (v *VaultsImpl) CreateWorkbenchTerminalTab(ctx context.Context, req *pb.CreateWorkbenchTerminalTab_Request) (*pb.CreateWorkbenchTerminalTab_Response, error)
- func (v *VaultsImpl) DeleteVault(ctx context.Context, req *pb.DeleteVault_Request) (*pb.DeleteVault_Response, error)
- func (v *VaultsImpl) DeleteWorkbench(ctx context.Context, req *pb.DeleteWorkbench_Request) (*pb.DeleteWorkbench_Response, error)
- func (v *VaultsImpl) DisablePostgresDatabase(ctx context.Context, req *pb.DisablePostgresDatabase_Request) (*pb.DisablePostgresDatabase_Response, error)
- func (v *VaultsImpl) EnablePostgresDatabase(ctx context.Context, req *pb.EnablePostgresDatabase_Request) (*pb.EnablePostgresDatabase_Response, error)
- func (v *VaultsImpl) Gateway(ctx context.Context, endpoint string, opts ...grpc.DialOption) (string, http.Handler)
- func (v *VaultsImpl) GetPostgresDatabase(ctx context.Context, req *pb.GetPostgresDatabase_Request) (*pb.GetPostgresDatabase_Response, error)
- func (v *VaultsImpl) GetVault(ctx context.Context, req *pb.GetVault_Request) (*pb.GetVault_Response, error)
- func (v *VaultsImpl) LinkS3Bucket(ctx context.Context, req *pb.LinkS3Bucket_Request) (*pb.LinkS3Bucket_Response, error)
- func (v *VaultsImpl) ListInviteLinks(ctx context.Context, req *pb.ListInviteLinks_Request) (*pb.ListInviteLinks_Response, error)
- func (v *VaultsImpl) ListMembers(ctx context.Context, req *pb.ListMembers_Request) (*pb.ListMembers_Response, error)
- func (v *VaultsImpl) ListVaults(ctx context.Context, req *pb.ListVaults_Request) (*pb.ListVaults_Response, error)
- func (v *VaultsImpl) ListWorkbenchTerminalTabs(ctx context.Context, req *pb.ListWorkbenchTerminalTabs_Request) (*pb.ListWorkbenchTerminalTabs_Response, error)
- func (v *VaultsImpl) PublishVault(ctx context.Context, req *pb.PublishVault_Request) (*pb.PublishVault_Response, error)
- func (v *VaultsImpl) Register(srv grpc.ServiceRegistrar)
- func (v *VaultsImpl) RemoveMember(ctx context.Context, req *pb.RemoveMember_Request) (*pb.RemoveMember_Response, error)
- func (v *VaultsImpl) RevokeInviteLink(ctx context.Context, req *pb.RevokeInviteLink_Request) (*pb.RevokeInviteLink_Response, error)
- func (v *VaultsImpl) SelectWorkbenchTerminalTab(ctx context.Context, req *pb.SelectWorkbenchTerminalTab_Request) (*pb.SelectWorkbenchTerminalTab_Response, error)
- func (v *VaultsImpl) SetVaultBinaryStorage(ctx context.Context, req *pb.SetVaultBinaryStorage_Request) (*pb.SetVaultBinaryStorage_Response, error)
- func (v *VaultsImpl) StartWorkbench(ctx context.Context, req *pb.StartWorkbench_Request) (*pb.StartWorkbench_Response, error)
- func (v *VaultsImpl) StopWorkbench(ctx context.Context, req *pb.StopWorkbench_Request) (*pb.StopWorkbench_Response, error)
- func (v *VaultsImpl) UnlinkS3Bucket(ctx context.Context, req *pb.UnlinkS3Bucket_Request) (*pb.UnlinkS3Bucket_Response, error)
- func (v *VaultsImpl) UnpublishVault(ctx context.Context, req *pb.UnpublishVault_Request) (*pb.UnpublishVault_Response, error)
- func (v *VaultsImpl) UpdateVaultPrompts(ctx context.Context, req *pb.UpdateVaultPrompts_Request) (*pb.UpdateVaultPrompts_Response, error)
- type WorkbenchTerminalHandler
- type WorkbenchTerminalShellHandler
Constants ¶
const ( // TerminalRoutePattern is the http.ServeMux pattern this handler is registered under in // internal/app/custom.go. Everything after ".../terminal/" is forwarded verbatim to the // workbench's in-container ttyd server, which serves its own index page, static assets and // the "/ws" WebSocket endpoint off its own root — hence the trailing multi-wildcard. // // It sits under the "/api/vaults/" prefix on purpose: the session cookies this handler // authenticates with are scoped to middleware.CookiePath ("/api/"), so a route outside that // prefix would never receive them. Being more specific than the grpc-gateway's "/api/vaults/" // subtree pattern, http.ServeMux routes it here rather than to the gateway. TerminalRoutePattern = "/api/vaults/workbench/{vaultId}/terminal/{rest...}" )
const ( // TerminalShellRoutePattern is the http.ServeMux pattern this handler is registered under in // internal/app/custom.go. Everything after ".../terminal-shell/" is forwarded verbatim to the // workbench's in-container ttyd server, which serves its own index page, static assets and // the "/ws" WebSocket endpoint off its own root — hence the trailing multi-wildcard. // // Distinct from TerminalRoutePattern (which stays pointed at the in-container chat bridge): // this is the raw interactive terminal — tmux windows, each running its own `claude` TUI, with // zero shared history with the chat bridge. It sits under the "/api/vaults/" prefix for the // same reason TerminalRoutePattern does — see that constant's doc comment. TerminalShellRoutePattern = "/api/vaults/workbench/{vaultId}/terminal-shell/{rest...}" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VaultsImpl ¶
type VaultsImpl struct {
pb.UnimplementedVaultsAPIServer
// contains filtered or unexported fields
}
func NewVaultsImpl ¶
func NewVaultsImpl( vaultSvc service.VaultService, workbenchSvc service.WorkbenchService, terminalAuthLinks terminalAuthLinkCache, ) *VaultsImpl
func (*VaultsImpl) AcceptInvite ¶
func (v *VaultsImpl) AcceptInvite( ctx context.Context, req *pb.AcceptInvite_Request, ) (*pb.AcceptInvite_Response, error)
func (*VaultsImpl) AddMember ¶
func (v *VaultsImpl) AddMember(ctx context.Context, req *pb.AddMember_Request) (*pb.AddMember_Response, error)
func (*VaultsImpl) CloseWorkbenchTerminalTab ¶ added in v1.0.25
func (v *VaultsImpl) CloseWorkbenchTerminalTab( ctx context.Context, req *pb.CloseWorkbenchTerminalTab_Request, ) (*pb.CloseWorkbenchTerminalTab_Response, error)
func (*VaultsImpl) CreateInviteLink ¶
func (v *VaultsImpl) CreateInviteLink( ctx context.Context, req *pb.CreateInviteLink_Request, ) (*pb.CreateInviteLink_Response, error)
func (*VaultsImpl) CreateVault ¶
func (v *VaultsImpl) CreateVault(ctx context.Context, req *pb.CreateVault_Request) (*pb.CreateVault_Response, error)
func (*VaultsImpl) CreateWorkbench ¶
func (v *VaultsImpl) CreateWorkbench( ctx context.Context, req *pb.CreateWorkbench_Request, ) (*pb.CreateWorkbench_Response, error)
func (*VaultsImpl) CreateWorkbenchTerminalTab ¶ added in v1.0.25
func (v *VaultsImpl) CreateWorkbenchTerminalTab( ctx context.Context, req *pb.CreateWorkbenchTerminalTab_Request, ) (*pb.CreateWorkbenchTerminalTab_Response, error)
func (*VaultsImpl) DeleteVault ¶
func (v *VaultsImpl) DeleteVault(ctx context.Context, req *pb.DeleteVault_Request) (*pb.DeleteVault_Response, error)
func (*VaultsImpl) DeleteWorkbench ¶ added in v1.0.25
func (v *VaultsImpl) DeleteWorkbench( ctx context.Context, req *pb.DeleteWorkbench_Request, ) (*pb.DeleteWorkbench_Response, error)
func (*VaultsImpl) DisablePostgresDatabase ¶ added in v1.0.15
func (v *VaultsImpl) DisablePostgresDatabase( ctx context.Context, req *pb.DisablePostgresDatabase_Request, ) (*pb.DisablePostgresDatabase_Response, error)
func (*VaultsImpl) EnablePostgresDatabase ¶ added in v1.0.15
func (v *VaultsImpl) EnablePostgresDatabase( ctx context.Context, req *pb.EnablePostgresDatabase_Request, ) (*pb.EnablePostgresDatabase_Response, error)
func (*VaultsImpl) Gateway ¶
func (v *VaultsImpl) Gateway(ctx context.Context, endpoint string, opts ...grpc.DialOption) (string, http.Handler)
func (*VaultsImpl) GetPostgresDatabase ¶ added in v1.0.15
func (v *VaultsImpl) GetPostgresDatabase( ctx context.Context, req *pb.GetPostgresDatabase_Request, ) (*pb.GetPostgresDatabase_Response, error)
func (*VaultsImpl) GetVault ¶
func (v *VaultsImpl) GetVault(ctx context.Context, req *pb.GetVault_Request) (*pb.GetVault_Response, error)
func (*VaultsImpl) LinkS3Bucket ¶
func (v *VaultsImpl) LinkS3Bucket( ctx context.Context, req *pb.LinkS3Bucket_Request, ) (*pb.LinkS3Bucket_Response, error)
func (*VaultsImpl) ListInviteLinks ¶
func (v *VaultsImpl) ListInviteLinks( ctx context.Context, req *pb.ListInviteLinks_Request, ) (*pb.ListInviteLinks_Response, error)
func (*VaultsImpl) ListMembers ¶
func (v *VaultsImpl) ListMembers(ctx context.Context, req *pb.ListMembers_Request) (*pb.ListMembers_Response, error)
func (*VaultsImpl) ListVaults ¶
func (v *VaultsImpl) ListVaults(ctx context.Context, req *pb.ListVaults_Request) (*pb.ListVaults_Response, error)
func (*VaultsImpl) ListWorkbenchTerminalTabs ¶ added in v1.0.25
func (v *VaultsImpl) ListWorkbenchTerminalTabs( ctx context.Context, req *pb.ListWorkbenchTerminalTabs_Request, ) (*pb.ListWorkbenchTerminalTabs_Response, error)
func (*VaultsImpl) PublishVault ¶
func (v *VaultsImpl) PublishVault(ctx context.Context, req *pb.PublishVault_Request) (*pb.PublishVault_Response, error)
func (*VaultsImpl) Register ¶
func (v *VaultsImpl) Register(srv grpc.ServiceRegistrar)
func (*VaultsImpl) RemoveMember ¶
func (v *VaultsImpl) RemoveMember( ctx context.Context, req *pb.RemoveMember_Request, ) (*pb.RemoveMember_Response, error)
func (*VaultsImpl) RevokeInviteLink ¶
func (v *VaultsImpl) RevokeInviteLink( ctx context.Context, req *pb.RevokeInviteLink_Request, ) (*pb.RevokeInviteLink_Response, error)
func (*VaultsImpl) SelectWorkbenchTerminalTab ¶ added in v1.0.25
func (v *VaultsImpl) SelectWorkbenchTerminalTab( ctx context.Context, req *pb.SelectWorkbenchTerminalTab_Request, ) (*pb.SelectWorkbenchTerminalTab_Response, error)
func (*VaultsImpl) SetVaultBinaryStorage ¶
func (v *VaultsImpl) SetVaultBinaryStorage( ctx context.Context, req *pb.SetVaultBinaryStorage_Request, ) (*pb.SetVaultBinaryStorage_Response, error)
func (*VaultsImpl) StartWorkbench ¶
func (v *VaultsImpl) StartWorkbench( ctx context.Context, req *pb.StartWorkbench_Request, ) (*pb.StartWorkbench_Response, error)
func (*VaultsImpl) StopWorkbench ¶
func (v *VaultsImpl) StopWorkbench( ctx context.Context, req *pb.StopWorkbench_Request, ) (*pb.StopWorkbench_Response, error)
func (*VaultsImpl) UnlinkS3Bucket ¶
func (v *VaultsImpl) UnlinkS3Bucket( ctx context.Context, req *pb.UnlinkS3Bucket_Request, ) (*pb.UnlinkS3Bucket_Response, error)
func (*VaultsImpl) UnpublishVault ¶
func (v *VaultsImpl) UnpublishVault(ctx context.Context, req *pb.UnpublishVault_Request) (*pb.UnpublishVault_Response, error)
func (*VaultsImpl) UpdateVaultPrompts ¶ added in v1.0.25
func (v *VaultsImpl) UpdateVaultPrompts(ctx context.Context, req *pb.UpdateVaultPrompts_Request) (*pb.UpdateVaultPrompts_Response, error)
type WorkbenchTerminalHandler ¶ added in v1.0.25
type WorkbenchTerminalHandler struct {
// contains filtered or unexported fields
}
WorkbenchTerminalHandler reverse-proxies a vault member's browser straight to the ttyd server running inside that vault's workbench container, giving the user a real interactive terminal on the workbench's tmux session (replacing the previous capture-pane/send-keys screen-scraping relay).
It is registered with transport.AddHttpHandler, i.e. outside the gRPC auth interceptor chain, so it authenticates and authorizes each request itself — same as the other raw handlers in internal/app/custom.go (mcp_api's OAuth endpoints, gitlab_webhook).
func NewWorkbenchTerminalHandler ¶ added in v1.0.25
func NewWorkbenchTerminalHandler( authSvc terminalAuthService, vaultMembers terminalVaultMembers, workbenchSvc terminalTargetResolver, ) *WorkbenchTerminalHandler
func (*WorkbenchTerminalHandler) ServeHTTP ¶ added in v1.0.25
func (h *WorkbenchTerminalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WorkbenchTerminalShellHandler ¶ added in v1.0.25
type WorkbenchTerminalShellHandler struct {
// contains filtered or unexported fields
}
WorkbenchTerminalShellHandler reverse-proxies a vault member's browser straight to the ttyd server running inside that vault's workbench container, giving the user a real interactive terminal on the workbench's tmux session — one tab per tmux window, each its own live `claude` TUI, entirely independent of the chat bridge WorkbenchTerminalHandler proxies to.
It is registered with transport.AddHttpHandler, i.e. outside the gRPC auth interceptor chain, so it authenticates and authorizes each request itself — same as WorkbenchTerminalHandler and the other raw handlers in internal/app/custom.go (mcp_api's OAuth endpoints, gitlab_webhook).
func NewWorkbenchTerminalShellHandler ¶ added in v1.0.25
func NewWorkbenchTerminalShellHandler( authSvc terminalAuthService, vaultMembers terminalVaultMembers, workbenchSvc terminalShellTargetResolver, ) *WorkbenchTerminalShellHandler
func (*WorkbenchTerminalShellHandler) ClearPendingTerminalAuthLink ¶ added in v1.0.25
func (h *WorkbenchTerminalShellHandler) ClearPendingTerminalAuthLink(vaultID uuid.UUID)
ClearPendingTerminalAuthLink removes vaultID's cached sign-in link — called by GetVault once a live login-status check (service.WorkbenchService.IsClaudeLoggedIn) confirms login actually completed, since this handler has no way to know that on its own (it only sees terminal scrollback, not the container's real credentials state).
func (*WorkbenchTerminalShellHandler) PendingTerminalAuthLink ¶ added in v1.0.25
func (h *WorkbenchTerminalShellHandler) PendingTerminalAuthLink(vaultID uuid.UUID) string
PendingTerminalAuthLink returns the Claude CLI OAuth sign-in link most recently detected on vaultID's terminal WS output, or "" if none has been seen yet on this process (a fresh detection overwrites any earlier one — see setPendingTerminalAuthLink) or the entry has since been cleared via ClearPendingTerminalAuthLink.
func (*WorkbenchTerminalShellHandler) ServeHTTP ¶ added in v1.0.25
func (h *WorkbenchTerminalShellHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files
¶
- accept_invite.go
- close_workbench_terminal_tab.go
- create.go
- create_workbench.go
- create_workbench_terminal_tab.go
- delete.go
- delete_workbench.go
- disable_postgres.go
- enable_postgres.go
- get.go
- get_postgres.go
- invite_create.go
- invite_list.go
- invite_revoke.go
- link_s3_bucket.go
- list.go
- list_workbench_terminal_tabs.go
- member_add.go
- member_list.go
- member_remove.go
- publish.go
- select_workbench_terminal_tab.go
- set_binary_storage.go
- start_workbench.go
- stop_workbench.go
- unlink_s3_bucket.go
- unpublish.go
- update_prompts.go
- vaults_impl.go
- workbench_terminal.go
- workbench_terminal_shell.go