Add Warp.dev Terminal Support#23
Conversation
|
Warning Rate limit exceeded@JosXa has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 26 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (12)
WalkthroughAdds full Warp format support: new Changes
Sequence Diagram(s)sequenceDiagram
rect rgb(240,248,255)
participant CLI
participant Importers as "importers"
participant Exporters as "exporters"
participant FS as "FileSystem"
end
alt Import Flow (Warp)
CLI->>Importers: importWarp(filePath)
Importers->>FS: read WARP.md / WARP.local.md
FS-->>Importers: file content
Importers->>Importers: parse into RuleBlock(s), set private if .local.md
Importers-->>CLI: ImportResult { filePath, rules, format: "warp", raw }
end
alt Export Flow (Warp)
CLI->>Exporters: exportToWarp(rules, outputPath, options)
Exporters->>Exporters: filter private (if !includePrivate)
Exporters->>Exporters: separate alwaysApply vs conditional, build content
Exporters->>FS: write WARP.md / WARP.local.md
FS-->>Exporters: write confirmation
Exporters-->>CLI: success / path
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/cli.ts (1)
185-200: Remove the stray closing bracketThere’s an extra
]immediately after theexportFormatsarray, which makes the file fail to parse and stops the CLI from compiling/running. Drop the extra bracket so the array closes only once.{ name: 'Warp.dev (WARP.md)', value: 'warp' } ] - ]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
pr-description.md(1 hunks)src/cli.ts(11 hunks)src/exporters.ts(2 hunks)src/importers.ts(2 hunks)src/index.ts(2 hunks)src/types.ts(3 hunks)test-import-warp.cjs(1 hunks)test-import-warp.js(1 hunks)test-warp.md(1 hunks)test/integration/roundtrip.test.ts(1 hunks)test/warp.test.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (6)
test-import-warp.js (2)
src/importers.ts (1)
importWarp(881-906)src/index.ts (1)
importWarp(23-23)
test-import-warp.cjs (1)
src/importers.ts (1)
importWarp(881-906)
src/exporters.ts (1)
src/types.ts (2)
RuleBlock(16-23)ExportOptions(37-43)
test/warp.test.ts (3)
src/importers.ts (1)
importWarp(881-906)src/types.ts (1)
RuleBlock(16-23)src/exporters.ts (1)
exportToWarp(549-569)
src/cli.ts (3)
src/exporters.ts (1)
exportToWarp(549-569)src/index.ts (2)
exportToWarp(42-42)importWarp(23-23)src/importers.ts (1)
importWarp(881-906)
src/importers.ts (2)
src/index.ts (3)
importWarp(23-23)ImportResult(49-49)RuleBlock(48-48)src/types.ts (2)
ImportResult(25-30)RuleBlock(16-23)
🪛 markdownlint-cli2 (0.18.1)
pr-description.md
179-179: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (11)
src/exporters.ts (2)
549-569: LGTM! Warp exporter follows established patterns.The
exportToWarpfunction is well-implemented and consistent with other single-file exporters (Windsurf, Zed, Codex, Claude). It correctly filters private rules, separates always-apply from conditional rules, and uses appropriate header formatting.
588-588: LGTM! Warp format correctly integrated into exportAll.The integration follows the established pattern and uses the correct output path (WARP.md).
test/integration/roundtrip.test.ts (1)
131-131: LGTM! Integration test correctly updated for Warp format.The test assertion ensures Warp format is included in the exported formats, consistent with the new functionality.
test-warp.md (1)
1-15: LGTM! Test fixture is appropriate.The test file provides suitable sample content for Warp format testing with clear structure and multiple rule examples.
src/index.ts (2)
22-23: LGTM! Public API correctly updated.The
importWarpexport is properly added to the public API, enabling external usage of Warp import functionality.
42-42: LGTM! Export function correctly exposed.The
exportToWarpfunction is properly exported, completing the public API for Warp format support.src/types.ts (2)
1-1: LGTM! Format type correctly extended with Warp support.The
Formattype union now includes'warp', providing type safety for the new format across the codebase.
26-26: LGTM! Type references updated correctly.Both
ImportResult.formatandExportOptions.formatnow use theFormattype, ensuring consistency and type safety.Also applies to: 38-38
src/importers.ts (3)
247-265: LGTM! Warp format detection correctly integrated into importAll.The integration follows the established pattern for format detection, checking for both public (WARP.md) and private (WARP.local.md) variants with proper error handling.
874-879: LGTM! importJunie return structure improved.The explicit return structure with
format,filePath,rules, andrawfields makes the function consistent with other importers and properly typed.
881-905: LGTM! importWarp function correctly implemented.The function follows the established pattern for single-file importers, correctly handles private file detection, and returns a properly structured
ImportResult. The metadata includes an appropriate description and the content is properly trimmed.
6f50f09 to
257a0d5
Compare
Add support for importing from and exporting to Warp.dev WARP.md format. - Add warp format to importers and exporters - Add comprehensive Warp test coverage - Update CLI to support warp format - Add project documentation files - Update .gitignore to exclude exported AI rule files
|
Add Warp.dev Terminal Support
Summary
This pull request adds comprehensive support for Warp.dev terminal rules to the dotagent project. Warp.dev is a modern terminal application that allows users to define custom rules and workflows. This implementation enables users to import Warp rules from
WARP.mdfiles and export their unified.agent/rules back to Warp format.What is Warp.dev?
Warp.dev is a next-generation terminal application that provides:
Warp uses
WARP.mdfiles to store terminal configuration, rules, and workflow definitions, similar to how other tools use their respective configuration files.Changes Made
Type Definitions (
src/types.ts)'warp'to theFormattype unionImportResult.formatandExportOptions.formatto use the newFormattype for better type safetyImporter Implementation (
src/importers.ts)importWarp()function to read and parseWARP.mdfilesWARP.mdandWARP.local.mdfiles inimportAll()Exporter Implementation (
src/exporters.ts)exportToWarp()function to convert unified rules to Warp formatexportAll()functionCLI Integration (
src/cli.ts)WARP.mdfiles in convert commandWARP.mdandWARP.local.mdin gitignore patternsModule Exports (
src/index.ts)importWarpandexportToWarpfunctions for public API accessTesting (
test/warp.test.ts)WARP.mdandWARP.local.mdfilesIntegration Tests (
test/integration/roundtrip.test.ts)How the Warp Format Works
File Structure
WARP.mdin repository rootWARP.local.mdin repository root (automatically excluded from version control)Format Characteristics
AGENTS.mdIntegration Pattern
Warp follows the same pattern as other single-file formats (AGENTS.md, CLAUDE.md, etc.):
Testing Information
Unit Tests
test/warp.test.tsIntegration Tests
Manual Testing
WARP.mdfiles containing various content typesWARP.local.mdBreaking Changes or Migration Notes
No Breaking Changes
This is a purely additive feature that does not affect existing functionality:
Migration Notes
Existing users can:
dotagent import .to detect existingWARP.mdfilesdotagent export --format warpto export rules to Warp formatwarpin multi-format exportsExample Usage
Importing Warp Rules
Exporting to Warp Format
Converting Warp Files
Sample WARP.md Content
Terminal Features
Enable the following Warp features: