MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / Register

Method Register

internal/loop/manager.go:149–165  ·  view source on GitHub ↗

Register registers a PRD with the manager (does not start it).

(name, prdPath string)

Source from the content-addressed store, hash-verified

147
148// Register registers a PRD with the manager (does not start it).
149func (m *Manager) Register(name, prdPath string) error {
150 m.mu.Lock()
151 defer m.mu.Unlock()
152
153 // Check if already registered
154 if _, exists := m.instances[name]; exists {
155 return fmt.Errorf("PRD %s is already registered", name)
156 }
157
158 m.instances[name] = &LoopInstance{
159 Name: name,
160 PRDPath: prdPath,
161 State: LoopStateReady,
162 }
163
164 return nil
165}
166
167// RegisterWithWorktree registers a PRD with worktree metadata (does not start it).
168func (m *Manager) RegisterWithWorktree(name, prdPath, worktreeDir, branch string) error {

Calls

no outgoing calls