MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / UninstallInstruction

Function UninstallInstruction

internal/entities/apps.go:356–368  ·  view source on GitHub ↗

UninstallInstruction resolves the instruction file for the given app and level and reports whether it exists. Instruction files are app-wide guidance files, so this function does not remove them unless a future managed marker scheme can prove CAM owns the file. For project-level installs the project

(entityName string, app string, level InstallLevel, projectDir string)

Source from the content-addressed store, hash-verified

354// scheme can prove CAM owns the file. For project-level installs the projectDir
355// must be provided.
356func UninstallInstruction(entityName string, app string, level InstallLevel, projectDir string) (string, bool, error) {
357 dest, err := InstructionPath(app, level, projectDir)
358 if err != nil {
359 return "", false, err
360 }
361 if !pathutil.Exists(dest) {
362 return dest, false, nil
363 }
364 // Instructions are app-wide files; removing the file is opt-in only when
365 // the file matches the entity's content marker. We don't truncate
366 // arbitrary user data — instead report "found" if the file exists.
367 return dest, false, nil
368}
369
370// InstructionApps returns the list of app names that support instructions
371// (those with at least one install path defined).

Callers 1

Calls 2

ExistsFunction · 0.92
InstructionPathFunction · 0.85

Tested by 1