@getripple/core 1.0.4 → 1.0.6
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 +13 -0
- package/README.md +306 -23
- package/dist/audit.d.ts +4 -0
- package/dist/audit.js +5 -0
- package/dist/audit.js.map +1 -1
- package/dist/change-intent.d.ts +1 -0
- package/dist/change-intent.js +22 -6
- package/dist/change-intent.js.map +1 -1
- package/dist/git.d.ts +6 -0
- package/dist/git.js +57 -0
- package/dist/git.js.map +1 -0
- package/dist/graph.d.ts +22 -2
- package/dist/graph.js +119 -31
- package/dist/graph.js.map +1 -1
- package/dist/readiness.d.ts +10 -0
- package/dist/readiness.js +117 -19
- package/dist/readiness.js.map +1 -1
- package/dist/staged-check.js +160 -98
- package/dist/staged-check.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @getripple/core Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.6] - 2026-06-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Report Git spawn failures with actionable messages when Node.js cannot launch `git`.
|
|
7
|
+
- Preserve the exact Git readiness failure in `ripple doctor` and readiness summaries.
|
|
8
|
+
|
|
9
|
+
## [1.0.5] - 2026-06-04
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Refresh package README wording for npm users.
|
|
13
|
+
- Clarify that the core powers VS Code, CLI, and MCP, while most users should start with `@getripple/cli` or `@getripple/mcp`.
|
|
14
|
+
- Document JavaScript/TypeScript depth, basic Python support, and static-analysis limits more clearly.
|
|
15
|
+
|
|
3
16
|
## [1.0.4] - 2026-06-03
|
|
4
17
|
|
|
5
18
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# @getripple/core
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
It scans a local repository, builds architectural context, and exposes the `GraphEngine`
|
|
5
|
-
used by Ripple's plan-before-edit and check-after-edit workflow.
|
|
3
|
+
**Core engine for Ripple's local drift-control system for AI coding agents.**
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
`@getripple/core` scans repositories, builds local dependency intelligence, tracks architectural relationships, records approved work boundaries, and powers Ripple's CLI, MCP server, CI integrations, and editor experiences.
|
|
6
|
+
|
|
7
|
+
Most users should start with:
|
|
8
|
+
|
|
9
|
+
```txt
|
|
10
|
+
@getripple/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or
|
|
14
|
+
|
|
15
|
+
```txt
|
|
16
|
+
@getripple/mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
and use `@getripple/core` only when building custom integrations.
|
|
20
|
+
|
|
21
|
+
---
|
|
10
22
|
|
|
11
23
|
## Install
|
|
12
24
|
|
|
@@ -14,39 +26,310 @@ Ripple's architectural context.
|
|
|
14
26
|
npm install @getripple/core
|
|
15
27
|
```
|
|
16
28
|
|
|
29
|
+
---
|
|
30
|
+
|
|
17
31
|
## Basic Usage
|
|
18
32
|
|
|
19
33
|
```ts
|
|
20
34
|
import { GraphEngine } from "@getripple/core";
|
|
21
35
|
|
|
22
36
|
const engine = new GraphEngine(process.cwd());
|
|
23
|
-
await engine.initialScan();
|
|
24
37
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
38
|
+
try {
|
|
39
|
+
await engine.initialScan();
|
|
40
|
+
|
|
41
|
+
const blastRadius = engine.blastRadius(["src/auth.ts"]);
|
|
42
|
+
const importers = engine.downstreamFiles("src/auth.ts");
|
|
43
|
+
const imports = engine.upstreamFiles("src/auth.ts");
|
|
44
|
+
|
|
45
|
+
console.log({
|
|
46
|
+
blastRadius,
|
|
47
|
+
importers,
|
|
48
|
+
imports,
|
|
49
|
+
});
|
|
50
|
+
} finally {
|
|
51
|
+
engine.dispose();
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## What Core Powers
|
|
58
|
+
|
|
59
|
+
`@getripple/core` is the shared engine behind Ripple's public interfaces.
|
|
60
|
+
|
|
61
|
+
```txt
|
|
62
|
+
@getripple/cli
|
|
63
|
+
@getripple/mcp
|
|
64
|
+
VS Code integrations
|
|
65
|
+
CI workflows
|
|
66
|
+
Custom integrations
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The engine provides local signals used to answer:
|
|
70
|
+
|
|
71
|
+
```txt
|
|
72
|
+
What should an agent read before editing?
|
|
73
|
+
|
|
74
|
+
What files may be affected?
|
|
75
|
+
|
|
76
|
+
What symbols may be affected?
|
|
77
|
+
|
|
78
|
+
What was approved?
|
|
79
|
+
|
|
80
|
+
What changed?
|
|
81
|
+
|
|
82
|
+
Did the agent drift?
|
|
83
|
+
|
|
84
|
+
Can the agent continue?
|
|
85
|
+
|
|
86
|
+
Does a human need to review?
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Core Capabilities
|
|
92
|
+
|
|
93
|
+
Ripple builds and maintains local repository intelligence.
|
|
94
|
+
|
|
95
|
+
```txt
|
|
96
|
+
dependency graph
|
|
97
|
+
|
|
98
|
+
reverse imports
|
|
99
|
+
|
|
100
|
+
exported symbols
|
|
101
|
+
|
|
102
|
+
call relationships
|
|
103
|
+
|
|
104
|
+
blast radius analysis
|
|
105
|
+
|
|
106
|
+
architectural history
|
|
107
|
+
|
|
108
|
+
focused context generation
|
|
109
|
+
|
|
110
|
+
saved change intents
|
|
111
|
+
|
|
112
|
+
approval tracking
|
|
113
|
+
|
|
114
|
+
trust-boundary validation
|
|
115
|
+
|
|
116
|
+
drift detection
|
|
117
|
+
|
|
118
|
+
continue / stop gate summaries
|
|
30
119
|
```
|
|
31
120
|
|
|
32
|
-
|
|
121
|
+
These capabilities power the Ripple workflow:
|
|
122
|
+
|
|
123
|
+
```txt
|
|
124
|
+
plan work
|
|
125
|
+
|
|
126
|
+
save intent
|
|
33
127
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
128
|
+
agent edits code
|
|
129
|
+
|
|
130
|
+
check changes
|
|
131
|
+
|
|
132
|
+
detect drift
|
|
133
|
+
|
|
134
|
+
repair or review
|
|
135
|
+
|
|
136
|
+
continue safely
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
39
140
|
|
|
40
141
|
## Trust Boundary Contract
|
|
41
142
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
143
|
+
The Trust Boundary Contract is the core safety model used throughout Ripple.
|
|
144
|
+
|
|
145
|
+
Ripple compares:
|
|
146
|
+
|
|
147
|
+
```txt
|
|
148
|
+
planned work
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
against
|
|
152
|
+
|
|
153
|
+
```txt
|
|
154
|
+
actual changes
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
to determine whether an AI coding agent stayed within the work it was trusted to perform.
|
|
158
|
+
|
|
159
|
+
The Trust Boundary Contract consists of:
|
|
160
|
+
|
|
161
|
+
```txt
|
|
162
|
+
planned work -> what the human approved
|
|
163
|
+
|
|
164
|
+
approved boundary -> file, function, task, brainstorm, or PR scope
|
|
165
|
+
|
|
166
|
+
actual changes -> what the agent modified
|
|
167
|
+
|
|
168
|
+
drift result -> whether the agent left the approved work
|
|
169
|
+
|
|
170
|
+
gate decision -> continue, repair, human-review, or restore-readiness
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The Trust Boundary Contract enables Ripple to:
|
|
174
|
+
|
|
175
|
+
```txt
|
|
176
|
+
detect intent drift
|
|
177
|
+
|
|
178
|
+
detect boundary drift
|
|
179
|
+
|
|
180
|
+
require repair
|
|
181
|
+
|
|
182
|
+
require human review
|
|
183
|
+
|
|
184
|
+
produce continue/stop decisions
|
|
185
|
+
|
|
186
|
+
protect approved workflows
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
This contract is consumed by:
|
|
190
|
+
|
|
191
|
+
```txt
|
|
192
|
+
humans
|
|
193
|
+
|
|
194
|
+
AI coding agents
|
|
195
|
+
|
|
196
|
+
CI systems
|
|
197
|
+
|
|
198
|
+
automation pipelines
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Context Modes
|
|
204
|
+
|
|
205
|
+
Core supports multiple context-generation modes.
|
|
206
|
+
|
|
207
|
+
```txt
|
|
208
|
+
lean
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Uses graph and history cache for fast checks and gates.
|
|
212
|
+
|
|
213
|
+
```txt
|
|
214
|
+
on-demand
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Builds targeted context for MCP tools and focused requests.
|
|
218
|
+
|
|
219
|
+
```txt
|
|
220
|
+
full
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Generates broader workflow context for file-oriented agent workflows.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Ripple Workspace
|
|
228
|
+
|
|
229
|
+
Machine cache:
|
|
230
|
+
|
|
231
|
+
```txt
|
|
232
|
+
.ripple/.cache/
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Workflow and audit state:
|
|
236
|
+
|
|
237
|
+
```txt
|
|
238
|
+
.ripple/policy.json
|
|
239
|
+
.ripple/history.json
|
|
240
|
+
.ripple/intents/
|
|
241
|
+
.ripple/approvals/
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Language Support
|
|
247
|
+
|
|
248
|
+
| Language | Support |
|
|
249
|
+
| ---------- | ------- |
|
|
250
|
+
| JavaScript | Deep |
|
|
251
|
+
| TypeScript | Deep |
|
|
252
|
+
| Python | Basic |
|
|
253
|
+
|
|
254
|
+
JavaScript and TypeScript currently provide the strongest experience.
|
|
255
|
+
|
|
256
|
+
Python support includes:
|
|
257
|
+
|
|
258
|
+
```txt
|
|
259
|
+
imports
|
|
260
|
+
|
|
261
|
+
functions
|
|
262
|
+
|
|
263
|
+
classes
|
|
264
|
+
|
|
265
|
+
basic call relationships
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Framework detection and configuration analysis remain heuristic.
|
|
269
|
+
|
|
270
|
+
Ripple reports local repository signals rather than perfect semantic truth.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Privacy
|
|
275
|
+
|
|
276
|
+
Ripple operates locally.
|
|
277
|
+
|
|
278
|
+
```txt
|
|
279
|
+
No telemetry
|
|
280
|
+
|
|
281
|
+
No cloud indexing
|
|
282
|
+
|
|
283
|
+
No code upload
|
|
284
|
+
|
|
285
|
+
No remote dependency required
|
|
286
|
+
|
|
287
|
+
No account required
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Repositories are scanned on the user's machine.
|
|
291
|
+
|
|
292
|
+
---
|
|
46
293
|
|
|
47
294
|
## Status
|
|
48
295
|
|
|
49
|
-
Public alpha.
|
|
296
|
+
Public alpha.
|
|
297
|
+
|
|
298
|
+
The most stable public contracts are:
|
|
299
|
+
|
|
300
|
+
```txt
|
|
301
|
+
@getripple/cli
|
|
302
|
+
|
|
303
|
+
@getripple/mcp
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Core APIs may evolve as Ripple's graph, context, drift-control, and approval systems mature.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## What Core Is Not
|
|
311
|
+
|
|
312
|
+
`@getripple/core` is not:
|
|
313
|
+
|
|
314
|
+
```txt
|
|
315
|
+
a coding agent
|
|
316
|
+
|
|
317
|
+
a code generator
|
|
318
|
+
|
|
319
|
+
a code review replacement
|
|
320
|
+
|
|
321
|
+
a test replacement
|
|
322
|
+
|
|
323
|
+
a typechecker replacement
|
|
324
|
+
|
|
325
|
+
a sandbox
|
|
326
|
+
|
|
327
|
+
a compiler
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Instead, it is the local intelligence engine that helps Ripple determine whether an AI coding agent remained inside the work it was trusted to perform.
|
|
331
|
+
|
|
332
|
+
---
|
|
50
333
|
|
|
51
334
|
## License
|
|
52
335
|
|
package/dist/audit.d.ts
CHANGED
|
@@ -55,6 +55,10 @@ export type RippleGateSummary = {
|
|
|
55
55
|
auditStatus: RippleAuditStatus;
|
|
56
56
|
auditDecision: RippleAuditDecision;
|
|
57
57
|
approvalStatus: RippleApprovalStatus["status"];
|
|
58
|
+
allowedFiles: string[];
|
|
59
|
+
allowedSymbols: string[];
|
|
60
|
+
changedOutsideBoundaryFiles: string[];
|
|
61
|
+
changedOutsideBoundarySymbols: string[];
|
|
58
62
|
changedFiles: string[];
|
|
59
63
|
verificationTargets: string[];
|
|
60
64
|
why: string[];
|
package/dist/audit.js
CHANGED
|
@@ -61,6 +61,7 @@ function buildRippleAuditSummary(input) {
|
|
|
61
61
|
exports.buildRippleAuditSummary = buildRippleAuditSummary;
|
|
62
62
|
function buildRippleGateSummary(audit) {
|
|
63
63
|
const handoff = audit.handoff;
|
|
64
|
+
const validation = audit.stagedCheck.intentValidation;
|
|
64
65
|
return {
|
|
65
66
|
protocol: "ripple-gate",
|
|
66
67
|
version: 1,
|
|
@@ -79,6 +80,10 @@ function buildRippleGateSummary(audit) {
|
|
|
79
80
|
auditStatus: audit.status,
|
|
80
81
|
auditDecision: audit.decision,
|
|
81
82
|
approvalStatus: audit.approvalStatus.status,
|
|
83
|
+
allowedFiles: validation?.editableFiles ?? [],
|
|
84
|
+
allowedSymbols: validation?.allowedSymbols ?? [],
|
|
85
|
+
changedOutsideBoundaryFiles: validation?.boundaryVerdict.changedOutsideBoundaryFiles ?? [],
|
|
86
|
+
changedOutsideBoundarySymbols: validation?.boundaryVerdict.changedOutsideBoundarySymbols ?? [],
|
|
82
87
|
changedFiles: audit.changedFiles,
|
|
83
88
|
verificationTargets: audit.verificationTargets,
|
|
84
89
|
why: handoff.why,
|
package/dist/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":";;;AASA,mDAA2D;AAG3D,yCAGoB;
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":";;;AASA,mDAA2D;AAG3D,yCAGoB;AAqEpB,SAAgB,uBAAuB,CAAC,KASvC;IACC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;IACtD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc;QACzC,IAAA,sCAA2B,EAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,iBAAiB,GAAG,4BAA4B,CACpD,UAAU,EACV,KAAK,CAAC,UAAU,EAChB,MAAM,EACN,cAAc,CACf,CAAC;IACF,MAAM,eAAe,GAAG,cAAc,CAAC,QAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ;QACzE,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,UAAU,CAAC,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC;IAC/B,MAAM,SAAS,GAAG,WAAW,CAAC;QAC5B,GAAG,CAAC,cAAc,CAAC,QAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;QACxF,GAAG,UAAU,C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AAI,KAAK,KAAK,kBAAkB,EAAE,CAAC;QACjC,OAAO,4CAA4C,CAAC;IACtD,CAAC;IACD,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACrC,OAAO,yDAAyD,CAAC;IACnE,CAAC;IACD,OAAO,0EAA0E,CAAC;AACpF,CAAC;AApBD,sEAoBC;AAED,SAAS,WAAW,CAAC,KAAe;IAClC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/change-intent.d.ts
CHANGED
package/dist/change-intent.js
CHANGED
|
@@ -105,6 +105,7 @@ function buildChangeIntentReadinessSnapshot(readiness) {
|
|
|
105
105
|
policyExplicit: readiness.enforcement.explicitPolicy.ok,
|
|
106
106
|
graphOk: readiness.checks.graph.ok,
|
|
107
107
|
gitOk: readiness.checks.git.ok,
|
|
108
|
+
gitIgnoreOk: readiness.checks.gitIgnore.ok,
|
|
108
109
|
ciWorkflowOk: readiness.checks.ciWorkflow.ok,
|
|
109
110
|
latestIntentOk: readiness.checks.latestIntent.ok,
|
|
110
111
|
gaps: readiness.enforcement.gaps,
|
|
@@ -902,6 +903,7 @@ function readinessChangedFields(saved, current) {
|
|
|
902
903
|
"policyExplicit",
|
|
903
904
|
"graphOk",
|
|
904
905
|
"gitOk",
|
|
906
|
+
"gitIgnoreOk",
|
|
905
907
|
"ciWorkflowOk",
|
|
906
908
|
"latestIntentOk",
|
|
907
909
|
];
|
|
@@ -922,6 +924,7 @@ function readinessWeakenedFields(saved, current) {
|
|
|
922
924
|
"policyExplicit",
|
|
923
925
|
"graphOk",
|
|
924
926
|
"gitOk",
|
|
927
|
+
"gitIgnoreOk",
|
|
925
928
|
"ciWorkflowOk",
|
|
926
929
|
"latestIntentOk",
|
|
927
930
|
];
|
|
@@ -954,6 +957,9 @@ function readinessDriftFix(current, weakenedFields) {
|
|
|
954
957
|
if (weakenedFields.includes("gitOk")) {
|
|
955
958
|
fixes.push("Run Ripple inside a git worktree so changed-file drift checks can work.");
|
|
956
959
|
}
|
|
960
|
+
if (weakenedFields.includes("gitIgnoreOk")) {
|
|
961
|
+
fixes.push("Restore the .gitignore entry for .ripple/.cache/ before committing Ripple audit files.");
|
|
962
|
+
}
|
|
957
963
|
if (weakenedFields.includes("graphOk") || weakenedFields.includes("canGuideAgents")) {
|
|
958
964
|
fixes.push("Run Ripple from a supported source repo so the graph can be scanned.");
|
|
959
965
|
}
|
|
@@ -1080,6 +1086,9 @@ function buildBoundaryVerdict(input) {
|
|
|
1080
1086
|
};
|
|
1081
1087
|
}
|
|
1082
1088
|
function boundaryPassReasons(intent, editableFiles) {
|
|
1089
|
+
if (intent.controlMode === "brainstorm") {
|
|
1090
|
+
return ["Control mode 'brainstorm' allows no file edits."];
|
|
1091
|
+
}
|
|
1083
1092
|
const allowedFiles = editableFiles.length > 0
|
|
1084
1093
|
? editableFiles.join(", ")
|
|
1085
1094
|
: "no files";
|
|
@@ -1352,6 +1361,9 @@ function contractChangedSymbols(symbols) {
|
|
|
1352
1361
|
});
|
|
1353
1362
|
}
|
|
1354
1363
|
function changeIntentEditableFiles(intent) {
|
|
1364
|
+
if (intent.controlMode === "brainstorm") {
|
|
1365
|
+
return [];
|
|
1366
|
+
}
|
|
1355
1367
|
return uniqueItems(intent.editableFiles && intent.editableFiles.length > 0
|
|
1356
1368
|
? intent.editableFiles
|
|
1357
1369
|
: intent.expectedFiles.length > 0
|
|
@@ -1403,16 +1415,18 @@ function assertChangeIntent(value, sourcePath) {
|
|
|
1403
1415
|
return normalizeChangeIntent(value);
|
|
1404
1416
|
}
|
|
1405
1417
|
function normalizeChangeIntent(intent) {
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1418
|
+
const controlMode = isControlMode(intent.controlMode) ? intent.controlMode : "file";
|
|
1419
|
+
const editableFiles = uniqueItems(controlMode === "brainstorm"
|
|
1420
|
+
? []
|
|
1421
|
+
: intent.editableFiles && intent.editableFiles.length > 0
|
|
1422
|
+
? intent.editableFiles
|
|
1423
|
+
: intent.expectedFiles.length > 0
|
|
1424
|
+
? intent.expectedFiles
|
|
1425
|
+
: [intent.targetFile]);
|
|
1411
1426
|
const editableFileSet = new Set(editableFiles);
|
|
1412
1427
|
const contextFiles = uniqueItems((intent.contextFiles && intent.contextFiles.length > 0
|
|
1413
1428
|
? intent.contextFiles
|
|
1414
1429
|
: intent.allowedFiles.filter((file) => !editableFileSet.has(file))).filter((file) => !editableFileSet.has(file)));
|
|
1415
|
-
const controlMode = isControlMode(intent.controlMode) ? intent.controlMode : "file";
|
|
1416
1430
|
const allowedSymbols = uniqueItems((intent.allowedSymbols ?? []).filter((symbol) => typeof symbol === "string" && symbol.trim().length > 0));
|
|
1417
1431
|
const boundaryRisk = isControlBoundaryRisk(intent.boundaryRisk)
|
|
1418
1432
|
? intent.boundaryRisk
|
|
@@ -1467,6 +1481,7 @@ function normalizeReadinessSnapshot(value) {
|
|
|
1467
1481
|
policyExplicit: typeof value.policyExplicit === "boolean" ? value.policyExplicit : false,
|
|
1468
1482
|
graphOk: typeof value.graphOk === "boolean" ? value.graphOk : false,
|
|
1469
1483
|
gitOk: typeof value.gitOk === "boolean" ? value.gitOk : false,
|
|
1484
|
+
gitIgnoreOk: typeof value.gitIgnoreOk === "boolean" ? value.gitIgnoreOk : false,
|
|
1470
1485
|
ciWorkflowOk: typeof value.ciWorkflowOk === "boolean" ? value.ciWorkflowOk : false,
|
|
1471
1486
|
latestIntentOk: typeof value.latestIntentOk === "boolean" ? value.latestIntentOk : false,
|
|
1472
1487
|
gaps: stringList(value.gaps),
|
|
@@ -1483,6 +1498,7 @@ function fallbackReadinessSnapshot() {
|
|
|
1483
1498
|
policyExplicit: false,
|
|
1484
1499
|
graphOk: false,
|
|
1485
1500
|
gitOk: false,
|
|
1501
|
+
gitIgnoreOk: false,
|
|
1486
1502
|
ciWorkflowOk: false,
|
|
1487
1503
|
latestIntentOk: false,
|
|
1488
1504
|
gaps: ["Readiness snapshot was not captured when this intent was saved."],
|