258 Commits
Author SHA1 Message Date
New Future 22ee68270a Update references and links in issue-assistant.md 2026-01-14 01:29:31 +08:00
9a932675e1 Move favicon.ico and img to docs/public, update references, and improve edge function 404 handling with ESA Cache (#643)
* Initial plan

* docs: move favicon and img to docs/public and update all references

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix: update .gitignore to ignore generated subdirs and correct _config.yml paths

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor: use symbolic links for schema and tests instead of copying

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat: add Vite config to preserve symbolic links in VitePress

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor: link only tests/config instead of entire tests directory

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat: return 404.html when URLs don't match any pattern in esa.js

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix: properly handle 404.html response headers in esa.js

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix: prevent infinite loop and improve error handling in 404.html fetch

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat: increase 404.html cache duration to 6 hours

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat: cache 404.html response in ESA Cache

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update docs/esa.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 17:35:21 +08:00
New Future 8895431032 Update RAW_URL to point to public install script 2026-01-13 12:18:38 +08:00
0e466dc496 feat(docs): add automated documentation website builder using VitePress 2.0 (#634)
* Initial plan

* feat(docs): add static documentation website builder script

Add build_docs.py script to convert markdown docs to static HTML website with:
- Responsive navigation bar with collapsible directory tree
- In-page table of contents (right sidebar, hidden on small screens)
- Language switcher (Chinese/English)
- Pure static HTML output (no server-side processing)
- Footer with GitHub links and edit page link
- Mobile-friendly responsive design

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* style: format build_docs.py with ruff

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): use MkDocs with Material theme instead of custom parser

Replace custom markdown parser with industry-standard tools:
- MkDocs: Popular static site generator for documentation
- Material for MkDocs: Modern, feature-rich theme

Benefits:
- Mature, well-tested codebase used by thousands of projects
- Built-in features: search, navigation, TOC, code highlighting
- Active development with regular updates
- Extensive documentation and community support
- Beautiful, responsive design out of the box
- Easy to maintain with configuration-based approach

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): use VitePress instead of MkDocs for documentation

Replace MkDocs with VitePress - a Vue-powered static site generator:
- VitePress: Modern, fast, designed for documentation
- Vue 3 + Vite stack with instant HMR
- Built-in i18n, search, dark mode, responsive design
- Chinese-friendly (created by Evan You)

Features:
- Responsive navigation with collapsible sidebar
- In-page TOC automatically generated
- Bilingual support (Chinese/English)
- Local search with keyboard shortcuts
- Light/Dark mode toggle
- Edit page links to GitHub
- Pure static HTML output

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(docs): add automated setup and build with npm run build

Add automated directory setup for VitePress build:
- Created scripts/setup-docs.mjs to auto-setup docs structure
- Updated package.json with 'build' command that runs setup + build
- Updated docs:dev to include setup automatically
- Simplified workflow to one command: npm run build

Changes:
- npm run build now handles everything automatically
- No need for separate bash script
- Directory structure created on-demand
- Updated BUILD_DOCS.md with simplified instructions

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): improve VitePress configuration per feedback

Addressed all feedback items:
1. Fixed edit link mapping: index.html now correctly maps to README.md/README.en.md in GitHub
2. Added schema directory to build output via public/ directory
3. Removed /doc/ prefix from all URLs - doc/ is now the web root
4. Fixed path references in README files during setup

Changes:
- Updated editLink to use function for proper README mapping
- Modified setup script to copy doc/ contents to docs root (not docs/doc/)
- Added schema/ to public/ directory for static asset serving
- Fixed /doc/ path references in copied README files
- Updated all navigation and sidebar paths to remove /doc/ prefix

URLs now work as:
- / (homepage from README.md)
- /docker, /install (no /doc/ prefix)
- /config/cli, /providers/dnspod (clean paths)
- /schema/v4.0.json (accessible in build)

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): preserve original /doc/ paths in documentation

Per user feedback, reverted path modifications:
- No longer replace /doc/ paths in README files
- Restored doc/ directory structure (docs/doc/)
- Updated VitePress navigation to use /doc/ prefix
- Edit links correctly map to source files in doc/ directory

Changes:
- setup-docs.mjs: removed path replacement, copy doc/ to docs/doc/
- config.mts: restored /doc/ prefix in all navigation and sidebar paths
- URLs now match original documentation: /doc/docker, /doc/providers/dnspod

This preserves the original documentation structure and paths as they
appear in the source repository.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): remove /doc/ prefix from URLs and ignore intermediate files

Per user feedback, changed URLs from /doc/xxx.html to /xxx.html:

Changes:
1. Updated setup-docs.mjs to copy doc/ contents to docs/ root (not docs/doc/)
2. Modified path replacement to handle both links and image src attributes
3. Updated VitePress config.mts to remove /doc/ prefix from all nav/sidebar paths
4. Updated .gitignore to exclude intermediate copied files from commits
5. Removed docs/index.md and docs/en/index.md from git tracking

URLs now:
- /docker.html instead of /doc/docker.html
- /providers/dnspod.html instead of /doc/providers/dnspod.html
- /config/cli.html instead of /doc/config/cli.html
- Images at /img/ddns.svg instead of /doc/img/ddns.svg
- Schema files remain at /schema/v4.0.json

Intermediate files generated during build are now gitignored and won't be committed.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): move build scripts to doc/ directory

Moved documentation build scripts from root and scripts/ to doc/ directory:
- Moved scripts/setup-docs.mjs → doc/setup-docs.mjs
- Moved build_docs.sh → doc/build_docs.sh
- Removed empty scripts/ directory
- Updated package.json to reference new script locations
- Updated BUILD_DOCS.md with new directory structure

This organizes all documentation-related files under doc/ directory,
keeping the repository root cleaner.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): consolidate into single doc/ directory

Eliminated docs/ directory, consolidated everything under doc/:
- Moved docs/.vitepress/ → doc/.vitepress/
- Removed docs/ directory entirely
- Updated package.json to use doc/ instead of docs/
- Updated .gitignore to reflect new structure (doc/.vitepress/dist/, doc/index.md, doc/en/, doc/public/)
- Updated setup-docs.mjs to generate files within doc/
- Updated BUILD_DOCS.md documentation

Structure now:
- doc/ contains source files, VitePress config, and generated intermediate files
- All build artifacts stay within doc/.vitepress/dist/
- Simpler single-directory structure without doc/docs nesting

Commands remain the same:
- npm run build
- npm run docs:dev
- npm run docs:preview

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): move package.json to doc/ directory

Moved package.json to doc/ directory to consolidate all documentation-related files:
- Moved package.json from root → doc/package.json
- Updated package.json scripts to use relative paths (. instead of doc)
- Updated BUILD_DOCS.md with new usage instructions (cd doc first)
- Updated build_docs.sh to work from within doc/ directory
- .gitignore already handles node_modules/ globally

