( ctx context.Context, _ toolspkg.Scope, req toolspkg.CallRequest, )
| 2317 | } |
| 2318 | |
| 2319 | func (n *daemonNativeTools) workspaceDescribe( |
| 2320 | ctx context.Context, |
| 2321 | _ toolspkg.Scope, |
| 2322 | req toolspkg.CallRequest, |
| 2323 | ) (toolspkg.ToolResult, error) { |
| 2324 | var input workspaceRefInput |
| 2325 | if err := decodeNativeInput(req, &input); err != nil { |
| 2326 | return toolspkg.ToolResult{}, err |
| 2327 | } |
| 2328 | ref, err := requiredNativeString(req.ToolID, nativeToolsWorkspaceKey, input.Workspace) |
| 2329 | if err != nil { |
| 2330 | return toolspkg.ToolResult{}, err |
| 2331 | } |
| 2332 | resolved, err := n.deps.Workspaces.Resolve(ctx, ref) |
| 2333 | if err != nil { |
| 2334 | return toolspkg.ToolResult{}, err |
| 2335 | } |
| 2336 | sessions, err := n.deps.Sessions.ListAll(ctx) |
| 2337 | if err != nil { |
| 2338 | return toolspkg.ToolResult{}, err |
| 2339 | } |
| 2340 | agents, err := n.workspaceAgents(ctx, &resolved) |
| 2341 | if err != nil { |
| 2342 | return toolspkg.ToolResult{}, err |
| 2343 | } |
| 2344 | workspaceID, err := nativeResolvedNetworkWorkspaceID(&resolved) |
| 2345 | if err != nil { |
| 2346 | return toolspkg.ToolResult{}, err |
| 2347 | } |
| 2348 | return structuredResult(map[string]any{ |
| 2349 | nativeToolsWorkspaceKey: core.WorkspacePayloadFromWorkspace(resolved.Workspace), |
| 2350 | nativeToolsSessionsKey: core.SessionPayloadsForWorkspace(sessions, workspaceID), |
| 2351 | nativeToolsAgentsKey: core.AgentPayloadsFromDefs(agents), |
| 2352 | nativeToolsSkillsKey: core.WorkspaceSkillPayloads(resolved.Skills), |
| 2353 | nativeToolsProvidersKey: core.SessionProviderOptionPayloadsFromConfig(&resolved.Config), |
| 2354 | }, workspaceID) |
| 2355 | } |
| 2356 | |
| 2357 | func (n *daemonNativeTools) memoryList( |
| 2358 | ctx context.Context, |
nothing calls this directly
no test coverage detected