@agent-cms/agentcms 0.0.0-stage → 0.1.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 (84) hide show
  1. package/LICENSE +143 -0
  2. package/README.md +1119 -2
  3. package/changelog.json +20 -0
  4. package/dist/admin/admin-files.json +48 -0
  5. package/dist/admin/assets/CodeEditor-DcFzGUt8.js +24 -0
  6. package/dist/admin/assets/flexweg-logo-CdtuqAFA.png +0 -0
  7. package/dist/admin/assets/index-CLZ1gQZl.js +5460 -0
  8. package/dist/admin/assets/index-DMcGogR2.css +1 -0
  9. package/dist/admin/assets/sql-wasm-C1U8OeUW.wasm +0 -0
  10. package/dist/admin/assets/sql-wasm-CYl3LXH_.js +2 -0
  11. package/dist/admin/assets/sql-wasm-V5jTDcrT.js +1 -0
  12. package/dist/admin/config.js +11 -0
  13. package/dist/admin/external.default.json +72 -0
  14. package/dist/admin/index.html +116 -0
  15. package/dist/admin/plugins/core-seo/bundle.js +55 -0
  16. package/dist/admin/plugins/core-seo/manifest.json +7 -0
  17. package/dist/admin/plugins/flexweg-archives/bundle.js +1414 -0
  18. package/dist/admin/plugins/flexweg-archives/manifest.json +7 -0
  19. package/dist/admin/plugins/flexweg-multilang/bundle.js +1187 -0
  20. package/dist/admin/plugins/flexweg-multilang/manifest.json +7 -0
  21. package/dist/admin/plugins/flexweg-rss/bundle.js +1354 -0
  22. package/dist/admin/plugins/flexweg-rss/manifest.json +7 -0
  23. package/dist/admin/plugins/flexweg-search/bundle.js +1243 -0
  24. package/dist/admin/plugins/flexweg-search/manifest.json +7 -0
  25. package/dist/admin/plugins/flexweg-sitemaps/bundle.js +1293 -0
  26. package/dist/admin/plugins/flexweg-sitemaps/manifest.json +7 -0
  27. package/dist/admin/runtime/cms-runtime.js +164 -0
  28. package/dist/admin/runtime/react-dom-client.js +13 -0
  29. package/dist/admin/runtime/react-dom.js +16 -0
  30. package/dist/admin/runtime/react-i18next.js +21 -0
  31. package/dist/admin/runtime/react-jsx-runtime.js +17 -0
  32. package/dist/admin/runtime/react.js +55 -0
  33. package/dist/admin/themes/corporate/bundle.js +14465 -0
  34. package/dist/admin/themes/corporate/manifest.json +7 -0
  35. package/dist/admin/themes/corporate/theme.css +2 -0
  36. package/dist/admin/themes/magazine/bundle.js +10229 -0
  37. package/dist/admin/themes/magazine/manifest.json +7 -0
  38. package/dist/admin/themes/magazine/theme.css +2 -0
  39. package/dist/admin/themes/marketplace-core/bundle.js +11213 -0
  40. package/dist/admin/themes/marketplace-core/manifest.json +7 -0
  41. package/dist/admin/themes/marketplace-core/theme.css +1613 -0
  42. package/dist/admin/themes/portfolio/bundle.js +9195 -0
  43. package/dist/admin/themes/portfolio/manifest.json +7 -0
  44. package/dist/admin/themes/portfolio/theme.css +2 -0
  45. package/dist/admin/themes/storefront/bundle.js +13172 -0
  46. package/dist/admin/themes/storefront/manifest.json +7 -0
  47. package/dist/admin/themes/storefront/theme.css +2 -0
  48. package/dist/agent/agentcms.mjs +1711 -0
  49. package/dist/agent/chunks/hosting-D_uj-Mt1.mjs +117 -0
  50. package/dist/agent/chunks/index-CrvEoyi0.mjs +3608 -0
  51. package/dist/agent/chunks/install-DkCCcKAO.mjs +577 -0
  52. package/dist/agent/chunks/plan-EYKegfhp.mjs +245 -0
  53. package/dist/agent/chunks/registry-lkfb_E9O.mjs +53517 -0
  54. package/dist/agent/chunks/siteAdd-BqcYt8nu.mjs +118 -0
  55. package/dist/agent/chunks/sql-wasm-GjJDiefO.mjs +10 -0
  56. package/dist/agent/chunks/sqljs-DjSCStJ0.mjs +20 -0
  57. package/dist/agent/vendor/sql-wasm.cjs +188 -0
  58. package/dist/theme-assets/corporate-menu.js +266 -0
  59. package/dist/theme-assets/corporate-posts.js +571 -0
  60. package/dist/theme-assets/corporate.css +2 -0
  61. package/dist/theme-assets/default-menu.js +266 -0
  62. package/dist/theme-assets/default-posts.js +378 -0
  63. package/dist/theme-assets/default.css +1 -0
  64. package/dist/theme-assets/magazine-menu.js +227 -0
  65. package/dist/theme-assets/magazine-posts.js +361 -0
  66. package/dist/theme-assets/magazine.css +2 -0
  67. package/dist/theme-assets/portfolio-filters.js +104 -0
  68. package/dist/theme-assets/portfolio-menu.js +240 -0
  69. package/dist/theme-assets/portfolio-posts.js +358 -0
  70. package/dist/theme-assets/portfolio.css +2 -0
  71. package/dist/theme-assets/storefront-catalog.js +504 -0
  72. package/dist/theme-assets/storefront-menu.js +239 -0
  73. package/dist/theme-assets/storefront-posts.js +404 -0
  74. package/dist/theme-assets/storefront.css +2 -0
  75. package/dist/version.json +9 -0
  76. package/package.json +101 -4
  77. package/plugin/.claude-plugin/plugin.json +16 -0
  78. package/plugin/skills/agentcms-install/SKILL.md +110 -0
  79. package/plugin/skills/agentcms-install/references/cloudflare.md +15 -0
  80. package/plugin/skills/agentcms-install/references/flexweg.md +11 -0
  81. package/plugin/skills/agentcms-install/references/github.md +67 -0
  82. package/plugin/skills/agentcms-install/references/gitlab.md +15 -0
  83. package/plugin/skills/agentcms-install/references/s3.md +81 -0
  84. package/plugin/skills/agentcms-manage/SKILL.md +92 -0
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: agentcms-manage
3
+ description: Check, repair and update existing AgentCMS sites - list the sites this computer manages, register one installed elsewhere, check their health (admin, theme assets, config.js, GitHub Pages, credentials), detect when a newer AgentCMS release or newer skills exist, and offer to update hosted admins. Use when the user asks about one of their AgentCMS / Flexweg CMS sites, says something is broken, or wants to update.
4
+ license: PolyForm-Noncommercial-1.0.0
5
+ metadata:
6
+ version: "0.1.0"
7
+ repository: "https://github.com/fleox/agentcms"
8
+ ---
9
+
10
+ # Manage AgentCMS sites
11
+
12
+ **Language:** talk to the user in their language; keep commands and files in English.
13
+
14
+ Every command is `npx -y @agent-cms/agentcms@0.1.0 <command> --json` (Node.js 20+); read `error.hint` whenever `ok` is false. Fallback without npm: `node agentcms/dist/agent/agentcms.mjs` from a clone of https://github.com/fleox/agentcms.
15
+
16
+ ## Always start with status
17
+
18
+ ```bash
19
+ npx -y @agent-cms/agentcms@0.1.0 status --json
20
+ ```
21
+
22
+ It compares this tool (= these skills, same release) with the latest release, and each registered site's hosted admin with this release.
23
+
24
+ - `data.tool.updateAvailable: true` -> tell the user AgentCMS `data.tool.latest` exists and offer to update the skills **before anything else**: Claude Code `/plugin marketplace update agentcms` then `/reload-plugins`; other agents re-read the skills from the repository. The new skills pin the new CLI, which then sees the new admin.
25
+ - A site with `state: "update"` -> summarise `update.changes` (breaking ones first, `update.breaking`), then **offer** `deploy-admin` (below). Never update silently.
26
+ - `state: "newer"` -> the hosted admin is newer than this tool: update the skills / tool first, never deploy an older admin.
27
+ - `state: "unreachable"` -> run `doctor` for that site.
28
+ - `data.advice` already phrases these; relay it.
29
+
30
+ ## Which site?
31
+
32
+ One computer can manage many sites. `npx -y @agent-cms/agentcms@0.1.0 site list --json` lists them.
33
+
34
+ - Commands take `--site <alias>`. Without it the tool uses the only site, the folder's `agentcms.json` (`{ "site": "<alias>" }`), or the default chosen with `site use` - otherwise it fails with `site-required`: ask the user which site.
35
+ - Always say which site you are working on before changing anything ("Working on **my-blog** (https://...)").
36
+ - Never move on to another site without telling the user.
37
+
38
+ Registry commands: `site show <alias>`, `site use <alias>`, `site rename <from> <to>`, `site forget <alias>` (local only - nothing is deleted online).
39
+
40
+ ## Register a site installed elsewhere
41
+
42
+ (Setup wizard, another computer, by hand.)
43
+
44
+ ```bash
45
+ npx -y @agent-cms/agentcms@0.1.0 site add <alias> --admin-url https://example.com/admin/ --data-credential github:<login> --hosting-credential <account> --json
46
+ ```
47
+
48
+ - `--data-credential` is required for Markdown-in-git sites (to read where the site publishes); omit it otherwise.
49
+ - `--hosting-credential` is needed to update the hosted admin later; for git hostings on the same account as the content it defaults to the data credential.
50
+ - SQLite sites: `--data-credential` is the account of the database location (it reads the real publish target from the database), `--passphrase-credential passphrase:<name>` the passphrase of an encrypted database (store it first with `credentials set`).
51
+ - Missing credential -> see "Credentials" in the `agentcms-install` skill (the user stores secrets themselves; never in the chat).
52
+
53
+ ## Health check
54
+
55
+ ```bash
56
+ npx -y @agent-cms/agentcms@0.1.0 doctor --site <alias> --json
57
+ ```
58
+
59
+ Add `--deep` to also test write access (writes then deletes a probe file on file hosts). For each check with `status: "fail"` or `"warn"`, explain it in plain words and propose its `fix`. Common ones:
60
+
61
+ - `admin` / `admin-files` failing right after a deploy on GitHub/GitLab/Cloudflare Pages: wait a minute, re-run.
62
+ - `admin-files`: bundle "served as application/xml" or missing -> the admin was copied partially; propose `deploy-admin`.
63
+ - `config-js` publishes secrets -> urgent: tell the user to revoke those keys first, then redeploy.
64
+ - `database-exposure` fails -> the SQLite database is downloadable in clear text: propose moving to an encrypted database or a separate private location (reinstall with a new alias, then the user migrates content with Settings -> Data backend -> export / import).
65
+ - `github-pages` not enabled -> give the user the settings link from `fix`.
66
+ - `credential-*` missing -> the user stores it again with `credentials set`.
67
+
68
+ ## Update a hosted admin
69
+
70
+ 1. Plan only (writes nothing):
71
+ ```bash
72
+ npx -y @agent-cms/agentcms@0.1.0 deploy-admin --site <alias> --json
73
+ ```
74
+ Show `from -> to`, the number of files and the changes (breaking first). If a plan has `refused`, explain why and stop for that site.
75
+ 2. After the user agrees:
76
+ ```bash
77
+ npx -y @agent-cms/agentcms@0.1.0 deploy-admin --site <alias> --yes --json
78
+ ```
79
+ Add `--theme-assets` when the changes list the `sync-theme-assets` action. `--all` plans / updates every hosted site (list them all to the user first).
80
+ 3. Relay `pendingActions` (e.g. `regenerate-all`: in the admin, Regenerate -> Everything) and run `doctor` again.
81
+
82
+ ## SQLite sites: encryption and history
83
+
84
+ - **Not encrypted yet** (`doctor` -> `database-exposure` fail, or the user asks): in the admin, Settings -> Data backend -> **Encrypt the database**. The admin generates a passphrase; the user saves it in their password manager, ticks the confirmation and applies. Other browsers then ask for it once. Store it for the CLI too: `! npx -y @agent-cms/agentcms@0.1.0 credentials set passphrase:<alias>`.
85
+ - **Change the passphrase** (leaked, editor left): same place, **Change the passphrase**. Old git commits still hold versions encrypted with the old one - compact the history afterwards (below).
86
+ - **Data branch history** (database kept in git, e.g. `agentcms-data`): every save adds a full copy of the encrypted file. When the repository grows, or after a passphrase change:
87
+ ```bash
88
+ npx -y @agent-cms/agentcms@0.1.0 compact-data --site <alias> --json
89
+ ```
90
+ shows the commit count; after the user agrees, re-run with `--yes` to keep one commit. GitHub only; branches holding anything else than the database are refused.
91
+
92
+ Downgrades are refused (`--allow-downgrade` only on the user's explicit request), and an admin is never replaced by one that can't read the site's data format.