Skip to content

feat(pdk): add config file support#1759

Merged
cjraft merged 21 commits into
mainfrom
feat/pdk-config-system
Dec 14, 2025
Merged

feat(pdk): add config file support#1759
cjraft merged 21 commits into
mainfrom
feat/pdk-config-system

Conversation

@ulivz
Copy link
Copy Markdown
Member

@ulivz ulivz commented Dec 8, 2025

Summary

Added config file support with defineConfig function, refactored types to extract common options, and ensured CLI/Node.js API/Config API are isomorphic.

Usage

Infra

Before

{
    "release": "pdk release --tag-prefix 'pdk@' --push-tag --build --ignore-scripts --auto-create-release-branch",
    "release:dryrun": "pdk release --tag-prefix 'pdk@' --push-tag --build --ignore-scripts --auto-create-release-branch --dry-run",
    "release:canary": "pdk release --tag-prefix 'pdk@' --canary --push-tag --build --ignore-scripts --auto-create-release-branch",
    "release:full": "pdk release --tag-prefix 'pdk@' --push-tag --build --ignore-scripts --create-github-release",
}

After

{
    "release": "pdk release ",
    "release:dryrun": "pdk release --dry-run",
    "release:canary": "pdk release --canary",
    "release:full": "pdk release --create-github-release",
}
// pdk.config.ts
import { defineConfig } from 'pnpm-dev-kit'

export default defineConfig({
    autoCreateReleaseBranch: true,
    build: true,
    tagPrefix: 'pdk@',
    pushTag: true,
    ignoreScripts: true,
}); 

For Agent TARS

Before
image

After

import { defineConfig } from 'pnpm-dev-kit';

export default defineConfig({
  // Release defaults for multimodal workspace
  pushTag: true,
  build: true,
  ignoreScripts: true,
  autoCreateReleaseBranch: true,
  
  // Scope filtering for changelog
  filterScopes: ['tars', 'agent', 'tarko', 'o-agent', 'tars-stack', 'browser', 'infra', 'mcp', 'all'],
});

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve to above items.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 8, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit cc28a02
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/693d9e1a6d13d40008ebc144
😎 Deploy Preview https://deploy-preview-1759--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 8, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit cc28a02
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/693d9e1a539f32000817a27a
😎 Deploy Preview https://deploy-preview-1759--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ulivz ulivz changed the title feat(pdk): add configuration system support feat(pdk): add config file support Dec 8, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 14.27%. Comparing base (b79bb93) to head (7d05b7c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1759      +/-   ##
==========================================
+ Coverage   14.23%   14.27%   +0.04%     
==========================================
  Files         250      250              
  Lines        8565     8565              
  Branches     1674     1674              
==========================================
+ Hits         1219     1223       +4     
+ Misses       7170     7166       -4     
  Partials      176      176              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ulivz ulivz force-pushed the feat/pdk-config-system branch from 4a901e6 to 1dd5264 Compare December 13, 2025 16:13
ulivz added 18 commits December 14, 2025 00:53
- Add @tarko/config-loader 0.3.0 dependency for config loading
- Implement defineConfig function for TypeScript configuration
- Refactor types to extract common options (CommonOptions, AIOptions, FilterOptions)
- Add PDKConfig interface with namespaced command-specific options
- Implement loadPDKConfig and mergeOptions utilities
- Update CLI to load and merge configuration with CLI arguments
- Add comprehensive configuration documentation and examples
- Ensure CLI, Node.js API, and Config API are isomorphic
- Remove common/ai/filter scope design from config
- Flatten PDKConfig to match CLI and Node.js API structure
- Simplify mergeOptions by removing complex scope resolution
- Update documentation and examples to reflect new flat structure
- Ensure complete isomorphism between all APIs
- Remove old common/ai/filter scope example
- Update defineConfig example to match new isomorphic API
- Add comments clarifying command-specific options
- Add detailed design philosophy and intent documentation
- Explain isomorphic API design and flattened configuration structure
- Document usage patterns for CLI, Node.js API, and Config API
- Add comprehensive field-level documentation with default values
- Include primary use cases and design notes for each interface
- Ensure all comments express clear design intent and rationale
- Remove DESIGN PHILOSOPHY section as requested
- Convert all field comments to multi-line format
- Maintain comprehensive documentation while improving readability
- Keep design intent documentation in interface-level comments
- Extract focused option groups (CoreOptions, AIOptions, etc.)
- Compose command options from reusable building blocks
- PDKConfig now extends all option groups instead of duplicating fields
- Maintain flat configuration structure while eliminating redundancy
- Improve type safety and maintainability through composition
- Reduce code duplication by ~80% in type definitions
- Update type definitions header comment with correct PDK expansion
- Fix CLI usage examples from 'ptk' to 'pdk' command
- Align with README.md documentation and actual project naming
- Ensure consistency across all documentation and examples
- Remove verbose configuration options from JSDoc example
- Keep only essential options to demonstrate usage pattern
- Reduce comment length from 37 lines to 13 lines
- Maintain clarity while improving readability
- Add comprehensive configuration design principles in types.ts
- Document config file vs CLI usage patterns in README
- Add detailed comments explaining configuration loading strategy
- Provide clear guidance on what belongs in config vs CLI
- Include anti-patterns and best practices documentation
- Enhance example config with design principle explanations
- Remove verbose philosophy sections
- Add clear option tables for quick reference
- Focus on code examples and practical usage
- Structure configuration vs CLI usage clearly
- Highlight best practices and integration patterns
@ulivz ulivz force-pushed the feat/pdk-config-system branch from a22eb9a to bcd18f3 Compare December 13, 2025 16:55
- Create pdk.config.ts with shared release configuration
- Simplify package.json scripts by removing duplicated parameters
- Move common options (pushTag, build, ignoreScripts, autoCreateReleaseBranch) to config
- Move filterScopes and AI configuration to config file
AI features should be opt-in to avoid unexpected API costs and security risks
@cjraft cjraft merged commit 8232e65 into main Dec 14, 2025
10 of 11 checks passed
@cjraft cjraft deleted the feat/pdk-config-system branch December 14, 2025 12:44
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.

2 participants