{"owner":"go-gitea","repo":"gitea","hasSkills":true,"totalSkillsCount":3,"totalTokensCount":3860,"categories":["root-instruction","plugin-manifest","anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md","routers/api/packages/README.md","tools/generate-svg-vscode-extensions.json"],"skills":{"AGENTS.md":"- Never assume, verify before claiming\n- List development targets with `make help`\n- Read relevant developer documentation in the `docs` folder\n- PR descriptions: minimal, only what and why, no task or file listings. Include screenshots for UI changes, before and after when modifying existing UI. Aim for less than 1000 characters\n- Reference issues and PRs by full URL, not by number\n- Use Conventional Commits for commit messages and PR titles, plus Gitea's `enhance` type for user-facing enhancements\n- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` trailer to commit messages, never `Co-Authored-By` or `Signed-off-by`\n- Attribute agent authorship on one trailing line in issue and PR comments, never as a PR description section\n- Never rewrite git history unless asked, update PRs with new commits and normal push\n- Comments: write almost none, short and preferably same-line, explaining why for a future reader. Never narrate code, the change or the prompt. Preserve existing ones that still apply. If you need to write a paragraph-long comment, rethink your implementation, it is likely too complicated\n- Add the current year to copyright headers of new `.go` files\n- In `options/locale`, only edit `locale_en-US.json`, other locales are synced automatically\n- In TS, use `!` instead of `?.`/`??` when a value always exists\n- In Go, prefer to use modern language features wherever possible\n- In Go, function-name prefixes in errors like `fmt.Errorf(\"Foo: %w\", err)` must always name the function they are in\n- Write sizes as multiplications like `64 * 1024`, not bit shifts like `64 << 10`\n- Prefer `tw-*` utilities over inline `style` and `flex-*` helpers over per-child `tw-ml-*`/`tw-mr-*` margins, falling back to `tw-*` where specificity requires `!important`\n- Run `make fmt` after `.go` edits, `make tidy` after `go.mod` edits, `make generate-swagger` after API changes, and lint what changed with `make lint-go`, `lint-js`, `lint-css` or `lint-templates`\n- Fix the cause rather than disabling a linter or weakening a test. Where unavoidable, use the narrowest scope with a trailing comment giving the reason\n- Run single tests with `go test -run '^TestName$' ./modulepath/` for Go, `pnpm exec vitest <path-filter>` for TS and `GITEA_TEST_E2E_FLAGS='<filepath>' make test-e2e` for e2e\n- Write the fewest, fastest tests covering the behavior, extending an existing one where possible. Prefer unit tests where logic is testable in isolation\n- Aim for sub-2s per integration test and sub-4s per e2e test. Wait on a deterministic condition rather than `sleep`, and prefer semantic locators in e2e tests\n","routers/api/packages/README.md":"# Gitea Package Registry\n\nThis document gives a brief overview how the package registry is organized in code.\n\n## Structure\n\nThe package registry code is divided into multiple modules to split the functionality and make code reuse possible.\n\n| Module | Description |\n| - | - |\n| `models/packages` | Common methods and models used by all registry types |\n| `models/packages/<type>` | Methods used by specific registry type. There should be no need to use type specific models. |\n| `modules/packages` | Common methods and types used by multiple registry types |\n| `modules/packages/<type>` | Registry type specific methods and types (e.g. metadata extraction of package files) |\n| `routers/api/packages` | Route definitions for all registry types |\n| `routers/api/packages/<type>` | Route implementation for a specific registry type |\n| `services/packages` | Helper methods used by registry types to handle common tasks like package creation and deletion in `routers` |\n| `services/packages/<type>` | Registry type specific methods used by `routers` and `services` |\n\n## Models\n\nEvery package registry implementation uses the same underlying models:\n\n| Model | Description |\n| - | - |\n| `Package` | The root of a package providing values fixed for every version (e.g. the package name) |\n| `PackageVersion` | A version of a package containing metadata (e.g. the package description) |\n| `PackageFile` | A file of a package describing its content (e.g. file name) |\n| `PackageBlob` | The content of a file (may be shared by multiple files) |\n| `PackageProperty` | Additional properties attached to `Package`, `PackageVersion` or `PackageFile` (e.g. used if metadata is needed for routing) |\n\nThe following diagram shows the relationship between the models:\n```\nPackage <1---*> PackageVersion <1---*> PackageFile <*---1> PackageBlob\n```\n\n## Adding a new package registry type\n\nBefore adding a new package registry type have a look at the existing implementation to get an impression of how it could work.\nMost registry types offer endpoints to retrieve the metadata, upload and download package files.\nThe upload endpoint is often the heavy part because it must validate the uploaded blob, extract metadata and create the models.\nThe methods to validate and extract the metadata should be added in the `modules/packages/<type>` package.\nIf the upload is valid the methods in `services/packages` allow to store the upload and create the corresponding models.\nIt depends if the registry type allows multiple files per package version which method should be called:\n- `CreatePackageAndAddFile`: error if package version already exists\n- `CreatePackageOrAddFileToExisting`: error if file already exists\n- `AddFileToExistingPackage`: error if package version does not exist or file already exists\n\n`services/packages` also contains helper methods to download a file or to remove a package version.\nThere are no helper methods for metadata endpoints because they are very type specific.\n","tools/generate-svg-vscode-extensions.json":"{\n  \"pkg:bat\": {\n    \"bat\": [\n      \".bat\",\n      \".cmd\"\n    ]\n  },\n  \"pkg:clojure\": {\n    \"clojure\": [\n      \".clj\",\n      \".cljs\",\n      \".cljc\",\n      \".cljx\",\n      \".clojure\",\n      \".edn\"\n    ]\n  },\n  \"pkg:coffeescript\": {\n    \"coffeescript\": [\n      \".coffee\",\n      \".cson\",\n      \".iced\"\n    ]\n  },\n  \"pkg:configuration-editing\": {\n    \"jsonc\": [\n      \".code-workspace\",\n      \"language-configuration.json\",\n      \"icon-theme.json\",\n      \"color-theme.json\"\n    ],\n    \"json\": [\n      \".code-profile\"\n    ]\n  },\n  \"pkg:cpp\": {\n    \"c\": [\n      \".c\",\n      \".i\"\n    ],\n    \"cpp\": [\n      \".cpp\",\n      \".cppm\",\n      \".cc\",\n      \".ccm\",\n      \".cxx\",\n      \".cxxm\",\n      \".c++\",\n      \".c++m\",\n      \".hpp\",\n      \".hh\",\n      \".hxx\",\n      \".h++\",\n      \".h\",\n      \".ii\",\n      \".ino\",\n      \".inl\",\n      \".ipp\",\n      \".ixx\",\n      \".tpp\",\n      \".txx\",\n      \".hpp.in\",\n      \".h.in\"\n    ],\n    \"cuda-cpp\": [\n      \".cu\",\n      \".cuh\"\n    ]\n  },\n  \"pkg:csharp\": {\n    \"csharp\": [\n      \".cs\",\n      \".csx\",\n      \".cake\"\n    ]\n  },\n  \"pkg:css\": {\n    \"css\": [\n      \".css\"\n    ]\n  },\n  \"pkg:dart\": {\n    \"dart\": [\n      \".dart\"\n    ]\n  },\n  \"pkg:diff\": {\n    \"diff\": [\n      \".diff\",\n      \".patch\",\n      \".rej\"\n    ]\n  },\n  \"pkg:docker\": {\n    \"dockerfile\": [\n      \".dockerfile\",\n      \".containerfile\"\n    ]\n  },\n  \"pkg:fsharp\": {\n    \"fsharp\": [\n      \".fs\",\n      \".fsi\",\n      \".fsx\",\n      \".fsscript\"\n    ]\n  },\n  \"pkg:git-base\": {\n    \"ignore\": [\n      \".gitignore_global\",\n      \".gitignore\",\n      \".git-blame-ignore-revs\"\n    ]\n  },\n  \"pkg:go\": {\n    \"go\": [\n      \".go\"\n    ]\n  },\n  \"pkg:groovy\": {\n    \"groovy\": [\n      \".groovy\",\n      \".gvy\",\n      \".gradle\",\n      \".jenkinsfile\",\n      \".nf\"\n    ]\n  },\n  \"pkg:handlebars\": {\n    \"handlebars\": [\n      \".handlebars\",\n      \".hbs\",\n      \".hjs\"\n    ]\n  },\n  \"pkg:hlsl\": {\n    \"hlsl\": [\n      \".hlsl\",\n      \".hlsli\",\n      \".fx\",\n      \".fxh\",\n      \".vsh\",\n      \".psh\",\n      \".cginc\",\n      \".compute\"\n    ]\n  },\n  \"pkg:html\": {\n    \"html\": [\n      \".html\",\n      \".htm\",\n      \".shtml\",\n      \".xhtml\",\n      \".xht\",\n      \".mdoc\",\n      \".jsp\",\n      \".asp\",\n      \".aspx\",\n      \".jshtm\",\n      \".volt\",\n      \".ejs\",\n      \".rhtml\"\n    ]\n  },\n  \"pkg:ini\": {\n    \"ini\": [\n      \".ini\"\n    ],\n    \"properties\": [\n      \".conf\",\n      \".properties\",\n      \".cfg\",\n      \".directory\",\n      \".gitattributes\",\n      \".gitconfig\",\n      \".gitmodules\",\n      \".editorconfig\",\n      \".repo\"\n    ]\n  },\n  \"pkg:java\": {\n    \"java\": [\n      \".java\",\n      \".jav\"\n    ]\n  },\n  \"pkg:javascript\": {\n    \"javascriptreact\": [\n      \".jsx\"\n    ],\n    \"javascript\": [\n      \".js\",\n      \".es6\",\n      \".mjs\",\n      \".cjs\",\n      \".pac\"\n    ]\n  },\n  \"pkg:json\": {\n    \"json\": [\n      \".json\",\n      \".bowerrc\",\n      \".jscsrc\",\n      \".webmanifest\",\n      \".js.map\",\n      \".css.map\",\n      \".ts.map\",\n      \".har\",\n      \".jslintrc\",\n      \".jsonld\",\n      \".geojson\",\n      \".ipynb\",\n      \".vuerc\"\n    ],\n    \"jsonc\": [\n      \".jsonc\",\n      \".eslintrc\",\n      \".eslintrc.json\",\n      \".jsfmtrc\",\n      \".jshintrc\",\n      \".swcrc\",\n      \".hintrc\",\n      \".babelrc\"\n    ],\n    \"jsonl\": [\n      \".jsonl\",\n      \".ndjson\"\n    ],\n    \"snippets\": [\n      \".code-snippets\"\n    ]\n  },\n  \"pkg:julia\": {\n    \"julia\": [\n      \".jl\"\n    ],\n    \"juliamarkdown\": [\n      \".jmd\"\n    ]\n  },\n  \"pkg:latex\": {\n    \"tex\": [\n      \".sty\",\n      \".cls\",\n      \".bbx\",\n      \".cbx\"\n    ],\n    \"latex\": [\n      \".tex\",\n      \".ltx\",\n      \".ctx\"\n    ],\n    \"bibtex\": [\n      \".bib\"\n    ]\n  },\n  \"pkg:less\": {\n    \"less\": [\n      \".less\"\n    ]\n  },\n  \"pkg:log\": {\n    \"log\": [\n      \".log\",\n      \"*.log.?\"\n    ]\n  },\n  \"pkg:lua\": {\n    \"lua\": [\n      \".lua\"\n    ]\n  },\n  \"pkg:make\": {\n    \"makefile\": [\n      \".mak\",\n      \".mk\"\n    ]\n  },\n  \"pkg:markdown-basics\": {\n    \"markdown\": [\n      \".md\",\n      \".mkd\",\n      \".mdwn\",\n      \".mdown\",\n      \".markdown\",\n      \".markdn\",\n      \".mdtxt\",\n      \".mdtext\",\n      \".workbook\"\n    ]\n  },\n  \"pkg:ms-vscode.js-debug\": {\n    \"wat\": [\n      \".wat\",\n      \".wasm\"\n    ]\n  },\n  \"pkg:npm\": {\n    \"ignore\": [\n      \".npmignore\"\n    ],\n    \"properties\": [\n      \".npmrc\"\n    ]\n  },\n  \"pkg:objective-c\": {\n    \"objective-c\": [\n      \".m\"\n    ],\n    \"objective-cpp\": [\n      \".mm\"\n    ]\n  },\n  \"pkg:perl\": {\n    \"perl\": [\n      \".pl\",\n      \".pm\",\n      \".pod\",\n      \".t\",\n      \".PL\",\n      \".psgi\"\n    ],\n    \"raku\": [\n      \".raku\",\n      \".rakumod\",\n      \".rakutest\",\n      \".rakudoc\",\n      \".nqp\",\n      \".p6\",\n      \".pl6\",\n      \".pm6\"\n    ]\n  },\n  \"pkg:php\": {\n    \"php\": [\n      \".php\",\n      \".php4\",\n      \".php5\",\n      \".phtml\",\n      \".ctp\"\n    ]\n  },\n  \"pkg:powershell\": {\n    \"powershell\": [\n      \".ps1\",\n      \".psm1\",\n      \".psd1\",\n      \".pssc\",\n      \".psrc\"\n    ]\n  },\n  \"pkg:pug\": {\n    \"jade\": [\n      \".pug\",\n      \".jade\"\n    ]\n  },\n  \"pkg:python\": {\n    \"python\": [\n      \".py\",\n      \".rpy\",\n      \".pyw\",\n      \".cpy\",\n      \".gyp\",\n      \".gypi\",\n      \".pyi\",\n      \".ipy\",\n      \".pyt\"\n    ]\n  },\n  \"pkg:r\": {\n    \"r\": [\n      \".r\",\n      \".rhistory\",\n      \".rprofile\",\n      \".rt\"\n    ]\n  },\n  \"pkg:razor\": {\n    \"razor\": [\n      \".cshtml\",\n      \".razor\"\n    ]\n  },\n  \"pkg:restructuredtext\": {\n    \"restructuredtext\": [\n      \".rst\"\n    ]\n  },\n  \"pkg:ruby\": {\n    \"ruby\": [\n      \".rb\",\n      \".rbx\",\n      \".rjs\",\n      \".gemspec\",\n      \".rake\",\n      \".ru\",\n      \".erb\",\n      \".podspec\",\n      \".rbi\"\n    ]\n  },\n  \"pkg:rust\": {\n    \"rust\": [\n      \".rs\"\n    ]\n  },\n  \"pkg:scss\": {\n    \"scss\": [\n      \".scss\"\n    ]\n  },\n  \"pkg:search-result\": {\n    \"search-result\": [\n      \".code-search\"\n    ]\n  },\n  \"pkg:shaderlab\": {\n    \"shaderlab\": [\n      \".shader\"\n    ]\n  },\n  \"pkg:shellscript\": {\n    \"shellscript\": [\n      \".sh\",\n      \".bash\",\n      \".bashrc\",\n      \".bash_aliases\",\n      \".bash_profile\",\n      \".bash_login\",\n      \".ebuild\",\n      \".eclass\",\n      \".profile\",\n      \".bash_logout\",\n      \".xprofile\",\n      \".xsession\",\n      \".xsessionrc\",\n      \".Xsession\",\n      \".zsh\",\n      \".zshrc\",\n      \".zprofile\",\n      \".zlogin\",\n      \".zlogout\",\n      \".zshenv\",\n      \".zsh-theme\",\n      \".fish\",\n      \".ksh\",\n      \".csh\",\n      \".cshrc\",\n      \".tcshrc\",\n      \".yashrc\",\n      \".yash_profile\"\n    ]\n  },\n  \"pkg:sql\": {\n    \"sql\": [\n      \".sql\",\n      \".dsql\"\n    ]\n  },\n  \"pkg:swift\": {\n    \"swift\": [\n      \".swift\"\n    ]\n  },\n  \"pkg:typescript-basics\": {\n    \"typescript\": [\n      \".ts\",\n      \".cts\",\n      \".mts\"\n    ],\n    \"typescriptreact\": [\n      \".tsx\"\n    ],\n    \"json\": [\n      \".tsbuildinfo\"\n    ]\n  },\n  \"pkg:vb\": {\n    \"vb\": [\n      \".vb\",\n      \".brs\",\n      \".vbs\",\n      \".bas\",\n      \".vba\"\n    ]\n  },\n  \"pkg:xml\": {\n    \"xml\": [\n      \".xml\",\n      \".xsd\",\n      \".ascx\",\n      \".atom\",\n      \".axml\",\n      \".axaml\",\n      \".bpmn\",\n      \".cpt\",\n      \".csl\",\n      \".csproj\",\n      \".csproj.user\",\n      \".dita\",\n      \".ditamap\",\n      \".dtd\",\n      \".ent\",\n      \".mod\",\n      \".dtml\",\n      \".fsproj\",\n      \".fxml\",\n      \".iml\",\n      \".isml\",\n      \".jmx\",\n      \".launch\",\n      \".menu\",\n      \".mxml\",\n      \".nuspec\",\n      \".opml\",\n      \".owl\",\n      \".proj\",\n      \".props\",\n      \".pt\",\n      \".publishsettings\",\n      \".pubxml\",\n      \".pubxml.user\",\n      \".rbxlx\",\n      \".rbxmx\",\n      \".rdf\",\n      \".rng\",\n      \".rss\",\n      \".shproj\",\n      \".storyboard\",\n      \".svg\",\n      \".targets\",\n      \".tld\",\n      \".tmx\",\n      \".vbproj\",\n      \".vbproj.user\",\n      \".vcxproj\",\n      \".vcxproj.filters\",\n      \".wsdl\",\n      \".wxi\",\n      \".wxl\",\n      \".wxs\",\n      \".xaml\",\n      \".xbl\",\n      \".xib\",\n      \".xlf\",\n      \".xliff\",\n      \".xpdl\",\n      \".xul\",\n      \".xoml\"\n    ],\n    \"xsl\": [\n      \".xsl\",\n      \".xslt\"\n    ]\n  },\n  \"pkg:yaml\": {\n    \"yaml\": [\n      \".yaml\",\n      \".yml\",\n      \".eyaml\",\n      \".eyml\",\n      \".cff\",\n      \".yaml-tmlanguage\",\n      \".yaml-tmpreferences\",\n      \".yaml-tmtheme\",\n      \".winget\"\n    ]\n  }\n}\n"},"files":{"AGENTS.md":"- Never assume, verify before claiming\n- List development targets with `make help`\n- Read relevant developer documentation in the `docs` folder\n- PR descriptions: minimal, only what and why, no task or file listings. Include screenshots for UI changes, before and after when modifying existing UI. Aim for less than 1000 characters\n- Reference issues and PRs by full URL, not by number\n- Use Conventional Commits for commit messages and PR titles, plus Gitea's `enhance` type for user-facing enhancements\n- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` trailer to commit messages, never `Co-Authored-By` or `Signed-off-by`\n- Attribute agent authorship on one trailing line in issue and PR comments, never as a PR description section\n- Never rewrite git history unless asked, update PRs with new commits and normal push\n- Comments: write almost none, short and preferably same-line, explaining why for a future reader. Never narrate code, the change or the prompt. Preserve existing ones that still apply. If you need to write a paragraph-long comment, rethink your implementation, it is likely too complicated\n- Add the current year to copyright headers of new `.go` files\n- In `options/locale`, only edit `locale_en-US.json`, other locales are synced automatically\n- In TS, use `!` instead of `?.`/`??` when a value always exists\n- In Go, prefer to use modern language features wherever possible\n- In Go, function-name prefixes in errors like `fmt.Errorf(\"Foo: %w\", err)` must always name the function they are in\n- Write sizes as multiplications like `64 * 1024`, not bit shifts like `64 << 10`\n- Prefer `tw-*` utilities over inline `style` and `flex-*` helpers over per-child `tw-ml-*`/`tw-mr-*` margins, falling back to `tw-*` where specificity requires `!important`\n- Run `make fmt` after `.go` edits, `make tidy` after `go.mod` edits, `make generate-swagger` after API changes, and lint what changed with `make lint-go`, `lint-js`, `lint-css` or `lint-templates`\n- Fix the cause rather than disabling a linter or weakening a test. Where unavoidable, use the narrowest scope with a trailing comment giving the reason\n- Run single tests with `go test -run '^TestName$' ./modulepath/` for Go, `pnpm exec vitest <path-filter>` for TS and `GITEA_TEST_E2E_FLAGS='<filepath>' make test-e2e` for e2e\n- Write the fewest, fastest tests covering the behavior, extending an existing one where possible. Prefer unit tests where logic is testable in isolation\n- Aim for sub-2s per integration test and sub-4s per e2e test. Wait on a deterministic condition rather than `sleep`, and prefer semantic locators in e2e tests\n","routers/api/packages/README.md":"# Gitea Package Registry\n\nThis document gives a brief overview how the package registry is organized in code.\n\n## Structure\n\nThe package registry code is divided into multiple modules to split the functionality and make code reuse possible.\n\n| Module | Description |\n| - | - |\n| `models/packages` | Common methods and models used by all registry types |\n| `models/packages/<type>` | Methods used by specific registry type. There should be no need to use type specific models. |\n| `modules/packages` | Common methods and types used by multiple registry types |\n| `modules/packages/<type>` | Registry type specific methods and types (e.g. metadata extraction of package files) |\n| `routers/api/packages` | Route definitions for all registry types |\n| `routers/api/packages/<type>` | Route implementation for a specific registry type |\n| `services/packages` | Helper methods used by registry types to handle common tasks like package creation and deletion in `routers` |\n| `services/packages/<type>` | Registry type specific methods used by `routers` and `services` |\n\n## Models\n\nEvery package registry implementation uses the same underlying models:\n\n| Model | Description |\n| - | - |\n| `Package` | The root of a package providing values fixed for every version (e.g. the package name) |\n| `PackageVersion` | A version of a package containing metadata (e.g. the package description) |\n| `PackageFile` | A file of a package describing its content (e.g. file name) |\n| `PackageBlob` | The content of a file (may be shared by multiple files) |\n| `PackageProperty` | Additional properties attached to `Package`, `PackageVersion` or `PackageFile` (e.g. used if metadata is needed for routing) |\n\nThe following diagram shows the relationship between the models:\n```\nPackage <1---*> PackageVersion <1---*> PackageFile <*---1> PackageBlob\n```\n\n## Adding a new package registry type\n\nBefore adding a new package registry type have a look at the existing implementation to get an impression of how it could work.\nMost registry types offer endpoints to retrieve the metadata, upload and download package files.\nThe upload endpoint is often the heavy part because it must validate the uploaded blob, extract metadata and create the models.\nThe methods to validate and extract the metadata should be added in the `modules/packages/<type>` package.\nIf the upload is valid the methods in `services/packages` allow to store the upload and create the corresponding models.\nIt depends if the registry type allows multiple files per package version which method should be called:\n- `CreatePackageAndAddFile`: error if package version already exists\n- `CreatePackageOrAddFileToExisting`: error if file already exists\n- `AddFileToExistingPackage`: error if package version does not exist or file already exists\n\n`services/packages` also contains helper methods to download a file or to remove a package version.\nThere are no helper methods for metadata endpoints because they are very type specific.\n","tools/generate-svg-vscode-extensions.json":"{\n  \"pkg:bat\": {\n    \"bat\": [\n      \".bat\",\n      \".cmd\"\n    ]\n  },\n  \"pkg:clojure\": {\n    \"clojure\": [\n      \".clj\",\n      \".cljs\",\n      \".cljc\",\n      \".cljx\",\n      \".clojure\",\n      \".edn\"\n    ]\n  },\n  \"pkg:coffeescript\": {\n    \"coffeescript\": [\n      \".coffee\",\n      \".cson\",\n      \".iced\"\n    ]\n  },\n  \"pkg:configuration-editing\": {\n    \"jsonc\": [\n      \".code-workspace\",\n      \"language-configuration.json\",\n      \"icon-theme.json\",\n      \"color-theme.json\"\n    ],\n    \"json\": [\n      \".code-profile\"\n    ]\n  },\n  \"pkg:cpp\": {\n    \"c\": [\n      \".c\",\n      \".i\"\n    ],\n    \"cpp\": [\n      \".cpp\",\n      \".cppm\",\n      \".cc\",\n      \".ccm\",\n      \".cxx\",\n      \".cxxm\",\n      \".c++\",\n      \".c++m\",\n      \".hpp\",\n      \".hh\",\n      \".hxx\",\n      \".h++\",\n      \".h\",\n      \".ii\",\n      \".ino\",\n      \".inl\",\n      \".ipp\",\n      \".ixx\",\n      \".tpp\",\n      \".txx\",\n      \".hpp.in\",\n      \".h.in\"\n    ],\n    \"cuda-cpp\": [\n      \".cu\",\n      \".cuh\"\n    ]\n  },\n  \"pkg:csharp\": {\n    \"csharp\": [\n      \".cs\",\n      \".csx\",\n      \".cake\"\n    ]\n  },\n  \"pkg:css\": {\n    \"css\": [\n      \".css\"\n    ]\n  },\n  \"pkg:dart\": {\n    \"dart\": [\n      \".dart\"\n    ]\n  },\n  \"pkg:diff\": {\n    \"diff\": [\n      \".diff\",\n      \".patch\",\n      \".rej\"\n    ]\n  },\n  \"pkg:docker\": {\n    \"dockerfile\": [\n      \".dockerfile\",\n      \".containerfile\"\n    ]\n  },\n  \"pkg:fsharp\": {\n    \"fsharp\": [\n      \".fs\",\n      \".fsi\",\n      \".fsx\",\n      \".fsscript\"\n    ]\n  },\n  \"pkg:git-base\": {\n    \"ignore\": [\n      \".gitignore_global\",\n      \".gitignore\",\n      \".git-blame-ignore-revs\"\n    ]\n  },\n  \"pkg:go\": {\n    \"go\": [\n      \".go\"\n    ]\n  },\n  \"pkg:groovy\": {\n    \"groovy\": [\n      \".groovy\",\n      \".gvy\",\n      \".gradle\",\n      \".jenkinsfile\",\n      \".nf\"\n    ]\n  },\n  \"pkg:handlebars\": {\n    \"handlebars\": [\n      \".handlebars\",\n      \".hbs\",\n      \".hjs\"\n    ]\n  },\n  \"pkg:hlsl\": {\n    \"hlsl\": [\n      \".hlsl\",\n      \".hlsli\",\n      \".fx\",\n      \".fxh\",\n      \".vsh\",\n      \".psh\",\n      \".cginc\",\n      \".compute\"\n    ]\n  },\n  \"pkg:html\": {\n    \"html\": [\n      \".html\",\n      \".htm\",\n      \".shtml\",\n      \".xhtml\",\n      \".xht\",\n      \".mdoc\",\n      \".jsp\",\n      \".asp\",\n      \".aspx\",\n      \".jshtm\",\n      \".volt\",\n      \".ejs\",\n      \".rhtml\"\n    ]\n  },\n  \"pkg:ini\": {\n    \"ini\": [\n      \".ini\"\n    ],\n    \"properties\": [\n      \".conf\",\n      \".properties\",\n      \".cfg\",\n      \".directory\",\n      \".gitattributes\",\n      \".gitconfig\",\n      \".gitmodules\",\n      \".editorconfig\",\n      \".repo\"\n    ]\n  },\n  \"pkg:java\": {\n    \"java\": [\n      \".java\",\n      \".jav\"\n    ]\n  },\n  \"pkg:javascript\": {\n    \"javascriptreact\": [\n      \".jsx\"\n    ],\n    \"javascript\": [\n      \".js\",\n      \".es6\",\n      \".mjs\",\n      \".cjs\",\n      \".pac\"\n    ]\n  },\n  \"pkg:json\": {\n    \"json\": [\n      \".json\",\n      \".bowerrc\",\n      \".jscsrc\",\n      \".webmanifest\",\n      \".js.map\",\n      \".css.map\",\n      \".ts.map\",\n      \".har\",\n      \".jslintrc\",\n      \".jsonld\",\n      \".geojson\",\n      \".ipynb\",\n      \".vuerc\"\n    ],\n    \"jsonc\": [\n      \".jsonc\",\n      \".eslintrc\",\n      \".eslintrc.json\",\n      \".jsfmtrc\",\n      \".jshintrc\",\n      \".swcrc\",\n      \".hintrc\",\n      \".babelrc\"\n    ],\n    \"jsonl\": [\n      \".jsonl\",\n      \".ndjson\"\n    ],\n    \"snippets\": [\n      \".code-snippets\"\n    ]\n  },\n  \"pkg:julia\": {\n    \"julia\": [\n      \".jl\"\n    ],\n    \"juliamarkdown\": [\n      \".jmd\"\n    ]\n  },\n  \"pkg:latex\": {\n    \"tex\": [\n      \".sty\",\n      \".cls\",\n      \".bbx\",\n      \".cbx\"\n    ],\n    \"latex\": [\n      \".tex\",\n      \".ltx\",\n      \".ctx\"\n    ],\n    \"bibtex\": [\n      \".bib\"\n    ]\n  },\n  \"pkg:less\": {\n    \"less\": [\n      \".less\"\n    ]\n  },\n  \"pkg:log\": {\n    \"log\": [\n      \".log\",\n      \"*.log.?\"\n    ]\n  },\n  \"pkg:lua\": {\n    \"lua\": [\n      \".lua\"\n    ]\n  },\n  \"pkg:make\": {\n    \"makefile\": [\n      \".mak\",\n      \".mk\"\n    ]\n  },\n  \"pkg:markdown-basics\": {\n    \"markdown\": [\n      \".md\",\n      \".mkd\",\n      \".mdwn\",\n      \".mdown\",\n      \".markdown\",\n      \".markdn\",\n      \".mdtxt\",\n      \".mdtext\",\n      \".workbook\"\n    ]\n  },\n  \"pkg:ms-vscode.js-debug\": {\n    \"wat\": [\n      \".wat\",\n      \".wasm\"\n    ]\n  },\n  \"pkg:npm\": {\n    \"ignore\": [\n      \".npmignore\"\n    ],\n    \"properties\": [\n      \".npmrc\"\n    ]\n  },\n  \"pkg:objective-c\": {\n    \"objective-c\": [\n      \".m\"\n    ],\n    \"objective-cpp\": [\n      \".mm\"\n    ]\n  },\n  \"pkg:perl\": {\n    \"perl\": [\n      \".pl\",\n      \".pm\",\n      \".pod\",\n      \".t\",\n      \".PL\",\n      \".psgi\"\n    ],\n    \"raku\": [\n      \".raku\",\n      \".rakumod\",\n      \".rakutest\",\n      \".rakudoc\",\n      \".nqp\",\n      \".p6\",\n      \".pl6\",\n      \".pm6\"\n    ]\n  },\n  \"pkg:php\": {\n    \"php\": [\n      \".php\",\n      \".php4\",\n      \".php5\",\n      \".phtml\",\n      \".ctp\"\n    ]\n  },\n  \"pkg:powershell\": {\n    \"powershell\": [\n      \".ps1\",\n      \".psm1\",\n      \".psd1\",\n      \".pssc\",\n      \".psrc\"\n    ]\n  },\n  \"pkg:pug\": {\n    \"jade\": [\n      \".pug\",\n      \".jade\"\n    ]\n  },\n  \"pkg:python\": {\n    \"python\": [\n      \".py\",\n      \".rpy\",\n      \".pyw\",\n      \".cpy\",\n      \".gyp\",\n      \".gypi\",\n      \".pyi\",\n      \".ipy\",\n      \".pyt\"\n    ]\n  },\n  \"pkg:r\": {\n    \"r\": [\n      \".r\",\n      \".rhistory\",\n      \".rprofile\",\n      \".rt\"\n    ]\n  },\n  \"pkg:razor\": {\n    \"razor\": [\n      \".cshtml\",\n      \".razor\"\n    ]\n  },\n  \"pkg:restructuredtext\": {\n    \"restructuredtext\": [\n      \".rst\"\n    ]\n  },\n  \"pkg:ruby\": {\n    \"ruby\": [\n      \".rb\",\n      \".rbx\",\n      \".rjs\",\n      \".gemspec\",\n      \".rake\",\n      \".ru\",\n      \".erb\",\n      \".podspec\",\n      \".rbi\"\n    ]\n  },\n  \"pkg:rust\": {\n    \"rust\": [\n      \".rs\"\n    ]\n  },\n  \"pkg:scss\": {\n    \"scss\": [\n      \".scss\"\n    ]\n  },\n  \"pkg:search-result\": {\n    \"search-result\": [\n      \".code-search\"\n    ]\n  },\n  \"pkg:shaderlab\": {\n    \"shaderlab\": [\n      \".shader\"\n    ]\n  },\n  \"pkg:shellscript\": {\n    \"shellscript\": [\n      \".sh\",\n      \".bash\",\n      \".bashrc\",\n      \".bash_aliases\",\n      \".bash_profile\",\n      \".bash_login\",\n      \".ebuild\",\n      \".eclass\",\n      \".profile\",\n      \".bash_logout\",\n      \".xprofile\",\n      \".xsession\",\n      \".xsessionrc\",\n      \".Xsession\",\n      \".zsh\",\n      \".zshrc\",\n      \".zprofile\",\n      \".zlogin\",\n      \".zlogout\",\n      \".zshenv\",\n      \".zsh-theme\",\n      \".fish\",\n      \".ksh\",\n      \".csh\",\n      \".cshrc\",\n      \".tcshrc\",\n      \".yashrc\",\n      \".yash_profile\"\n    ]\n  },\n  \"pkg:sql\": {\n    \"sql\": [\n      \".sql\",\n      \".dsql\"\n    ]\n  },\n  \"pkg:swift\": {\n    \"swift\": [\n      \".swift\"\n    ]\n  },\n  \"pkg:typescript-basics\": {\n    \"typescript\": [\n      \".ts\",\n      \".cts\",\n      \".mts\"\n    ],\n    \"typescriptreact\": [\n      \".tsx\"\n    ],\n    \"json\": [\n      \".tsbuildinfo\"\n    ]\n  },\n  \"pkg:vb\": {\n    \"vb\": [\n      \".vb\",\n      \".brs\",\n      \".vbs\",\n      \".bas\",\n      \".vba\"\n    ]\n  },\n  \"pkg:xml\": {\n    \"xml\": [\n      \".xml\",\n      \".xsd\",\n      \".ascx\",\n      \".atom\",\n      \".axml\",\n      \".axaml\",\n      \".bpmn\",\n      \".cpt\",\n      \".csl\",\n      \".csproj\",\n      \".csproj.user\",\n      \".dita\",\n      \".ditamap\",\n      \".dtd\",\n      \".ent\",\n      \".mod\",\n      \".dtml\",\n      \".fsproj\",\n      \".fxml\",\n      \".iml\",\n      \".isml\",\n      \".jmx\",\n      \".launch\",\n      \".menu\",\n      \".mxml\",\n      \".nuspec\",\n      \".opml\",\n      \".owl\",\n      \".proj\",\n      \".props\",\n      \".pt\",\n      \".publishsettings\",\n      \".pubxml\",\n      \".pubxml.user\",\n      \".rbxlx\",\n      \".rbxmx\",\n      \".rdf\",\n      \".rng\",\n      \".rss\",\n      \".shproj\",\n      \".storyboard\",\n      \".svg\",\n      \".targets\",\n      \".tld\",\n      \".tmx\",\n      \".vbproj\",\n      \".vbproj.user\",\n      \".vcxproj\",\n      \".vcxproj.filters\",\n      \".wsdl\",\n      \".wxi\",\n      \".wxl\",\n      \".wxs\",\n      \".xaml\",\n      \".xbl\",\n      \".xib\",\n      \".xlf\",\n      \".xliff\",\n      \".xpdl\",\n      \".xul\",\n      \".xoml\"\n    ],\n    \"xsl\": [\n      \".xsl\",\n      \".xslt\"\n    ]\n  },\n  \"pkg:yaml\": {\n    \"yaml\": [\n      \".yaml\",\n      \".yml\",\n      \".eyaml\",\n      \".eyml\",\n      \".cff\",\n      \".yaml-tmlanguage\",\n      \".yaml-tmpreferences\",\n      \".yaml-tmtheme\",\n      \".winget\"\n    ]\n  }\n}\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/go-gitea/gitea/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"- Never assume, verify before claiming\n- List development targets with `make help`\n- Read relevant developer documentation in the `docs` folder\n- PR descriptions: minimal, only what and why, no task or file listings. Include screenshots for UI changes, before and after when modifying existing UI. Aim for less than 1000 characters\n- Reference issues and PRs by full URL, not by number\n- Use Conventional Commits for commit messages and PR titles, plus Gitea's `enhance` type for user-facing enhancements\n- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` trailer to commit messages, never `Co-Authored-By` or `Signed-off-by`\n- Attribute agent authorship on one trailing line in issue and PR comments, never as a PR description section\n- Never rewrite git history unless asked, update PRs with new commits and normal push\n- Comments: write almost none, short and preferably same-line, explaining why for a future reader. Never narrate code, the change or the prompt. Preserve existing ones that still apply. If you need to write a paragraph-long comment, rethink your implementation, it is likely too complicated\n- Add the current year to copyright headers of new `.go` files\n- In `options/locale`, only edit `locale_en-US.json`, other locales are synced automatically\n- In TS, use `!` instead of `?.`/`??` when a value always exists\n- In Go, prefer to use modern language features wherever possible\n- In Go, function-name prefixes in errors like `fmt.Errorf(\"Foo: %w\", err)` must always name the function they are in\n- Write sizes as multiplications like `64 * 1024`, not bit shifts like `64 << 10`\n- Prefer `tw-*` utilities over inline `style` and `flex-*` helpers over per-child `tw-ml-*`/`tw-mr-*` margins, falling back to `tw-*` where specificity requires `!important`\n- Run `make fmt` after `.go` edits, `make tidy` after `go.mod` edits, `make generate-swagger` after API changes, and lint what changed with `make lint-go`, `lint-js`, `lint-css` or `lint-templates`\n- Fix the cause rather than disabling a linter or weakening a test. Where unavoidable, use the narrowest scope with a trailing comment giving the reason\n- Run single tests with `go test -run '^TestName$' ./modulepath/` for Go, `pnpm exec vitest <path-filter>` for TS and `GITEA_TEST_E2E_FLAGS='<filepath>' make test-e2e` for e2e\n- Write the fewest, fastest tests covering the behavior, extending an existing one where possible. Prefer unit tests where logic is testable in isolation\n- Aim for sub-2s per integration test and sub-4s per e2e test. Wait on a deterministic condition rather than `sleep`, and prefer semantic locators in e2e tests\n","isInternal":false,"tokens":638,"sizeBytes":2613},{"name":"generate-svg-vscode-extensions.json","path":"tools/generate-svg-vscode-extensions.json","rawUrl":"https://raw.githubusercontent.com/go-gitea/gitea/HEAD/tools/generate-svg-vscode-extensions.json","title":"Tools Skill","category":"anthropic-skill","format":"json","content":"{\n  \"pkg:bat\": {\n    \"bat\": [\n      \".bat\",\n      \".cmd\"\n    ]\n  },\n  \"pkg:clojure\": {\n    \"clojure\": [\n      \".clj\",\n      \".cljs\",\n      \".cljc\",\n      \".cljx\",\n      \".clojure\",\n      \".edn\"\n    ]\n  },\n  \"pkg:coffeescript\": {\n    \"coffeescript\": [\n      \".coffee\",\n      \".cson\",\n      \".iced\"\n    ]\n  },\n  \"pkg:configuration-editing\": {\n    \"jsonc\": [\n      \".code-workspace\",\n      \"language-configuration.json\",\n      \"icon-theme.json\",\n      \"color-theme.json\"\n    ],\n    \"json\": [\n      \".code-profile\"\n    ]\n  },\n  \"pkg:cpp\": {\n    \"c\": [\n      \".c\",\n      \".i\"\n    ],\n    \"cpp\": [\n      \".cpp\",\n      \".cppm\",\n      \".cc\",\n      \".ccm\",\n      \".cxx\",\n      \".cxxm\",\n      \".c++\",\n      \".c++m\",\n      \".hpp\",\n      \".hh\",\n      \".hxx\",\n      \".h++\",\n      \".h\",\n      \".ii\",\n      \".ino\",\n      \".inl\",\n      \".ipp\",\n      \".ixx\",\n      \".tpp\",\n      \".txx\",\n      \".hpp.in\",\n      \".h.in\"\n    ],\n    \"cuda-cpp\": [\n      \".cu\",\n      \".cuh\"\n    ]\n  },\n  \"pkg:csharp\": {\n    \"csharp\": [\n      \".cs\",\n      \".csx\",\n      \".cake\"\n    ]\n  },\n  \"pkg:css\": {\n    \"css\": [\n      \".css\"\n    ]\n  },\n  \"pkg:dart\": {\n    \"dart\": [\n      \".dart\"\n    ]\n  },\n  \"pkg:diff\": {\n    \"diff\": [\n      \".diff\",\n      \".patch\",\n      \".rej\"\n    ]\n  },\n  \"pkg:docker\": {\n    \"dockerfile\": [\n      \".dockerfile\",\n      \".containerfile\"\n    ]\n  },\n  \"pkg:fsharp\": {\n    \"fsharp\": [\n      \".fs\",\n      \".fsi\",\n      \".fsx\",\n      \".fsscript\"\n    ]\n  },\n  \"pkg:git-base\": {\n    \"ignore\": [\n      \".gitignore_global\",\n      \".gitignore\",\n      \".git-blame-ignore-revs\"\n    ]\n  },\n  \"pkg:go\": {\n    \"go\": [\n      \".go\"\n    ]\n  },\n  \"pkg:groovy\": {\n    \"groovy\": [\n      \".groovy\",\n      \".gvy\",\n      \".gradle\",\n      \".jenkinsfile\",\n      \".nf\"\n    ]\n  },\n  \"pkg:handlebars\": {\n    \"handlebars\": [\n      \".handlebars\",\n      \".hbs\",\n      \".hjs\"\n    ]\n  },\n  \"pkg:hlsl\": {\n    \"hlsl\": [\n      \".hlsl\",\n      \".hlsli\",\n      \".fx\",\n      \".fxh\",\n      \".vsh\",\n      \".psh\",\n      \".cginc\",\n      \".compute\"\n    ]\n  },\n  \"pkg:html\": {\n    \"html\": [\n      \".html\",\n      \".htm\",\n      \".shtml\",\n      \".xhtml\",\n      \".xht\",\n      \".mdoc\",\n      \".jsp\",\n      \".asp\",\n      \".aspx\",\n      \".jshtm\",\n      \".volt\",\n      \".ejs\",\n      \".rhtml\"\n    ]\n  },\n  \"pkg:ini\": {\n    \"ini\": [\n      \".ini\"\n    ],\n    \"properties\": [\n      \".conf\",\n      \".properties\",\n      \".cfg\",\n      \".directory\",\n      \".gitattributes\",\n      \".gitconfig\",\n      \".gitmodules\",\n      \".editorconfig\",\n      \".repo\"\n    ]\n  },\n  \"pkg:java\": {\n    \"java\": [\n      \".java\",\n      \".jav\"\n    ]\n  },\n  \"pkg:javascript\": {\n    \"javascriptreact\": [\n      \".jsx\"\n    ],\n    \"javascript\": [\n      \".js\",\n      \".es6\",\n      \".mjs\",\n      \".cjs\",\n      \".pac\"\n    ]\n  },\n  \"pkg:json\": {\n    \"json\": [\n      \".json\",\n      \".bowerrc\",\n      \".jscsrc\",\n      \".webmanifest\",\n      \".js.map\",\n      \".css.map\",\n      \".ts.map\",\n      \".har\",\n      \".jslintrc\",\n      \".jsonld\",\n      \".geojson\",\n      \".ipynb\",\n      \".vuerc\"\n    ],\n    \"jsonc\": [\n      \".jsonc\",\n      \".eslintrc\",\n      \".eslintrc.json\",\n      \".jsfmtrc\",\n      \".jshintrc\",\n      \".swcrc\",\n      \".hintrc\",\n      \".babelrc\"\n    ],\n    \"jsonl\": [\n      \".jsonl\",\n      \".ndjson\"\n    ],\n    \"snippets\": [\n      \".code-snippets\"\n    ]\n  },\n  \"pkg:julia\": {\n    \"julia\": [\n      \".jl\"\n    ],\n    \"juliamarkdown\": [\n      \".jmd\"\n    ]\n  },\n  \"pkg:latex\": {\n    \"tex\": [\n      \".sty\",\n      \".cls\",\n      \".bbx\",\n      \".cbx\"\n    ],\n    \"latex\": [\n      \".tex\",\n      \".ltx\",\n      \".ctx\"\n    ],\n    \"bibtex\": [\n      \".bib\"\n    ]\n  },\n  \"pkg:less\": {\n    \"less\": [\n      \".less\"\n    ]\n  },\n  \"pkg:log\": {\n    \"log\": [\n      \".log\",\n      \"*.log.?\"\n    ]\n  },\n  \"pkg:lua\": {\n    \"lua\": [\n      \".lua\"\n    ]\n  },\n  \"pkg:make\": {\n    \"makefile\": [\n      \".mak\",\n      \".mk\"\n    ]\n  },\n  \"pkg:markdown-basics\": {\n    \"markdown\": [\n      \".md\",\n      \".mkd\",\n      \".mdwn\",\n      \".mdown\",\n      \".markdown\",\n      \".markdn\",\n      \".mdtxt\",\n      \".mdtext\",\n      \".workbook\"\n    ]\n  },\n  \"pkg:ms-vscode.js-debug\": {\n    \"wat\": [\n      \".wat\",\n      \".wasm\"\n    ]\n  },\n  \"pkg:npm\": {\n    \"ignore\": [\n      \".npmignore\"\n    ],\n    \"properties\": [\n      \".npmrc\"\n    ]\n  },\n  \"pkg:objective-c\": {\n    \"objective-c\": [\n      \".m\"\n    ],\n    \"objective-cpp\": [\n      \".mm\"\n    ]\n  },\n  \"pkg:perl\": {\n    \"perl\": [\n      \".pl\",\n      \".pm\",\n      \".pod\",\n      \".t\",\n      \".PL\",\n      \".psgi\"\n    ],\n    \"raku\": [\n      \".raku\",\n      \".rakumod\",\n      \".rakutest\",\n      \".rakudoc\",\n      \".nqp\",\n      \".p6\",\n      \".pl6\",\n      \".pm6\"\n    ]\n  },\n  \"pkg:php\": {\n    \"php\": [\n      \".php\",\n      \".php4\",\n      \".php5\",\n      \".phtml\",\n      \".ctp\"\n    ]\n  },\n  \"pkg:powershell\": {\n    \"powershell\": [\n      \".ps1\",\n      \".psm1\",\n      \".psd1\",\n      \".pssc\",\n      \".psrc\"\n    ]\n  },\n  \"pkg:pug\": {\n    \"jade\": [\n      \".pug\",\n      \".jade\"\n    ]\n  },\n  \"pkg:python\": {\n    \"python\": [\n      \".py\",\n      \".rpy\",\n      \".pyw\",\n      \".cpy\",\n      \".gyp\",\n      \".gypi\",\n      \".pyi\",\n      \".ipy\",\n      \".pyt\"\n    ]\n  },\n  \"pkg:r\": {\n    \"r\": [\n      \".r\",\n      \".rhistory\",\n      \".rprofile\",\n      \".rt\"\n    ]\n  },\n  \"pkg:razor\": {\n    \"razor\": [\n      \".cshtml\",\n      \".razor\"\n    ]\n  },\n  \"pkg:restructuredtext\": {\n    \"restructuredtext\": [\n      \".rst\"\n    ]\n  },\n  \"pkg:ruby\": {\n    \"ruby\": [\n      \".rb\",\n      \".rbx\",\n      \".rjs\",\n      \".gemspec\",\n      \".rake\",\n      \".ru\",\n      \".erb\",\n      \".podspec\",\n      \".rbi\"\n    ]\n  },\n  \"pkg:rust\": {\n    \"rust\": [\n      \".rs\"\n    ]\n  },\n  \"pkg:scss\": {\n    \"scss\": [\n      \".scss\"\n    ]\n  },\n  \"pkg:search-result\": {\n    \"search-result\": [\n      \".code-search\"\n    ]\n  },\n  \"pkg:shaderlab\": {\n    \"shaderlab\": [\n      \".shader\"\n    ]\n  },\n  \"pkg:shellscript\": {\n    \"shellscript\": [\n      \".sh\",\n      \".bash\",\n      \".bashrc\",\n      \".bash_aliases\",\n      \".bash_profile\",\n      \".bash_login\",\n      \".ebuild\",\n      \".eclass\",\n      \".profile\",\n      \".bash_logout\",\n      \".xprofile\",\n      \".xsession\",\n      \".xsessionrc\",\n      \".Xsession\",\n      \".zsh\",\n      \".zshrc\",\n      \".zprofile\",\n      \".zlogin\",\n      \".zlogout\",\n      \".zshenv\",\n      \".zsh-theme\",\n      \".fish\",\n      \".ksh\",\n      \".csh\",\n      \".cshrc\",\n      \".tcshrc\",\n      \".yashrc\",\n      \".yash_profile\"\n    ]\n  },\n  \"pkg:sql\": {\n    \"sql\": [\n      \".sql\",\n      \".dsql\"\n    ]\n  },\n  \"pkg:swift\": {\n    \"swift\": [\n      \".swift\"\n    ]\n  },\n  \"pkg:typescript-basics\": {\n    \"typescript\": [\n      \".ts\",\n      \".cts\",\n      \".mts\"\n    ],\n    \"typescriptreact\": [\n      \".tsx\"\n    ],\n    \"json\": [\n      \".tsbuildinfo\"\n    ]\n  },\n  \"pkg:vb\": {\n    \"vb\": [\n      \".vb\",\n      \".brs\",\n      \".vbs\",\n      \".bas\",\n      \".vba\"\n    ]\n  },\n  \"pkg:xml\": {\n    \"xml\": [\n      \".xml\",\n      \".xsd\",\n      \".ascx\",\n      \".atom\",\n      \".axml\",\n      \".axaml\",\n      \".bpmn\",\n      \".cpt\",\n      \".csl\",\n      \".csproj\",\n      \".csproj.user\",\n      \".dita\",\n      \".ditamap\",\n      \".dtd\",\n      \".ent\",\n      \".mod\",\n      \".dtml\",\n      \".fsproj\",\n      \".fxml\",\n      \".iml\",\n      \".isml\",\n      \".jmx\",\n      \".launch\",\n      \".menu\",\n      \".mxml\",\n      \".nuspec\",\n      \".opml\",\n      \".owl\",\n      \".proj\",\n      \".props\",\n      \".pt\",\n      \".publishsettings\",\n      \".pubxml\",\n      \".pubxml.user\",\n      \".rbxlx\",\n      \".rbxmx\",\n      \".rdf\",\n      \".rng\",\n      \".rss\",\n      \".shproj\",\n      \".storyboard\",\n      \".svg\",\n      \".targets\",\n      \".tld\",\n      \".tmx\",\n      \".vbproj\",\n      \".vbproj.user\",\n      \".vcxproj\",\n      \".vcxproj.filters\",\n      \".wsdl\",\n      \".wxi\",\n      \".wxl\",\n      \".wxs\",\n      \".xaml\",\n      \".xbl\",\n      \".xib\",\n      \".xlf\",\n      \".xliff\",\n      \".xpdl\",\n      \".xul\",\n      \".xoml\"\n    ],\n    \"xsl\": [\n      \".xsl\",\n      \".xslt\"\n    ]\n  },\n  \"pkg:yaml\": {\n    \"yaml\": [\n      \".yaml\",\n      \".yml\",\n      \".eyaml\",\n      \".eyml\",\n      \".cff\",\n      \".yaml-tmlanguage\",\n      \".yaml-tmpreferences\",\n      \".yaml-tmtheme\",\n      \".winget\"\n    ]\n  }\n}\n","frontmatter":{"pkg:bat":{"bat":[".bat",".cmd"]},"pkg:clojure":{"clojure":[".clj",".cljs",".cljc",".cljx",".clojure",".edn"]},"pkg:coffeescript":{"coffeescript":[".coffee",".cson",".iced"]},"pkg:configuration-editing":{"jsonc":[".code-workspace","language-configuration.json","icon-theme.json","color-theme.json"],"json":[".code-profile"]},"pkg:cpp":{"c":[".c",".i"],"cpp":[".cpp",".cppm",".cc",".ccm",".cxx",".cxxm",".c++",".c++m",".hpp",".hh",".hxx",".h++",".h",".ii",".ino",".inl",".ipp",".ixx",".tpp",".txx",".hpp.in",".h.in"],"cuda-cpp":[".cu",".cuh"]},"pkg:csharp":{"csharp":[".cs",".csx",".cake"]},"pkg:css":{"css":[".css"]},"pkg:dart":{"dart":[".dart"]},"pkg:diff":{"diff":[".diff",".patch",".rej"]},"pkg:docker":{"dockerfile":[".dockerfile",".containerfile"]},"pkg:fsharp":{"fsharp":[".fs",".fsi",".fsx",".fsscript"]},"pkg:git-base":{"ignore":[".gitignore_global",".gitignore",".git-blame-ignore-revs"]},"pkg:go":{"go":[".go"]},"pkg:groovy":{"groovy":[".groovy",".gvy",".gradle",".jenkinsfile",".nf"]},"pkg:handlebars":{"handlebars":[".handlebars",".hbs",".hjs"]},"pkg:hlsl":{"hlsl":[".hlsl",".hlsli",".fx",".fxh",".vsh",".psh",".cginc",".compute"]},"pkg:html":{"html":[".html",".htm",".shtml",".xhtml",".xht",".mdoc",".jsp",".asp",".aspx",".jshtm",".volt",".ejs",".rhtml"]},"pkg:ini":{"ini":[".ini"],"properties":[".conf",".properties",".cfg",".directory",".gitattributes",".gitconfig",".gitmodules",".editorconfig",".repo"]},"pkg:java":{"java":[".java",".jav"]},"pkg:javascript":{"javascriptreact":[".jsx"],"javascript":[".js",".es6",".mjs",".cjs",".pac"]},"pkg:json":{"json":[".json",".bowerrc",".jscsrc",".webmanifest",".js.map",".css.map",".ts.map",".har",".jslintrc",".jsonld",".geojson",".ipynb",".vuerc"],"jsonc":[".jsonc",".eslintrc",".eslintrc.json",".jsfmtrc",".jshintrc",".swcrc",".hintrc",".babelrc"],"jsonl":[".jsonl",".ndjson"],"snippets":[".code-snippets"]},"pkg:julia":{"julia":[".jl"],"juliamarkdown":[".jmd"]},"pkg:latex":{"tex":[".sty",".cls",".bbx",".cbx"],"latex":[".tex",".ltx",".ctx"],"bibtex":[".bib"]},"pkg:less":{"less":[".less"]},"pkg:log":{"log":[".log","*.log.?"]},"pkg:lua":{"lua":[".lua"]},"pkg:make":{"makefile":[".mak",".mk"]},"pkg:markdown-basics":{"markdown":[".md",".mkd",".mdwn",".mdown",".markdown",".markdn",".mdtxt",".mdtext",".workbook"]},"pkg:ms-vscode.js-debug":{"wat":[".wat",".wasm"]},"pkg:npm":{"ignore":[".npmignore"],"properties":[".npmrc"]},"pkg:objective-c":{"objective-c":[".m"],"objective-cpp":[".mm"]},"pkg:perl":{"perl":[".pl",".pm",".pod",".t",".PL",".psgi"],"raku":[".raku",".rakumod",".rakutest",".rakudoc",".nqp",".p6",".pl6",".pm6"]},"pkg:php":{"php":[".php",".php4",".php5",".phtml",".ctp"]},"pkg:powershell":{"powershell":[".ps1",".psm1",".psd1",".pssc",".psrc"]},"pkg:pug":{"jade":[".pug",".jade"]},"pkg:python":{"python":[".py",".rpy",".pyw",".cpy",".gyp",".gypi",".pyi",".ipy",".pyt"]},"pkg:r":{"r":[".r",".rhistory",".rprofile",".rt"]},"pkg:razor":{"razor":[".cshtml",".razor"]},"pkg:restructuredtext":{"restructuredtext":[".rst"]},"pkg:ruby":{"ruby":[".rb",".rbx",".rjs",".gemspec",".rake",".ru",".erb",".podspec",".rbi"]},"pkg:rust":{"rust":[".rs"]},"pkg:scss":{"scss":[".scss"]},"pkg:search-result":{"search-result":[".code-search"]},"pkg:shaderlab":{"shaderlab":[".shader"]},"pkg:shellscript":{"shellscript":[".sh",".bash",".bashrc",".bash_aliases",".bash_profile",".bash_login",".ebuild",".eclass",".profile",".bash_logout",".xprofile",".xsession",".xsessionrc",".Xsession",".zsh",".zshrc",".zprofile",".zlogin",".zlogout",".zshenv",".zsh-theme",".fish",".ksh",".csh",".cshrc",".tcshrc",".yashrc",".yash_profile"]},"pkg:sql":{"sql":[".sql",".dsql"]},"pkg:swift":{"swift":[".swift"]},"pkg:typescript-basics":{"typescript":[".ts",".cts",".mts"],"typescriptreact":[".tsx"],"json":[".tsbuildinfo"]},"pkg:vb":{"vb":[".vb",".brs",".vbs",".bas",".vba"]},"pkg:xml":{"xml":[".xml",".xsd",".ascx",".atom",".axml",".axaml",".bpmn",".cpt",".csl",".csproj",".csproj.user",".dita",".ditamap",".dtd",".ent",".mod",".dtml",".fsproj",".fxml",".iml",".isml",".jmx",".launch",".menu",".mxml",".nuspec",".opml",".owl",".proj",".props",".pt",".publishsettings",".pubxml",".pubxml.user",".rbxlx",".rbxmx",".rdf",".rng",".rss",".shproj",".storyboard",".svg",".targets",".tld",".tmx",".vbproj",".vbproj.user",".vcxproj",".vcxproj.filters",".wsdl",".wxi",".wxl",".wxs",".xaml",".xbl",".xib",".xlf",".xliff",".xpdl",".xul",".xoml"],"xsl":[".xsl",".xslt"]},"pkg:yaml":{"yaml":[".yaml",".yml",".eyaml",".eyml",".cff",".yaml-tmlanguage",".yaml-tmpreferences",".yaml-tmtheme",".winget"]}},"isInternal":false,"tokens":2602,"sizeBytes":7941},{"name":"README.md","path":"routers/api/packages/README.md","rawUrl":"https://raw.githubusercontent.com/go-gitea/gitea/HEAD/routers/api/packages/README.md","title":"packages Documentation","category":"plugin-manifest","format":"markdown","content":"# Gitea Package Registry\n\nThis document gives a brief overview how the package registry is organized in code.\n\n## Structure\n\nThe package registry code is divided into multiple modules to split the functionality and make code reuse possible.\n\n| Module | Description |\n| - | - |\n| `models/packages` | Common methods and models used by all registry types |\n| `models/packages/<type>` | Methods used by specific registry type. There should be no need to use type specific models. |\n| `modules/packages` | Common methods and types used by multiple registry types |\n| `modules/packages/<type>` | Registry type specific methods and types (e.g. metadata extraction of package files) |\n| `routers/api/packages` | Route definitions for all registry types |\n| `routers/api/packages/<type>` | Route implementation for a specific registry type |\n| `services/packages` | Helper methods used by registry types to handle common tasks like package creation and deletion in `routers` |\n| `services/packages/<type>` | Registry type specific methods used by `routers` and `services` |\n\n## Models\n\nEvery package registry implementation uses the same underlying models:\n\n| Model | Description |\n| - | - |\n| `Package` | The root of a package providing values fixed for every version (e.g. the package name) |\n| `PackageVersion` | A version of a package containing metadata (e.g. the package description) |\n| `PackageFile` | A file of a package describing its content (e.g. file name) |\n| `PackageBlob` | The content of a file (may be shared by multiple files) |\n| `PackageProperty` | Additional properties attached to `Package`, `PackageVersion` or `PackageFile` (e.g. used if metadata is needed for routing) |\n\nThe following diagram shows the relationship between the models:\n```\nPackage <1---*> PackageVersion <1---*> PackageFile <*---1> PackageBlob\n```\n\n## Adding a new package registry type\n\nBefore adding a new package registry type have a look at the existing implementation to get an impression of how it could work.\nMost registry types offer endpoints to retrieve the metadata, upload and download package files.\nThe upload endpoint is often the heavy part because it must validate the uploaded blob, extract metadata and create the models.\nThe methods to validate and extract the metadata should be added in the `modules/packages/<type>` package.\nIf the upload is valid the methods in `services/packages` allow to store the upload and create the corresponding models.\nIt depends if the registry type allows multiple files per package version which method should be called:\n- `CreatePackageAndAddFile`: error if package version already exists\n- `CreatePackageOrAddFileToExisting`: error if file already exists\n- `AddFileToExistingPackage`: error if package version does not exist or file already exists\n\n`services/packages` also contains helper methods to download a file or to remove a package version.\nThere are no helper methods for metadata endpoints because they are very type specific.\n","isInternal":false,"tokens":620,"sizeBytes":2977}],"systemPromptSnippet":"<yakaai_skills repo=\"go-gitea/gitea\">\n<!-- File: AGENTS.md (Tokens: ~638 | Category: root-instruction) -->\n- Never assume, verify before claiming\n- List development targets with `make help`\n- Read relevant developer documentation in the `docs` folder\n- PR descriptions: minimal, only what and why, no task or file listings. Include screenshots for UI changes, before and after when modifying existing UI. Aim for less than 1000 characters\n- Reference issues and PRs by full URL, not by number\n- Use Conventional Commits for commit messages and PR titles, plus Gitea's `enhance` type for user-facing enhancements\n- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` trailer to commit messages, never `Co-Authored-By` or `Signed-off-by`\n- Attribute agent authorship on one trailing line in issue and PR comments, never as a PR description section\n- Never rewrite git history unless asked, update PRs with new commits and normal push\n- Comments: write almost none, short and preferably same-line, explaining why for a future reader. Never narrate code, the change or the prompt. Preserve existing ones that still apply. If you need to write a paragraph-long comment, rethink your implementation, it is likely too complicated\n- Add the current year to copyright headers of new `.go` files\n- In `options/locale`, only edit `locale_en-US.json`, other locales are synced automatically\n- In TS, use `!` instead of `?.`/`??` when a value always exists\n- In Go, prefer to use modern language features wherever possible\n- In Go, function-name prefixes in errors like `fmt.Errorf(\"Foo: %w\", err)` must always name the function they are in\n- Write sizes as multiplications like `64 * 1024`, not bit shifts like `64 << 10`\n- Prefer `tw-*` utilities over inline `style` and `flex-*` helpers over per-child `tw-ml-*`/`tw-mr-*` margins, falling back to `tw-*` where specificity requires `!important`\n- Run `make fmt` after `.go` edits, `make tidy` after `go.mod` edits, `make generate-swagger` after API changes, and lint what changed with `make lint-go`, `lint-js`, `lint-css` or `lint-templates`\n- Fix the cause rather than disabling a linter or weakening a test. Where unavoidable, use the narrowest scope with a trailing comment giving the reason\n- Run single tests with `go test -run '^TestName$' ./modulepath/` for Go, `pnpm exec vitest <path-filter>` for TS and `GITEA_TEST_E2E_FLAGS='<filepath>' make test-e2e` for e2e\n- Write the fewest, fastest tests covering the behavior, extending an existing one where possible. Prefer unit tests where logic is testable in isolation\n- Aim for sub-2s per integration test and sub-4s per e2e test. Wait on a deterministic condition rather than `sleep`, and prefer semantic locators in e2e tests\n\n<!-- File: tools/generate-svg-vscode-extensions.json (Tokens: ~2602 | Category: anthropic-skill) -->\n{\n  \"pkg:bat\": {\n    \"bat\": [\n      \".bat\",\n      \".cmd\"\n    ]\n  },\n  \"pkg:clojure\": {\n    \"clojure\": [\n      \".clj\",\n      \".cljs\",\n      \".cljc\",\n      \".cljx\",\n      \".clojure\",\n      \".edn\"\n    ]\n  },\n  \"pkg:coffeescript\": {\n    \"coffeescript\": [\n      \".coffee\",\n      \".cson\",\n      \".iced\"\n    ]\n  },\n  \"pkg:configuration-editing\": {\n    \"jsonc\": [\n      \".code-workspace\",\n      \"language-configuration.json\",\n      \"icon-theme.json\",\n      \"color-theme.json\"\n    ],\n    \"json\": [\n      \".code-profile\"\n    ]\n  },\n  \"pkg:cpp\": {\n    \"c\": [\n      \".c\",\n      \".i\"\n    ],\n    \"cpp\": [\n      \".cpp\",\n      \".cppm\",\n      \".cc\",\n      \".ccm\",\n      \".cxx\",\n      \".cxxm\",\n      \".c++\",\n      \".c++m\",\n      \".hpp\",\n      \".hh\",\n      \".hxx\",\n      \".h++\",\n      \".h\",\n      \".ii\",\n      \".ino\",\n      \".inl\",\n      \".ipp\",\n      \".ixx\",\n      \".tpp\",\n      \".txx\",\n      \".hpp.in\",\n      \".h.in\"\n    ],\n    \"cuda-cpp\": [\n      \".cu\",\n      \".cuh\"\n    ]\n  },\n  \"pkg:csharp\": {\n    \"csharp\": [\n      \".cs\",\n      \".csx\",\n      \".cake\"\n    ]\n  },\n  \"pkg:css\": {\n    \"css\": [\n      \".css\"\n    ]\n  },\n  \"pkg:dart\": {\n    \"dart\": [\n      \".dart\"\n    ]\n  },\n  \"pkg:diff\": {\n    \"diff\": [\n      \".diff\",\n      \".patch\",\n      \".rej\"\n    ]\n  },\n  \"pkg:docker\": {\n    \"dockerfile\": [\n      \".dockerfile\",\n      \".containerfile\"\n    ]\n  },\n  \"pkg:fsharp\": {\n    \"fsharp\": [\n      \".fs\",\n      \".fsi\",\n      \".fsx\",\n      \".fsscript\"\n    ]\n  },\n  \"pkg:git-base\": {\n    \"ignore\": [\n      \".gitignore_global\",\n      \".gitignore\",\n      \".git-blame-ignore-revs\"\n    ]\n  },\n  \"pkg:go\": {\n    \"go\": [\n      \".go\"\n    ]\n  },\n  \"pkg:groovy\": {\n    \"groovy\": [\n      \".groovy\",\n      \".gvy\",\n      \".gradle\",\n      \".jenkinsfile\",\n      \".nf\"\n    ]\n  },\n  \"pkg:handlebars\": {\n    \"handlebars\": [\n      \".handlebars\",\n      \".hbs\",\n      \".hjs\"\n    ]\n  },\n  \"pkg:hlsl\": {\n    \"hlsl\": [\n      \".hlsl\",\n      \".hlsli\",\n      \".fx\",\n      \".fxh\",\n      \".vsh\",\n      \".psh\",\n      \".cginc\",\n      \".compute\"\n    ]\n  },\n  \"pkg:html\": {\n    \"html\": [\n      \".html\",\n      \".htm\",\n      \".shtml\",\n      \".xhtml\",\n      \".xht\",\n      \".mdoc\",\n      \".jsp\",\n      \".asp\",\n      \".aspx\",\n      \".jshtm\",\n      \".volt\",\n      \".ejs\",\n      \".rhtml\"\n    ]\n  },\n  \"pkg:ini\": {\n    \"ini\": [\n      \".ini\"\n    ],\n    \"properties\": [\n      \".conf\",\n      \".properties\",\n      \".cfg\",\n      \".directory\",\n      \".gitattributes\",\n      \".gitconfig\",\n      \".gitmodules\",\n      \".editorconfig\",\n      \".repo\"\n    ]\n  },\n  \"pkg:java\": {\n    \"java\": [\n      \".java\",\n      \".jav\"\n    ]\n  },\n  \"pkg:javascript\": {\n    \"javascriptreact\": [\n      \".jsx\"\n    ],\n    \"javascript\": [\n      \".js\",\n      \".es6\",\n      \".mjs\",\n      \".cjs\",\n      \".pac\"\n    ]\n  },\n  \"pkg:json\": {\n    \"json\": [\n      \".json\",\n      \".bowerrc\",\n      \".jscsrc\",\n      \".webmanifest\",\n      \".js.map\",\n      \".css.map\",\n      \".ts.map\",\n      \".har\",\n      \".jslintrc\",\n      \".jsonld\",\n      \".geojson\",\n      \".ipynb\",\n      \".vuerc\"\n    ],\n    \"jsonc\": [\n      \".jsonc\",\n      \".eslintrc\",\n      \".eslintrc.json\",\n      \".jsfmtrc\",\n      \".jshintrc\",\n      \".swcrc\",\n      \".hintrc\",\n      \".babelrc\"\n    ],\n    \"jsonl\": [\n      \".jsonl\",\n      \".ndjson\"\n    ],\n    \"snippets\": [\n      \".code-snippets\"\n    ]\n  },\n  \"pkg:julia\": {\n    \"julia\": [\n      \".jl\"\n    ],\n    \"juliamarkdown\": [\n      \".jmd\"\n    ]\n  },\n  \"pkg:latex\": {\n    \"tex\": [\n      \".sty\",\n      \".cls\",\n      \".bbx\",\n      \".cbx\"\n    ],\n    \"latex\": [\n      \".tex\",\n      \".ltx\",\n      \".ctx\"\n    ],\n    \"bibtex\": [\n      \".bib\"\n    ]\n  },\n  \"pkg:less\": {\n    \"less\": [\n      \".less\"\n    ]\n  },\n  \"pkg:log\": {\n    \"log\": [\n      \".log\",\n      \"*.log.?\"\n    ]\n  },\n  \"pkg:lua\": {\n    \"lua\": [\n      \".lua\"\n    ]\n  },\n  \"pkg:make\": {\n    \"makefile\": [\n      \".mak\",\n      \".mk\"\n    ]\n  },\n  \"pkg:markdown-basics\": {\n    \"markdown\": [\n      \".md\",\n      \".mkd\",\n      \".mdwn\",\n      \".mdown\",\n      \".markdown\",\n      \".markdn\",\n      \".mdtxt\",\n      \".mdtext\",\n      \".workbook\"\n    ]\n  },\n  \"pkg:ms-vscode.js-debug\": {\n    \"wat\": [\n      \".wat\",\n      \".wasm\"\n    ]\n  },\n  \"pkg:npm\": {\n    \"ignore\": [\n      \".npmignore\"\n    ],\n    \"properties\": [\n      \".npmrc\"\n    ]\n  },\n  \"pkg:objective-c\": {\n    \"objective-c\": [\n      \".m\"\n    ],\n    \"objective-cpp\": [\n      \".mm\"\n    ]\n  },\n  \"pkg:perl\": {\n    \"perl\": [\n      \".pl\",\n      \".pm\",\n      \".pod\",\n      \".t\",\n      \".PL\",\n      \".psgi\"\n    ],\n    \"raku\": [\n      \".raku\",\n      \".rakumod\",\n      \".rakutest\",\n      \".rakudoc\",\n      \".nqp\",\n      \".p6\",\n      \".pl6\",\n      \".pm6\"\n    ]\n  },\n  \"pkg:php\": {\n    \"php\": [\n      \".php\",\n      \".php4\",\n      \".php5\",\n      \".phtml\",\n      \".ctp\"\n    ]\n  },\n  \"pkg:powershell\": {\n    \"powershell\": [\n      \".ps1\",\n      \".psm1\",\n      \".psd1\",\n      \".pssc\",\n      \".psrc\"\n    ]\n  },\n  \"pkg:pug\": {\n    \"jade\": [\n      \".pug\",\n      \".jade\"\n    ]\n  },\n  \"pkg:python\": {\n    \"python\": [\n      \".py\",\n      \".rpy\",\n      \".pyw\",\n      \".cpy\",\n      \".gyp\",\n      \".gypi\",\n      \".pyi\",\n      \".ipy\",\n      \".pyt\"\n    ]\n  },\n  \"pkg:r\": {\n    \"r\": [\n      \".r\",\n      \".rhistory\",\n      \".rprofile\",\n      \".rt\"\n    ]\n  },\n  \"pkg:razor\": {\n    \"razor\": [\n      \".cshtml\",\n      \".razor\"\n    ]\n  },\n  \"pkg:restructuredtext\": {\n    \"restructuredtext\": [\n      \".rst\"\n    ]\n  },\n  \"pkg:ruby\": {\n    \"ruby\": [\n      \".rb\",\n      \".rbx\",\n      \".rjs\",\n      \".gemspec\",\n      \".rake\",\n      \".ru\",\n      \".erb\",\n      \".podspec\",\n      \".rbi\"\n    ]\n  },\n  \"pkg:rust\": {\n    \"rust\": [\n      \".rs\"\n    ]\n  },\n  \"pkg:scss\": {\n    \"scss\": [\n      \".scss\"\n    ]\n  },\n  \"pkg:search-result\": {\n    \"search-result\": [\n      \".code-search\"\n    ]\n  },\n  \"pkg:shaderlab\": {\n    \"shaderlab\": [\n      \".shader\"\n    ]\n  },\n  \"pkg:shellscript\": {\n    \"shellscript\": [\n      \".sh\",\n      \".bash\",\n      \".bashrc\",\n      \".bash_aliases\",\n      \".bash_profile\",\n      \".bash_login\",\n      \".ebuild\",\n      \".eclass\",\n      \".profile\",\n      \".bash_logout\",\n      \".xprofile\",\n      \".xsession\",\n      \".xsessionrc\",\n      \".Xsession\",\n      \".zsh\",\n      \".zshrc\",\n      \".zprofile\",\n      \".zlogin\",\n      \".zlogout\",\n      \".zshenv\",\n      \".zsh-theme\",\n      \".fish\",\n      \".ksh\",\n      \".csh\",\n      \".cshrc\",\n      \".tcshrc\",\n      \".yashrc\",\n      \".yash_profile\"\n    ]\n  },\n  \"pkg:sql\": {\n    \"sql\": [\n      \".sql\",\n      \".dsql\"\n    ]\n  },\n  \"pkg:swift\": {\n    \"swift\": [\n      \".swift\"\n    ]\n  },\n  \"pkg:typescript-basics\": {\n    \"typescript\": [\n      \".ts\",\n      \".cts\",\n      \".mts\"\n    ],\n    \"typescriptreact\": [\n      \".tsx\"\n    ],\n    \"json\": [\n      \".tsbuildinfo\"\n    ]\n  },\n  \"pkg:vb\": {\n    \"vb\": [\n      \".vb\",\n      \".brs\",\n      \".vbs\",\n      \".bas\",\n      \".vba\"\n    ]\n  },\n  \"pkg:xml\": {\n    \"xml\": [\n      \".xml\",\n      \".xsd\",\n      \".ascx\",\n      \".atom\",\n      \".axml\",\n      \".axaml\",\n      \".bpmn\",\n      \".cpt\",\n      \".csl\",\n      \".csproj\",\n      \".csproj.user\",\n      \".dita\",\n      \".ditamap\",\n      \".dtd\",\n      \".ent\",\n      \".mod\",\n      \".dtml\",\n      \".fsproj\",\n      \".fxml\",\n      \".iml\",\n      \".isml\",\n      \".jmx\",\n      \".launch\",\n      \".menu\",\n      \".mxml\",\n      \".nuspec\",\n      \".opml\",\n      \".owl\",\n      \".proj\",\n      \".props\",\n      \".pt\",\n      \".publishsettings\",\n      \".pubxml\",\n      \".pubxml.user\",\n      \".rbxlx\",\n      \".rbxmx\",\n      \".rdf\",\n      \".rng\",\n      \".rss\",\n      \".shproj\",\n      \".storyboard\",\n      \".svg\",\n      \".targets\",\n      \".tld\",\n      \".tmx\",\n      \".vbproj\",\n      \".vbproj.user\",\n      \".vcxproj\",\n      \".vcxproj.filters\",\n      \".wsdl\",\n      \".wxi\",\n      \".wxl\",\n      \".wxs\",\n      \".xaml\",\n      \".xbl\",\n      \".xib\",\n      \".xlf\",\n      \".xliff\",\n      \".xpdl\",\n      \".xul\",\n      \".xoml\"\n    ],\n    \"xsl\": [\n      \".xsl\",\n      \".xslt\"\n    ]\n  },\n  \"pkg:yaml\": {\n    \"yaml\": [\n      \".yaml\",\n      \".yml\",\n      \".eyaml\",\n      \".eyml\",\n      \".cff\",\n      \".yaml-tmlanguage\",\n      \".yaml-tmpreferences\",\n      \".yaml-tmtheme\",\n      \".winget\"\n    ]\n  }\n}\n\n<!-- File: routers/api/packages/README.md (Tokens: ~620 | Category: plugin-manifest) -->\n# Gitea Package Registry\n\nThis document gives a brief overview how the package registry is organized in code.\n\n## Structure\n\nThe package registry code is divided into multiple modules to split the functionality and make code reuse possible.\n\n| Module | Description |\n| - | - |\n| `models/packages` | Common methods and models used by all registry types |\n| `models/packages/<type>` | Methods used by specific registry type. There should be no need to use type specific models. |\n| `modules/packages` | Common methods and types used by multiple registry types |\n| `modules/packages/<type>` | Registry type specific methods and types (e.g. metadata extraction of package files) |\n| `routers/api/packages` | Route definitions for all registry types |\n| `routers/api/packages/<type>` | Route implementation for a specific registry type |\n| `services/packages` | Helper methods used by registry types to handle common tasks like package creation and deletion in `routers` |\n| `services/packages/<type>` | Registry type specific methods used by `routers` and `services` |\n\n## Models\n\nEvery package registry implementation uses the same underlying models:\n\n| Model | Description |\n| - | - |\n| `Package` | The root of a package providing values fixed for every version (e.g. the package name) |\n| `PackageVersion` | A version of a package containing metadata (e.g. the package description) |\n| `PackageFile` | A file of a package describing its content (e.g. file name) |\n| `PackageBlob` | The content of a file (may be shared by multiple files) |\n| `PackageProperty` | Additional properties attached to `Package`, `PackageVersion` or `PackageFile` (e.g. used if metadata is needed for routing) |\n\nThe following diagram shows the relationship between the models:\n```\nPackage <1---*> PackageVersion <1---*> PackageFile <*---1> PackageBlob\n```\n\n## Adding a new package registry type\n\nBefore adding a new package registry type have a look at the existing implementation to get an impression of how it could work.\nMost registry types offer endpoints to retrieve the metadata, upload and download package files.\nThe upload endpoint is often the heavy part because it must validate the uploaded blob, extract metadata and create the models.\nThe methods to validate and extract the metadata should be added in the `modules/packages/<type>` package.\nIf the upload is valid the methods in `services/packages` allow to store the upload and create the corresponding models.\nIt depends if the registry type allows multiple files per package version which method should be called:\n- `CreatePackageAndAddFile`: error if package version already exists\n- `CreatePackageOrAddFileToExisting`: error if file already exists\n- `AddFileToExistingPackage`: error if package version does not exist or file already exists\n\n`services/packages` also contains helper methods to download a file or to remove a package version.\nThere are no helper methods for metadata endpoints because they are very type specific.\n</yakaai_skills>"}