feat(agent-config): agent config types, glob matching and cron parsing [3/21] - #324
Open
gusfcarvalho wants to merge 2 commits into
Open
gusfcarvalho wants to merge 2 commits into
gusfcarvalho wants to merge 2 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Glob and duration validation diverge from server behavior, and the overlay type permits invalid API payloads.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Adds foundational agent remote-configuration types, glob matching, and five-field cron utilities.
Changes:
- Defines API and configuration document types.
- Adds Go-compatible glob and cron helpers.
- Adds unit tests for matching and schedule parsing.
| File | Description |
|---|---|
src/types/agent-config.ts |
Defines remote-configuration types. |
src/types/agents.ts |
Re-exports configuration types. |
src/utils/agent-config/glob.ts |
Implements path-style glob matching. |
src/utils/agent-config/cron5.ts |
Validates and describes schedules. |
src/utils/agent-config/__tests__/glob.spec.ts |
Tests glob behavior. |
src/utils/agent-config/__tests__/cron5.spec.ts |
Tests cron behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+57
to
+59
| /** JSON Merge Patch (RFC 7396) over ConfigDoc minus the locked keys. `null` deletes. */ | ||
| export type OverlayDoc = Omit<ConfigDoc, 'api' | 'daemon' | 'remote_config'> & | ||
| Record<string, unknown>; |
Comment on lines
+132
to
+135
| const d = expr.slice('@every '.length); | ||
| return GO_DURATION_RE.test(d) | ||
| ? null | ||
| : `invalid duration "${d}" in @every`; |
Comment on lines
+131
to
+132
| let pat: Runes = Array.from(pattern); | ||
| let nm: Runes = Array.from(name); |
gusfcarvalho
force-pushed
the
agent-config/03-types-glob-cron
branch
from
October 5, 2026 16:32
356488f to
0362bb9
Compare
This was referenced Oct 6, 2026
Layer 3 of 21 in the stacked split of #318. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Go's time.LoadLocation reads zoneinfo files by name, case-sensitively on the agent's host; Intl matches case-insensitively, so cron5 accepted TZ=utc and CRON_TZ=europe/london, which the API and agent reject. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
agent-config/03-types-glob-cron
branch
from
October 6, 2026 09:40
0362bb9 to
6cc9c63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part 3 of 21 of the stacked split of #318 (agent remote configuration). Every layer adds the final version of its files from #318, and only imports from layers below it, so each layer passes
make reviewableon its own. Nothing is reachable in the app until layer 20 wires the Configuration tab in.What
The hand-written agent remote-configuration types (
src/types/agent-config.ts, re-exported fromsrc/types/agents.ts), glob matching for locked/allowed key patterns, and a 5-field cron parser/describer used for schedule fields.Tests
Unit specs for glob and cron.
🤖 Generated with Claude Code