-
Notifications
You must be signed in to change notification settings - Fork 100
fix(openclaw): align paths with upstream openclaw/openclaw conventions #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,8 @@ export interface AgentDirectoryConfig { | |
| skillsDir: string; | ||
| /** Config file that references skills */ | ||
| configFile: string; | ||
| /** Alternative config files that also mark this agent as present */ | ||
| altConfigFiles?: string[]; | ||
| /** Alternative skills directories */ | ||
| altSkillsDirs?: string[]; | ||
| /** Global skills directory */ | ||
|
|
@@ -121,10 +123,11 @@ export const AGENT_CONFIG: Record<AgentType, AgentDirectoryConfig> = { | |
| }, | ||
|
|
||
| openclaw: { | ||
| skillsDir: 'skills', | ||
| configFile: 'CLAUDE.md', | ||
| altSkillsDirs: ['~/.openclaw/skills'], | ||
| globalSkillsDir: '~/.openclaw/skills', | ||
| skillsDir: '.openclaw/skills', | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
| configFile: 'AGENTS.md', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep
🐛 Proposed direction export interface AgentDirectoryConfig {
/** Config file that references skills */
configFile: string;
+ /** Additional config files that identify the agent */
+ altConfigFiles?: string[]; openclaw: {
skillsDir: '.openclaw/skills',
configFile: 'AGENTS.md',
+ altConfigFiles: ['openclaw.json'],
altSkillsDirs: ['skills', '~/.openclaw/workspace/skills'],Then update core detection to check 🤖 Prompt for AI Agents |
||
| altConfigFiles: ['openclaw.json'], | ||
| altSkillsDirs: ['skills', '~/.openclaw/workspace/skills'], | ||
| globalSkillsDir: '~/.openclaw/workspace/skills', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wire The new value is not enough by itself: 🐛 Proposed direction export function getSearchDirs(adapter: AgentAdapterInfo): string[] {
const dirs: string[] = [];
dirs.push(join(process.cwd(), adapter.skillsDir));
dirs.push(join(process.cwd(), '.agent', 'skills'));
- dirs.push(join(homedir(), adapter.skillsDir));
+ if (adapter.globalSkillsDir) {
+ dirs.push(adapter.globalSkillsDir.replace(/^~(?=\/)/, homedir()));
+ } else {
+ dirs.push(join(homedir(), adapter.skillsDir));
+ }
dirs.push(join(homedir(), '.agent', 'skills'));
return dirs;
}🤖 Prompt for AI Agents |
||
| configFormat: 'xml', | ||
| usesFrontmatter: true, | ||
| frontmatterFields: [ | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 The PR updated (Refers to lines 119-120) Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Redundant
existsSync(globalWorkspace)check — always shadowed by parent directory checkglobalWorkspaceisjoin(homedir(), '.openclaw', 'workspace')(i.e.~/.openclaw/workspace), whileglobalOpenClawisjoin(homedir(), '.openclaw')(i.e.~/.openclaw). Since~/.openclaw/workspaceis a subdirectory of~/.openclaw, it's impossible forexistsSync(globalWorkspace)to betruewhenexistsSync(globalOpenClaw)isfalse— the parent directory must exist for the child to exist. TheglobalWorkspacevariable and its check on line 22-23 are dead code. If the intent was to detect specifically the workspace subdirectory (not just any.openclawpresence), theglobalOpenClawcheck should be removed or reordered.Was this helpful? React with 👍 or 👎 to provide feedback.