All documentation dependencies and configuration now in single doc/ directory.

Usage:
```bash
cd doc
npm install
npm run build
```

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(docs): add install.sh to public, auto-redirects, and ensure README→index.html mapping

Implemented three enhancements:

1. Copy install.sh to public/ directory
   - install.sh now accessible at /install.sh in build
   - Users can download directly from documentation site

2. Add automatic redirects for old URLs
   - Created custom VitePress theme with redirect logic
   - /doc/xxx URLs redirect to /xxx
   - /doc/xxx.en.html URLs redirect to /en/xxx.html
   - Maintains backward compatibility with old links

3. README.md renders as index.html with correct edit links
   - Already configured: index.md maps to README.md for editing
   - en/index.md maps to README.en.md for editing
   - Edit links work correctly for both Chinese and English homepages

Updated BUILD_DOCS.md with new features documentation.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(docs): upgrade to VitePress 2.0 (next)

Upgraded VitePress from v1.x to v2.0 (next tag):
- Updated package.json to use "vitepress": "next"
- Currently using v2.0.0-alpha.15
- Tested build successfully - all features working
- Updated BUILD_DOCS.md to reflect VitePress 2.0

VitePress 2.0 benefits:
- Better performance and faster build times
- Improved developer experience
- Enhanced features and bug fixes
- Future-ready with latest Vue 3 + Vite improvements

Build tested and confirmed working with no breaking changes.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): remove redundant build script and fix copyright years

Changes per user feedback:
1. Removed doc/build_docs.sh (redundant - standard npm commands sufficient)
2. Updated copyright in config.mts line 133: "Copyright © 2016 ~ 2024 NewFuture"
3. Updated copyright in config.mts line 305: "Copyright © 2016 ~ 2024 NewFuture"

Usage now simplified to standard npm commands:
- cd doc && npm install
- npm run build
- npm run docs:dev
- npm run docs:preview

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): dynamic copyright year, move redirects to esa.js, update providers link

Per user feedback:
1. Made copyright year dynamic: `${new Date().getFullYear()}` (line 305)
2. Moved redirect logic from theme/index.ts to esa.js for server-side handling
3. Changed providers link from "概述 /providers/README" to "所有服务商 /providers/index" (line 70)

Changes:
- config.mts: Dynamic copyright calculation, updated providers navigation
- esa.js: Added redirect logic for /doc/ URLs (301 permanent redirects)
- theme/index.ts: Removed client-side redirect logic (now handled server-side)

Redirects now handled at edge function level for better SEO and performance.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): improve redirects, provider link, and add code-to-GitHub link conversion

