@mainsoft/agent-cms 0.0.0-stage → 0.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 (108) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/LICENSE +21 -0
  3. package/README.md +359 -2
  4. package/TODO.md +178 -0
  5. package/UPGRADE-0.6.md +236 -0
  6. package/dist/agent.cjs +250 -0
  7. package/dist/agent.d.cts +88 -0
  8. package/dist/agent.d.ts +88 -0
  9. package/dist/agent.js +24 -0
  10. package/dist/ai.cjs +555 -0
  11. package/dist/ai.d.cts +48 -0
  12. package/dist/ai.d.ts +48 -0
  13. package/dist/ai.js +73 -0
  14. package/dist/bin.js +1556 -0
  15. package/dist/chunk-2NTK7H4W.js +10 -0
  16. package/dist/chunk-52NUUZC7.js +1446 -0
  17. package/dist/chunk-6K5ZTGHQ.js +30 -0
  18. package/dist/chunk-AKN7SUXU.js +281 -0
  19. package/dist/chunk-CRDW6Q72.js +188 -0
  20. package/dist/chunk-DD56PTZ4.js +78 -0
  21. package/dist/chunk-DOADAH4L.js +52 -0
  22. package/dist/chunk-EXV6JNLY.js +251 -0
  23. package/dist/chunk-IGL2V6US.js +324 -0
  24. package/dist/chunk-IW3D4I7Q.js +317 -0
  25. package/dist/chunk-OQ55GEF3.js +6 -0
  26. package/dist/chunk-QC2M4NZY.js +158 -0
  27. package/dist/chunk-QQV6VLYJ.js +204 -0
  28. package/dist/chunk-T66ZKBHF.js +25 -0
  29. package/dist/chunk-VICZ76TR.js +118 -0
  30. package/dist/chunk-Y63XQS2J.js +6 -0
  31. package/dist/cli.cjs +1596 -0
  32. package/dist/cli.d.cts +89 -0
  33. package/dist/cli.d.ts +89 -0
  34. package/dist/cli.js +534 -0
  35. package/dist/client.cjs +185 -0
  36. package/dist/client.d.cts +228 -0
  37. package/dist/client.d.ts +228 -0
  38. package/dist/client.js +13 -0
  39. package/dist/cms-BPp01z-8.d.ts +411 -0
  40. package/dist/cms-D6D89-qZ.d.cts +411 -0
  41. package/dist/config.cjs +61 -0
  42. package/dist/config.d.cts +36 -0
  43. package/dist/config.d.ts +36 -0
  44. package/dist/config.js +11 -0
  45. package/dist/diff.cjs +316 -0
  46. package/dist/diff.d.cts +122 -0
  47. package/dist/diff.d.ts +122 -0
  48. package/dist/diff.js +29 -0
  49. package/dist/drizzle-repo-B1rt7r4j.d.ts +90 -0
  50. package/dist/drizzle-repo-Cn-kL2FK.d.cts +90 -0
  51. package/dist/errors.cjs +193 -0
  52. package/dist/errors.d.cts +109 -0
  53. package/dist/errors.d.ts +109 -0
  54. package/dist/errors.js +16 -0
  55. package/dist/frontmatter.cjs +103 -0
  56. package/dist/frontmatter.d.cts +32 -0
  57. package/dist/frontmatter.d.ts +32 -0
  58. package/dist/frontmatter.js +9 -0
  59. package/dist/http.cjs +1105 -0
  60. package/dist/http.d.cts +75 -0
  61. package/dist/http.d.ts +75 -0
  62. package/dist/http.js +321 -0
  63. package/dist/index.cjs +3066 -0
  64. package/dist/index.d.cts +19 -0
  65. package/dist/index.d.ts +19 -0
  66. package/dist/index.js +263 -0
  67. package/dist/markdown.cjs +220 -0
  68. package/dist/markdown.d.cts +88 -0
  69. package/dist/markdown.d.ts +88 -0
  70. package/dist/markdown.js +23 -0
  71. package/dist/mcp.cjs +652 -0
  72. package/dist/mcp.d.cts +43 -0
  73. package/dist/mcp.d.ts +43 -0
  74. package/dist/mcp.js +26 -0
  75. package/dist/messages/en.cjs +76 -0
  76. package/dist/messages/en.d.cts +7 -0
  77. package/dist/messages/en.d.ts +7 -0
  78. package/dist/messages/en.js +7 -0
  79. package/dist/messages/ko.cjs +76 -0
  80. package/dist/messages/ko.d.cts +7 -0
  81. package/dist/messages/ko.d.ts +7 -0
  82. package/dist/messages/ko.js +53 -0
  83. package/dist/registry/cms-audit.json +25 -0
  84. package/dist/registry/cms-command.json +23 -0
  85. package/dist/registry/cms-doc-editor.json +36 -0
  86. package/dist/registry/cms-doc-list.json +29 -0
  87. package/dist/registry/cms-empty.json +22 -0
  88. package/dist/registry/cms-keys.json +29 -0
  89. package/dist/registry/cms-lib.json +33 -0
  90. package/dist/registry/cms-merge.json +26 -0
  91. package/dist/registry/cms-shell.json +22 -0
  92. package/dist/registry/cms-versions.json +26 -0
  93. package/dist/registry/registry.json +255 -0
  94. package/dist/repo-BWI2Pkrv.d.ts +162 -0
  95. package/dist/repo-CeDxUxO6.d.cts +162 -0
  96. package/dist/tables.cjs +356 -0
  97. package/dist/tables.d.cts +3515 -0
  98. package/dist/tables.d.ts +3515 -0
  99. package/dist/tables.js +35 -0
  100. package/dist/tools.cjs +420 -0
  101. package/dist/tools.d.cts +27 -0
  102. package/dist/tools.d.ts +27 -0
  103. package/dist/tools.js +18 -0
  104. package/dist/types.cjs +226 -0
  105. package/dist/types.d.cts +286 -0
  106. package/dist/types.d.ts +286 -0
  107. package/dist/types.js +28 -0
  108. package/package.json +277 -4
