MCPcopy Create free account
hub / github.com/compozy/agh / nativeResolvedWorkspace

Method nativeResolvedWorkspace

internal/daemon/native_tools.go:4879–4903  ·  view source on GitHub ↗
(
	ctx context.Context,
	id toolspkg.ToolID,
	workspaceRef string,
	scope toolspkg.Scope,
)

Source from the content-addressed store, hash-verified

4877}
4878
4879func (n *daemonNativeTools) nativeResolvedWorkspace(
4880 ctx context.Context,
4881 id toolspkg.ToolID,
4882 workspaceRef string,
4883 scope toolspkg.Scope,
4884) (workspacepkg.ResolvedWorkspace, error) {
4885 ref, err := nativeCallerWorkspaceInput(id, "workspace_id", workspaceRef, scope)
4886 if err != nil {
4887 return workspacepkg.ResolvedWorkspace{}, err
4888 }
4889 if ref == "" {
4890 return workspacepkg.ResolvedWorkspace{}, nativeRequiredInputError(id, "workspace_id")
4891 }
4892 if n == nil || n.deps == nil || n.deps.Workspaces == nil {
4893 return workspacepkg.ResolvedWorkspace{}, nativeNetworkInputError(
4894 id,
4895 workspacepkg.ErrWorkspaceResolverUnavailable,
4896 )
4897 }
4898 resolved, err := n.deps.Workspaces.Resolve(ctx, ref)
4899 if err != nil {
4900 return workspacepkg.ResolvedWorkspace{}, nativeNetworkInputError(id, err)
4901 }
4902 return resolved, nil
4903}
4904
4905func nativeCallerWorkspaceInput(
4906 id toolspkg.ToolID,

Callers 10

hooksRunsMethod · 0.95
networkInboxMethod · 0.95
networkSendMethod · 0.95
sessionStatusMethod · 0.95
sessionHealthMethod · 0.95
sessionEventsMethod · 0.95
sessionHistoryMethod · 0.95
sessionDescribeMethod · 0.95
TestDaemonNativeToolsFunction · 0.95

Calls 4

nativeRequiredInputErrorFunction · 0.85
nativeNetworkInputErrorFunction · 0.85
ResolveMethod · 0.65

Tested by 1

TestDaemonNativeToolsFunction · 0.76