Per user feedback (comment #3736692270):
1. Moved .en.html redirect logic before general /doc/ redirect in esa.js
2. Added /index.en.html → /en/ redirect
3. Changed providers/README URL to providers/ (line 39)
4. Added markdown transformer to convert code links (e.g., /ddns/provider/dnspod.py) to GitHub links

Changes:
- esa.js: Reordered redirect logic (en first), added index.en.html redirect
- config.mts: Changed providers link from /providers/README to /providers/
- config.mts: Added markdown.config to transform inline code paths to GitHub links

Code paths like `/ddns/provider/dnspod.py` in documentation will now automatically link to GitHub repository.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(docs): enable dead link check, add sitemap, llms.txt, and GitHub Actions build

Per user feedback (comment #3736806631):
1. Changed redirects to 301 permanent redirects in esa.js (line 183)
2. Enabled dead link checking in config.mts (ignoreDeadLinks: false)
3. Added sitemap generation (sitemap.hostname: https://ddns.newfuture.cc)
4. Added llms.txt generation via buildEnd hook for AI/LLM context
5. Created GitHub Actions workflow (.github/workflows/build-docs.yml) to build docs on push

Changes:
- esa.js: Clarified 301 redirect comment
- config.mts: Enabled dead link check, added sitemap config, added buildEnd hook for llms.txt
- .github/workflows/build-docs.yml: New workflow to build and optionally deploy docs

GitHub Action triggers on:
- Push to master/main (doc/, README*, schema/ paths)
- Pull requests
- Manual workflow dispatch

Build output includes sitemap.xml and llms.txt for better SEO and AI integration.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): update Node.js to v24, retention to 7 days, simplify BUILD_DOCS

Per user feedback (comment #3736833266):
1. Updated Node.js version from v20 to v24 in build-docs.yml (line 33)
2. Changed artifact retention from 30 to 7 days (line 50)
3. Simplified BUILD_DOCS.md - removed verbose explanations, kept essentials

Changes:
- .github/workflows/build-docs.yml: Node 24, 7-day retention
- BUILD_DOCS.md: Condensed from 327 to 40 lines, focused on quick start and essential commands

BUILD_DOCS.md now provides concise reference instead of lengthy tutorial.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor(docs): simplify link transformer, extract llms.txt template, add docs agent

Per user feedback (comment #3737275691):
1. Simplified markdown transformer to only process link (a tag) hrefs instead of code_inline tokens
2. Extracted llms.txt content to separate template file (doc/llms.txt) with:
   - Complete documentation structure with all page URLs
   - All schema file URLs (v4.0, v2.8, v2)
   - Template variable {{DATE}} for build-time replacement
3. Deleted BUILD_DOCS.md and created .github/agents/docs.agent.md:
   - Comprehensive documentation maintenance agent
   - Full guide for updating docs, navigation, providers
   - Build/test procedures and common tasks
   - Guidelines for writing and link handling

Changes:
- config.mts: Transform link hrefs (not inline code), read llms.txt from template
- doc/llms.txt: New template with full doc/schema URLs
- .github/agents/docs.agent.md: New documentation maintenance agent
- BUILD_DOCS.md: Deleted (replaced by agent instructions)

Link transformer now only modifies existing <a> tags, preserving markdown styling.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): add metadata to docs agent, fix markdown syntax, add v4.1.json schema

Per user feedback (comment #3737334654):
1. Added YAML metadata to docs.agent.md (name, description) following new-provider.agent.md format
2. Fixed markdown syntax to be GitHub-compatible:
   - Changed inline code blocks in list items to properly formatted code blocks
   - Ensured all code examples are in fenced code blocks
3. Added missing v4.1.json schema to llms.txt (was only showing v4.0, v2.8, v2)

Changes:
- .github/agents/docs.agent.md: Added YAML frontmatter, fixed markdown formatting
- doc/llms.txt: Added v4.1 schema URL (first in list as newest version)

All schema files now documented: v4.1, v4.0, v2.8, v2

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): restructure to docs/ directory with cleaner organization

Per user feedback (comment #3737399407):
1. Renamed doc/ → docs/
2. Moved all .en.md files → docs/en/*.md (removed .en suffix)
3. Moved install.sh → docs/install.sh (source file, not copied)
4. Moved favicon.ico → docs/favicon.ico (source file)
5. Simplified setup-docs.mjs - no longer copies English files or install.sh
6. Updated all path references:
   - GitHub Actions workflow: doc/ → docs/
   - .gitignore: doc/ → docs/
   - VitePress config: edit links now map to docs/
   - Documentation agent: updated structure docs

New Structure:
- docs/ (was doc/)
  - config/, providers/, dev/ (Chinese markdown)
  - en/ (English markdown, no .en suffix)
    - config/, providers/, dev/
  - install.sh (source)
  - favicon.ico (source)
  - llms.txt (template)

Build command unchanged: cd docs && npm run build

All English documentation now sourced directly from docs/en/ instead of being generated.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): update documentation links from /doc/ to docs/ in README files

Per user feedback (comment #3737497400):
1. Updated setup-docs.mjs to properly replace /doc/ → docs/ → / in README processing
2. Updated all /doc/ links to docs/ in README.md:
   - Image src: /doc/img/ddns.svg → docs/img/ddns.svg
   - Docker docs: /doc/docker.md → docs/docker.md
   - Config docs: /doc/config/* → docs/config/*
   - Provider docs: /doc/providers/* → docs/providers/*
3. Updated all /doc/ links to docs/en/ in README.en.md:
   - Image src: /doc/img/ddns.svg → docs/img/ddns.svg
   - Docker docs: /doc/docker.en.md → docs/en/docker.md
   - Config docs: /doc/config/*.en.md → docs/en/config/*.md
   - Provider docs: /doc/providers/*.en.md → docs/en/providers/*.md

Changes:
- docs/setup-docs.mjs: Two-step replacement (/doc/ → docs/ → /) for GitHub links
- README.md: All documentation links now use docs/ prefix
- README.en.md: All documentation links now use docs/en/ prefix

Verified: No /doc/ links remain in README files or .github markdown files.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): simplify setup script and move to .vitepress directory

Per user feedback (comment #3737562776):
1. Moved setup-docs.mjs to docs/.vitepress/ directory
2. Simplified link replacement logic:
   - Removed unnecessary /doc/ processing code
   - Now only converts docs/ → / (Chinese version)
   - And docs/en/ → / (English version)
   - Since README files already use correct docs/ prefix
3. Updated package.json script paths to reference .vitepress/setup-docs.mjs
4. Updated path variables in script to work from .vitepress/ location

Changes:
- docs/.vitepress/setup-docs.mjs: New location, simplified logic
- docs/package.json: Updated setup script path
- Removed obsolete /doc/ → docs/ replacement steps

Build process now simpler and cleaner.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): fix all broken documentation links

Per user feedback (comment #3737640946):
Fixed all broken links throughout the documentation:

1. Fixed providers/README links → providers/ (clean URL)
2. Removed all .en.md suffixes from links (files now in docs/en/ with .md extension)
3. Fixed /doc/ prefix references → proper docs/ paths
4. Fixed cross-references between Chinese and English docs:
   - Chinese providers/README.md → ../en/providers/*.md for English docs
   - English docs use relative paths within en/ directory
5. Fixed redirect_to URLs in dnscom.md files
6. Fixed image URL: /doc/img/ → /img/

Changes affect 28 files:
- All config documentation (cli.md, env.md, json.md) in both languages
- All provider documentation in both languages
- Developer documentation (dev/config.md)
- Docker documentation
- Provider README files

All dead links now resolved. Documentation navigation works correctly.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): fix remaining dead links in generated index.md and provider files

Per user feedback (comment #3737692822):
Fixed all remaining dead links:

1. Enhanced setup-docs.mjs to handle ./doc/ prefix links:
   - Added replacement for (./doc/ → (/
   - Added replacement for /providers/index → /providers/
   - Now correctly converts README links to clean web URLs

2. Fixed provider documentation links:
   - callback.md and debug.md: Added "Return to All Providers" links
   - English versions: Added /en/providers/ links
   - Removed broken ./../../README links

All dead links now resolved:
- ./doc/install → /install
- ./doc/providers/* → /providers/*
- ./doc/config/* → /config/*
- /providers/index → /providers/
- Provider files now link to /providers/ and /en/providers/

Dead link checking should now pass successfully.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): fix all remaining dead links in documentation

Per user feedback (comment #3737728554):
Fixed all remaining dead links throughout documentation:

1. Enhanced setup-docs.mjs:
   - Added replacement for ](doc/ pattern
   - Handles more link format variations

2. Fixed config files (6 files):
   - config/cli.md: providers/ → ../providers/, providers/callback → ../providers/callback
   - config/json.md: docker.md → ../docker.md, providers/ → ../providers/
   - en/config/env.md: providers/callback → ../providers/callback, docker → ../docker, providers/ → ../providers/
   - en/config/json.md: docker.md → ../docker.md, providers/ → ../providers/

3. Fixed provider files (6 files):
   - providers/callback.md, debug.md, README.md: ../../README.md → /
   - en/providers/callback.md, debug.md: ../../README.md → /en/
   - en/providers/he.md: ../json.md → ../config/json.md

All dead links resolved:
✓ ./providers/index → ../providers/
✓ ./providers/callback → ../providers/callback
✓ ./docker → ../docker
✓ ./../../README → / (or /en/)
✓ ../json → ../config/json
✓ ](doc/ → ](/

Dead link checking should now pass successfully with zero errors.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): add VitePress rewrites to map providers/README.md to /providers/

Per user feedback (comment #3737780259):
Fixed `/providers/index` dead links by adding VitePress rewrites configuration.

Changes to docs/.vitepress/config.mts:
1. Added rewrites mapping:
   - providers/README.md → providers/index.md
   - en/providers/README.md → en/providers/index.md
2. Updated sidebar links:
   - /providers/index → /providers/
   - /en/providers/index → /en/providers/

This tells VitePress that the README.md files in providers directories should be accessible via the /providers/ URL (with cleanUrls enabled).

All /providers/index links now correctly resolve to /providers/

Dead link checking should now pass with zero errors.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): fix providers/index links and simplify setup script

Per user feedback (comment #3737836475):
1. Fixed dead links in config/env.md files:
   - ./providers/ → ../providers/ (both Chinese and English)
2. Simplified setup-docs.mjs:
   - Removed unnecessary doc/ processing (README no longer contains doc/)
   - Merged logic for both README files into single processReadme function
   - Cleaner, more maintainable code with less duplication

Changes:
- docs/config/env.md: Fixed providers/ link
- docs/en/config/env.md: Fixed providers/ link
- docs/.vitepress/setup-docs.mjs: Refactored with shared function

Dead link checking should now pass with zero errors.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): remove providers/index replacement from setup script

Per user feedback (comment #3737887893):
Removed `/providers/index` → `/providers/` replacement from setup-docs.mjs.
This should be fixed in markdown files instead, not in the setup script.

Simplified setup script by removing unnecessary transformation logic.

Changes:
- docs/.vitepress/setup-docs.mjs: Removed line 29 replacement

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): update remaining /doc/ references to docs/ in README files

Per user feedback (comment #3737970179):
Updated all remaining /doc/ references to docs/ or docs/en/ in both README files.

Changes in README.md:
- doc/install.md → docs/install.md
- All doc/providers/*.md → docs/providers/*.md (10 provider links)

Changes in README.en.md:
- doc/install.en.md → docs/en/install.md
- doc/providers/dnspod.en.md → docs/en/providers/dnspod.md
- doc/providers/alidns.en.md → docs/en/providers/alidns.md

All documentation links now correctly use docs/ prefix for GitHub navigation.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(docs): update all remaining doc/ references to docs/ in README files

Per user feedback (comment #3738298603):
Updated ALL remaining doc/ references to docs/ or docs/en/ in both README files.

Changes in README.md (13 links):
- doc/providers/edgeone.md → docs/providers/edgeone.md
- doc/providers/noip.md → docs/providers/noip.md
- doc/config/cli.md → docs/config/cli.md (3 occurrences)
- doc/config/json.md → docs/config/json.md (2 occurrences)
- doc/config/env.md → docs/config/env.md (2 occurrences)
- doc/providers/ → docs/providers/ (3 occurrences)

Changes in README.en.md (13 links):
- doc/providers/*.en.md → docs/en/providers/*.md (9 provider links)
- doc/config/cli.en.md → docs/en/config/cli.md
- doc/config/json.en.md → docs/en/config/json.md
- doc/config/env.en.md → docs/en/config/env.md
- doc/providers/ → docs/en/providers/

All documentation links now use correct docs/ prefix with NO /doc/ references remaining.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(docs): integrate setup logic into config.mts

Per user feedback (comment #3738600577):
Integrated setup-docs.mjs functionality into config.mts.

Changes:
1. Removed standalone setup-docs.mjs file
2. Added setupDocs() function in config.mts that runs before config export
3. Simplified package.json scripts - removed setup step
4. Setup now runs automatically when config loads (works for both dev and build)

Benefits:
- Single configuration file - easier to maintain
- No separate setup script needed
- Automatic execution on both dev and build
- Cleaner package.json scripts
- Same functionality, simpler implementation

Build command: `npm run build` or `npm run docs:dev`

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* update link

* /doc/img/ddns.svg

* fix docs paths

* fix docs

* fix docs url

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-12 23:48:37 +08:00
d43d6108eb Convert issue templates to YAML format (#637)
* Initial plan

* feat: convert issue templates to YAML format with improvements

- Convert debug.md to bug_report.yml with structured form inputs
- Convert feature_request.md to feature_request.yml with simplified structure
- Convert new-dns-provider.md to new_dns_provider.yml with better organization
- Add config.yml for issue template configuration with links to docs and discussions
- Remove old Markdown templates (debug.md, feature_request.md, new-dns-provider.md, other-issues.md)
- Add dropdowns, required fields, and better field types for improved user experience

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix: update documentation URL to https://ddns.newfuture.cc

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/bug_report.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-05 10:02:36 +00:00
CopilotandNewFuture c3699f320a ci(macos): Update macOS Intel runners to macos-15-intel (#631)
* Initial plan

* ci: switch mac runners to macos-15-intel

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-12-21 03:26:38 +08:00
ecf25fb4e7 refactor(scripts): implement strict 3-step OpenAI workflow for issue assistance (#622)
* Initial plan

* refactor(scripts): implement strict 3-step OpenAI workflow for issue assistance

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* style(scripts): use const/let instead of var for better code clarity

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(scripts): remove classification requirement when requesting files

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(prompts): minimal modifications to issue-assistant.md based on master

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(scripts): simplify issue-ai-response.js logic using loop-based approach

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(scripts): split into 3 explicit queries with different user prompts

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(scripts): add logging for each query response for debugging

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(scripts): consolidate logging into callOpenAI function

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(scripts): simplify query logic with processResponse helper

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(scripts): remove files.length check and add detailed API error logging

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(prompts): simplify issue-assistant.md system prompt

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* update prompts

* fix

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
2025-12-03 18:35:49 +08:00
New FutureandCopilot 39f645a91b Revise issue assistant guidelines for clarity and tone (#621)
* Revise issue assistant guidelines for clarity and tone

Updated language for professionalism and clarity in the issue assistant guidelines.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-01 09:36:18 +00:00
New Future 880b6856e5 Handle error when reading required files 2025-12-01 13:46:45 +08:00
6780eed5c5 feat(prompts): restructure auto-reply-issue with two-step classification-based prompts (#619)
* Initial plan

* feat(prompts): update auto-reply-issue with two-step approach and word limits

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(prompts): simplify strategy injection logic in issue-ai-response.js

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(prompts): address code review feedback for strategy injection

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(prompts): include all strategies upfront for file selection guidance

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(prompts): consolidate issue response strategies and enhance AI response workflow

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(prompts): clarify turn counting in issue-assistant.md

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-01 13:35:14 +08:00
CopilotandNewFuture b431e313f1 feat(workflows): remove ai-assessment workflow and update auto-reply-issue trigger (#618)
* Initial plan

* feat(workflows): remove ai-assessment workflow and update auto-reply-issue trigger

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-11-30 06:00:54 +00:00
New Future 72afae1130 Fix scan_files function calls in main 2025-11-30 12:05:34 +08:00
7ea8312aab ci(agents): create issue instead of PR for AGENTS.md structure drift (#613)
* Initial plan

* ci(agents): update workflow to create issue instead of PR with copilot assignee

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(agents): remove dead code (unused sorted call)

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(agents): simplify script by removing hardcoded file descriptions

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(agents): simplify script, ignore images, check all documented files exist

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat(agents): support new 2-space indent format for directory structure

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(agents): use Tab indentation format, remove legacy tree format support

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(agents): optimize and simplify script (181 → 93 lines)

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor(agents): check output file instead of parsing stdout

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(agents): add format description for directory structure

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-30 03:47:07 +00:00
CopilotandNewFuture cb8ed219ce ci(workflow): extract repo index from AGENTS.md and add API rate limit delay (#610)
* Initial plan

* ci(workflow): update auto-reply-issue to extract from AGENTS.md and add rate limit delay

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* chore: change RATE_LIMIT_DELAY_MS default to 31000

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-11-29 16:22:21 +00:00
New Future 69012611c0 Rename test step for language detection help 2025-11-30 00:12:43 +08:00
3176b02925 ci(agents): add daily workflow to auto-update AGENTS.md directory structure (#607)
* Initial plan

* ci(agents): add workflow to auto-update AGENTS.md directory structure

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor(agents): remove unused functions and add type hints

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update .github/scripts/update_agents_structure.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-29 19:24:51 +08:00
1eab38669d ci: implement multi-turn AI conversation for issue analysis (#606)
* Initial plan

* ci: change auto-reply-issue workflow trigger from opened to labeled

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* ci: restrict auto-reply trigger to 'AI Review' label only

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* ci: implement multi-turn AI conversation for issue analysis

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* ci: extract AI response script to separate JS file

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: restore temperature to 1 and improve last turn handling

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: remove unreachable else block in turn handling

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: extract binary file check into helper function

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: improve error message with optional chaining

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor: simplify turn limit handling by removing redundant condition

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/scripts/issue-ai-response.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: use StringDecoder for proper UTF-8 handling and increase MAX_FILES_PER_TURN to 10

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update .github/scripts/issue-ai-response.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: update prompt to match MAX_FILES_PER_TURN constant (10 files)

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/scripts/issue-ai-response.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-28 09:54:31 +00:00
Copilot 21539a6cb4 fix(config): create parent directories for log file automatically (#600) 2025-11-21 00:17:09 +08:00
New Future 9b53abb6a2 Add New Provider Agent documentation
Added metadata for New Provider Agent in the documentation.
2025-11-19 18:34:36 +08:00
New Future af081a5ecf rename agent 2025-11-19 17:26:32 +08:00
180b6efb78 feat(ci): use JSON format and auto-convert file references to URLs in issue replies (#597)
* Initial plan

* feat(ci): improve auto-reply-issue with JSON format and URL conversion

- Update system prompt to request JSON response format instead of text tag
- Add JSON parsing with fallback to legacy format for backward compatibility
- Add automatic URL conversion for markdown doc references (doc/*.md -> https://ddns.newfuture.cc/doc/*.html)
- Add automatic URL conversion for code file references (ddns/*.py -> GitHub links)
- Add response_format: json_object to API request for structured responses
- Add comprehensive file reference guidelines in system prompt

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(ci): remove redundant URL conversion mentions from AI prompt

The URL conversion is handled in the workflow code, so the AI prompt should only instruct to use backticks with relative paths, not mention the post-processing conversion.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(ci): let AI generate markdown links directly in response

Simplify workflow logic by having AI output markdown links directly instead of post-processing. This makes the code simpler and reduces complexity in the workflow.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-18 07:36:19 +00:00
New Future 5d1694609e Update question.prompt.yml 2025-11-17 15:28:36 +08:00
New Future 8500fe3760 Update feature-request.prompt.yml 2025-11-17 15:28:19 +08:00
New Future 468df16328 Update bug-review.prompt.yml 2025-11-17 12:30:01 +08:00
f99fd8f0b3 feat(provider): add EdgeOne DNS provider for non-accelerated domain records (#588)
* Initial plan

* feat(provider): add EdgeOne DNS provider for non-accelerated domains

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(provider): add EdgeOne DNS documentation for non-accelerated domains

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(provider): update EdgeOne provider aliases per feedback

- Acceleration domains: edgeone, edgeone_acc, teo_acc
- DNS records: edgeone_dns, teo_dns, edgeone_noacc
- Removed: teo, tencentedgeone, neo_acc, neo
- Updated documentation to reflect new aliases

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(provider): add extra parameter support and update documentation index

- Add edgeone_dns to provider index documentation (README.md)
- Add "teo" alias for backward compatibility (not documented)
- Enable EdgeOneProvider to support both acceleration and DNS records via extra['dns_record'] parameter
- Update provider aliases and documentation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs: create comprehensive new-provider agent guide

- Add detailed step-by-step guide for creating new DNS providers
- Include API analysis, implementation, testing, and documentation steps
- Provide code templates and examples for both BaseProvider and SimpleProvider
- Add completion checklist and common pitfalls
- Document all requirements including compatibility checks and index updates

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(provider): change extra parameter from dns_record to teoDomainType

- Change EdgeOneProvider to use teoDomainType parameter instead of dns_record
- Support values: "dns" or "acceleration" (default)
- Parameter is case-insensitive
- EdgeOneDnsProvider now uses extra parameter to control behavior
- All 55 tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(provider): simplify EdgeOneDnsProvider with helper method

- Extract common extra parameter preparation into _prepare_extra() method
- Reduces code duplication across _query_record, _create_record, _update_record
- All 55 tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(provider): make EdgeOneDnsProvider more elegant and concise

- Use class attribute _default_domain_type = "dns" for clarity
- Replace _prepare_extra() with inline setdefault() for more Pythonic code
- setdefault() allows users to override teoDomainType if needed
- All 55 tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(provider): use options instead of extra for teoDomainType

- Move teoDomainType from per-call extra to instance-level options
- More appropriate since provider type is fixed per instance
- EdgeOneProvider reads teoDomainType from self.options at initialization
- EdgeOneDnsProvider sets teoDomainType="dns" in __init__
- Simplified implementation: 28 lines vs 43 lines for EdgeOneDnsProvider
- All 55 tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(provider): support both extra and options for teoDomainType with priority

- Remove __init__ from EdgeOneProvider, read directly from self.options
- Support teoDomainType in both extra (per-call) and options (initialization)
- extra parameter has higher priority than options
- Priority: extra > options > default ("acceleration")
- All 55 tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(provider): add teoDomainType parameter documentation for EdgeOne

- Document how to switch between acceleration domains and DNS records
- Explain extra.teoDomainType parameter usage
- Add configuration examples for both modes
- Update parameter tables with teoDomainType and extra
- Document priority: extra > initialization parameter
- Add bilingual documentation (Chinese and English)

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(provider): remove initialization parameter config example from EdgeOne

- Remove the example showing teoDomainType via initialization parameters
- Only document usage via extra parameter
- Remove priority note since only one method is documented
- Keep recommendation to use EdgeOneDnsProvider for cleaner code
- Update both Chinese and English documentation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(agent): update new-provider guide with relative paths and schema notes

- Update CLI compatibility note to mention checking --dns parameter choices
- Change schema note to only require v4.0 (latest format) updates
- Replace "multi-provider format" with "latest schema format"
- Convert all absolute paths to relative paths from project root
- Remove /home/runner/work/DDNS/DDNS/ prefix from all file paths

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(agent): correct latest schema version to v4.1

- Update schema compatibility section to reference v4.1 instead of v4.0
- v4.1 is the latest schema format that requires updates

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(config): add edgeone_dns to CLI and schema v4.1

- Add edgeone_dns to CLI --dns parameter choices
- Add edgeone_dns to schema v4.1 provider enum (both legacy and multi-provider sections)
- Update provider descriptions to include EdgeOne DNS

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor labels_to_prompts_mapping format

* fix(provider): filter teoDomainType from extra params before API call

- Remove teoDomainType from extra dict before passing to Tencent Cloud API
- Fixes "UnknownParameter - The parameter `extra_teoDomainType` is not recognized" error
- teoDomainType is internal parameter for routing, not for API requests
- All 55 tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(provider): update schema references to v4.1.json in EdgeOne docs

- Update all $schema references from v4.0.json to v4.1.json
- Applied to edgeone.md, edgeone.en.md, edgeone_dns.md, edgeone_dns.en.md
- Ensures documentation references the latest schema format

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Changes before error encountered

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): preserve nested extra dict from JSON/ENV config

- Process "extra" dict before extra_ prefixed keys to avoid flattening
- Fixes issue where {"extra":{"teoDomainType":"dns"}} was incorrectly transformed to {"extra_teoDomainType":"dns"}
- Maintains backward compatibility with extra_ prefixed keys
- Priority: explicit extra dict > extra_ prefixed keys > unknown keys

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/test_provider_edgeone_dns.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/test_provider_edgeone_dns.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* style: apply ruff formatting fixes

- Format 9 files with ruff
- Fix 2 linting issues automatically
- One complexity warning remains (C901) but doesn't affect functionality
- All code now follows consistent formatting standards

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(agent): add ruff installation instructions to new-provider guide

- Add pip3 install ruff command before formatting/linting steps
- Ensures developers have required tools before running verification
- Prevents common setup errors

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(config): clarify extra dict and extra_ prefix priority within config sources

- Add comments explaining that extra_ prefixed keys override nested extra dict values within the same source
- Improves code documentation clarity for config flattening logic
- Addresses feedback about intra-source priority ordering

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(config): reduce complexity of _collect_extra method

- Extract _process_extra_from_source helper method to reduce cyclomatic complexity
- Fixes ruff C901 error (complexity was 14, now under threshold)
- Maintains all existing functionality and test coverage
- All 60 extra-related tests passing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-15 16:44:59 +00:00
CopilotandNewFuture 28e70e9bf5 feat(workflow): include issue title in AI assessment and use JSON response format (#595)
* Initial plan

* feat(workflow): include issue title in AI assessment input

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(prompts): use JSON response format with markdown body

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-11-15 10:02:04 +00:00
New Future 8ccee2bed1 Comment out assessment_regex_pattern in workflow
Commented out the assessment_regex_pattern line in the AI assessment workflow.
2025-11-15 17:17:44 +08:00
New Future eb5274a986 Modify assessment regex pattern for case insensitivity
Updated assessment regex pattern to be case-insensitive.
2025-11-15 17:09:46 +08:00
New Future 24656358c3 Update AI assessment action to use main branch 2025-11-15 17:05:33 +08:00
New Future 4dc5e9a7c3 Refactor labels_to_prompts_mapping format 2025-11-15 17:02:50 +08:00
4ed2caf0fb feat(workflow): integrate github/ai-assessment-comment-labeler for automated issue triage (#593)
* Initial plan

* feat(workflow): add ai-assessment-comment-labeler integration with prompt files

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(workflow): add AI assessment documentation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update .github/prompts/question.prompt.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/ai-assessment.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/ai-assessment.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/ai-assessment.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/ai-assessment.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/ai-assessment.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/AI_ASSESSMENT.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/prompts/question.prompt.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/ai-assessment.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs(prompts): add multilingual documentation references to bug-review and feature-request prompts

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-15 08:33:22 +00:00
New Future d8b497a18f Increase max_completion_tokens to 2000 2025-11-15 01:00:25 +08:00
New Future bc272957c4 Increase temperature setting in auto-reply workflow 2025-11-15 00:58:06 +08:00
CopilotandNewFuture e489de6d7d fix(workflow): use max_completion_tokens for Azure OpenAI API (#589)
* Initial plan

* fix(workflow): use max_completion_tokens for Azure OpenAI API

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(workflow): increase max_completion_tokens to 1500

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-11-14 16:45:04 +00:00
8760c2bb05 feat(workflow): add Azure OpenAI auto-reply with classification and labeling for new issues (#585)
* Initial plan

* feat(workflow): add auto-reply action for new issues with Azure OpenAI

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(workflow): add documentation for auto-reply action

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(workflow): simplify auto-reply action per feedback

- Remove run count check in code (as requested)
- Remove Python script and use GitHub Actions script directly
- Move system prompt to markdown file (.github/prompts/issue-assistant.md)
- Add skip logic for issues with 'copilot' label
- Simplify workflow to single step using github-script action

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(workflow): remove AI_TOKEN, use only OPENAI_KEY

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* chore(workflow): upgrade github-script from v7 to v8

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(workflow): remove automatic /chat/completions URL appending logic

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(workflow): add API response structure validation

Add validation to ensure Azure OpenAI API response contains expected structure before accessing nested properties. Prevents runtime errors if API returns unexpected response format.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(workflow): add repository index for AI context

Build and cache repository index including:
- Project structure and core modules
- Available DNS providers list
- Recent commits (last 5)
- Available documentation files

This provides the AI with up-to-date knowledge of the codebase, enabling more accurate and contextual responses to issues.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(prompt): respond in same language as issue content

Changed from always using Chinese to detecting and matching the issue's language. The AI will now respond in Chinese, English, or other languages based on the issue title and content.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(workflow): add automatic issue classification and labeling

- AI now classifies issues as bug, feature, or question
- Classification tag added to prompt with clear instructions
- Workflow extracts classification from AI response
- Automatically adds appropriate label to issue
- Classification tag removed from public comment
- Graceful error handling if label addition fails

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(prompt): add classification-specific response strategies

Enhanced AI response guidelines with specific strategies for each issue type:
- Bug: Analyze, locate root cause, provide troubleshooting steps
- Feature: Assess feasibility, confirm requirements, check conflicts
- Question: Provide direct answers, reference docs, explain usage

Added comprehensive guidance for requesting additional information with specific instructions on collecting logs, configs, and error details.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update .github/prompts/issue-assistant.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-14 15:52:24 +00:00
CopilotandNewFuture 8eb16b0043 fix(workflows): pass GITHUB_REF_NAME to workflows for correct version in extraction path (#579)
* Initial plan

* fix(docker): add GITHUB_REF_NAME to Dockerfile for correct version extraction path

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(workflows): add GITHUB_REF_NAME env to patch.py docker steps

The patch.py docker command runs on the GitHub Actions runner before the Docker build, but it didn't have access to GITHUB_REF_NAME environment variable. This caused it to fall back to the hardcoded version 4.0.0.devXXXXX.

Added GITHUB_REF_NAME environment variable to the workflow steps that run patch.py docker in both publish.yml and build.yml. This complements the Dockerfile fix by ensuring version is correct at both stages:
1. Pre-patch on runner (now fixed)
2. Patch inside Docker build (already fixed in previous commit)

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* revert: remove GITHUB_REF_NAME from Dockerfile and revert http.py changes

As requested, reverted the Dockerfile changes (ARG/ENV GITHUB_REF_NAME) and the http.py changes (Python 2/3 compatibility removal that was an unintended side effect).

The fix now only modifies the workflow files (publish.yml and build.yml) to set GITHUB_REF_NAME environment variable for the patch.py docker steps that run on the GitHub Actions runner.

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* revert: restore http.py try/except for Python 2/3 compatibility

The previous commit only reverted the Dockerfile. This commit properly restores the http.py file to its original state with Python 2/3 compatibility (try/except blocks).

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-11-09 14:20:28 +00:00
f74438cb82 fix: add missing packages to pip distribution (config and scheduler) (#572)
* Initial plan

* chore: initial investigation - reproduce pip install issue

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(pyproject): add missing packages config and scheduler to pip distribution

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* test(ci): add pip install verification tests to GitHub Actions

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(ci): improve pip install test commands for better error handling

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(ci): use find command for more robust file selection in pip tests

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* revert(init): restore placeholder values for BUILD_VERSION and BUILD_DATE

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
2025-10-21 16:08:54 +00:00
CopilotandNewFuture aba52bc517 fix(cloudflare): DNS record query conditions - Boolean encoding and extra filter fallback (#571)
* Initial plan

* Fix Boolean values in URL parameters and add fallback logic for extra filters

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Add documentation for extra filter and fallback behavior

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs: improve formatting consistency in documentation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor: move boolean conversion to cloudflare.py and simplify _query_record

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* chore: fix ruff linting issues and add format commands to copilot instructions

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-10-20 15:51:13 +00:00
1600e57aff feat(config): add support for extra configuration fields (#562)
* Initial plan

* feat(config): add extra field support to Config class

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(config): complete extra field implementation with documentation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(config): add practical examples for extra fields usage

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): remove func from known_keys, delete docs, update schema

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): revert v4.0.json changes and fix lint/format issues

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Remove statistics option from ruff-action args

* Update ddns/config/cli.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(config): fix lint error and Python 2.7 compatibility

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): remove redundant extra unpacking in provider init

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): make set_record call Python 2.7 compatible

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-13 17:06:56 +08:00
CopilotandNewFuture f58db1af0a fix(ci): extend Windows x86 timeout to 20 minutes in publish workflow (#559)
* Initial plan

* fix(ci): extend Windows x86 timeout to 20 minutes in publish workflow

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-10-11 11:36:55 +08:00
New Future 6f5984c588 fix(scheduler ): scheduler path and check (#550) 2025-08-16 01:20:09 +00:00
New Future 1463020411 fix(scheduler): 优化 Windows 打包和定时任务 and command executio… (#547)
* feat(scheduler): enhance Windows task scheduling and command execution handling
fix(install): update version fetching logic in installation script
test(scheduler): refactor tests to remove VBS script dependency and validate command execution

* feat(versioning): enhance version resolution logic and update release links in documentation

* feat(scheduler): improve DDNS command retrieval and set working directory for task scheduling

* test: update command assertions to handle list output and improve readability

* fix: update curl command to use progress meter in installation scripts and documentation

* fix: adjust packaging to include contents of .dist folder directly and update release notes for EXE warnings

* feat: add Windows app build and packaging steps to publish workflow
2025-08-13 17:02:44 +00:00
New Future b9bd2ab333 ci:update patch release 2025-08-11 12:37:31 +00:00
09af9a094d feat(install): 一键安装脚本 add POSIX-compatible one-click installation script with multilingual support and comprehensive testing (#546)
* Initial plan

* feat(install): add one-click installation script with multi-platform support

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(install): address review feedback - POSIX sh compatibility, multilingual support, API proxy, and CI tests

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(install): address feedback - simplify logic, update URLs, add OpenWrt testing, improve sudo handling

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* update scripts

* mv test scripts

* update test scirpts

* update tests

* fix tests

* fix ci

* update test

* fix tests

* set-ua

* fix tests in docker

* fix tests

* fix version

* fix version check

* fix tests

* fix proxy

* fix tests

* enhance download functionality with timeout and improved SSL handling

* update proxy validation to use a real release asset for improved reliability

* fix proxy

* fix download result code

* fix test proxy

* fix ertry

* fix retry

* info message

* update README and installation scripts to support remote URL and proxy configuration

* wget 兼容

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix libc detect

* fix beta check

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-10 18:11:22 +00:00
f7a92b3903 chore(lint): replace flake8 and black with ruff for unified linting and formatting (#544)
* Initial plan

* feat: replace flake8 and black with ruff for unified linting and formatting

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor: use astral-sh/ruff-action@v3 for cleaner CI workflow

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* run format

* use fmt skip

* fix cloudflare

* fix cron

* fix cron

* fix fileio tests

* fix fileio tests

* fix cron

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
2025-08-09 11:29:35 +08:00
6c24557505 feat(cli): add task subcommand for automated scheduled task management (#541)
* Initial plan

* feat(cli): implement task subcommand with cross-platform scheduler support

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(cli): add task subcommand documentation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(cli,task): address review feedback - move task handler to cli, remove defaults, improve fallback status checking

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor(task): convert TaskManager class to functions and handle task commands entirely in CLI

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(cli,tests): remove handle_task_command from exports and rename test file

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(task): add enable and disable commands for scheduled tasks

* add task tests

* refactor(task): simplify task command handling and update status retrieval

* update task

* test(task): update subcommand tests to assert exit codes and rename delete to uninstall

* Add unit tests for DDNS task subcommand functionality and enhance existing tests

- Introduced comprehensive unit tests for the DDNS task subcommand, covering help, status, install, enable, disable, delete, and argument handling.
- Added tests for file I/O operations in the ddns.util.fileio module, ensuring proper directory creation, file reading/writing, and error handling.
- Enhanced test coverage for task scheduling functions, including systemd and cron installations, with additional checks for argument handling.
- Updated existing tests to improve compatibility and reliability across different operating systems, particularly for path handling on Windows.
- Refactored task command building tests to ensure correct command generation with various argument types, including lists and boolean flags.

* refactor(task): improve command execution and path handling for DDNS tasks

* remove DEVNULL

* fix(task): ensure proper task interval handling and add sudo for task commands in test script

* add and fix tests

* fix lint

* refactor(cli): organize DDNS arguments into groups and improve task subcommand handling

* fix tests

* +x

* fix py2 and types

* rm sudo

* fix(tests): use sudo for task installation and uninstallation in test script

* update test command

* always force

* fix format

* docs: add task management parameters and usage examples to CLI documentation

* update log

* docs: update CLI task management instructions and examples

* fix py2

* fix task in python2

* fix lint

* refactor tasks

* update tests

* add schtasks-based task scheduler implementation and unit tests

* Enhance scheduler functionality and improve error handling

- Added a 60-second timeout to subprocess calls in BaseScheduler to prevent hanging.
- Improved error logging in BaseScheduler to capture command failures.
- Refactored CronScheduler to remove unnecessary variable initialization.
- Updated SystemdScheduler to handle PermissionError and provide user feedback for permission issues.
- Enhanced file I/O functions in fileio.py to return default values on exceptions.
- Improved unit tests for scheduler classes to ensure robust testing of functionality and error handling.
- Added lifecycle operation tests for SystemdScheduler to validate install, enable, disable, and uninstall processes.
- Ensured consistent status reporting across multiple calls in SystemdScheduler.
- Cleaned up test code for better readability and maintainability.

* fix lint

* Refactor scheduler command execution and enhance error handling in BaseScheduler and LaunchdScheduler tests

* fix tests

* Add unittest configuration to settings and improve SchtasksScheduler error handling

* Refactor code for improved readability and maintainability in various test files and the DnspodProvider class

* Refactor LaunchdScheduler tests for improved readability and error handling

* fix py2

* fix mac launchd test

* fix lint

* fix macos tests

* fix windows test

* patch readme

* update doc

* Update tests/test_scheduler_cron.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-07 17:58:43 +00:00
e66dcf0240 feat(config): 支持远程配置文件 add remote HTTP(S) config loading support (#539)
* Initial plan

* feat(config): add remote HTTP(S) configuration loading support

- Add URL detection in load_config() function to support remote configuration files
- Leverage existing ddns.util.http module for HTTP requests with proxy, SSL, and auth support
- Support embedded authentication in URLs (https://user:pass@host/config.json)
- Maintain full backward compatibility with local file loading
- Skip file existence check for URLs in config path validation
- Add comprehensive test suite with 16 test cases covering various scenarios
- Support all existing configuration formats including v4.1 providers format
- Pass proxy and SSL settings from CLI/environment to HTTP requests

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): address code review feedback for remote config loading

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* docs(config): add remote HTTP(S) configuration examples and update README

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config): Python 2 compatibility and code structure improvements

- Fix Python 2.7 compatibility in test_config_file_remote.py:
  - Remove encoding parameter from open() function
  - Add proper try/except import for URLError (Python 2/3 compatibility)
- Extract proxy and SSL parameter extraction outside function call in config/__init__.py
- Move remote config example from main README list to CLI usage examples section

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix(config,docs): address PR feedback and lint issues

- Remove remote config from README feature list, add as example code instead
- Fix proxy_settings fallback chain in config/__init__.py
- Add HTTP response body logging in config/file.py and fix line length
- Add real integration test for https://ddns.newfuture.cc/tests/config/debug.json
- Fix all flake8 lint issues: remove unused imports, clean whitespace

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update ddns/config/file.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(docs,test,build): update README.en.md, add real remote tests, and improve test skipping logic

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(http): add default user-agent and fix lint issues

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* feat(http): implement default user-agent handling and update related tests

* feat(http): add default User-Agent handling in request function and enhance related tests

* fix(tests): update proxy handling in multi-config tests and improve user agent type check

* fix(http): add retry logic to remote config loading and improve error messages

* chore(tests): update test structure for multi-config functionality

* fix(tests): remove unnecessary CLI argument mock in multi-config test

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-22 01:46:01 +00:00
96b4ca2e0c feat(config): 支持多配置文件和多服务商 优化http support multi config/providers (#531)
* Initial plan

* Implement multi-provider and multi-config file support

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Complete multi-provider and multi-config support with comprehensive testing

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Address code review feedback: fix exit behavior, remove special env handling, fix log level

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Add object-with-configs array support for improved JSON schema validation

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Address code review feedback: simplify config path handling, remove load_config function, and improve debug provider logic

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Address final code review feedback: improve log handling, provider logging, and debug assignment logic

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Address final review feedback: simplify debug provider logic and remove array format support

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Fix lint issues: remove whitespace from blank lines and apply black formatting

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Implement schema v4.1 with multi-provider support using providers array format

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Address code review feedback: rename tests, use global log settings, simplify config logic, remove configs format support

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Fix lint issues and simplify complex functions to reduce cyclomatic complexity

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Address code review feedback: enhance config functions and inline simple logic

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Fix Python 2.7 compatibility and lint issues in test_config_schema_v4_1.py

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Simplify config logic, fix Python 2.7 compatibility, and improve code formatting

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Optimize config logic and enhance schema v4.0/v4.1 compatibility tests

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* Update file.py

* Update file.py

* Update file.py

* Update file.py

* Fix critical bug in multi-provider config processing and clean up lint issues

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* fix

* 优化测试代码格式,移除多余空行并调整注释位置
* refactor: update HTTP request handling and improve error processing

- Refactored imports for better clarity and organization.
- Added custom HTTP error processor to handle all HTTP error status codes gracefully.
- Enhanced SSL certificate loading with additional paths for Windows.
- Updated test cases to use HTTP instead of HTTPS for testing endpoints.
- Added tests for handling HTTP 400 Bad Request and SSL auto fallback behavior.

* update http

* update docs

* refactor: enhance SSL handling in SSLAutoFallbackHandler for better compatibility

* add multi tests

* fix patch and add rename fileds

* refactor: update provider field naming in configuration tests for consistency

* update doc link

* fix encoding

* fix

* 清理编码问题

* fix 编码问题

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
2025-07-17 18:54:09 +00:00
New FutureandCopilot 0eea4c6850 doc(providers): all providers doc (#522)
* doc(providers): all providers doc

- Enhanced No-IP documentation with clearer authentication methods and examples.
- Added official links and improved parameter descriptions for No-IP.
- Updated TencentCloud documentation to streamline API key acquisition and configuration examples.
- Improved troubleshooting sections for both providers, including common issues and error codes.
- Standardized JSON configuration examples across both providers.
- Added schema validation reference in configuration examples.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-14 16:35:13 +00:00
New Future 458f354067 fix(http): fix and refactor http (#520)
* refact(http): simplify connection handling and utilize urllib's built-in redirect support

* refact(HttpResponse): 修改头部处理方式,支持不区分大小写的查找

* feat(ip): 添加SSL验证配置并优化HTTP请求处理

* refact(ip): 修改导入方式,优化模块结构

* fix error log tests

* fix tests

* revert: restore test_provider_dnspod.py to master state

* add noip tests

* 更新构建工作流,移除冗余的可执行文件测试;在HTTP请求测试中添加真实API请求和JSON响应解析的测试用例
2025-07-13 17:36:35 +00:00