@mainsoft/agent-cms 0.7.0 → 0.10.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/CHANGELOG.md +64 -0
- package/README.md +291 -32
- package/TODO.md +72 -26
- package/UPGRADE-0.10.md +36 -0
- package/UPGRADE-0.8.md +118 -0
- package/dist/agent.cjs +39 -17
- package/dist/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +9 -7
- package/dist/bin.js +4528 -355
- package/dist/{chunk-OQ55GEF3.js → chunk-3OPKTBEI.js} +1 -1
- package/dist/chunk-6PB4ZCHH.js +328 -0
- package/dist/chunk-7SCYDG2G.js +2943 -0
- package/dist/chunk-7WJIIJCI.js +544 -0
- package/dist/chunk-7Y6TU2UA.js +150 -0
- package/dist/{chunk-QC2M4NZY.js → chunk-BFVBHIHV.js} +72 -1
- package/dist/chunk-DSJETZT4.js +493 -0
- package/dist/{chunk-IW3D4I7Q.js → chunk-IU2SMWAM.js} +246 -4
- package/dist/{chunk-VICZ76TR.js → chunk-KAO3Z3CF.js} +43 -2
- package/dist/{chunk-CRDW6Q72.js → chunk-MA6VKJ3F.js} +87 -25
- package/dist/{chunk-6K5ZTGHQ.js → chunk-PEQY4N73.js} +16 -0
- package/dist/{chunk-DOADAH4L.js → chunk-PGV2QPIL.js} +40 -0
- package/dist/{chunk-Y63XQS2J.js → chunk-QMPSOLLH.js} +1 -1
- package/dist/{chunk-EXV6JNLY.js → chunk-ZCUJ4MPT.js} +15 -22
- package/dist/cli.cjs +4528 -355
- package/dist/cli.d.cts +19 -3
- package/dist/cli.d.ts +19 -3
- package/dist/cli.js +206 -16
- package/dist/client.cjs +72 -1
- package/dist/client.d.cts +308 -6
- package/dist/client.d.ts +308 -6
- package/dist/client.js +1 -1
- package/dist/cms-C_vkAxYV.d.cts +1537 -0
- package/dist/cms-pqJyowu1.d.ts +1537 -0
- package/dist/config.d.cts +7 -1
- package/dist/config.d.ts +7 -1
- package/dist/drizzle-repo-CviH3EX7.d.cts +146 -0
- package/dist/drizzle-repo-DWLD0rWe.d.ts +146 -0
- package/dist/errors.cjs +82 -1
- package/dist/errors.d.cts +43 -3
- package/dist/errors.d.ts +43 -3
- package/dist/errors.js +2 -2
- package/dist/frontmatter.d.cts +5 -4
- package/dist/frontmatter.d.ts +5 -4
- package/dist/http.cjs +640 -94
- package/dist/http.d.cts +51 -2
- package/dist/http.d.ts +51 -2
- package/dist/http.js +203 -13
- package/dist/index.cjs +3759 -575
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +226 -30
- package/dist/markdown.cjs +89 -25
- package/dist/markdown.d.cts +57 -3
- package/dist/markdown.d.ts +57 -3
- package/dist/markdown.js +5 -1
- package/dist/mcp.cjs +314 -37
- package/dist/mcp.d.cts +3 -2
- package/dist/mcp.d.ts +3 -2
- package/dist/mcp.js +12 -9
- package/dist/messages/en.cjs +40 -0
- package/dist/messages/en.js +1 -1
- package/dist/messages/ko.cjs +40 -0
- package/dist/messages/ko.js +40 -0
- package/dist/registry/cms-audit.json +1 -1
- package/dist/registry/cms-doc-editor.json +15 -4
- package/dist/registry/cms-doc-list.json +2 -1
- package/dist/registry/cms-files.json +29 -0
- package/dist/registry/cms-lib.json +3 -3
- package/dist/registry/cms-media-picker.json +29 -0
- package/dist/registry/cms-media.json +28 -0
- package/dist/registry/cms-preview-comments.json +24 -0
- package/dist/registry/cms-releases.json +28 -0
- package/dist/registry/cms-shell.json +2 -2
- package/dist/registry/cms-trash.json +24 -0
- package/dist/registry/cms-versions.json +2 -1
- package/dist/registry/registry.json +163 -3
- package/dist/storage-s3.cjs +168 -0
- package/dist/storage-s3.d.cts +53 -0
- package/dist/storage-s3.d.ts +53 -0
- package/dist/storage-s3.js +143 -0
- package/dist/storage.cjs +373 -0
- package/dist/storage.d.cts +183 -0
- package/dist/storage.d.ts +183 -0
- package/dist/storage.js +49 -0
- package/dist/tables.cjs +251 -3
- package/dist/tables.d.cts +4965 -681
- package/dist/tables.d.ts +4965 -681
- package/dist/tables.js +14 -2
- package/dist/tools.cjs +331 -20
- package/dist/tools.d.cts +54 -7
- package/dist/tools.d.ts +54 -7
- package/dist/tools.js +16 -7
- package/dist/types.cjs +99 -1
- package/dist/types.d.cts +205 -5
- package/dist/types.d.ts +205 -5
- package/dist/types.js +5 -3
- package/package.json +32 -22
- package/dist/ai.cjs +0 -555
- package/dist/ai.d.cts +0 -48
- package/dist/ai.d.ts +0 -48
- package/dist/ai.js +0 -73
- package/dist/chunk-52NUUZC7.js +0 -1446
- package/dist/chunk-IGL2V6US.js +0 -324
- package/dist/chunk-QQV6VLYJ.js +0 -204
- package/dist/cms-BPp01z-8.d.ts +0 -411
- package/dist/cms-D6D89-qZ.d.cts +0 -411
- package/dist/drizzle-repo-B1rt7r4j.d.ts +0 -90
- package/dist/drizzle-repo-Cn-kL2FK.d.cts +0 -90
- package/dist/repo-BWI2Pkrv.d.ts +0 -162
- package/dist/repo-CeDxUxO6.d.cts +0 -162
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export { CmsError, CmsErrorCode, CmsErrorKind, CmsErrorOptions, Diagnostic, ERRO
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* agent-cms — an add-on CMS that people (an admin screen) and agents (REST,
|
|
6
|
-
* MCP,
|
|
6
|
+
* MCP, CLI) edit together. Lives inside the app: no separate server. It hands
|
|
7
|
+
* agents tools and never calls a model itself.
|
|
7
8
|
*
|
|
8
9
|
* EXTRACTION RULE: nothing under `src/` may import from a host app (`@/`) or
|
|
9
10
|
* any app module (`src/parts.test.ts` enforces it).
|
|
@@ -32,6 +33,16 @@ type Actor = ({
|
|
|
32
33
|
label: string;
|
|
33
34
|
email?: string | null;
|
|
34
35
|
isAdmin: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Set when an agent acts for this person (an assistant inside the admin,
|
|
38
|
+
* say). Permissions are exactly the person's; versions, the document and
|
|
39
|
+
* the audit log also record the agent's name, and its edits show up as
|
|
40
|
+
* agent changes to review. Only code in the app can set this: REST and
|
|
41
|
+
* MCP never accept it.
|
|
42
|
+
*/
|
|
43
|
+
agent?: {
|
|
44
|
+
label: string;
|
|
45
|
+
};
|
|
35
46
|
} | {
|
|
36
47
|
kind: "key";
|
|
37
48
|
id: string;
|
|
@@ -42,7 +53,7 @@ type Actor = ({
|
|
|
42
53
|
kind: "system";
|
|
43
54
|
label: string;
|
|
44
55
|
}) & {
|
|
45
|
-
/** Set by the transports (REST, MCP,
|
|
56
|
+
/** Set by the transports (REST, MCP, `callTool`); app code may leave it out. */
|
|
46
57
|
via?: Via;
|
|
47
58
|
};
|
|
48
59
|
/** The editable content of a document; one version = one snapshot of this. */
|
|
@@ -82,10 +93,117 @@ interface CmsDoc extends DocContent {
|
|
|
82
93
|
/** Label of whoever wrote the latest version. */
|
|
83
94
|
updatedBy: string | null;
|
|
84
95
|
updatedByKind: "user" | "key" | "system" | null;
|
|
96
|
+
/** Name of the agent that acted for `updatedBy` (a person), or null. */
|
|
97
|
+
updatedByAgent: string | null;
|
|
85
98
|
/** Unsaved editor content (only for editors; never on a public read). */
|
|
86
99
|
autosave: AutosaveState | null;
|
|
100
|
+
/** In the trash since (null: not deleted). A trashed document is invisible everywhere but the trash. */
|
|
101
|
+
deletedAt: string | null;
|
|
102
|
+
deletedBy: string | null;
|
|
103
|
+
/** A publish or unpublish waiting for its time. */
|
|
104
|
+
schedule: Schedule | null;
|
|
105
|
+
/** The next time the schedule has something to do (for the runner). */
|
|
106
|
+
dueAt: string | null;
|
|
107
|
+
/** An open review request, or the reviewer's answer to it. */
|
|
108
|
+
review: ReviewRequest | null;
|
|
87
109
|
}
|
|
88
110
|
/** What `commit()` records about a version: changed fields and body hunks. */
|
|
111
|
+
type ActorKind = "user" | "key" | "system";
|
|
112
|
+
interface Schedule {
|
|
113
|
+
publishAt: string | null;
|
|
114
|
+
unpublishAt: string | null;
|
|
115
|
+
/** The version that will go public: the one that was current when it was scheduled. */
|
|
116
|
+
version: number;
|
|
117
|
+
by: string;
|
|
118
|
+
byKind: ActorKind;
|
|
119
|
+
byId: string | null;
|
|
120
|
+
byAgent: string | null;
|
|
121
|
+
at: string;
|
|
122
|
+
}
|
|
123
|
+
interface ReviewRequest {
|
|
124
|
+
state: "requested" | "changes_requested";
|
|
125
|
+
/** The version under review (moves along while the request is open). */
|
|
126
|
+
version: number;
|
|
127
|
+
by: string;
|
|
128
|
+
byKind: ActorKind;
|
|
129
|
+
byId: string | null;
|
|
130
|
+
byAgent: string | null;
|
|
131
|
+
at: string;
|
|
132
|
+
note: string | null;
|
|
133
|
+
/** Who sent it back, with `changes_requested`. */
|
|
134
|
+
answeredBy?: string | null;
|
|
135
|
+
answeredAt?: string | null;
|
|
136
|
+
}
|
|
137
|
+
interface CmsComment {
|
|
138
|
+
id: string;
|
|
139
|
+
documentId: string;
|
|
140
|
+
/** The comment this one answers (one level only), or null. */
|
|
141
|
+
threadId: string | null;
|
|
142
|
+
/** Section anchor (`sectionRanges`), "" for the top of the document. */
|
|
143
|
+
anchor: string;
|
|
144
|
+
/** The text it was written about. */
|
|
145
|
+
quote: string;
|
|
146
|
+
body: string;
|
|
147
|
+
authorKind: ActorKind | "guest";
|
|
148
|
+
authorId: string | null;
|
|
149
|
+
authorLabel: string;
|
|
150
|
+
authorAgent: string | null;
|
|
151
|
+
createdAt: string;
|
|
152
|
+
resolvedAt: string | null;
|
|
153
|
+
resolvedBy: string | null;
|
|
154
|
+
}
|
|
155
|
+
interface ReleaseItem {
|
|
156
|
+
documentId: string;
|
|
157
|
+
collection: string;
|
|
158
|
+
slug: string;
|
|
159
|
+
title: string;
|
|
160
|
+
action: "publish" | "unpublish";
|
|
161
|
+
/** The version pinned when it was added. */
|
|
162
|
+
version: number;
|
|
163
|
+
}
|
|
164
|
+
interface CmsRelease {
|
|
165
|
+
id: string;
|
|
166
|
+
name: string;
|
|
167
|
+
state: "open" | "scheduled" | "published";
|
|
168
|
+
publishAt: string | null;
|
|
169
|
+
items: ReleaseItem[];
|
|
170
|
+
createdBy: string;
|
|
171
|
+
createdById: string | null;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
updatedAt: string;
|
|
174
|
+
publishedAt: string | null;
|
|
175
|
+
publishedBy: string | null;
|
|
176
|
+
/** Why the last scheduled run did nothing. */
|
|
177
|
+
lastError: string | null;
|
|
178
|
+
}
|
|
179
|
+
interface SavedFilter {
|
|
180
|
+
id: string;
|
|
181
|
+
collection: string;
|
|
182
|
+
name: string;
|
|
183
|
+
query: Record<string, string>;
|
|
184
|
+
ownerId: string;
|
|
185
|
+
ownerLabel: string;
|
|
186
|
+
/** Visible to everyone who can edit the collection. */
|
|
187
|
+
shared: boolean;
|
|
188
|
+
createdAt: string;
|
|
189
|
+
}
|
|
190
|
+
interface Presence {
|
|
191
|
+
documentId: string;
|
|
192
|
+
actorId: string;
|
|
193
|
+
label: string;
|
|
194
|
+
kind: ActorKind;
|
|
195
|
+
agent: string | null;
|
|
196
|
+
/** Editor position: line and column of the cursor, and of the other end of a selection. */
|
|
197
|
+
cursor: {
|
|
198
|
+
line: number;
|
|
199
|
+
ch: number;
|
|
200
|
+
} | null;
|
|
201
|
+
selection: {
|
|
202
|
+
line: number;
|
|
203
|
+
ch: number;
|
|
204
|
+
} | null;
|
|
205
|
+
seenAt: string;
|
|
206
|
+
}
|
|
89
207
|
interface VersionChange {
|
|
90
208
|
fields: string[];
|
|
91
209
|
/** Body hunks (added and removed lines) against the previous version. */
|
|
@@ -111,11 +229,20 @@ interface CmsVersion {
|
|
|
111
229
|
authorKind: "user" | "key" | "system";
|
|
112
230
|
authorId: string | null;
|
|
113
231
|
authorLabel: string;
|
|
232
|
+
/** Name of the agent that acted for the author (a person), or null. */
|
|
233
|
+
authorAgent: string | null;
|
|
114
234
|
note: string | null;
|
|
115
235
|
published: boolean;
|
|
116
236
|
createdAt: string;
|
|
117
237
|
changed: VersionChange | null;
|
|
118
238
|
reviewed: ReviewMark[];
|
|
239
|
+
/** A name someone gave this version ("launch copy"). */
|
|
240
|
+
label: string | null;
|
|
241
|
+
/** Pinned versions are never pruned. */
|
|
242
|
+
pinned: boolean;
|
|
243
|
+
/** Who approved this version in a review. */
|
|
244
|
+
approvedBy: string | null;
|
|
245
|
+
approvedAt: string | null;
|
|
119
246
|
}
|
|
120
247
|
/** A version without its snapshot (version lists). */
|
|
121
248
|
type VersionSummary = Omit<CmsVersion, "snapshot"> & {
|
|
@@ -133,7 +260,7 @@ interface CmsKey {
|
|
|
133
260
|
expiresAt: string | null;
|
|
134
261
|
createdAt: string;
|
|
135
262
|
}
|
|
136
|
-
declare const AUDIT_ACTIONS: readonly ["key.create", "key.revoke", "doc.publish", "doc.unpublish", "doc.archive", "doc.unarchive", "doc.delete", "doc.restore", "preview.create", "access.denied", "auth.failed"];
|
|
263
|
+
declare const AUDIT_ACTIONS: readonly ["key.create", "key.revoke", "doc.publish", "doc.unpublish", "doc.archive", "doc.unarchive", "doc.delete", "doc.restore", "doc.undelete", "doc.purge", "doc.schedule", "doc.unschedule", "review.request", "review.approve", "review.reject", "release.publish", "asset.restore", "preview.create", "asset.upload", "asset.move", "asset.delete", "asset.register", "asset.share", "access.denied", "auth.failed"];
|
|
137
264
|
type AuditAction = (typeof AUDIT_ACTIONS)[number];
|
|
138
265
|
interface AuditEntry {
|
|
139
266
|
id: string;
|
|
@@ -141,6 +268,8 @@ interface AuditEntry {
|
|
|
141
268
|
actorKind: Actor["kind"];
|
|
142
269
|
actorId: string | null;
|
|
143
270
|
actorLabel: string;
|
|
271
|
+
/** Name of the agent that acted for the actor (a person), or null. */
|
|
272
|
+
actorAgent: string | null;
|
|
144
273
|
action: AuditAction;
|
|
145
274
|
collection: string | null;
|
|
146
275
|
slug: string | null;
|
|
@@ -177,7 +306,60 @@ interface AccessArgs {
|
|
|
177
306
|
interface FieldAdmin {
|
|
178
307
|
label?: string;
|
|
179
308
|
help?: string;
|
|
180
|
-
widget?: "text" | "textarea" | "number" | "switch" | "select" | "multiselect" | "date" | "tags" | "json";
|
|
309
|
+
widget?: "text" | "textarea" | "number" | "switch" | "select" | "multiselect" | "date" | "tags" | "json" | "image" | "file";
|
|
310
|
+
/**
|
|
311
|
+
* For `image` and `file` (the value is a media library file id): which
|
|
312
|
+
* files the field takes, as MIME types (`image/png`), groups (`image/*`)
|
|
313
|
+
* or extensions (`.pdf`). Applied on top of the store's own rule. Default
|
|
314
|
+
* for `image`: `["image/*"]`.
|
|
315
|
+
*/
|
|
316
|
+
accept?: readonly string[];
|
|
317
|
+
/** For `image` and `file`: largest file (bytes) the field takes. */
|
|
318
|
+
maxFileSize?: number;
|
|
319
|
+
/** For `image` and `file`: the only store the field picks from and uploads to. */
|
|
320
|
+
store?: string;
|
|
321
|
+
}
|
|
322
|
+
declare const ASSET_KINDS: readonly ["image", "video", "audio", "document", "other", "folder"];
|
|
323
|
+
type AssetKind = (typeof ASSET_KINDS)[number];
|
|
324
|
+
/** A file in a store (`cms_assets`). Documents point at it by `id`. */
|
|
325
|
+
interface CmsAsset {
|
|
326
|
+
/** 12 lowercase letters and digits. */
|
|
327
|
+
id: string;
|
|
328
|
+
store: string;
|
|
329
|
+
/** Path inside the store, e.g. `blog/launch-hero.jpg`. */
|
|
330
|
+
key: string;
|
|
331
|
+
/** Folder part of `key` ("" = top level), without slashes at either end. */
|
|
332
|
+
folder: string;
|
|
333
|
+
name: string;
|
|
334
|
+
kind: AssetKind;
|
|
335
|
+
mime: string;
|
|
336
|
+
/** Bytes. */
|
|
337
|
+
size: number;
|
|
338
|
+
width: number | null;
|
|
339
|
+
height: number | null;
|
|
340
|
+
/** Seconds (video, audio). */
|
|
341
|
+
duration: number | null;
|
|
342
|
+
alt: string;
|
|
343
|
+
tags: string[];
|
|
344
|
+
thumbKey: string | null;
|
|
345
|
+
/** `pending` while it is being uploaded. */
|
|
346
|
+
status: "pending" | "ready";
|
|
347
|
+
uploadId: string | null;
|
|
348
|
+
createdBy: string | null;
|
|
349
|
+
createdByKind: "user" | "key" | "system" | null;
|
|
350
|
+
createdByAgent: string | null;
|
|
351
|
+
createdAt: string;
|
|
352
|
+
updatedAt: string;
|
|
353
|
+
/** In the trash since (null: not deleted). The object stays in the store until it is purged. */
|
|
354
|
+
deletedAt: string | null;
|
|
355
|
+
deletedBy: string | null;
|
|
356
|
+
}
|
|
357
|
+
/** One document's use of a file (`cms_asset_refs`). */
|
|
358
|
+
interface AssetRef {
|
|
359
|
+
assetId: string;
|
|
360
|
+
documentId: string;
|
|
361
|
+
inDraft: boolean;
|
|
362
|
+
inPublished: boolean;
|
|
181
363
|
}
|
|
182
364
|
interface CollectionConfig<F extends ZodTypeAny | undefined = ZodTypeAny | undefined, S extends string = string> {
|
|
183
365
|
slug: S;
|
|
@@ -235,6 +417,19 @@ interface CollectionConfig<F extends ZodTypeAny | undefined = ZodTypeAny | undef
|
|
|
235
417
|
/** Per field path (`tags`, `seo.title`): label, help text, widget. */
|
|
236
418
|
fields?: Record<string, FieldAdmin>;
|
|
237
419
|
};
|
|
420
|
+
media?: {
|
|
421
|
+
/** true: an image without alt text is an error, not a warning. */
|
|
422
|
+
requireAlt?: boolean;
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Who needs another person's approval before publishing. `agents`: API
|
|
426
|
+
* keys and agents acting for a person. `everyone`: people too (nobody
|
|
427
|
+
* approves their own request). Default: nobody.
|
|
428
|
+
*/
|
|
429
|
+
review?: {
|
|
430
|
+
agents?: "required";
|
|
431
|
+
everyone?: "required";
|
|
432
|
+
};
|
|
238
433
|
hooks?: {
|
|
239
434
|
/**
|
|
240
435
|
* After every write. `info.contentChanged` is false when only the draft
|
|
@@ -273,7 +468,10 @@ interface DocSummary {
|
|
|
273
468
|
updatedAt: string;
|
|
274
469
|
updatedBy: string | null;
|
|
275
470
|
updatedByKind: CmsDoc["updatedByKind"];
|
|
471
|
+
updatedByAgent: string | null;
|
|
276
472
|
hits7d?: number;
|
|
473
|
+
schedule: Pick<Schedule, "publishAt" | "unpublishAt" | "version" | "by"> | null;
|
|
474
|
+
review: Pick<ReviewRequest, "state" | "version" | "by" | "note"> | null;
|
|
277
475
|
}
|
|
278
476
|
interface DocCounts {
|
|
279
477
|
all: number;
|
|
@@ -281,6 +479,8 @@ interface DocCounts {
|
|
|
281
479
|
published: number;
|
|
282
480
|
modified: number;
|
|
283
481
|
archived: number;
|
|
482
|
+
scheduled: number;
|
|
483
|
+
review: number;
|
|
284
484
|
}
|
|
285
485
|
|
|
286
|
-
export { AUDIT_ACTIONS, type AccessArgs, type Actor, type AuditAction, type AuditEntry, type AutosaveState, type CmsDoc, type CmsKey, type CmsVersion, type CollectionConfig, DOC_STATUSES, type DocContent, type DocCounts, type DocState, type DocStatus, type DocSummary, type FieldAdmin, KEY_SCOPES, type KeyScope, type ReviewMark, type SearchMissEvent, VIAS, type VersionChange, type VersionSummary, type Via, docState };
|
|
486
|
+
export { ASSET_KINDS, AUDIT_ACTIONS, type AccessArgs, type Actor, type ActorKind, type AssetKind, type AssetRef, type AuditAction, type AuditEntry, type AutosaveState, type CmsAsset, type CmsComment, type CmsDoc, type CmsKey, type CmsRelease, type CmsVersion, type CollectionConfig, DOC_STATUSES, type DocContent, type DocCounts, type DocState, type DocStatus, type DocSummary, type FieldAdmin, KEY_SCOPES, type KeyScope, type Presence, type ReleaseItem, type ReviewMark, type ReviewRequest, type SavedFilter, type Schedule, type SearchMissEvent, VIAS, type VersionChange, type VersionSummary, type Via, docState };
|
package/dist/types.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ASSET_KINDS,
|
|
2
3
|
AUDIT_ACTIONS,
|
|
3
4
|
DOC_STATUSES,
|
|
4
5
|
KEY_SCOPES,
|
|
5
6
|
VIAS,
|
|
6
7
|
docState
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PEQY4N73.js";
|
|
8
9
|
import {
|
|
9
10
|
CmsError,
|
|
10
11
|
ERROR_CODES,
|
|
11
12
|
ERROR_KINDS,
|
|
12
13
|
formatMessage,
|
|
13
14
|
isCmsError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-KAO3Z3CF.js";
|
|
16
|
+
import "./chunk-PGV2QPIL.js";
|
|
16
17
|
import "./chunk-2NTK7H4W.js";
|
|
17
18
|
export {
|
|
19
|
+
ASSET_KINDS,
|
|
18
20
|
AUDIT_ACTIONS,
|
|
19
21
|
CmsError,
|
|
20
22
|
DOC_STATUSES,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mainsoft/agent-cms",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "An add-on CMS that runs inside your web app, edited by people (admin UI) and AI agents (
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "An add-on CMS that runs inside your web app, edited by people (admin UI) and AI agents (MCP, REST, CLI) together.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"dist",
|
|
19
19
|
"README.md",
|
|
20
20
|
"UPGRADE-0.6.md",
|
|
21
|
+
"UPGRADE-0.8.md",
|
|
22
|
+
"UPGRADE-0.10.md",
|
|
21
23
|
"CHANGELOG.md",
|
|
22
24
|
"TODO.md",
|
|
23
25
|
"LICENSE"
|
|
@@ -60,16 +62,6 @@
|
|
|
60
62
|
"default": "./dist/mcp.cjs"
|
|
61
63
|
}
|
|
62
64
|
},
|
|
63
|
-
"./ai": {
|
|
64
|
-
"import": {
|
|
65
|
-
"types": "./dist/ai.d.ts",
|
|
66
|
-
"default": "./dist/ai.js"
|
|
67
|
-
},
|
|
68
|
-
"require": {
|
|
69
|
-
"types": "./dist/ai.d.cts",
|
|
70
|
-
"default": "./dist/ai.cjs"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
65
|
"./client": {
|
|
74
66
|
"import": {
|
|
75
67
|
"types": "./dist/client.d.ts",
|
|
@@ -90,6 +82,26 @@
|
|
|
90
82
|
"default": "./dist/tools.cjs"
|
|
91
83
|
}
|
|
92
84
|
},
|
|
85
|
+
"./storage": {
|
|
86
|
+
"import": {
|
|
87
|
+
"types": "./dist/storage.d.ts",
|
|
88
|
+
"default": "./dist/storage.js"
|
|
89
|
+
},
|
|
90
|
+
"require": {
|
|
91
|
+
"types": "./dist/storage.d.cts",
|
|
92
|
+
"default": "./dist/storage.cjs"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"./storage-s3": {
|
|
96
|
+
"import": {
|
|
97
|
+
"types": "./dist/storage-s3.d.ts",
|
|
98
|
+
"default": "./dist/storage-s3.js"
|
|
99
|
+
},
|
|
100
|
+
"require": {
|
|
101
|
+
"types": "./dist/storage-s3.d.cts",
|
|
102
|
+
"default": "./dist/storage-s3.cjs"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
93
105
|
"./agent": {
|
|
94
106
|
"import": {
|
|
95
107
|
"types": "./dist/agent.d.ts",
|
|
@@ -208,6 +220,8 @@
|
|
|
208
220
|
"typecheck": "tsc --noEmit",
|
|
209
221
|
"test": "tsx --test src/*.test.ts",
|
|
210
222
|
"test:db": "tsx --test src/db/*.test.ts",
|
|
223
|
+
"test:s3": "tsx --test src/storage-s3.test.ts",
|
|
224
|
+
"s3:dev": "bash scripts/s3-dev.sh",
|
|
211
225
|
"test:ui": "tsx --tsconfig registry/tsconfig.json --test registry/__tests__/*.test.tsx",
|
|
212
226
|
"test:e2e": "playwright test -c e2e/playwright.config.ts",
|
|
213
227
|
"check:pack": "publint --strict && attw --pack . --profile node16",
|
|
@@ -216,7 +230,6 @@
|
|
|
216
230
|
"test:shadcn": "bash scripts/shadcn-smoke.sh"
|
|
217
231
|
},
|
|
218
232
|
"peerDependencies": {
|
|
219
|
-
"ai": ">=5.0.0",
|
|
220
233
|
"drizzle-orm": ">=0.36.0",
|
|
221
234
|
"zod": "^3.25.0 || ^4.0.0"
|
|
222
235
|
},
|
|
@@ -232,7 +245,6 @@
|
|
|
232
245
|
"@types/pg": "8.23.1",
|
|
233
246
|
"@types/react": "18.3.31",
|
|
234
247
|
"@types/react-dom": "18.3.7",
|
|
235
|
-
"ai": "^7.0.31",
|
|
236
248
|
"axe-core": "4.14.1",
|
|
237
249
|
"drizzle-orm": "0.45.2",
|
|
238
250
|
"global-jsdom": "26.0.0",
|
|
@@ -247,7 +259,8 @@
|
|
|
247
259
|
"zod": "3.25.76"
|
|
248
260
|
},
|
|
249
261
|
"workspaces": [
|
|
250
|
-
"examples/next"
|
|
262
|
+
"examples/next",
|
|
263
|
+
"apps/docs"
|
|
251
264
|
],
|
|
252
265
|
"engines": {
|
|
253
266
|
"node": ">=20"
|
|
@@ -257,20 +270,17 @@
|
|
|
257
270
|
"headless-cms",
|
|
258
271
|
"ai-agents",
|
|
259
272
|
"mcp",
|
|
260
|
-
"ai-sdk",
|
|
261
273
|
"nextjs",
|
|
262
274
|
"drizzle",
|
|
263
275
|
"postgres",
|
|
264
276
|
"shadcn",
|
|
265
|
-
"shadcn-registry"
|
|
277
|
+
"shadcn-registry",
|
|
278
|
+
"media-library",
|
|
279
|
+
"s3"
|
|
266
280
|
],
|
|
267
|
-
"peerDependenciesMeta": {
|
|
268
|
-
"ai": {
|
|
269
|
-
"optional": true
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
281
|
"dependencies": {
|
|
273
282
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
283
|
+
"aws4fetch": "^1.0.20",
|
|
274
284
|
"jiti": "2.7.0"
|
|
275
285
|
},
|
|
276
286
|
"bugs": {
|