@@ -0,0 +1,286 @@
1
+ import { ZodTypeAny } from 'zod';
2
+ export { CmsError, CmsErrorCode, CmsErrorKind, CmsErrorOptions, Diagnostic, ERROR_CODES, ERROR_KINDS, ErrorParams, MessageTemplate, Messages, formatMessage, isCmsError } from './errors.js';
3
+
4
+ /**
5
+ * agent-cms — an add-on CMS that people (an admin screen) and agents (REST,
6
+ * MCP, AI SDK tools) edit together. Lives inside the app: no separate server.
7
+ *
8
+ * EXTRACTION RULE: nothing under `src/` may import from a host app (`@/`) or
9
+ * any app module (`src/parts.test.ts` enforces it).
10
+ *
11
+ * Browser-safe: no Node APIs here (the admin UI imports these types).
12
+ */
13
+
14
+ /**
15
+ * draft — the latest version is not public (an older one may be).
16
+ * published — the latest version is the public one.
17
+ * archived — hidden from the public; history kept.
18
+ */
19
+ declare const DOC_STATUSES: readonly ["draft", "published", "archived"];
20
+ type DocStatus = (typeof DOC_STATUSES)[number];
21
+ declare const KEY_SCOPES: readonly ["read", "write", "publish", "admin"];
22
+ type KeyScope = (typeof KEY_SCOPES)[number];
23
+ /** How a request came in. Used for usage counts (`cms_hits.source`) and the audit log. */
24
+ declare const VIAS: readonly ["rest", "mcp", "ai", "cli", "app"];
25
+ type Via = (typeof VIAS)[number];
26
+ /** Who is acting. Either an app session (user), an API key, the app itself or nobody. */
27
+ type Actor = ({
28
+ kind: "anonymous";
29
+ } | {
30
+ kind: "user";
31
+ id: string;
32
+ label: string;
33
+ email?: string | null;
34
+ isAdmin: boolean;
35
+ } | {
36
+ kind: "key";
37
+ id: string;
38
+ label: string;
39
+ scopes: KeyScope[];
40
+ collections: string[] | null;
41
+ } | {
42
+ kind: "system";
43
+ label: string;
44
+ }) & {
45
+ /** Set by the transports (REST, MCP, AI tools); app code may leave it out. */
46
+ via?: Via;
47
+ };
48
+ /** The editable content of a document; one version = one snapshot of this. */
49
+ interface DocContent {
50
+ slug: string;
51
+ title: string;
52
+ summary: string;
53
+ body: string;
54
+ category: string | null;
55
+ keywords: string[];
56
+ fields: Record<string, unknown>;
57
+ }
58
+ /** Unsaved editor state kept by `cms.autosave()`. Never a version. */
59
+ interface AutosaveState {
60
+ content: DocContent;
61
+ at: string;
62
+ by: string | null;
63
+ /** The version the editor started from (the base of a 3-way merge). */
64
+ baseVersion: number;
65
+ }
66
+ interface CmsDoc extends DocContent {
67
+ id: string;
68
+ collection: string;
69
+ status: DocStatus;
70
+ /** Latest version number (the working copy). */
71
+ version: number;
72
+ /** Version that is public, or null when never published. */
73
+ publishedVersion: number | null;
74
+ /** The public snapshot (null when never published). */
75
+ published: DocContent | null;
76
+ /** First publish time; kept across unpublish and republish. */
77
+ publishedAt: string | null;
78
+ /** Last time it went public again after being hidden or unpublished. */
79
+ republishedAt: string | null;
80
+ createdAt: string;
81
+ updatedAt: string;
82
+ /** Label of whoever wrote the latest version. */
83
+ updatedBy: string | null;
84
+ updatedByKind: "user" | "key" | "system" | null;
85
+ /** Unsaved editor content (only for editors; never on a public read). */
86
+ autosave: AutosaveState | null;
87
+ }
88
+ /** What `commit()` records about a version: changed fields and body hunks. */
89
+ interface VersionChange {
90
+ fields: string[];
91
+ /** Body hunks (added and removed lines) against the previous version. */
92
+ hunks: {
93
+ id: string;
94
+ removed: string[];
95
+ added: string[];
96
+ before?: string | null;
97
+ }[];
98
+ }
99
+ /** A reviewed agent change (`cms.reviewChanges`). */
100
+ interface ReviewMark {
101
+ hunk: string;
102
+ by: string;
103
+ at: string;
104
+ action: "accepted" | "reverted";
105
+ }
106
+ interface CmsVersion {
107
+ id: string;
108
+ documentId: string;
109
+ version: number;
110
+ snapshot: DocContent;
111
+ authorKind: "user" | "key" | "system";
112
+ authorId: string | null;
113
+ authorLabel: string;
114
+ note: string | null;
115
+ published: boolean;
116
+ createdAt: string;
117
+ changed: VersionChange | null;
118
+ reviewed: ReviewMark[];
119
+ }
120
+ /** A version without its snapshot (version lists). */
121
+ type VersionSummary = Omit<CmsVersion, "snapshot"> & {
122
+ title: string;
123
+ };
124
+ interface CmsKey {
125
+ id: string;
126
+ name: string;
127
+ prefix: string;
128
+ scopes: KeyScope[];
129
+ collections: string[] | null;
130
+ lastUsedAt: string | null;
131
+ revokedAt: string | null;
132
+ /** null = never expires. */
133
+ expiresAt: string | null;
134
+ createdAt: string;
135
+ }
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"];
137
+ type AuditAction = (typeof AUDIT_ACTIONS)[number];
138
+ interface AuditEntry {
139
+ id: string;
140
+ at: string;
141
+ actorKind: Actor["kind"];
142
+ actorId: string | null;
143
+ actorLabel: string;
144
+ action: AuditAction;
145
+ collection: string | null;
146
+ slug: string | null;
147
+ version: number | null;
148
+ outcome: "ok" | "denied" | "failed";
149
+ via: Via | null;
150
+ detail: Record<string, unknown>;
151
+ }
152
+ /** Passed to `createCms({ onSearchMiss })` when a search the caller flagged found nothing. */
153
+ interface SearchMissEvent {
154
+ query: string;
155
+ /** `normalizeQuery(query)`: particles dropped, words sorted — group by this. */
156
+ normalized: string;
157
+ collections: string[];
158
+ /** Anyone, anonymous included. Whether to keep it is the app's call. */
159
+ actor: Actor;
160
+ source: Via;
161
+ at: string;
162
+ /** Best results that scored below the threshold (max 3). */
163
+ nearest: {
164
+ collection: string;
165
+ slug: string;
166
+ anchor: string | null;
167
+ score: number;
168
+ coverage: number;
169
+ }[];
170
+ }
171
+ interface AccessArgs {
172
+ actor: Actor;
173
+ collection: string;
174
+ doc?: CmsDoc | null;
175
+ }
176
+ /** How the admin form shows one field (`admin.fields` in the collection). */
177
+ interface FieldAdmin {
178
+ label?: string;
179
+ help?: string;
180
+ widget?: "text" | "textarea" | "number" | "switch" | "select" | "multiselect" | "date" | "tags" | "json";
181
+ }
182
+ interface CollectionConfig<F extends ZodTypeAny | undefined = ZodTypeAny | undefined, S extends string = string> {
183
+ slug: S;
184
+ label: string;
185
+ /**
186
+ * Required. "public": anyone may read published documents unless
187
+ * `access.read` says otherwise. "internal": `access.read` is required (the
188
+ * CMS refuses to start without it), so nothing is public by accident.
189
+ */
190
+ visibility: "public" | "internal";
191
+ /**
192
+ * Writes only through the host app (the `system` actor). Users and API keys
193
+ * can read it over REST and MCP but never create, edit, publish or delete.
194
+ */
195
+ managed?: boolean;
196
+ /** Allowed category values (null = free text / none). */
197
+ categories?: readonly string[];
198
+ /** zod object for `fields`; parsed (with defaults) on every save. */
199
+ fields?: F;
200
+ versions?: {
201
+ /** Versions kept per document (0 = all). Default 100. */
202
+ max?: number;
203
+ /**
204
+ * true (default): saving a published document makes a draft; the public
205
+ * copy stays until it is published. false: a save to a published
206
+ * document republishes it (a changelog post edited in place).
207
+ */
208
+ drafts?: boolean;
209
+ };
210
+ /** Slug rule override (default: lowercase ascii words joined by hyphens). */
211
+ slugPattern?: RegExp;
212
+ /** Characters the house style bans from title, summary and body. */
213
+ forbiddenChars?: readonly string[];
214
+ search?: {
215
+ /** Index published docs of this collection. Default true. */
216
+ enabled?: boolean;
217
+ };
218
+ /** `[[link:key|label]]` keys: return the URL, or null when the key is unknown. */
219
+ links?: {
220
+ resolve: (key: string) => string | null;
221
+ };
222
+ /** Public URL of a document (agent results, the editor's public link, preview links). */
223
+ url?: (doc: {
224
+ slug: string;
225
+ }) => string;
226
+ access?: {
227
+ /** Read published documents. Default for "public": everyone. Required for "internal". */
228
+ read?: (a: AccessArgs) => boolean;
229
+ /** Read drafts and versions; create and edit. */
230
+ write?: (a: AccessArgs) => boolean;
231
+ /** Publish, archive, restore-and-publish, delete. */
232
+ publish?: (a: AccessArgs) => boolean;
233
+ };
234
+ admin?: {
235
+ /** Per field path (`tags`, `seo.title`): label, help text, widget. */
236
+ fields?: Record<string, FieldAdmin>;
237
+ };
238
+ hooks?: {
239
+ /**
240
+ * After every write. `info.contentChanged` is false when only the draft
241
+ * changed (the public copy is the same), e.g. to skip ISR revalidation.
242
+ */
243
+ afterChange?: Array<(doc: CmsDoc, info: {
244
+ contentChanged: boolean;
245
+ }) => void | Promise<void>>;
246
+ };
247
+ }
248
+ /** What the admin list shows for a document. */
249
+ interface DocState {
250
+ state: "draft" | "published" | "archived";
251
+ /** Published, and the working copy has changes the public does not see yet. */
252
+ modifiedSincePublish: boolean;
253
+ }
254
+ /**
255
+ * Display state. The stored status is "draft" when a published document has
256
+ * a newer working copy; the admin shows that as "published, modified".
257
+ */
258
+ declare function docState(doc: Pick<CmsDoc, "status" | "version" | "publishedVersion">): DocState;
259
+ /** List item without the body (`fields: "summary"` lists). */
260
+ interface DocSummary {
261
+ id: string;
262
+ collection: string;
263
+ slug: string;
264
+ title: string;
265
+ summary: string;
266
+ category: string | null;
267
+ status: DocStatus;
268
+ state: DocState["state"];
269
+ modifiedSincePublish: boolean;
270
+ version: number;
271
+ publishedVersion: number | null;
272
+ publishedAt: string | null;
273
+ updatedAt: string;
274
+ updatedBy: string | null;
275
+ updatedByKind: CmsDoc["updatedByKind"];
276
+ hits7d?: number;
277
+ }
278
+ interface DocCounts {
279
+ all: number;
280
+ draft: number;
281
+ published: number;
282
+ modified: number;
283
+ archived: number;
284
+ }
285
+
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 };
package/dist/types.js ADDED
@@ -0,0 +1,28 @@
1
+ import {
2
+ AUDIT_ACTIONS,
3
+ DOC_STATUSES,
4
+ KEY_SCOPES,
5
+ VIAS,
6
+ docState
7
+ } from "./chunk-6K5ZTGHQ.js";
8
+ import {
9
+ CmsError,
10
+ ERROR_CODES,
11
+ ERROR_KINDS,
12
+ formatMessage,
13
+ isCmsError
14
+ } from "./chunk-VICZ76TR.js";
15
+ import "./chunk-DOADAH4L.js";
16
+ import "./chunk-2NTK7H4W.js";
17
+ export {
18
+ AUDIT_ACTIONS,
19
+ CmsError,
20
+ DOC_STATUSES,
21
+ ERROR_CODES,
22
+ ERROR_KINDS,
23
+ KEY_SCOPES,
24
+ VIAS,
25
+ docState,
26
+ formatMessage,
27
+ isCmsError
28
+ };
package/package.json CHANGED
@@ -1,6 +1,279 @@
1
1
  {
2
2
  "name": "@mainsoft/agent-cms",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.7.0",
4
+ "description": "An add-on CMS that runs inside your web app, edited by people (admin UI) and AI agents (REST, MCP, AI SDK tools) together.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/mainsoft-2024/agent-cms.git"
10
+ },
11
+ "homepage": "https://github.com/mainsoft-2024/agent-cms#readme",
12
+ "author": "Paul Park <2000mageia@gmail.com>",
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "provenance": true
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md",
20
+ "UPGRADE-0.6.md",
21
+ "CHANGELOG.md",
22
+ "TODO.md",
23
+ "LICENSE"
24
+ ],
25
+ "sideEffects": false,
26
+ "bin": {
27
+ "agent-cms": "dist/bin.js"
28
+ },
29
+ "main": "./dist/index.cjs",
30
+ "module": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "import": {
35
+ "types": "./dist/index.d.ts",
36
+ "default": "./dist/index.js"
37
+ },
38
+ "require": {
39
+ "types": "./dist/index.d.cts",
40
+ "default": "./dist/index.cjs"
41
+ }
42
+ },
43
+ "./http": {
44
+ "import": {
45
+ "types": "./dist/http.d.ts",
46
+ "default": "./dist/http.js"
47
+ },
48
+ "require": {
49
+ "types": "./dist/http.d.cts",
50
+ "default": "./dist/http.cjs"
51
+ }
52
+ },
53
+ "./mcp": {
54
+ "import": {
55
+ "types": "./dist/mcp.d.ts",
56
+ "default": "./dist/mcp.js"
57
+ },
58
+ "require": {
59
+ "types": "./dist/mcp.d.cts",
60
+ "default": "./dist/mcp.cjs"
61
+ }
62
+ },
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
+ "./client": {
74
+ "import": {
75
+ "types": "./dist/client.d.ts",
76
+ "default": "./dist/client.js"
77
+ },
78
+ "require": {
79
+ "types": "./dist/client.d.cts",
80
+ "default": "./dist/client.cjs"
81
+ }
82
+ },
83
+ "./tools": {
84
+ "import": {
85
+ "types": "./dist/tools.d.ts",
86
+ "default": "./dist/tools.js"
87
+ },
88
+ "require": {
89
+ "types": "./dist/tools.d.cts",
90
+ "default": "./dist/tools.cjs"
91
+ }
92
+ },
93
+ "./agent": {
94
+ "import": {
95
+ "types": "./dist/agent.d.ts",
96
+ "default": "./dist/agent.js"
97
+ },
98
+ "require": {
99
+ "types": "./dist/agent.d.cts",
100
+ "default": "./dist/agent.cjs"
101
+ }
102
+ },
103
+ "./markdown": {
104
+ "import": {
105
+ "types": "./dist/markdown.d.ts",
106
+ "default": "./dist/markdown.js"
107
+ },
108
+ "require": {
109
+ "types": "./dist/markdown.d.cts",
110
+ "default": "./dist/markdown.cjs"
111
+ }
112
+ },
113
+ "./frontmatter": {
114
+ "import": {
115
+ "types": "./dist/frontmatter.d.ts",
116
+ "default": "./dist/frontmatter.js"
117
+ },
118
+ "require": {
119
+ "types": "./dist/frontmatter.d.cts",
120
+ "default": "./dist/frontmatter.cjs"
121
+ }
122
+ },
123
+ "./types": {
124
+ "import": {
125
+ "types": "./dist/types.d.ts",
126
+ "default": "./dist/types.js"
127
+ },
128
+ "require": {
129
+ "types": "./dist/types.d.cts",
130
+ "default": "./dist/types.cjs"
131
+ }
132
+ },
133
+ "./tables": {
134
+ "import": {
135
+ "types": "./dist/tables.d.ts",
136
+ "default": "./dist/tables.js"
137
+ },
138
+ "require": {
139
+ "types": "./dist/tables.d.cts",
140
+ "default": "./dist/tables.cjs"
141
+ }
142
+ },
143
+ "./cli": {
144
+ "import": {
145
+ "types": "./dist/cli.d.ts",
146
+ "default": "./dist/cli.js"
147
+ },
148
+ "require": {
149
+ "types": "./dist/cli.d.cts",
150
+ "default": "./dist/cli.cjs"
151
+ }
152
+ },
153
+ "./diff": {
154
+ "import": {
155
+ "types": "./dist/diff.d.ts",
156
+ "default": "./dist/diff.js"
157
+ },
158
+ "require": {
159
+ "types": "./dist/diff.d.cts",
160
+ "default": "./dist/diff.cjs"
161
+ }
162
+ },
163
+ "./errors": {
164
+ "import": {
165
+ "types": "./dist/errors.d.ts",
166
+ "default": "./dist/errors.js"
167
+ },
168
+ "require": {
169
+ "types": "./dist/errors.d.cts",
170
+ "default": "./dist/errors.cjs"
171
+ }
172
+ },
173
+ "./config": {
174
+ "import": {
175
+ "types": "./dist/config.d.ts",
176
+ "default": "./dist/config.js"
177
+ },
178
+ "require": {
179
+ "types": "./dist/config.d.cts",
180
+ "default": "./dist/config.cjs"
181
+ }
182
+ },
183
+ "./messages/en": {
184
+ "import": {
185
+ "types": "./dist/messages/en.d.ts",
186
+ "default": "./dist/messages/en.js"
187
+ },
188
+ "require": {
189
+ "types": "./dist/messages/en.d.cts",
190
+ "default": "./dist/messages/en.cjs"
191
+ }
192
+ },
193
+ "./messages/ko": {
194
+ "import": {
195
+ "types": "./dist/messages/ko.d.ts",
196
+ "default": "./dist/messages/ko.js"
197
+ },
198
+ "require": {
199
+ "types": "./dist/messages/ko.d.cts",
200
+ "default": "./dist/messages/ko.cjs"
201
+ }
202
+ },
203
+ "./registry/*": "./dist/registry/*",
204
+ "./package.json": "./package.json"
205
+ },
206
+ "scripts": {
207
+ "build": "tsup && tsx scripts/build-registry.ts",
208
+ "typecheck": "tsc --noEmit",
209
+ "test": "tsx --test src/*.test.ts",
210
+ "test:db": "tsx --test src/db/*.test.ts",
211
+ "test:ui": "tsx --tsconfig registry/tsconfig.json --test registry/__tests__/*.test.tsx",
212
+ "test:e2e": "playwright test -c e2e/playwright.config.ts",
213
+ "check:pack": "publint --strict && attw --pack . --profile node16",
214
+ "prepublishOnly": "npm run typecheck && npm test && npm run build",
215
+ "build:registry": "tsx scripts/build-registry.ts",
216
+ "test:shadcn": "bash scripts/shadcn-smoke.sh"
217
+ },
218
+ "peerDependencies": {
219
+ "ai": ">=5.0.0",
220
+ "drizzle-orm": ">=0.36.0",
221
+ "zod": "^3.25.0 || ^4.0.0"
222
+ },
223
+ "devDependencies": {
224
+ "@arethetypeswrong/cli": "0.18.5",
225
+ "@electric-sql/pglite": "0.5.16",
226
+ "@playwright/test": "1.65.1",
227
+ "@testing-library/dom": "10.4.2",
228
+ "@testing-library/react": "16.3.3",
229
+ "@testing-library/user-event": "14.6.12",
230
+ "@types/jsdom": "21.1.7",
231
+ "@types/node": "^22.10.0",
232
+ "@types/pg": "8.23.1",
233
+ "@types/react": "18.3.31",
234
+ "@types/react-dom": "18.3.7",
235
+ "ai": "^7.0.31",
236
+ "axe-core": "4.14.1",
237
+ "drizzle-orm": "0.45.2",
238
+ "global-jsdom": "26.0.0",
239
+ "jsdom": "26.1.0",
240
+ "pg": "8.23.1",
241
+ "publint": "0.3.25",
242
+ "react": "18.3.1",
243
+ "react-dom": "18.3.1",
244
+ "tsup": "^8.3.5",
245
+ "tsx": "^4.19.2",
246
+ "typescript": "^5.7.2",
247
+ "zod": "3.25.76"
248
+ },
249
+ "workspaces": [
250
+ "examples/next"
251
+ ],
252
+ "engines": {
253
+ "node": ">=20"
254
+ },
255
+ "keywords": [
256
+ "cms",
257
+ "headless-cms",
258
+ "ai-agents",
259
+ "mcp",
260
+ "ai-sdk",
261
+ "nextjs",
262
+ "drizzle",
263
+ "postgres",
264
+ "shadcn",
265
+ "shadcn-registry"
266
+ ],
267
+ "peerDependenciesMeta": {
268
+ "ai": {
269
+ "optional": true
270
+ }
271
+ },
272
+ "dependencies": {
273
+ "@modelcontextprotocol/sdk": "1.32.2",
274
+ "jiti": "2.7.0"
275
+ },
276
+ "bugs": {
277
+ "url": "https://github.com/mainsoft-2024/agent-cms/issues"
278
+ }
279
+ }