Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ package-lock.json
test.jpg
.serena/
.pnpm-store/
test.js
test.js
specs/
.env
openspec/
40 changes: 40 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- OPENSPEC:START -->
# OpenSpec Instructions

These instructions are for AI assistants working in this project.

Always open `@/openspec/AGENTS.md` when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
- Sounds ambiguous and you need the authoritative spec before coding

Use `@/openspec/AGENTS.md` to learn:
- How to create and apply change proposals
- Spec format and conventions
- Project structure and guidelines

Keep this managed block so 'openspec update' can refresh the instructions.

Always ask questions before create proposal files if unsure about anything in these instructions or the spec file.

<!-- OPENSPEC:END -->

# PicGo-Core: Agent Notes

## Package Manager / Dependency Installation
- This repo uses `pnpm` (has `pnpm-lock.yaml`).
- If dependencies change, do not only edit `package.json`; run `pnpm install` to ensure deps + lockfile are consistent. Only run this when the user explicitly asks/coordinates it.
- In non-TTY environments, `pnpm install` may fail with `ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY`; use `CI=true pnpm install`. Only run this when the user explicitly asks/coordinates it.

## Code Conventions
- **Exports**: do not use `export default` for new/modified modules. Prefer named exports (e.g. `export { ServerManager }`) and named imports (e.g. `import { ServerManager } from '...'`).
- Keep TypeScript types explicit; avoid ad-hoc `any` when possible.
- Don't write `as any` in TypeScript code unless absolutely necessary. Always prefer explicit types.
- **Config persistence**: use `ctx.saveConfig(...)` for changes that must persist to disk; use `ctx.setConfig(...)` only for in-memory/session updates.

## Execution Rules
- If a command fails due to insufficient permissions, rerun with elevated approval.
- For `pnpm` commands that hit network issues, retry first.

## Serena MCP & Context7 Tools
When starting work or if you hit issues, try checking MCP for Serena or Context7 tooling. If available, use those tools to navigate, edit, or fetch docs efficiently.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ $ picgo -h
install|add <plugins...> install picgo plugin
uninstall|rm <plugins...> uninstall picgo plugin
update <plugins...> update picgo plugin
set|config <module> [name] configure config of picgo modules
set <module> [name] configure config of picgo modules
upload|u [input...] upload, go go go
use [module] use modules of picgo
init [options] <template> [project] create picgo plugin\'s development templates
```

Note: the plugin's template initializer has moved to the standalone [picgo-init](https://github.com/PicGo/PicGo-Init) package.

You can use the following command to init a picgo plugin template:

```bash
npx picgo-init plugin <your-plugin-folder>
```

#### Upload a picture from path
Expand Down
17 changes: 4 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
},
"scripts": {
"start": "node ./bin/picgo",
"lint": "eslint src --ext .ts",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint src --ext .ts && tsc --noEmit",
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint script now includes "tsc --noEmit" which is a good practice to catch TypeScript type errors during linting. However, this change should be explicitly mentioned in the PR description as it makes the lint step potentially slower and may catch new type errors that weren't detected before.

Copilot uses AI. Check for mistakes.
"build": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js",
"dev": "cross-env NODE_ENV=development rollup -c rollup.config.js -w",
Comment on lines 17 to 18
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test script has been changed to run "vitest run", and vitest has been added as a devDependency, but there is no vitest.config.ts file and no test files are present in the repository. Without a configuration file, vitest will use defaults which may not be appropriate for this project's structure. Consider adding a vitest.config.ts file or removing the test infrastructure until tests are actually implemented.

Copilot uses AI. Check for mistakes.
"patch": "npm version patch && git push origin master && git push origin --tags",
Expand Down Expand Up @@ -56,19 +55,15 @@
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.3.0",
"@types/cross-spawn": "^6.0.0",
"@types/ejs": "^3.0.5",
"@types/fs-extra": "^5.0.4",
"@types/glob": "^7.2.0",
"@types/image-size": "^0.0.29",
"@types/inquirer": "^0.0.42",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.175",
"@types/md5": "^2.1.32",
"@types/mime-types": "^2.1.0",
"@types/minimatch": "^3.0.3",
"@types/node": "20.19.26",
"@types/resolve": "^0.0.8",
"@types/rimraf": "^3.0.0",
"@types/tunnel": "^0.0.3",
"@typescript-eslint/eslint-plugin": "^8.49.0",
"@typescript-eslint/parser": "^8.49.0",
Expand All @@ -87,6 +82,7 @@
"rollup": "^4.53.3",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-string": "^3.0.0",
"rimraf": "^6.1.2",
"typescript": "^5.9.3"
},
"dependencies": {
Expand All @@ -95,25 +91,20 @@
"axios": "^1.13.2",
"chalk": "^2.4.1",
"commander": "^8.1.0",
"comment-json": "^2.3.1",
"comment-json": "^4.5.1",
"cross-spawn": "^6.0.5",
"dayjs": "^1.7.4",
"ejs": "^3.1.10",
"form-data": "^4.0.5",
"fs-extra": "^6.0.1",
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment-json dependency has been upgraded from "^2.3.1" to "^4.5.1", which represents a major version bump (v2 to v4). This could introduce breaking changes in how JSON with comments is parsed or handled. Ensure that all usages of comment-json throughout the codebase are compatible with version 4.x API changes.

Copilot uses AI. Check for mistakes.
"giget": "^2.0.0",
"globby": "^11.0.4",
"image-size": "^0.8.3",
"inquirer": "^6.0.0",
"is-wsl": "^2.2.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"md5": "^2.2.1",
"mime-types": "3.0.2",
"minimatch": "^3.0.4",
"minimist": "^1.2.5",
"resolve": "^1.8.1",
"rimraf": "^6.1.2",
"tunnel": "^0.0.6"
},
"repository": {
Expand All @@ -125,6 +116,6 @@
},
"plugins": {},
"engines": {
"node": ">= 20.0.0"
"node": ">= 22.12.0"
}
}
Loading