pumuki 6.3.309 → 6.3.311
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.
|
@@ -26,6 +26,7 @@ import { runLifecycleUninstall } from './uninstall';
|
|
|
26
26
|
import { runLifecycleUpdate } from './update';
|
|
27
27
|
import { runOpenSpecBootstrap } from './openSpecBootstrap';
|
|
28
28
|
import { runLifecycleAdapterInstall, type AdapterAgent } from './adapter';
|
|
29
|
+
import { writePreWriteLease } from './preWriteLease';
|
|
29
30
|
import { createLoopSessionContract, isLoopSessionTransitionAllowed } from './loopSessionContract';
|
|
30
31
|
import {
|
|
31
32
|
createLoopSession,
|
|
@@ -1864,6 +1865,7 @@ export type LifecycleCliDependencies = {
|
|
|
1864
1865
|
emitAuditSummaryNotificationFromAiGate: typeof emitAuditSummaryNotificationFromAiGate;
|
|
1865
1866
|
emitGateBlockedNotification: typeof emitGateBlockedNotification;
|
|
1866
1867
|
runPlatformGate: typeof runPlatformGate;
|
|
1868
|
+
writePreWriteLease: typeof writePreWriteLease;
|
|
1867
1869
|
runLifecycleWatch: typeof runLifecycleWatch;
|
|
1868
1870
|
collectRemoteCiDiagnostics: typeof collectRemoteCiDiagnostics;
|
|
1869
1871
|
};
|
|
@@ -1872,6 +1874,7 @@ const defaultLifecycleCliDependencies: LifecycleCliDependencies = {
|
|
|
1872
1874
|
emitAuditSummaryNotificationFromAiGate,
|
|
1873
1875
|
emitGateBlockedNotification,
|
|
1874
1876
|
runPlatformGate,
|
|
1877
|
+
writePreWriteLease,
|
|
1875
1878
|
runLifecycleWatch,
|
|
1876
1879
|
collectRemoteCiDiagnostics,
|
|
1877
1880
|
};
|
|
@@ -2019,8 +2022,11 @@ export const prioritizePreWriteAiGateViolations = (
|
|
|
2019
2022
|
const rightMatches = right.code === nextAction.reason ? 0 : 1;
|
|
2020
2023
|
return leftMatches - rightMatches;
|
|
2021
2024
|
});
|
|
2025
|
+
const blocked = violations.some((violation) => violation.severity === 'ERROR');
|
|
2022
2026
|
return {
|
|
2023
2027
|
...aiGate,
|
|
2028
|
+
status: blocked ? 'BLOCKED' : 'ALLOWED',
|
|
2029
|
+
allowed: !blocked,
|
|
2024
2030
|
violations,
|
|
2025
2031
|
};
|
|
2026
2032
|
};
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
type PreWriteEnforcementResolution,
|
|
22
22
|
} from '../policy/preWriteEnforcement';
|
|
23
23
|
import { readLifecycleExperimentalFeaturesSnapshot } from './experimentalFeaturesSnapshot';
|
|
24
|
+
import { GitService } from '../git/GitService';
|
|
24
25
|
|
|
25
26
|
import {
|
|
26
27
|
type ParsedArgs,
|
|
@@ -207,9 +208,54 @@ export const runSddCommand = async (parsed: ParsedArgs, activeDependencies: Life
|
|
|
207
208
|
aiGate: rawPreWriteAiGate ?? aiGate,
|
|
208
209
|
});
|
|
209
210
|
const effectiveAiGate = rawPreWriteAiGate ?? aiGate;
|
|
210
|
-
|
|
211
|
+
let reportedAiGate = effectiveAiGate
|
|
211
212
|
? prioritizePreWriteAiGateViolations(effectiveAiGate, nextAction)
|
|
212
213
|
: null;
|
|
214
|
+
if (
|
|
215
|
+
result.stage === 'PRE_WRITE' &&
|
|
216
|
+
result.decision.allowed &&
|
|
217
|
+
reportedAiGate?.allowed
|
|
218
|
+
) {
|
|
219
|
+
try {
|
|
220
|
+
const lease = activeDependencies.writePreWriteLease({
|
|
221
|
+
repoRoot: process.cwd(),
|
|
222
|
+
git: new GitService(),
|
|
223
|
+
allowExistingCodeChanges: true,
|
|
224
|
+
});
|
|
225
|
+
if (!lease.valid) {
|
|
226
|
+
reportedAiGate = {
|
|
227
|
+
...reportedAiGate,
|
|
228
|
+
status: 'BLOCKED',
|
|
229
|
+
allowed: false,
|
|
230
|
+
violations: [
|
|
231
|
+
...reportedAiGate.violations,
|
|
232
|
+
{
|
|
233
|
+
code: lease.code,
|
|
234
|
+
severity: 'ERROR',
|
|
235
|
+
message: lease.message,
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
} catch (error) {
|
|
241
|
+
reportedAiGate = {
|
|
242
|
+
...reportedAiGate,
|
|
243
|
+
status: 'BLOCKED',
|
|
244
|
+
allowed: false,
|
|
245
|
+
violations: [
|
|
246
|
+
...reportedAiGate.violations,
|
|
247
|
+
{
|
|
248
|
+
code: 'PRE_WRITE_LEASE_WRITE_FAILED',
|
|
249
|
+
severity: 'ERROR',
|
|
250
|
+
message:
|
|
251
|
+
error instanceof Error
|
|
252
|
+
? `PRE_WRITE validation passed but could not write the required lease: ${error.message}`
|
|
253
|
+
: 'PRE_WRITE validation passed but could not write the required lease.',
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
}
|
|
213
259
|
const sddExperimentalNextAction =
|
|
214
260
|
!aiGate && result.decision.code === 'SDD_EXPERIMENTAL_DISABLED'
|
|
215
261
|
? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.311",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|