@synchronized-studio/cmsassets-agent 0.3.10 → 0.5.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/dist/index.js CHANGED
@@ -2,9 +2,14 @@ import {
2
2
  AiFileResult,
3
3
  AiReviewReport,
4
4
  ApplyReport,
5
+ CandidateGraph,
6
+ CandidateRegion,
7
+ CandidateRegionType,
5
8
  CmsInfo,
6
9
  CmsType,
7
10
  Confidence,
11
+ DecisionLogEntry,
12
+ DecisionReasonCode,
8
13
  FilePatch,
9
14
  FrameworkInfo,
10
15
  FrameworkName,
@@ -12,11 +17,13 @@ import {
12
17
  InjectionType,
13
18
  PackageManager,
14
19
  PatchMethod,
20
+ PatchMode,
15
21
  PatchPlan,
16
22
  PatchedFileReport,
17
23
  ScanResult,
18
24
  VerifyProfile,
19
25
  VerifyReport,
26
+ VerifyStepLog,
20
27
  applyPlan,
21
28
  createPlan,
22
29
  createReport,
@@ -26,11 +33,11 @@ import {
26
33
  saveReport,
27
34
  scan,
28
35
  verify
29
- } from "./chunk-WXCGZDUK.js";
36
+ } from "./chunk-MNFV7OJO.js";
30
37
  import {
31
38
  aiReviewAll
32
- } from "./chunk-Q3VHF32G.js";
33
- import "./chunk-KYRW5D2O.js";
39
+ } from "./chunk-JZ2YOFY7.js";
40
+ import "./chunk-MMNQQM5Y.js";
34
41
  import "./chunk-E74TGIFQ.js";
35
42
  import "./chunk-QGM4M3NI.js";
36
43
 
@@ -48,8 +55,8 @@ async function runFullPipeline(opts) {
48
55
  if (opts.slug) {
49
56
  plan.env.placeholder = `https://${opts.slug}.cmsassets.com`;
50
57
  }
51
- if (opts.allowLlmFallback) {
52
- plan.policies.allowLlmFallback = true;
58
+ if (opts.patchMode) {
59
+ plan.policies.patchMode = opts.patchMode;
53
60
  }
54
61
  if (opts.verifyProfile) {
55
62
  plan.policies.verifyProfile = opts.verifyProfile;
@@ -63,7 +70,8 @@ async function runFullPipeline(opts) {
63
70
  previousCommit = gitOps.getHeadCommit(root);
64
71
  gitOps.createBranch(root, `cmsassets-agent/integrate-${Date.now()}`);
65
72
  }
66
- let aiMode = opts.aiVerify && !!process.env.OPENAI_API_KEY;
73
+ const patchMode = plan.policies.patchMode ?? "hybrid";
74
+ let aiMode = patchMode !== "ast" && !!process.env.OPENAI_API_KEY;
67
75
  if (aiMode) {
68
76
  const { checkAiVerifyReady } = await import("./openaiClient-YGAFYB3X.js");
69
77
  const ready = await checkAiVerifyReady(root);
@@ -74,6 +82,7 @@ async function runFullPipeline(opts) {
74
82
  includeTests: opts.includeTests ?? false,
75
83
  maxFiles: opts.maxFiles,
76
84
  aiMode,
85
+ patchMode,
77
86
  aiModel: opts.aiModel
78
87
  });
79
88
  if (opts.gitCommit && gitOps.isGitRepo(root) && !opts.dryRun) {
@@ -107,6 +116,7 @@ async function runFullPipeline(opts) {
107
116
  verifyReport = verify(root, {
108
117
  profile: plan.policies.verifyProfile,
109
118
  framework: scanResult.framework.name,
119
+ packageManager: scanResult.packageManager,
110
120
  patchedFiles: applyReport.files.filter((f) => f.applied).map((f) => f.filePath)
111
121
  });
112
122
  }
@@ -134,9 +144,14 @@ export {
134
144
  AiFileResult,
135
145
  AiReviewReport,
136
146
  ApplyReport,
147
+ CandidateGraph,
148
+ CandidateRegion,
149
+ CandidateRegionType,
137
150
  CmsInfo,
138
151
  CmsType,
139
152
  Confidence,
153
+ DecisionLogEntry,
154
+ DecisionReasonCode,
140
155
  FilePatch,
141
156
  FrameworkInfo,
142
157
  FrameworkName,
@@ -144,11 +159,13 @@ export {
144
159
  InjectionType,
145
160
  PackageManager,
146
161
  PatchMethod,
162
+ PatchMode,
147
163
  PatchPlan,
148
164
  PatchedFileReport,
149
165
  ScanResult,
150
166
  VerifyProfile,
151
167
  VerifyReport,
168
+ VerifyStepLog,
152
169
  aiReviewAll,
153
170
  applyPlan,
154
171
  createPlan,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synchronized-studio/cmsassets-agent",
3
- "version": "0.3.10",
3
+ "version": "0.5.0",
4
4
  "description": "CLI agent that auto-integrates @synchronized-studio/response-transformer into any JS/TS project.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,8 @@
23
23
  },
24
24
  "files": [
25
25
  "dist",
26
- "README.md"
26
+ "README.md",
27
+ "CHANGELOG.md"
27
28
  ],
28
29
  "publishConfig": {
29
30
  "access": "public"