Skip to content

fix: sanitize derived project ids#2107

Open
miloquinn wants to merge 1 commit into
AgentWrapper:mainfrom
miloquinn:fix/sanitize-derived-project-id
Open

fix: sanitize derived project ids#2107
miloquinn wants to merge 1 commit into
AgentWrapper:mainfrom
miloquinn:fix/sanitize-derived-project-id

Conversation

@miloquinn
Copy link
Copy Markdown

Summary

Sanitize project IDs derived from local directory names before registering projects in the global config.

Root Cause

Some ao start paths used basename(...) directly as the requested project ID. Directory names such as llama.cpp can contain dots or other characters that do not satisfy the project ID schema, which can cause validation errors during startup/registration.

Fix

Use the existing sanitizeProjectId helper for derived IDs in the local config registration paths, while preserving the original directory name as the human-readable project name/display value.

Impact

Projects in directories like llama.cpp now register cleanly instead of failing validation. Existing readable project names are preserved.

Tests

  • corepack pnpm --filter @aoagents/ao-cli test -- start.test.ts
  • corepack pnpm --filter @aoagents/ao-cli typecheck

Fixes #1877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project IDs with dots/special chars cause validation error on ao start

1 participant