@getripple/core 1.0.8 → 1.0.9
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 +27 -0
- package/README.md +38 -28
- package/dist/agent-workflow.d.ts +6 -1
- package/dist/agent-workflow.js +44 -9
- package/dist/agent-workflow.js.map +1 -1
- package/dist/approval.d.ts +1 -1
- package/dist/approval.js +7 -3
- package/dist/approval.js.map +1 -1
- package/dist/audit.d.ts +34 -2
- package/dist/audit.js +152 -3
- package/dist/audit.js.map +1 -1
- package/dist/change-intent.d.ts +85 -0
- package/dist/change-intent.js +557 -15
- package/dist/change-intent.js.map +1 -1
- package/dist/policy.d.ts +9 -0
- package/dist/policy.js +232 -3
- package/dist/policy.js.map +1 -1
- package/dist/readiness.js +21 -12
- package/dist/readiness.js.map +1 -1
- package/dist/staged-check.d.ts +6 -2
- package/dist/staged-check.js +83 -4
- package/dist/staged-check.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @getripple/core Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.9] - 2026-06-13
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Align core package documentation with Ripple's local authorization-gate positioning.
|
|
7
|
+
- Clarify the Trust Boundary Contract and Authorization Gate Contract while preserving the technical `GraphEngine` integration guidance.
|
|
8
|
+
- Update package metadata language for npm users building custom integrations.
|
|
9
|
+
|
|
10
|
+
## [1.0.8] - 2026-06-09
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Record `.ripple/history.json` events during cached `GraphEngine` scans so changed files still produce semantic history.
|
|
14
|
+
- Preserve architectural memory for changed symbols, imports, and calls through events such as `symbol_modified`, `symbol_created`, `symbol_deleted`, `import_added`, `import_removed`, `call_added`, and `call_removed`.
|
|
15
|
+
- Add regression coverage proving cached scans record history after a real file change.
|
|
16
|
+
|
|
17
|
+
### Validation
|
|
18
|
+
- Confirm real-repo graph and symbol discovery on a local clone of `sindresorhus/ky`, including high-impact files with broad importer counts.
|
|
19
|
+
|
|
20
|
+
## [1.0.7] - 2026-06-08
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- Add structured risk summaries with level, score, summary, reasons, evidence, affected files/symbols, and required actions.
|
|
24
|
+
- Add graph-backed risk evidence from saved intents, boundary drift, blast radius, policy risk, public contracts, and verification targets.
|
|
25
|
+
- Add shared risk contracts used by CLI, MCP, and CI gate outputs.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- Make gate evidence more explicit so downstream interfaces can explain why an agent may continue, must repair, or needs human review.
|
|
29
|
+
|
|
3
30
|
## [1.0.6] - 2026-06-07
|
|
4
31
|
|
|
5
32
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @getripple/core
|
|
2
2
|
|
|
3
|
-
**Core engine for Ripple's local
|
|
3
|
+
**Core engine for Ripple's local authorization gate for AI coding agents.**
|
|
4
4
|
|
|
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.
|
|
5
|
+
`@getripple/core` scans repositories, builds local dependency intelligence, tracks architectural relationships, records approved work boundaries, compares those boundaries against Git diffs, and powers Ripple's CLI, MCP server, CI integrations, and editor experiences.
|
|
6
6
|
|
|
7
7
|
Most users should start with:
|
|
8
8
|
|
|
@@ -79,7 +79,7 @@ What was approved?
|
|
|
79
79
|
|
|
80
80
|
What changed?
|
|
81
81
|
|
|
82
|
-
Did the agent
|
|
82
|
+
Did the agent cross the approved boundary?
|
|
83
83
|
|
|
84
84
|
Can the agent continue?
|
|
85
85
|
|
|
@@ -115,68 +115,74 @@ trust-boundary validation
|
|
|
115
115
|
|
|
116
116
|
drift detection
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
authorization gate summaries
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
These capabilities power the Ripple workflow:
|
|
122
122
|
|
|
123
123
|
```txt
|
|
124
|
-
|
|
124
|
+
policy defines sensitive areas
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
intent defines what is approved now
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Git diff shows what actually changed
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
detect drift
|
|
133
|
-
|
|
134
|
-
repair or review
|
|
135
|
-
|
|
136
|
-
continue safely
|
|
130
|
+
gate decides continue, repair, or human review
|
|
137
131
|
```
|
|
138
132
|
|
|
139
133
|
---
|
|
140
134
|
|
|
141
|
-
## Trust Boundary Contract
|
|
135
|
+
## Trust Boundary Contract / Authorization Gate Contract
|
|
142
136
|
|
|
143
137
|
The Trust Boundary Contract is the core safety model used throughout Ripple.
|
|
138
|
+
It defines what an AI coding agent is authorized to change for the current task.
|
|
139
|
+
|
|
140
|
+
The Authorization Gate Contract is the decision layer built from that trust
|
|
141
|
+
boundary. It compares the approved boundary with the actual Git diff and decides
|
|
142
|
+
whether work may continue, must be repaired, or needs human review.
|
|
144
143
|
|
|
145
144
|
Ripple compares:
|
|
146
145
|
|
|
147
146
|
```txt
|
|
148
|
-
|
|
147
|
+
approved intent
|
|
149
148
|
```
|
|
150
149
|
|
|
151
|
-
against
|
|
150
|
+
against:
|
|
152
151
|
|
|
153
152
|
```txt
|
|
154
|
-
actual
|
|
153
|
+
actual Git diff
|
|
155
154
|
```
|
|
156
155
|
|
|
157
|
-
to determine whether an AI coding agent stayed
|
|
156
|
+
to determine whether an AI coding agent stayed inside the work it was trusted to perform.
|
|
158
157
|
|
|
159
|
-
The
|
|
158
|
+
The contract consists of:
|
|
160
159
|
|
|
161
160
|
```txt
|
|
162
|
-
|
|
161
|
+
policy -> permanent repo trust rules
|
|
163
162
|
|
|
164
|
-
|
|
163
|
+
intent -> temporary approved boundary for the current task
|
|
165
164
|
|
|
166
|
-
|
|
165
|
+
approved boundary -> file, function, task, brainstorm, or PR scope
|
|
167
166
|
|
|
168
|
-
|
|
167
|
+
actual changes -> what the agent modified
|
|
169
168
|
|
|
170
|
-
|
|
169
|
+
drift result -> whether the agent left the approved work
|
|
170
|
+
|
|
171
|
+
gate decision -> continue, repair, human-review, or restore-readiness
|
|
171
172
|
```
|
|
172
173
|
|
|
173
|
-
|
|
174
|
+
Together, the Trust Boundary Contract and Authorization Gate Contract enable
|
|
175
|
+
Ripple to:
|
|
174
176
|
|
|
175
177
|
```txt
|
|
176
178
|
detect intent drift
|
|
177
179
|
|
|
178
180
|
detect boundary drift
|
|
179
181
|
|
|
182
|
+
detect policy drift
|
|
183
|
+
|
|
184
|
+
track verification evidence
|
|
185
|
+
|
|
180
186
|
require repair
|
|
181
187
|
|
|
182
188
|
require human review
|
|
@@ -198,6 +204,10 @@ CI systems
|
|
|
198
204
|
automation pipelines
|
|
199
205
|
```
|
|
200
206
|
|
|
207
|
+
Ripple does not silently delete code. It gives the surrounding CLI, MCP, hook,
|
|
208
|
+
or CI layer enough evidence to decide whether work may continue or must stop for
|
|
209
|
+
repair or human review.
|
|
210
|
+
|
|
201
211
|
---
|
|
202
212
|
|
|
203
213
|
## Context Modes
|
|
@@ -303,7 +313,7 @@ The most stable public contracts are:
|
|
|
303
313
|
@getripple/mcp
|
|
304
314
|
```
|
|
305
315
|
|
|
306
|
-
Core APIs may evolve as Ripple's graph, context,
|
|
316
|
+
Core APIs may evolve as Ripple's graph, context, authorization-gate, and approval systems mature.
|
|
307
317
|
|
|
308
318
|
---
|
|
309
319
|
|
|
@@ -327,7 +337,7 @@ a sandbox
|
|
|
327
337
|
a compiler
|
|
328
338
|
```
|
|
329
339
|
|
|
330
|
-
Instead, it is the local intelligence engine that helps Ripple determine whether an AI coding agent remained inside the work it was
|
|
340
|
+
Instead, it is the local intelligence engine that helps Ripple determine whether an AI coding agent remained inside the work it was authorized to perform.
|
|
331
341
|
|
|
332
342
|
---
|
|
333
343
|
|
package/dist/agent-workflow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type AgentControlMode = "brainstorm" | "function" | "file" | "task" | "pr";
|
|
2
2
|
export type AgentAuditGate = "beforeRiskyEdit" | "afterStaging" | "beforeMerge";
|
|
3
|
-
export type AgentRuntimePhaseId = "discover_contract" | "plan_before_edit" | "approval_gate" | "edit_inside_boundary" | "audit_after_change" | "repair_or_handoff";
|
|
3
|
+
export type AgentRuntimePhaseId = "discover_contract" | "plan_before_edit" | "approval_gate" | "edit_inside_boundary" | "audit_after_change" | "record_verification" | "repair_or_handoff";
|
|
4
4
|
export type AgentRuntimeNextPhaseId = AgentRuntimePhaseId | "done";
|
|
5
5
|
export type AgentRuntimePhase = {
|
|
6
6
|
id: AgentRuntimePhaseId;
|
|
@@ -32,11 +32,13 @@ export type AgentWorkflowSummary = {
|
|
|
32
32
|
checkReadiness: string;
|
|
33
33
|
installCi: string;
|
|
34
34
|
explainPolicy: string;
|
|
35
|
+
checkIntentStatus: string;
|
|
35
36
|
planBeforeEditing: string;
|
|
36
37
|
checkAfterStaging: string;
|
|
37
38
|
checkChangedAgainstBase: string;
|
|
38
39
|
auditCurrentChange: string;
|
|
39
40
|
gateCurrentChange: string;
|
|
41
|
+
recordVerification: string;
|
|
40
42
|
checkApproval: string;
|
|
41
43
|
approveHumanGate: string;
|
|
42
44
|
ciGate: string;
|
|
@@ -46,11 +48,13 @@ export type AgentWorkflowSummary = {
|
|
|
46
48
|
workflow: "ripple_get_agent_workflow";
|
|
47
49
|
checkReadiness: "ripple_doctor";
|
|
48
50
|
explainPolicy: "ripple_explain_policy";
|
|
51
|
+
checkIntentStatus: "ripple_get_intent_status";
|
|
49
52
|
planBeforeEditing: "ripple_plan_context";
|
|
50
53
|
checkAfterStaging: "ripple_check_staged";
|
|
51
54
|
checkChangedAgainstBase: "ripple_check_changed";
|
|
52
55
|
auditCurrentChange: "ripple_audit_change";
|
|
53
56
|
gateCurrentChange: "ripple_gate";
|
|
57
|
+
recordVerification: "ripple_record_verification";
|
|
54
58
|
checkApproval: "ripple_get_approval_status";
|
|
55
59
|
repairIntentDrift: "ripple_repair_intent_drift";
|
|
56
60
|
};
|
|
@@ -63,6 +67,7 @@ export type AgentWorkflowSummary = {
|
|
|
63
67
|
gateHeader: "RIPPLE_GATE";
|
|
64
68
|
approvalHeader: "RIPPLE_APPROVAL";
|
|
65
69
|
approvalStatusHeader: "RIPPLE_APPROVAL_STATUS";
|
|
70
|
+
intentStatusHeader: "RIPPLE_INTENT_STATUS";
|
|
66
71
|
doctorSections: string[];
|
|
67
72
|
planSections: string[];
|
|
68
73
|
stagedCheckSections: string[];
|
package/dist/agent-workflow.js
CHANGED
|
@@ -13,6 +13,7 @@ function getAgentWorkflowSummary() {
|
|
|
13
13
|
"edit",
|
|
14
14
|
"stage",
|
|
15
15
|
"check",
|
|
16
|
+
"record_verification",
|
|
16
17
|
"repair_if_needed",
|
|
17
18
|
],
|
|
18
19
|
controlModes: {
|
|
@@ -38,25 +39,29 @@ function getAgentWorkflowSummary() {
|
|
|
38
39
|
checkReadiness: "ripple doctor --agent --strict",
|
|
39
40
|
installCi: "ripple init-ci",
|
|
40
41
|
explainPolicy: "ripple policy explain --file <file> --agent",
|
|
42
|
+
checkIntentStatus: "ripple intent status --intent latest --json",
|
|
41
43
|
planBeforeEditing: "ripple plan --file <file> --task \"<task>\" --mode file --agent --save",
|
|
42
44
|
checkAfterStaging: "ripple check --staged --agent --intent latest",
|
|
43
45
|
checkChangedAgainstBase: "ripple check --changed --base <ref> --agent --intent latest",
|
|
44
46
|
auditCurrentChange: "ripple audit --agent --intent latest",
|
|
45
47
|
gateCurrentChange: "ripple gate --agent --intent latest",
|
|
48
|
+
recordVerification: "ripple verify --run \"<command>\" --intent latest",
|
|
46
49
|
checkApproval: "ripple approval --intent latest --agent",
|
|
47
|
-
approveHumanGate: "ripple approve --intent latest --gate before-risky-edit",
|
|
48
|
-
ciGate: "ripple ci --base <ref> --
|
|
50
|
+
approveHumanGate: "ripple approve --intent latest --gate before-risky-edit --reason \"human reviewed and approved this boundary\"",
|
|
51
|
+
ciGate: "ripple ci --base <ref> --github-annotations",
|
|
49
52
|
repairIntentDrift: "ripple repair --agent --intent latest",
|
|
50
53
|
},
|
|
51
54
|
mcpTools: {
|
|
52
55
|
workflow: "ripple_get_agent_workflow",
|
|
53
56
|
checkReadiness: "ripple_doctor",
|
|
54
57
|
explainPolicy: "ripple_explain_policy",
|
|
58
|
+
checkIntentStatus: "ripple_get_intent_status",
|
|
55
59
|
planBeforeEditing: "ripple_plan_context",
|
|
56
60
|
checkAfterStaging: "ripple_check_staged",
|
|
57
61
|
checkChangedAgainstBase: "ripple_check_changed",
|
|
58
62
|
auditCurrentChange: "ripple_audit_change",
|
|
59
63
|
gateCurrentChange: "ripple_gate",
|
|
64
|
+
recordVerification: "ripple_record_verification",
|
|
60
65
|
checkApproval: "ripple_get_approval_status",
|
|
61
66
|
repairIntentDrift: "ripple_repair_intent_drift",
|
|
62
67
|
},
|
|
@@ -69,6 +74,7 @@ function getAgentWorkflowSummary() {
|
|
|
69
74
|
gateHeader: "RIPPLE_GATE",
|
|
70
75
|
approvalHeader: "RIPPLE_APPROVAL",
|
|
71
76
|
approvalStatusHeader: "RIPPLE_APPROVAL_STATUS",
|
|
77
|
+
intentStatusHeader: "RIPPLE_INTENT_STATUS",
|
|
72
78
|
doctorSections: [
|
|
73
79
|
"status",
|
|
74
80
|
"readiness_decision",
|
|
@@ -212,6 +218,7 @@ function getAgentWorkflowSummary() {
|
|
|
212
218
|
"Before editing, ripple_plan_context / ripple plan is the source of truth.",
|
|
213
219
|
"During editing, saved change intent allowed_files and allowed_symbols are the source of truth.",
|
|
214
220
|
"After editing, ripple_audit_change / ripple audit is the full report; ripple gate is the compact continue/stop decision.",
|
|
221
|
+
"After running verification, ripple verify --run records executed evidence; ripple_record_verification records reported evidence from MCP runtimes before final gate.",
|
|
215
222
|
"If human approval is required, ripple_get_approval_status / ripple approval is the source of truth.",
|
|
216
223
|
],
|
|
217
224
|
phases: [
|
|
@@ -301,14 +308,15 @@ function getAgentWorkflowSummary() {
|
|
|
301
308
|
id: "audit_after_change",
|
|
302
309
|
order: 5,
|
|
303
310
|
requiredWhen: "after files are staged, or before handoff in changed-file workflows",
|
|
304
|
-
agentAction: "Run the compact Ripple gate or full audit
|
|
311
|
+
agentAction: "Run the compact Ripple gate or full audit to detect drift, approval state, and verification targets.",
|
|
305
312
|
mcpTool: "ripple_gate",
|
|
306
313
|
cliCommand: "ripple gate --agent --intent latest",
|
|
307
314
|
outputContract: "RIPPLE_GATE",
|
|
308
315
|
must: [
|
|
309
316
|
"Use staged audit for local agent work and changed audit for PR/CI work.",
|
|
310
|
-
"Use ripple gate when the agent only needs the
|
|
317
|
+
"Use ripple gate when the agent only needs the continue/stop handoff.",
|
|
311
318
|
"Check drift_verdict, boundary_verdict, policy_drift, approval_status, and can_proceed together.",
|
|
319
|
+
"If verification targets exist and the agent runs them, record the result before the final handoff gate.",
|
|
312
320
|
],
|
|
313
321
|
stopIf: [
|
|
314
322
|
"can_continue=false or can_proceed=false.",
|
|
@@ -321,8 +329,31 @@ function getAgentWorkflowSummary() {
|
|
|
321
329
|
],
|
|
322
330
|
},
|
|
323
331
|
{
|
|
324
|
-
id: "
|
|
332
|
+
id: "record_verification",
|
|
325
333
|
order: 6,
|
|
334
|
+
requiredWhen: "after the agent runs, skips, or cannot prove a verification target from the plan, audit, or gate",
|
|
335
|
+
agentAction: "Record verification evidence on the saved intent, then run the gate again for the final continue/stop decision.",
|
|
336
|
+
mcpTool: "ripple_record_verification",
|
|
337
|
+
cliCommand: "ripple verify --run \"<command>\" --intent latest",
|
|
338
|
+
outputContract: "ripple-verification-evidence",
|
|
339
|
+
must: [
|
|
340
|
+
"Prefer ripple verify --run so Ripple executes the command and records the exit code.",
|
|
341
|
+
"Record passed only when the named command or manual check actually passed.",
|
|
342
|
+
"Record failed when the command failed or produced a blocking result.",
|
|
343
|
+
"Record skipped or unknown when the agent did not run the check or cannot prove the result.",
|
|
344
|
+
"Run gateCurrentChange again after recording verification evidence.",
|
|
345
|
+
],
|
|
346
|
+
stopIf: [
|
|
347
|
+
"verification status is failed, skipped, or unknown until ripple_gate returns repair or human-review.",
|
|
348
|
+
"the agent cannot name the command or check it is reporting.",
|
|
349
|
+
],
|
|
350
|
+
continueIf: [
|
|
351
|
+
"verification evidence is recorded and a fresh gate/audit permits continuing.",
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
id: "repair_or_handoff",
|
|
356
|
+
order: 7,
|
|
326
357
|
requiredWhen: "when audit fails, or when preparing final human handoff",
|
|
327
358
|
agentAction: "Ask Ripple for exact repair actions, or hand off the passed audit summary to the human.",
|
|
328
359
|
mcpTool: "ripple_repair_intent_drift",
|
|
@@ -331,7 +362,7 @@ function getAgentWorkflowSummary() {
|
|
|
331
362
|
must: [
|
|
332
363
|
"Follow blocker fix_actions before widening scope.",
|
|
333
364
|
"Unstage files Ripple marks as outside intent unless the human explicitly replans or approves wider scope.",
|
|
334
|
-
"
|
|
365
|
+
"Record verification evidence before final handoff when the agent ran, skipped, or could not prove a verification target.",
|
|
335
366
|
],
|
|
336
367
|
stopIf: [
|
|
337
368
|
"repair status is human-review-required.",
|
|
@@ -348,6 +379,7 @@ function getAgentWorkflowSummary() {
|
|
|
348
379
|
"The agent needs to edit outside allowed_files or allowed_symbols.",
|
|
349
380
|
"policyDrift.status=changed.",
|
|
350
381
|
"drift_verdict or boundary_verdict is DANGER or blocks the change.",
|
|
382
|
+
"Reported verification evidence is failed, skipped, or unknown.",
|
|
351
383
|
"audit.canProceed is false.",
|
|
352
384
|
"repair status is human-review-required.",
|
|
353
385
|
],
|
|
@@ -357,7 +389,7 @@ function getAgentWorkflowSummary() {
|
|
|
357
389
|
"Edits remain inside editable_files and allowed_symbols.",
|
|
358
390
|
"policyDrift.status is unchanged or not-applicable.",
|
|
359
391
|
"The audit reports canProceed=true.",
|
|
360
|
-
"
|
|
392
|
+
"Recorded verification evidence, when present, is passed; failed, skipped, or unknown evidence requires repair or human review.",
|
|
361
393
|
],
|
|
362
394
|
},
|
|
363
395
|
rules: [
|
|
@@ -378,6 +410,8 @@ function getAgentWorkflowSummary() {
|
|
|
378
410
|
"After editing, stage the intended files and run checkAfterStaging against the saved intent.",
|
|
379
411
|
"Use auditCurrentChange when a human needs one compact report of intent, boundary, policy drift, repair status, and next action.",
|
|
380
412
|
"Use gateCurrentChange when an agent needs only the final continue, repair, human-review, or restore-readiness decision.",
|
|
413
|
+
"After running verification targets, prefer ripple verify --run before the final gate; MCP runtimes may call recordVerification when they can only report evidence.",
|
|
414
|
+
"Do not claim verification passed without recorded passed evidence.",
|
|
381
415
|
"In CI or PR review, use checkChangedAgainstBase instead of staging files.",
|
|
382
416
|
"Use ciGate as the default strict automation command for PR checks.",
|
|
383
417
|
"If staged changes drift from intent or boundary, call repairIntentDrift before widening scope.",
|
|
@@ -387,15 +421,16 @@ function getAgentWorkflowSummary() {
|
|
|
387
421
|
"ripple init",
|
|
388
422
|
"ripple plan --file src/auth.ts --task \"change token refresh behavior\" --mode file --agent --save",
|
|
389
423
|
"ripple approval --intent latest --agent",
|
|
390
|
-
"ripple approve --intent latest --gate before-risky-edit",
|
|
424
|
+
"ripple approve --intent latest --gate before-risky-edit --reason \"human reviewed and approved this boundary\"",
|
|
391
425
|
"ripple plan --file src/auth.ts --symbol refreshToken --task \"fix retry behavior\" --mode function --agent --save",
|
|
392
426
|
"git add src/auth.ts",
|
|
393
427
|
"ripple check --staged --agent --intent latest",
|
|
394
428
|
"ripple audit --agent --intent latest",
|
|
429
|
+
"ripple verify --run \"npm test -- tests/auth.test.ts\" --intent latest",
|
|
395
430
|
"ripple gate --agent --intent latest",
|
|
396
431
|
"ripple doctor --agent --strict",
|
|
397
432
|
"ripple check --changed --base origin/main --agent --intent latest",
|
|
398
|
-
"ripple ci --base origin/main --
|
|
433
|
+
"ripple ci --base origin/main --github-annotations",
|
|
399
434
|
"ripple repair --agent --intent latest",
|
|
400
435
|
],
|
|
401
436
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-workflow.js","sourceRoot":"","sources":["../src/agent-workflow.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"agent-workflow.js","sourceRoot":"","sources":["../src/agent-workflow.ts"],"names":[],"mappings":";;;AAqGA,SAAgB,uBAAuB;IACrC,OAAO;QACL,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,qJAAqJ;QAC9J,IAAI,EAAE;YACJ,iBAAiB;YACjB,MAAM;YACN,qBAAqB;YACrB,MAAM;YACN,OAAO;YACP,OAAO;YACP,qBAAqB;YACrB,kBAAkB;SACnB;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,sEAAsE;YAClF,QAAQ,EAAE,6EAA6E;YACvF,IAAI,EAAE,+CAA+C;YACrD,IAAI,EAAE,oDAAoD;YAC1D,EAAE,EAAE,2EAA2E;SAChF;QACD,UAAU,EAAE;YACV,eAAe,EAAE,uFAAuF;YACxG,YAAY,EAAE,kFAAkF;YAChG,WAAW,EAAE,6EAA6E;SAC3F;QACD,cAAc,EAAE;YACd,gBAAgB,EAAE,wKAAwK;YAC1L,cAAc,EAAE,sGAAsG;YACtH,eAAe,EAAE,sJAAsJ;SACxK;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,cAAc;YACrB,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,gCAAgC;YAChD,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,6CAA6C;YAC5D,iBAAiB,EAAE,6CAA6C;YAChE,iBAAiB,EAAE,wEAAwE;YAC3F,iBAAiB,EAAE,+CAA+C;YAClE,uBAAuB,EAAE,6DAA6D;YACtF,kBAAkB,EAAE,sCAAsC;YAC1D,iBAAiB,EAAE,qCAAqC;YACxD,kBAAkB,EAAE,mDAAmD;YACvE,aAAa,EAAE,yCAAyC;YACxD,gBAAgB,EAAE,gHAAgH;YAClI,MAAM,EAAE,6CAA6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YACnE,mDAAmD;YACnD,uCAAuC;SACxC;KACF,CAAC;AACJ,CAAC;AAlbD,0DAkbC"}
|
package/dist/approval.d.ts
CHANGED
package/dist/approval.js
CHANGED
|
@@ -48,6 +48,10 @@ function recordRippleApproval(workspaceRoot, intent, options = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
const approvedAt = options.approvedAt ?? new Date().toISOString();
|
|
50
50
|
const approvedBy = normalizeApprover(options.approvedBy);
|
|
51
|
+
const reason = cleanOptionalText(options.reason);
|
|
52
|
+
if (!reason) {
|
|
53
|
+
throw new Error("Human approval requires a reason. Run ripple approve with --reason explaining why this boundary is approved.");
|
|
54
|
+
}
|
|
51
55
|
const intentFingerprint = fingerprintChangeIntent(intent);
|
|
52
56
|
const policyFingerprint = fingerprintJson(intent.policyExplanation);
|
|
53
57
|
const approval = {
|
|
@@ -65,7 +69,7 @@ function recordRippleApproval(workspaceRoot, intent, options = {}) {
|
|
|
65
69
|
boundaryRisk: intent.boundaryRisk,
|
|
66
70
|
intentFingerprint,
|
|
67
71
|
policyFingerprint,
|
|
68
|
-
reason
|
|
72
|
+
reason,
|
|
69
73
|
};
|
|
70
74
|
const targetPath = rippleApprovalPath(workspaceRoot, intent.id, gate);
|
|
71
75
|
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
|
|
@@ -106,7 +110,7 @@ function resolveRippleApprovalStatus(workspaceRoot, intent, gateOverride) {
|
|
|
106
110
|
`No approval record exists at ${relativePath}.`,
|
|
107
111
|
],
|
|
108
112
|
nextSteps: [
|
|
109
|
-
`Run ripple approve --intent latest --gate ${gate} after the human reviews the plan.`,
|
|
113
|
+
`Run ripple approve --intent latest --gate ${gate} --reason "<why this boundary is safe>" after the human reviews the plan.`,
|
|
110
114
|
],
|
|
111
115
|
};
|
|
112
116
|
}
|
|
@@ -130,7 +134,7 @@ function resolveRippleApprovalStatus(workspaceRoot, intent, gateOverride) {
|
|
|
130
134
|
approvalPath: relativePath,
|
|
131
135
|
why: staleReasons,
|
|
132
136
|
nextSteps: [
|
|
133
|
-
`Ask the human to review the current saved intent, then re-run ripple approve --intent latest --gate ${gate}.`,
|
|
137
|
+
`Ask the human to review the current saved intent, then re-run ripple approve --intent latest --gate ${gate} --reason "<why this boundary is safe>".`,
|
|
134
138
|
],
|
|
135
139
|
};
|
|
136
140
|
}
|
package/dist/approval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,uCAAyB;AACzB,2CAA6B;AAoD7B,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAC5C,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAC1D,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAExD,SAAgB,wBAAwB,CACtC,SAAoB;IAEpB,IAAI,SAAS,KAAK,sBAAsB,EAAE,CAAC;QACzC,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IACD,IAAI,SAAS,KAAK,uBAAuB,EAAE,CAAC;QAC1C,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAVD,4DAUC;AAED,SAAgB,oBAAoB,CAClC,aAAqB,EACrB,MAAoB,EACpB,UAAuC,EAAE;IAEzC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,wBAAwB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACxE,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClE,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,C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C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/audit.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { ChangeIntent, ChangeIntentValidationSummary, ControlMode, IntentDriftRepairPlan, RippleAgentHandoffVerdict, StagedCheckWithIntentSummary } from "./change-intent";
|
|
1
|
+
import type { ChangeIntent, ChangeIntentValidationSummary, ControlMode, IntentDriftRepairPlan, RippleAgentHandoffVerdict, RippleReviewPacket, StagedCheckWithIntentSummary } from "./change-intent";
|
|
2
2
|
import { RippleRiskSummary } from "./risk";
|
|
3
3
|
import type { AgentRuntimeNextPhaseId } from "./agent-workflow";
|
|
4
4
|
import type { RipplePolicyExplanation } from "./policy";
|
|
5
5
|
import { RippleApprovalStatus } from "./approval";
|
|
6
|
-
export type RippleAuditMode = "staged" | "changed";
|
|
6
|
+
export type RippleAuditMode = "staged" | "changed" | "worktree";
|
|
7
7
|
export type RippleAuditStatus = "pass" | "repair-required" | "human-review-required";
|
|
8
8
|
export type RippleAuditDecision = "continue" | "repair" | "human-review";
|
|
9
9
|
export type RippleGateStatus = "open" | "closed";
|
|
10
|
+
export type RippleGateIntentState = "missing" | "closed" | "invalid";
|
|
10
11
|
export type RippleAuditSummary = {
|
|
11
12
|
protocol: "ripple-audit";
|
|
12
13
|
version: 1;
|
|
@@ -37,6 +38,7 @@ export type RippleAuditSummary = {
|
|
|
37
38
|
changedFiles: string[];
|
|
38
39
|
verificationTargets: string[];
|
|
39
40
|
risk: RippleRiskSummary;
|
|
41
|
+
reviewPacket: RippleReviewPacket;
|
|
40
42
|
handoff: RippleAgentHandoffVerdict;
|
|
41
43
|
};
|
|
42
44
|
export type RippleGateSummary = {
|
|
@@ -68,6 +70,29 @@ export type RippleGateSummary = {
|
|
|
68
70
|
askHuman: string[];
|
|
69
71
|
commands: RippleAgentHandoffVerdict["commands"];
|
|
70
72
|
risk: RippleRiskSummary;
|
|
73
|
+
reviewPacket: RippleReviewPacket;
|
|
74
|
+
};
|
|
75
|
+
export type RippleGateIntentBlockSummary = {
|
|
76
|
+
protocol: "ripple-gate-intent-block";
|
|
77
|
+
version: 1;
|
|
78
|
+
workspace: string;
|
|
79
|
+
mode: RippleAuditMode;
|
|
80
|
+
baseRef?: string;
|
|
81
|
+
status: "closed";
|
|
82
|
+
decision: "create-intent";
|
|
83
|
+
canContinue: false;
|
|
84
|
+
mustStop: true;
|
|
85
|
+
needsHuman: true;
|
|
86
|
+
nextRequiredPhase: "plan_before_edit";
|
|
87
|
+
nextRequiredAction: string;
|
|
88
|
+
summary: string;
|
|
89
|
+
intentRef: string;
|
|
90
|
+
intentState: RippleGateIntentState;
|
|
91
|
+
intentLoadError: string;
|
|
92
|
+
why: string[];
|
|
93
|
+
fixNow: string[];
|
|
94
|
+
askHuman: string[];
|
|
95
|
+
commands: RippleAgentHandoffVerdict["commands"];
|
|
71
96
|
};
|
|
72
97
|
export declare function buildRippleAuditSummary(input: {
|
|
73
98
|
workspaceRoot: string;
|
|
@@ -80,6 +105,13 @@ export declare function buildRippleAuditSummary(input: {
|
|
|
80
105
|
approvalStatus?: RippleApprovalStatus;
|
|
81
106
|
}): RippleAuditSummary;
|
|
82
107
|
export declare function buildRippleGateSummary(audit: RippleAuditSummary): RippleGateSummary;
|
|
108
|
+
export declare function buildRippleGateIntentBlockSummary(input: {
|
|
109
|
+
workspaceRoot: string;
|
|
110
|
+
mode: RippleAuditMode;
|
|
111
|
+
baseRef?: string;
|
|
112
|
+
intentRef: string;
|
|
113
|
+
error: unknown;
|
|
114
|
+
}): RippleGateIntentBlockSummary;
|
|
83
115
|
export declare function rippleAuditStatus(validation: ChangeIntentValidationSummary, repairPlan: IntentDriftRepairPlan, approvalStatus: RippleApprovalStatus): RippleAuditStatus;
|
|
84
116
|
export declare function rippleAuditDecision(status: RippleAuditStatus): RippleAuditDecision;
|
|
85
117
|
export declare function rippleAuditRecommendedAction(validation: ChangeIntentValidationSummary, repairPlan: IntentDriftRepairPlan, status: RippleAuditStatus, approvalStatus: RippleApprovalStatus): string;
|