advanced-preset 0.0.0-stage → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/dist/ap.js +9919 -0
  4. package/package.json +43 -4
  5. package/template/.agents/skills/ap-preset-authoring/SKILL.md +131 -0
  6. package/template/.agents/skills/ap-preset-authoring/recipes.md +136 -0
  7. package/template/.agents/skills/ap-preset-authoring/references/README.md +70 -0
  8. package/template/.agents/skills/ap-preset-authoring/references/artifact-and-runtime.md +137 -0
  9. package/template/.agents/skills/ap-preset-authoring/references/assembly.md +111 -0
  10. package/template/.agents/skills/ap-preset-authoring/references/build-variables.md +75 -0
  11. package/template/.agents/skills/ap-preset-authoring/references/cli.md +117 -0
  12. package/template/.agents/skills/ap-preset-authoring/references/configuration.md +177 -0
  13. package/template/.agents/skills/ap-preset-authoring/references/directives.md +81 -0
  14. package/template/.agents/skills/ap-preset-authoring/references/expressions.md +69 -0
  15. package/template/.agents/skills/ap-preset-authoring/references/locales.md +62 -0
  16. package/template/.agents/skills/ap-preset-authoring/references/macros.md +54 -0
  17. package/template/.agents/skills/ap-preset-authoring/references/manifest.md +304 -0
  18. package/template/.agents/skills/ap-preset-authoring/references/meta-and-tasks.md +107 -0
  19. package/template/.agents/skills/ap-preset-authoring/references/modules.md +99 -0
  20. package/template/.agents/skills/ap-preset-authoring/references/structures.md +261 -0
  21. package/template/.agents/skills/ap-preset-authoring/references/transports.md +219 -0
  22. package/template/.agents/skills/ap-preset-authoring/references/user-modules.md +118 -0
  23. package/template/.agents/skills/ap-preset-authoring/references/workflows.md +143 -0
  24. package/template/.agents/skills/ap-preset-design/SKILL.md +64 -0
  25. package/template/.agents/skills/ap-preset-design/references/design-checklist.md +144 -0
  26. package/template/.agents/skills/ap-preset-design/references/design-doc-template.md +129 -0
  27. package/template/.agents/skills/ap-preset-design/references/petals-case-study.md +125 -0
  28. package/template/.agents/skills/ap-preset-testing/SKILL.md +93 -0
  29. package/template/.agents/skills/ap-preset-testing/references/release.md +37 -0
  30. package/template/.agents/skills/ap-preset-testing/references/troubleshooting.md +42 -0
  31. package/template/.github/workflows/build.yml +22 -0
  32. package/template/AGENTS.md +42 -0
  33. package/template/LICENSE +121 -0
  34. package/template/README.md +78 -0
  35. package/template/gitignore +1 -0
  36. package/template/locales/zh-cn.yaml +23 -0
  37. package/template/modules/core/core.md +27 -0
  38. package/template/modules/guidelines/options.md +15 -0
  39. package/template/modules/guidelines/show-dont-tell.md +15 -0
  40. package/template/modules/tasks/meta.md +14 -0
  41. package/template/package.json +17 -0
  42. package/template/preset.yaml +134 -0
  43. package/template/workflows/linear.md +33 -0
  44. package/template/workflows/task.md +17 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mirrorange
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ # advanced-preset · `ap`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [Advanced Preset](https://github.com/mirrorange/advanced-preset)(AP)的命令行工具链:把 Markdown + YAML 编写的预设源码编译成 SillyTavern 中 AP 扩展可加载的 `.apreset.json`,并提供检查、组装预览、热更新开发服务器、新预设模板与 Agent Skills。
4
+
5
+ [![npm](https://img.shields.io/npm/v/advanced-preset?color=d6409f)](https://www.npmjs.com/package/advanced-preset)
6
+ [![license](https://img.shields.io/badge/license-MIT-8b5cf6)](https://github.com/mirrorange/advanced-preset/blob/main/LICENSE)
7
+ ![node](https://img.shields.io/node/v/advanced-preset?color=2563eb)
8
+
9
+ ## 快速开始
10
+
11
+ 创建一个新的预设仓库(需要 Node.js 20+):
12
+
13
+ ```sh
14
+ npx advanced-preset@latest init my-preset --name "我的预设"
15
+ cd my-preset
16
+ npm install
17
+ npm run dev # 在 AP 面板 → 调试 → 开发源 填入 http://localhost:4747
18
+ ```
19
+
20
+ 在已有的预设仓库中安装:
21
+
22
+ ```sh
23
+ npm install -D advanced-preset
24
+ npx ap check --strict
25
+ ```
26
+
27
+ ## 命令
28
+
29
+ | 命令 | 作用 |
30
+ | --- | --- |
31
+ | `ap build [dir] [--out dist] [--strict]` | 编译源码为 `dist/<id>.apreset.json` |
32
+ | `ap check [dir] [--strict]` | 只校验,不输出产物;`--strict` 把警告也视为错误 |
33
+ | `ap dev [dir] [--port 4747] [--host 127.0.0.1]` | 监视源码、自动重建,并为 AP 调试页提供产物 |
34
+ | `ap preview [dir] [--transport t] [--workflow w] [--config c] …` | 以与运行期相同的组装器输出请求消息 |
35
+ | `ap init <dir> [--id x] [--name "…"] [--author me]` | 从内置模板创建新预设仓库 |
36
+ | `ap skills list` / `ap skills install [dir] [--target .agents/skills]` | 列出 / 安装、更新内置的 AP Agent Skills |
37
+
38
+ 完整说明见 [CLI 参考](https://github.com/mirrorange/advanced-preset/blob/main/docs/reference/cli.md)。
39
+
40
+ ## 文档
41
+
42
+ - [预设开发指南](https://github.com/mirrorange/advanced-preset/blob/main/docs/guide/README.md):面向新手,以花瓣预设为例,推荐用 AI Agent 开发;
43
+ - [参考文档](https://github.com/mirrorange/advanced-preset/blob/main/docs/reference/README.md):源码格式、编译规则与运行期行为;
44
+ - [花瓣预设](https://github.com/mirrorange/petals-preset):完整的真实例子。
45
+
46
+ ## 包内容
47
+
48
+ - `dist/ap.js`:自包含的单文件 CLI,无运行时依赖;
49
+ - `template/`:`ap init` 使用的预设模板(含 `.agents/skills`、`AGENTS.md`、GitHub Actions)。
50
+
51
+ ## 许可
52
+
53
+ CLI 以 [MIT](LICENSE) 许可发布;`template/` 中的模板内容以 [CC0 1.0](template/LICENSE) 发布,生成的预设可以自由选用任何许可。