pumuki 6.3.117 → 6.3.118
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 +7 -0
- package/VERSION +1 -1
- package/integrations/mcp/enterpriseServer.ts +40 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [6.3.118] - 2026-04-28
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Guard PRE_WRITE para editores/agentes vía MCP:** el catálogo enterprise expone `pre_write_guard`, una tool no mutante que ejecuta `audit --stage=PRE_WRITE --json` y devuelve `findings` accionables antes de permitir continuar una edición/restauración de ficheros.
|
|
14
|
+
- **Cierre operativo de `PUMUKI-INC-109`:** RuralGo ya tiene una ruta MCP explícita para bloquear antes de escribir, no sólo en commit/gate posterior.
|
|
15
|
+
|
|
9
16
|
## [6.3.117] - 2026-04-28
|
|
10
17
|
|
|
11
18
|
### Fixed
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v6.3.
|
|
1
|
+
v6.3.118
|
|
@@ -4,7 +4,7 @@ import type { Server } from 'node:http';
|
|
|
4
4
|
import { execFileSync as runBinarySync } from 'node:child_process';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
|
-
import { readLifecycleStatus } from '../lifecycle';
|
|
7
|
+
import { readLifecycleStatus, runLifecycleAudit } from '../lifecycle';
|
|
8
8
|
import { resolveMcpEnterpriseExperimentalFeature } from '../policy/experimentalFeatures';
|
|
9
9
|
import { evaluateSddPolicy, readSddStatus } from '../sdd';
|
|
10
10
|
import type { SddStage } from '../sdd';
|
|
@@ -75,6 +75,7 @@ const ENTERPRISE_RESOURCE_DESCRIPTORS: ReadonlyArray<{
|
|
|
75
75
|
];
|
|
76
76
|
|
|
77
77
|
const ENTERPRISE_TOOLS = [
|
|
78
|
+
'pre_write_guard',
|
|
78
79
|
'ai_gate_check',
|
|
79
80
|
'pre_flight_check',
|
|
80
81
|
'auto_execute_ai_start',
|
|
@@ -91,6 +92,12 @@ const ENTERPRISE_TOOL_DESCRIPTORS: ReadonlyArray<{
|
|
|
91
92
|
mutating: boolean;
|
|
92
93
|
safeByDefault: boolean;
|
|
93
94
|
}> = [
|
|
95
|
+
{
|
|
96
|
+
name: 'pre_write_guard',
|
|
97
|
+
description: 'Runs the PRE_WRITE audit gate and returns actionable findings before an editor/agent writes code.',
|
|
98
|
+
mutating: false,
|
|
99
|
+
safeByDefault: true,
|
|
100
|
+
},
|
|
94
101
|
{
|
|
95
102
|
name: 'ai_gate_check',
|
|
96
103
|
description: 'Reads .ai_evidence.json and reports AI gate compatibility status.',
|
|
@@ -382,13 +389,41 @@ const evaluateCriticalToolGuard = (
|
|
|
382
389
|
}
|
|
383
390
|
};
|
|
384
391
|
|
|
385
|
-
const executeEnterpriseTool = (
|
|
392
|
+
const executeEnterpriseTool = async (
|
|
386
393
|
repoRoot: string,
|
|
387
394
|
toolName: EnterpriseToolName,
|
|
388
395
|
args: Record<string, string | number | boolean | bigint | symbol | null | Date | object>,
|
|
389
396
|
dryRun: boolean
|
|
390
|
-
): EnterpriseToolExecution => {
|
|
397
|
+
): Promise<EnterpriseToolExecution> => {
|
|
391
398
|
switch (toolName) {
|
|
399
|
+
case 'pre_write_guard': {
|
|
400
|
+
const audit = await runLifecycleAudit({
|
|
401
|
+
repoRoot,
|
|
402
|
+
stage: 'PRE_WRITE',
|
|
403
|
+
auditMode: 'gate',
|
|
404
|
+
});
|
|
405
|
+
return {
|
|
406
|
+
name: toolName,
|
|
407
|
+
success: audit.gate_exit_code === 0 && audit.blocking_findings_count === 0,
|
|
408
|
+
dryRun: true,
|
|
409
|
+
executed: true,
|
|
410
|
+
warnings: audit.blocking_findings_count > 0
|
|
411
|
+
? ['PRE_WRITE guard blocked before editor write; inspect result.findings.']
|
|
412
|
+
: [],
|
|
413
|
+
data: {
|
|
414
|
+
...audit,
|
|
415
|
+
next_action: audit.blocking_findings_count > 0
|
|
416
|
+
? {
|
|
417
|
+
kind: 'inspect_findings',
|
|
418
|
+
message: 'Corrige los findings bloqueantes antes de escribir o restaurar ficheros.',
|
|
419
|
+
}
|
|
420
|
+
: {
|
|
421
|
+
kind: 'continue',
|
|
422
|
+
message: 'PRE_WRITE guard passed.',
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
};
|
|
426
|
+
}
|
|
392
427
|
case 'ai_gate_check': {
|
|
393
428
|
const stage = toSddStage(args.stage, 'PRE_COMMIT');
|
|
394
429
|
const execution = runEnterpriseAiGateCheck({
|
|
@@ -741,7 +776,7 @@ export const startEnterpriseMcpServer = (
|
|
|
741
776
|
return;
|
|
742
777
|
}
|
|
743
778
|
void readJsonBody(req)
|
|
744
|
-
.then((body) => {
|
|
779
|
+
.then(async (body) => {
|
|
745
780
|
if (typeof body !== 'object' || body === null) {
|
|
746
781
|
sendJson(res, 400, {
|
|
747
782
|
error: 'Invalid request body.',
|
|
@@ -814,7 +849,7 @@ export const startEnterpriseMcpServer = (
|
|
|
814
849
|
}
|
|
815
850
|
let result: EnterpriseToolExecution;
|
|
816
851
|
try {
|
|
817
|
-
result = executeEnterpriseTool(
|
|
852
|
+
result = await executeEnterpriseTool(
|
|
818
853
|
repoRoot,
|
|
819
854
|
toolName,
|
|
820
855
|
args,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.118",
|
|
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": {
|