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

Method Spawn

internal/daemon/daemon_test.go:4777–4801  ·  view source on GitHub ↗
(ctx context.Context, opts session.SpawnOpts)

Source from the content-addressed store, hash-verified

4775}
4776
4777func (f *fakeSessionManager) Spawn(ctx context.Context, opts session.SpawnOpts) (*session.Session, error) {
4778 child, err := f.Create(ctx, session.CreateOpts{
4779 AgentName: opts.AgentName,
4780 Provider: opts.Provider,
4781 Name: opts.Name,
4782 Workspace: opts.Workspace,
4783 WorkspacePath: opts.WorkspacePath,
4784 Channel: opts.Channel,
4785 PromptOverlay: opts.PromptOverlay,
4786 Type: session.SessionTypeSpawned,
4787 Lineage: &store.SessionLineage{
4788 ParentSessionID: opts.ParentSessionID,
4789 SpawnRole: opts.SpawnRole,
4790 AutoStopOnParent: opts.AutoStopOnParent,
4791 PermissionPolicy: opts.PermissionPolicy,
4792 },
4793 })
4794 if err != nil {
4795 return nil, err
4796 }
4797 f.mu.Lock()
4798 f.infos = append(f.infos, child.Info())
4799 f.mu.Unlock()
4800 return child, nil
4801}
4802
4803func (f *fakeSessionManager) List() []*session.Info {
4804 f.mu.Lock()

Callers

nothing calls this directly

Calls 3

CreateMethod · 0.95
appendFunction · 0.85
InfoMethod · 0.65

Tested by

no test coverage detected