@synchronized-studio/cmsassets-agent 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.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # @synchronized-studio/cmsassets-agent
2
+
3
+ CLI agent that auto-integrates `@synchronized-studio/response-transformer` into any JS/TS project.
4
+
5
+ ## Quick start
6
+
7
+ ```bash
8
+ npx @synchronized-studio/cmsassets-agent init
9
+ ```
10
+
11
+ This single command will:
12
+
13
+ 1. Scan your project (detect framework, CMS, injection points)
14
+ 2. Install `@synchronized-studio/response-transformer`
15
+ 3. Patch your source files with the transformer calls
16
+ 4. Add a `cmsassets:transform` npm script for easy re-runs
17
+
18
+ ## Re-run after code changes
19
+
20
+ ```bash
21
+ npm run cmsassets:transform
22
+ ```
23
+
24
+ ## Options
25
+
26
+ ```bash
27
+ # Preview changes without applying
28
+ npx @synchronized-studio/cmsassets-agent init --dry-run
29
+
30
+ # Skip confirmation prompt (CI-friendly)
31
+ npx @synchronized-studio/cmsassets-agent init --yes
32
+
33
+ # Set your tenant slug
34
+ npx @synchronized-studio/cmsassets-agent init --slug my-project
35
+
36
+ # Override CMS type
37
+ npx @synchronized-studio/cmsassets-agent init --cms prismic
38
+ ```
39
+
40
+ ## Advanced usage
41
+
42
+ For more control, use the individual commands:
43
+
44
+ ```bash
45
+ # Scan only
46
+ npx @synchronized-studio/cmsassets-agent scan --dir .
47
+
48
+ # Generate a plan file for review
49
+ npx @synchronized-studio/cmsassets-agent plan --dir .
50
+
51
+ # Apply patches (installs transformer by default)
52
+ npx @synchronized-studio/cmsassets-agent apply --dir .
53
+
54
+ # Verify integration (lint, build, test)
55
+ npx @synchronized-studio/cmsassets-agent verify --dir .
56
+
57
+ # Diagnose project setup
58
+ npx @synchronized-studio/cmsassets-agent doctor --dir .
59
+
60
+ # Rollback last apply
61
+ npx @synchronized-studio/cmsassets-agent rollback --dir .
62
+ ```
63
+
64
+ ## LLM fallback (optional)
65
+
66
+ When AST-based patching fails, the agent can optionally use OpenAI to generate a diff. Disabled by default.
67
+
68
+ 1. Install the optional dependency: `npm install openai`
69
+ 2. Set `OPENAI_API_KEY` in your environment
70
+ 3. Add `--llm` when applying:
71
+
72
+ ```bash
73
+ npx @synchronized-studio/cmsassets-agent init --llm
74
+ ```
75
+
76
+ ## Publishing
77
+
78
+ ```bash
79
+ cd packages/cmsassets-agent
80
+ npm run build
81
+ npm publish
82
+ ```
83
+
84
+ `openai` is an optional dependency — users who want LLM must install it themselves.
@@ -0,0 +1,8 @@
1
+ import {
2
+ aiReviewAll
3
+ } from "./chunk-R6XRR66U.js";
4
+ import "./chunk-645ASJ55.js";
5
+ import "./chunk-QGM4M3NI.js";
6
+ export {
7
+ aiReviewAll
8
+ };