@agent-cms/agentcms 0.1.0 → 0.1.1
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.
- package/README.md +2 -2
- package/changelog.json +11 -0
- package/dist/admin/admin-files.json +4 -4
- package/dist/admin/assets/{CodeEditor-DcFzGUt8.js → CodeEditor-Wx1WlF3h.js} +1 -1
- package/dist/admin/assets/{index-CLZ1gQZl.js → index-DFVZw8E0.js} +23 -23
- package/dist/admin/assets/{sql-wasm-CYl3LXH_.js → sql-wasm-Bfkbn6Oa.js} +1 -1
- package/dist/admin/index.html +2 -2
- package/dist/admin/plugins/core-seo/bundle.js +2 -2
- package/dist/admin/plugins/flexweg-search/bundle.js +15 -15
- package/dist/admin/themes/marketplace-core/bundle.js +1 -1
- package/dist/agent/agentcms.mjs +7 -7
- package/dist/agent/chunks/{hosting-D_uj-Mt1.mjs → hosting-BftlDdsL.mjs} +3 -3
- package/dist/agent/chunks/{index-CrvEoyi0.mjs → index-BG05qslv.mjs} +29 -29
- package/dist/agent/chunks/{install-DkCCcKAO.mjs → install-DnmgOT3F.mjs} +4 -4
- package/dist/agent/chunks/{plan-EYKegfhp.mjs → plan-BrM8ztEp.mjs} +2 -2
- package/dist/agent/chunks/{registry-lkfb_E9O.mjs → registry-C9TSnZ77.mjs} +6 -6
- package/dist/agent/chunks/{siteAdd-BqcYt8nu.mjs → siteAdd-BcXhN9fk.mjs} +4 -4
- package/dist/version.json +1 -1
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/agentcms-install/SKILL.md +15 -15
- package/plugin/skills/agentcms-install/references/flexweg.md +1 -1
- package/plugin/skills/agentcms-install/references/github.md +2 -2
- package/plugin/skills/agentcms-install/references/gitlab.md +1 -1
- package/plugin/skills/agentcms-install/references/s3.md +2 -2
- package/plugin/skills/agentcms-manage/SKILL.md +11 -11
|
@@ -4,11 +4,11 @@ import { dirname as __acmsDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acmsRequire(import.meta.url);
|
|
5
5
|
const __filename = __acmsPath(import.meta.url);
|
|
6
6
|
const __dirname = __acmsDirname(__filename);
|
|
7
|
-
import { g as getDoc, s as setDoc, d as doc, a as getDb, c as configDocs, b as collections, e as sqlQuery, f as sqlExec, h as getDocStore, i as getBackendKind, j as isDocStoreBackend, o as onSnapshot, k as settingsDocs, l as deleteField, m as sqlVersion, S as SqliteApiError, n as setFlexwegConfig, D as DEFAULT_FLEXWEG_API_BASE_URL, p as setGitToken, q as saveSqliteConnectorSecrets, r as saveSqlitePassphrase, t as testStorageConnection, u as openDatabaseBytes, v as githubPagesCheck, w as resetRuntimeConfigCache, x as resetDocStore } from "./registry-
|
|
7
|
+
import { g as getDoc, s as setDoc, d as doc, a as getDb, c as configDocs, b as collections, e as sqlQuery, f as sqlExec, h as getDocStore, i as getBackendKind, j as isDocStoreBackend, o as onSnapshot, k as settingsDocs, l as deleteField, m as sqlVersion, S as SqliteApiError, n as setFlexwegConfig, D as DEFAULT_FLEXWEG_API_BASE_URL, p as setGitToken, q as saveSqliteConnectorSecrets, r as saveSqlitePassphrase, t as testStorageConnection, u as openDatabaseBytes, v as githubPagesCheck, w as resetRuntimeConfigCache, x as resetDocStore } from "./registry-C9TSnZ77.mjs";
|
|
8
8
|
import { g as generatePassphrase, s as setCredential, i as isEncryptedDatabase, S as SqlitePassphraseError } from "../agentcms.mjs";
|
|
9
|
-
import { e as ensurePublishBranch } from "./plan-
|
|
10
|
-
import { j as joinRepoPath, s as subscribeToToasts, c as createRemoteGitTransport } from "./index-
|
|
11
|
-
import { loadSqlWasm, themeAssetOps, adminOps, applyOps, hostingConnector } from "./hosting-
|
|
9
|
+
import { e as ensurePublishBranch } from "./plan-BrM8ztEp.mjs";
|
|
10
|
+
import { j as joinRepoPath, s as subscribeToToasts, c as createRemoteGitTransport } from "./index-BG05qslv.mjs";
|
|
11
|
+
import { loadSqlWasm, themeAssetOps, adminOps, applyOps, hostingConnector } from "./hosting-BftlDdsL.mjs";
|
|
12
12
|
import "util";
|
|
13
13
|
import "crypto";
|
|
14
14
|
import "process";
|
|
@@ -4,8 +4,8 @@ import { dirname as __acmsDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acmsRequire(import.meta.url);
|
|
5
5
|
const __filename = __acmsPath(import.meta.url);
|
|
6
6
|
const __dirname = __acmsDirname(__filename);
|
|
7
|
-
import { F as resolveGitPagesToken, y as splitSecrets, G as missingFields } from "./registry-
|
|
8
|
-
import { c as createRemoteGitTransport } from "./index-
|
|
7
|
+
import { F as resolveGitPagesToken, y as splitSecrets, G as missingFields } from "./registry-C9TSnZ77.mjs";
|
|
8
|
+
import { c as createRemoteGitTransport } from "./index-BG05qslv.mjs";
|
|
9
9
|
import { v as validateAlias, c as findDataBackend, a as parseAccount, r as requireCredential, e as getCredential, C as CliError, h as findHosting } from "../agentcms.mjs";
|
|
10
10
|
const gitHost = (host) => (connectorId, s) => connectorId === "git-pages" && (s.host ?? "github-pages") === host;
|
|
11
11
|
const HOSTING_OPTIONS = [
|
|
@@ -4,7 +4,7 @@ import { dirname as __acmsDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acmsRequire(import.meta.url);
|
|
5
5
|
const __filename = __acmsPath(import.meta.url);
|
|
6
6
|
const __dirname = __acmsDirname(__filename);
|
|
7
|
-
import { j as joinRepoPath, G as GitConflictError, i as instance, l as loadFolderHandle, e as ensureFolderPermission, a as createLocalFsTransport, c as createRemoteGitTransport, S as StorageError, t as toast, b as bytesToBase64, d as base64ToBytes, f as base64ToUtf8, p as performRequest, m as mapLimit } from "./index-
|
|
7
|
+
import { j as joinRepoPath, G as GitConflictError, i as instance, l as loadFolderHandle, e as ensureFolderPermission, a as createLocalFsTransport, c as createRemoteGitTransport, S as StorageError, t as toast, b as bytesToBase64, d as base64ToBytes, f as base64ToUtf8, p as performRequest, m as mapLimit } from "./index-BG05qslv.mjs";
|
|
8
8
|
import require$$2, { TextEncoder as TextEncoder$1, inspect } from "util";
|
|
9
9
|
import { randomBytes as randomBytes$1 } from "crypto";
|
|
10
10
|
import require$$1 from "process";
|
|
@@ -134,7 +134,7 @@ function getBackendKind() {
|
|
|
134
134
|
return getRuntimeConfig()?.backend ?? null;
|
|
135
135
|
}
|
|
136
136
|
function buildConfigJsSource(config) {
|
|
137
|
-
const banner = "// Generated by
|
|
137
|
+
const banner = "// Generated by AgentCMS first-run setup. Do not edit by hand —\n// re-run the admin setup form to update.\n";
|
|
138
138
|
let serialisable;
|
|
139
139
|
if (config.backend === "firebase") {
|
|
140
140
|
serialisable = { backend: config.backend, firebase: config.firebase };
|
|
@@ -42314,7 +42314,7 @@ function createGitDocStore(cfg) {
|
|
|
42314
42314
|
}
|
|
42315
42315
|
if (changes.length === 0) return;
|
|
42316
42316
|
try {
|
|
42317
|
-
const head = await t.commit(changes, { message: `${message2} —
|
|
42317
|
+
const head = await t.commit(changes, { message: `${message2} — AgentCMS`, expectedHeadSha: state.head });
|
|
42318
42318
|
state = { head, files, index, snapshot: target };
|
|
42319
42319
|
return;
|
|
42320
42320
|
} catch (err) {
|
|
@@ -42514,7 +42514,7 @@ async function testFlexwegConnection(config, signal) {
|
|
|
42514
42514
|
function gitlabCi(dir, branch) {
|
|
42515
42515
|
const copy = dir === "public" ? ' - echo "Publishing public/"' : ` - rm -rf public && cp -r ${dir} public`;
|
|
42516
42516
|
return [
|
|
42517
|
-
"# Generated by
|
|
42517
|
+
"# Generated by AgentCMS — publishes the static site with GitLab Pages.",
|
|
42518
42518
|
"# Safe to edit: the CMS only creates this file when the repo has none.",
|
|
42519
42519
|
"pages:",
|
|
42520
42520
|
" stage: deploy",
|
|
@@ -42637,7 +42637,7 @@ function createGitPagesConnector(settings) {
|
|
|
42637
42637
|
changes.push(...hostExtras(files));
|
|
42638
42638
|
const deleted = changes.filter((c) => c.type === "delete").length;
|
|
42639
42639
|
const summary = [count && `${count} updated`, deleted && `${deleted} removed`].filter(Boolean).join(", ");
|
|
42640
|
-
await transport2.commit(changes, { message: `Publish site${summary ? ` (${summary})` : ""} —
|
|
42640
|
+
await transport2.commit(changes, { message: `Publish site${summary ? ` (${summary})` : ""} — AgentCMS` });
|
|
42641
42641
|
cache = null;
|
|
42642
42642
|
if (settings.host === "github-pages" && settings.provider === "github") {
|
|
42643
42643
|
void ensureGithubPages(settings, token, dir);
|
|
@@ -42723,7 +42723,7 @@ async function testStorageConnection(connectorId, settings, opts = {}) {
|
|
|
42723
42723
|
}
|
|
42724
42724
|
const connector = instantiateStorageConnector(connectorId, settings);
|
|
42725
42725
|
if (connectorId === "browser-mirror") return { ok: true, detail: "browser" };
|
|
42726
|
-
await connector.put({ path: PROBE_PATH, content: `
|
|
42726
|
+
await connector.put({ path: PROBE_PATH, content: `AgentCMS connection test ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
42727
42727
|
` });
|
|
42728
42728
|
const echoed = await connector.get(PROBE_PATH).catch(() => null);
|
|
42729
42729
|
await connector.delete(PROBE_PATH);
|
|
@@ -4,9 +4,9 @@ import { dirname as __acmsDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acmsRequire(import.meta.url);
|
|
5
5
|
const __filename = __acmsPath(import.meta.url);
|
|
6
6
|
const __dirname = __acmsDirname(__filename);
|
|
7
|
-
import { y as splitSecrets, u as openDatabaseBytes, z as decodeDatabase } from "./registry-
|
|
8
|
-
import { c as createRemoteGitTransport, j as joinRepoPath } from "./index-
|
|
9
|
-
import { loadSqlWasm, hostingConnector } from "./hosting-
|
|
7
|
+
import { y as splitSecrets, u as openDatabaseBytes, z as decodeDatabase } from "./registry-C9TSnZ77.mjs";
|
|
8
|
+
import { c as createRemoteGitTransport, j as joinRepoPath } from "./index-BG05qslv.mjs";
|
|
9
|
+
import { loadSqlWasm, hostingConnector } from "./hosting-BftlDdsL.mjs";
|
|
10
10
|
import { C as CliError, f as fetchText, p as parseConfigJs, a as parseAccount, r as requireCredential, b as fetchHostedAdmin } from "../agentcms.mjs";
|
|
11
11
|
import "util";
|
|
12
12
|
import "crypto";
|
|
@@ -26,7 +26,7 @@ import "zlib";
|
|
|
26
26
|
import "buffer";
|
|
27
27
|
import "node:fs";
|
|
28
28
|
import "node:path";
|
|
29
|
-
import "./plan-
|
|
29
|
+
import "./plan-BrM8ztEp.mjs";
|
|
30
30
|
import "node:util";
|
|
31
31
|
import "node:url";
|
|
32
32
|
import "node:os";
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-cms/agentcms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Static CMS whose admin runs in the browser and publishes plain HTML to any static host (GitHub/GitLab/Cloudflare Pages, S3, Flexweg, own server). Installable and manageable from AI coding agents.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"pack:zips": "node scripts/pack-bundled-zips.mjs",
|
|
57
57
|
"preview": "vite preview",
|
|
58
58
|
"check:skills": "node scripts/check-skills.mjs",
|
|
59
|
-
"version": "node scripts/sync-version.mjs && git add plugin"
|
|
59
|
+
"version": "node scripts/sync-version.mjs && npm run build && git add -A plugin dist"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@codemirror/lang-html": "^6.4.11",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentcms-install
|
|
3
|
-
description: Install a new AgentCMS site (static CMS) for the user - ask where content is stored (SQLite file, Markdown in GitHub/GitLab, Firebase, this browser), then where the site is hosted (GitHub/GitLab/Cloudflare Pages, S3 or OVH bucket, Flexweg), help create or import the needed tokens and keys, and install everything with the agentcms CLI. Use when the user wants to create, set up or install an AgentCMS /
|
|
3
|
+
description: Install a new AgentCMS site (static CMS) for the user - ask where content is stored (SQLite file, Markdown in GitHub/GitLab, Firebase, this browser), then where the site is hosted (GitHub/GitLab/Cloudflare Pages, S3 or OVH bucket, Flexweg), help create or import the needed tokens and keys, and install everything with the agentcms CLI. Use when the user wants to create, set up or install an AgentCMS / AgentCMS site.
|
|
4
4
|
license: PolyForm-Noncommercial-1.0.0
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.1"
|
|
7
7
|
repository: "https://github.com/fleox/agentcms"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -13,12 +13,12 @@ AgentCMS is a static CMS: an admin web app (runs in the browser) keeps content i
|
|
|
13
13
|
|
|
14
14
|
**Language:** talk to the user in their language. Keep commands, file contents and these instructions in English.
|
|
15
15
|
|
|
16
|
-
Every command below is `npx -y @agent-cms/agentcms@0.1.
|
|
16
|
+
Every command below is `npx -y @agent-cms/agentcms@0.1.1 <command> --json` (Node.js 20+). Output is one JSON object: `{"ok":true,"data":...}` or `{"ok":false,"error":{"code","message","hint"}}` - when `ok` is false, read `hint` and act on it. If npx can't fetch the package (404 / offline), clone `https://github.com/fleox/agentcms` and use `node agentcms/dist/agent/agentcms.mjs` the same way.
|
|
17
17
|
|
|
18
18
|
## Step 0 - Versions and existing sites
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
21
|
+
npx -y @agent-cms/agentcms@0.1.1 status --json
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
- `data.tool.updateAvailable: true` -> a newer AgentCMS exists. Offer to update these skills first (Claude Code: `/plugin marketplace update agentcms`, then `/reload-plugins`), then continue.
|
|
@@ -26,7 +26,7 @@ npx -y @agent-cms/agentcms@0.1.0 status --json
|
|
|
26
26
|
|
|
27
27
|
## Step 1 - Ask where the content is stored
|
|
28
28
|
|
|
29
|
-
Ask this first; hosting comes after. Run `npx -y @agent-cms/agentcms@0.1.
|
|
29
|
+
Ask this first; hosting comes after. Run `npx -y @agent-cms/agentcms@0.1.1 options --json` and present `data.dataBackends` in one sentence each:
|
|
30
30
|
|
|
31
31
|
- **SQLite file** - one owner, simplest, no other account. Encrypted with a passphrase by default (a static host serves the file like any page); can also live in a separate private bucket / repo. No login screen: anyone with the admin URL, the keys and the passphrase can edit.
|
|
32
32
|
- **Markdown in a Git repo** (GitHub / GitLab) - several editors or computers, full history; each editor uses their own token.
|
|
@@ -48,15 +48,15 @@ Markdown content on GitHub/GitLab also needs the content repository: [references
|
|
|
48
48
|
|
|
49
49
|
## Step 3 - Credentials (never through the chat)
|
|
50
50
|
|
|
51
|
-
Secrets are stored per **account** (`github:<login>`, `s3:<name>`, `flexweg:<name>`, `php-bridge:<name>`, `gitlab:<name>`), not per site - check `npx -y @agent-cms/agentcms@0.1.
|
|
51
|
+
Secrets are stored per **account** (`github:<login>`, `s3:<name>`, `flexweg:<name>`, `php-bridge:<name>`, `gitlab:<name>`), not per site - check `npx -y @agent-cms/agentcms@0.1.1 credentials list --json` first and reuse an account that is already there.
|
|
52
52
|
|
|
53
53
|
To add one, use the first option that applies:
|
|
54
54
|
|
|
55
|
-
1. Import from a tool the user is signed in to: `npx -y @agent-cms/agentcms@0.1.
|
|
56
|
-
2. Otherwise ask the user to run it **themselves** - in Claude Code they type `! npx -y @agent-cms/agentcms@0.1.
|
|
55
|
+
1. Import from a tool the user is signed in to: `npx -y @agent-cms/agentcms@0.1.1 credentials set github:<login> --from-gh --json`, `npx -y @agent-cms/agentcms@0.1.1 credentials set s3:<name> --from-aws-profile <profile> --json`.
|
|
56
|
+
2. Otherwise ask the user to run it **themselves** - in Claude Code they type `! npx -y @agent-cms/agentcms@0.1.1 credentials set <account>` - and type the secret at the hidden prompt.
|
|
57
57
|
3. Or an environment variable the user set: `--from-env VAR` (`--from-env KEY_ID,SECRET` for S3).
|
|
58
58
|
|
|
59
|
-
SQLite passphrase: nothing to do before installing - `install` generates a strong one and stores it as `passphrase:<alias>`. To reuse an existing database, store its passphrase first (`! npx -y @agent-cms/agentcms@0.1.
|
|
59
|
+
SQLite passphrase: nothing to do before installing - `install` generates a strong one and stores it as `passphrase:<alias>`. To reuse an existing database, store its passphrase first (`! npx -y @agent-cms/agentcms@0.1.1 credentials set passphrase:<alias>`).
|
|
60
60
|
|
|
61
61
|
Rules: never ask for a token, password or secret key in the chat; never print one; never put one in a plan file, `config.js`, a repo or a commit. When you create a key with a CLI, send it straight into `credentials set` (environment variable or pipe), or copy it to the clipboard (`pbcopy` / `xclip` / `clip`) - never display it.
|
|
62
62
|
|
|
@@ -81,7 +81,7 @@ Write `agentcms-plan.json` (no secrets - only account ids), following `data.plan
|
|
|
81
81
|
Then:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
84
|
+
npx -y @agent-cms/agentcms@0.1.1 install --plan agentcms-plan.json --dry-run --json
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
Fix whatever `error.hint` says (token permissions, repo or bucket names, URL). Error `content-exists` means the content repo already publishes somewhere else: ask the user whether to keep that site (register it with `agentcms-manage`) or publish elsewhere (`--overwrite-target`).
|
|
@@ -91,20 +91,20 @@ Fix whatever `error.hint` says (token permissions, repo or bucket names, URL). E
|
|
|
91
91
|
Show the user a one-line summary (data -> hosting -> site URL) and ask for a go. Then:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
95
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
94
|
+
npx -y @agent-cms/agentcms@0.1.1 install --plan agentcms-plan.json --json
|
|
95
|
+
npx -y @agent-cms/agentcms@0.1.1 doctor --site <alias> --json
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
- Relay `data.notices` (for example "GitHub Pages enabled" or how to enable it) and `data.nextSteps`.
|
|
99
99
|
- For every doctor check with `status: "fail"`, propose its `fix`. Pages hosts need about a minute before the admin URL answers - re-run doctor after waiting.
|
|
100
100
|
- Give the user the site URL and the admin URL, and remind them each new browser asks once for its access token or hosting keys (they are stored per browser, never online).
|
|
101
|
-
- **Encrypted SQLite**: the passphrase is the only key to the content. Before finishing, run `npx -y @agent-cms/agentcms@0.1.
|
|
101
|
+
- **Encrypted SQLite**: the passphrase is the only key to the content. Before finishing, run `npx -y @agent-cms/agentcms@0.1.1 credentials copy passphrase:<alias> --json` (it goes to the clipboard, never to the chat) and ask the user to save it in their password manager now; the admin asks for it once per browser.
|
|
102
102
|
- The plan file holds no secrets; offer to delete it or keep it for reference.
|
|
103
103
|
|
|
104
104
|
## Wizard fallback (Firebase, this browser, local folder, ZIP)
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
107
|
+
npx -y @agent-cms/agentcms@0.1.1 serve --json
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
Run it in the background; it prints `data.url` (http://localhost:4173/). The user opens it and follows the setup wizard with the choices from steps 1 and 2 - keep "Host the admin on this site" checked. Help them find each value; secrets go into the wizard, not the chat. Stop the process when the wizard shows its done card, then register the site: `npx -y @agent-cms/agentcms@0.1.
|
|
110
|
+
Run it in the background; it prints `data.url` (http://localhost:4173/). The user opens it and follows the setup wizard with the choices from steps 1 and 2 - keep "Host the admin on this site" checked. Help them find each value; secrets go into the wizard, not the chat. Stop the process when the wizard shows its done card, then register the site: `npx -y @agent-cms/agentcms@0.1.1 site add <alias> --admin-url <admin URL> --json` (see `agentcms-manage`).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Flexweg hosting
|
|
2
2
|
|
|
3
|
-
- The user creates (or opens) a site on https://www.flexweg.com, then copies an **API key** from the site's API section. They store it: `! npx -y @agent-cms/agentcms@0.1.
|
|
3
|
+
- The user creates (or opens) a site on https://www.flexweg.com, then copies an **API key** from the site's API section. They store it: `! npx -y @agent-cms/agentcms@0.1.1 credentials set flexweg:<site-name>`.
|
|
4
4
|
- Site URL: the site's public URL shown in the Flexweg dashboard.
|
|
5
5
|
- Data: SQLite file on Flexweg works out of the box. Flexweg's own SQLite service (with real logins) is only available through the setup wizard (`serve`), via the "Use Flexweg's SQLite service" checkbox.
|
|
6
6
|
|
|
@@ -32,12 +32,12 @@ If GitHub ignores the query parameters, they set by hand:
|
|
|
32
32
|
- Permissions -> Repository: **Contents: Read and write**, **Pages: Read and write** (lets AgentCMS switch Pages on), Metadata: Read-only (automatic).
|
|
33
33
|
- Expiration: their choice (note the date - the site stops publishing when it expires).
|
|
34
34
|
|
|
35
|
-
Then they store it themselves: `! npx -y @agent-cms/agentcms@0.1.
|
|
35
|
+
Then they store it themselves: `! npx -y @agent-cms/agentcms@0.1.1 credentials set github:<login>` and paste it at the hidden prompt.
|
|
36
36
|
|
|
37
37
|
**Option B - reuse the GitHub CLI login** (broader `repo` scope, quickest):
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
40
|
+
npx -y @agent-cms/agentcms@0.1.1 credentials set github:<login> --from-gh --json
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Each editor of a Markdown site later signs in to the admin with **their own** token (same permissions on the content repo); write access = editor, admin access = admin.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# GitLab - content repo, GitLab Pages hosting, token
|
|
2
2
|
|
|
3
3
|
- Projects: one private project for content (Markdown backend), one for the site (GitLab Pages). Create them on https://gitlab.com/projects/new, or with `glab repo create <group>/<name> --private` / `--public` when `glab` is installed and signed in.
|
|
4
|
-
- Token: project access token (Settings -> Access tokens) or personal token (Preferences -> Access tokens) with scope **`api`** and role **Developer** or higher on both projects. The user stores it: `! npx -y @agent-cms/agentcms@0.1.
|
|
4
|
+
- Token: project access token (Settings -> Access tokens) or personal token (Preferences -> Access tokens) with scope **`api`** and role **Developer** or higher on both projects. The user stores it: `! npx -y @agent-cms/agentcms@0.1.1 credentials set gitlab:<name>`.
|
|
5
5
|
- GitLab Pages needs the site in a folder: AgentCMS publishes into `public/` and commits a minimal `.gitlab-ci.yml` with the first publish.
|
|
6
6
|
- Site URL: `https://<group>.gitlab.io/<project>` (or the custom domain from Deploy -> Pages).
|
|
7
7
|
|
|
@@ -20,10 +20,10 @@ If the `aws` CLI is installed, offer to do 2 and 3 for the user, and import 1 fr
|
|
|
20
20
|
|
|
21
21
|
## Key pair
|
|
22
22
|
|
|
23
|
-
- From an existing aws CLI profile: `npx -y @agent-cms/agentcms@0.1.
|
|
23
|
+
- From an existing aws CLI profile: `npx -y @agent-cms/agentcms@0.1.1 credentials set s3:<name> --from-aws-profile <profile> --json`.
|
|
24
24
|
- AWS: IAM user with `s3:GetObject`, `s3:PutObject`, `s3:PutObjectAcl`, `s3:DeleteObject`, `s3:ListBucket` on this bucket only.
|
|
25
25
|
- OVHcloud: Public Cloud -> Object Storage -> **S3 users** -> create a user with access to the bucket, then show its credentials (access key + secret).
|
|
26
|
-
- Otherwise the user runs `! npx -y @agent-cms/agentcms@0.1.
|
|
26
|
+
- Otherwise the user runs `! npx -y @agent-cms/agentcms@0.1.1 credentials set s3:<name>` and types both values.
|
|
27
27
|
|
|
28
28
|
## CORS (aws CLI)
|
|
29
29
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
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 /
|
|
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 / AgentCMS sites, says something is broken, or wants to update.
|
|
4
4
|
license: PolyForm-Noncommercial-1.0.0
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.1"
|
|
7
7
|
repository: "https://github.com/fleox/agentcms"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -11,12 +11,12 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
**Language:** talk to the user in their language; keep commands and files in English.
|
|
13
13
|
|
|
14
|
-
Every command is `npx -y @agent-cms/agentcms@0.1.
|
|
14
|
+
Every command is `npx -y @agent-cms/agentcms@0.1.1 <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
15
|
|
|
16
16
|
## Always start with status
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
19
|
+
npx -y @agent-cms/agentcms@0.1.1 status --json
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
It compares this tool (= these skills, same release) with the latest release, and each registered site's hosted admin with this release.
|
|
@@ -29,7 +29,7 @@ It compares this tool (= these skills, same release) with the latest release, an
|
|
|
29
29
|
|
|
30
30
|
## Which site?
|
|
31
31
|
|
|
32
|
-
One computer can manage many sites. `npx -y @agent-cms/agentcms@0.1.
|
|
32
|
+
One computer can manage many sites. `npx -y @agent-cms/agentcms@0.1.1 site list --json` lists them.
|
|
33
33
|
|
|
34
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
35
|
- Always say which site you are working on before changing anything ("Working on **my-blog** (https://...)").
|
|
@@ -42,7 +42,7 @@ Registry commands: `site show <alias>`, `site use <alias>`, `site rename <from>
|
|
|
42
42
|
(Setup wizard, another computer, by hand.)
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
45
|
+
npx -y @agent-cms/agentcms@0.1.1 site add <alias> --admin-url https://example.com/admin/ --data-credential github:<login> --hosting-credential <account> --json
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
- `--data-credential` is required for Markdown-in-git sites (to read where the site publishes); omit it otherwise.
|
|
@@ -53,7 +53,7 @@ npx -y @agent-cms/agentcms@0.1.0 site add <alias> --admin-url https://example.co
|
|
|
53
53
|
## Health check
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
56
|
+
npx -y @agent-cms/agentcms@0.1.1 doctor --site <alias> --json
|
|
57
57
|
```
|
|
58
58
|
|
|
59
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:
|
|
@@ -69,23 +69,23 @@ Add `--deep` to also test write access (writes then deletes a probe file on file
|
|
|
69
69
|
|
|
70
70
|
1. Plan only (writes nothing):
|
|
71
71
|
```bash
|
|
72
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
72
|
+
npx -y @agent-cms/agentcms@0.1.1 deploy-admin --site <alias> --json
|
|
73
73
|
```
|
|
74
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
75
|
2. After the user agrees:
|
|
76
76
|
```bash
|
|
77
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
77
|
+
npx -y @agent-cms/agentcms@0.1.1 deploy-admin --site <alias> --yes --json
|
|
78
78
|
```
|
|
79
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
80
|
3. Relay `pendingActions` (e.g. `regenerate-all`: in the admin, Regenerate -> Everything) and run `doctor` again.
|
|
81
81
|
|
|
82
82
|
## SQLite sites: encryption and history
|
|
83
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.
|
|
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.1 credentials set passphrase:<alias>`.
|
|
85
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
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
87
|
```bash
|
|
88
|
-
npx -y @agent-cms/agentcms@0.1.
|
|
88
|
+
npx -y @agent-cms/agentcms@0.1.1 compact-data --site <alias> --json
|
|
89
89
|
```
|
|
90
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
91
|
|