pumuki 6.3.26 → 6.3.28
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/README.md +3 -1
- package/bin/pumuki-mcp-enterprise-stdio.js +5 -0
- package/bin/pumuki-mcp-evidence-stdio.js +5 -0
- package/core/gate/conditionMatches.ts +1 -21
- package/core/gate/evaluateGate.js +5 -0
- package/core/gate/evaluateRules.js +5 -0
- package/core/gate/evaluateRules.ts +1 -24
- package/core/gate/scopeMatcher.ts +84 -0
- package/docs/EXECUTION_BOARD.md +749 -376
- package/docs/MCP_SERVERS.md +41 -2
- package/docs/README.md +6 -2
- package/docs/REFRACTOR_PROGRESS.md +374 -6
- package/docs/validation/README.md +11 -1
- package/docs/validation/p9-ruralgo-bug-registry.md +607 -0
- package/docs/validation/p9-ruralgo-fork-validation-tracking.md +904 -0
- package/docs/validation/real-repo-manual-e2e-ruralgo-fork.md +372 -0
- package/integrations/config/skillsCompliance.ts +212 -0
- package/integrations/evidence/integrity.ts +352 -0
- package/integrations/evidence/rulesCoverage.ts +94 -0
- package/integrations/evidence/schema.test.ts +16 -0
- package/integrations/evidence/schema.ts +41 -0
- package/integrations/evidence/writeEvidence.test.ts +68 -0
- package/integrations/evidence/writeEvidence.ts +23 -2
- package/integrations/gate/evaluateAiGate.ts +382 -15
- package/integrations/gate/stagePolicies.ts +70 -15
- package/integrations/gate/waivers.ts +209 -0
- package/integrations/git/findingTraceability.ts +3 -23
- package/integrations/git/index.js +5 -0
- package/integrations/git/runCliCommand.ts +16 -0
- package/integrations/git/runPlatformGate.ts +53 -1
- package/integrations/git/runPlatformGateEvaluation.ts +13 -0
- package/integrations/git/stageRunners.ts +168 -5
- package/integrations/lifecycle/adapter.templates.json +72 -5
- package/integrations/lifecycle/adapter.ts +78 -4
- package/integrations/lifecycle/cli.ts +384 -14
- package/integrations/lifecycle/doctor.ts +534 -0
- package/integrations/lifecycle/hookBlock.ts +2 -1
- package/integrations/lifecycle/index.js +5 -0
- package/integrations/lifecycle/install.ts +115 -3
- package/integrations/lifecycle/openSpecBootstrap.ts +68 -8
- package/integrations/lifecycle/preWriteAutomation.ts +142 -0
- package/integrations/mcp/aiGateCheck.ts +6 -0
- package/integrations/mcp/aiGateReceipt.ts +188 -0
- package/integrations/mcp/enterpriseServer.ts +14 -1
- package/integrations/mcp/enterpriseStdioServer.cli.ts +315 -0
- package/integrations/mcp/evidenceStdioServer.cli.ts +342 -0
- package/integrations/mcp/index.js +5 -0
- package/integrations/sdd/index.js +5 -0
- package/integrations/sdd/index.ts +2 -0
- package/integrations/sdd/policy.ts +191 -2
- package/integrations/sdd/sessionStore.ts +139 -19
- package/integrations/sdd/syncDocs.ts +180 -0
- package/integrations/sdd/types.ts +4 -1
- package/integrations/telemetry/structuredTelemetry.ts +197 -0
- package/package.json +27 -8
- package/scripts/build-p9-validation-manifests.ts +53 -0
- package/scripts/check-p9-ruralgo-baseline-clean.ts +200 -0
- package/scripts/check-p9-ruralgo-baseline-versioned.ts +198 -0
- package/scripts/check-p9-ruralgo-branch-ready.ts +215 -0
- package/scripts/check-p9-ruralgo-install-health.ts +288 -0
- package/scripts/check-p9-ruralgo-runtime-ready.ts +188 -0
- package/scripts/check-package-manifest.ts +49 -0
- package/scripts/check-tracking-single-active.sh +40 -0
- package/scripts/framework-menu-consumer-preflight-lib.ts +31 -0
- package/scripts/framework-menu-consumer-runtime-lib.ts +3 -3
- package/scripts/framework-menu-legacy-audit-lib.ts +35 -7
- package/scripts/framework-menu-matrix-evidence-lib.ts +6 -2
- package/scripts/manage-library.sh +1 -1
- package/scripts/p9-ruralgo-baseline-clean-lib.ts +117 -0
- package/scripts/p9-ruralgo-baseline-versioned-lib.ts +119 -0
- package/scripts/p9-ruralgo-branch-ready-lib.ts +128 -0
- package/scripts/p9-ruralgo-install-health-lib.ts +121 -0
- package/scripts/p9-ruralgo-runtime-ready-lib.ts +149 -0
- package/scripts/p9-validation-manifests-lib.ts +366 -0
- package/scripts/package-manifest-lib.ts +9 -0
- package/skills.lock.json +1 -1
package/README.md
CHANGED
|
@@ -211,7 +211,9 @@ npx --yes pumuki-ci
|
|
|
211
211
|
|
|
212
212
|
```bash
|
|
213
213
|
npx --yes pumuki-mcp-evidence
|
|
214
|
-
npx --yes pumuki-mcp-
|
|
214
|
+
npx --yes --package pumuki@latest pumuki-mcp-evidence-stdio
|
|
215
|
+
npx --yes --package pumuki@latest pumuki-mcp-enterprise
|
|
216
|
+
npx --yes --package pumuki@latest pumuki-mcp-enterprise-stdio
|
|
215
217
|
```
|
|
216
218
|
|
|
217
219
|
## Validation and Diagnostics (Framework-Only)
|
|
@@ -4,6 +4,7 @@ import type { Fact } from '../facts/Fact';
|
|
|
4
4
|
import type { DependencyFact } from '../facts/DependencyFact';
|
|
5
5
|
import type { FileChangeFact } from '../facts/FileChangeFact';
|
|
6
6
|
import type { FileContentFact } from '../facts/FileContentFact';
|
|
7
|
+
import { matchesScope } from './scopeMatcher';
|
|
7
8
|
|
|
8
9
|
type RuleScope = RuleDefinition['scope'];
|
|
9
10
|
|
|
@@ -26,27 +27,6 @@ const isDependencyFact = (fact: FactInput): fact is DependencyFact =>
|
|
|
26
27
|
const isHeuristicFact = (fact: FactInput): fact is Extract<Fact, { kind: 'Heuristic' }> =>
|
|
27
28
|
fact.kind === 'Heuristic';
|
|
28
29
|
|
|
29
|
-
const extractPrefix = (pattern: string): string => {
|
|
30
|
-
const wildcardIndex = pattern.indexOf('*');
|
|
31
|
-
return wildcardIndex === -1 ? pattern : pattern.slice(0, wildcardIndex);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const matchesAnyPrefix = (path: string, patterns: ReadonlyArray<string>): boolean => {
|
|
35
|
-
return patterns.some((pattern) => path.startsWith(extractPrefix(pattern)));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const matchesScope = (path: string, scope?: RuleScope): boolean => {
|
|
39
|
-
const include = scope?.include;
|
|
40
|
-
const exclude = scope?.exclude;
|
|
41
|
-
if (exclude && exclude.length > 0 && matchesAnyPrefix(path, exclude)) {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
if (!include || include.length === 0) {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return matchesAnyPrefix(path, include);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
30
|
const matchesFileChange = (
|
|
51
31
|
condition: Extract<Condition, { kind: 'FileChange' }>,
|
|
52
32
|
facts: ReadonlyArray<FactInput>
|
|
@@ -7,6 +7,7 @@ import type { FileChangeFact } from '../facts/FileChangeFact';
|
|
|
7
7
|
import type { FileContentFact } from '../facts/FileContentFact';
|
|
8
8
|
import type { Finding } from './Finding';
|
|
9
9
|
import { conditionMatches } from './conditionMatches';
|
|
10
|
+
import { matchesScope } from './scopeMatcher';
|
|
10
11
|
|
|
11
12
|
type FactInput = Fact | FileChangeFact | FileContentFact;
|
|
12
13
|
|
|
@@ -37,30 +38,6 @@ const toFinding = (
|
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
const extractPrefix = (pattern: string): string => {
|
|
41
|
-
const wildcardIndex = pattern.indexOf('*');
|
|
42
|
-
return wildcardIndex === -1 ? pattern : pattern.slice(0, wildcardIndex);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const matchesAnyPrefix = (path: string, patterns: ReadonlyArray<string>): boolean => {
|
|
46
|
-
return patterns.some((pattern) => path.startsWith(extractPrefix(pattern)));
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const matchesScope = (
|
|
50
|
-
path: string,
|
|
51
|
-
scope?: RuleDefinition['scope']
|
|
52
|
-
): boolean => {
|
|
53
|
-
const include = scope?.include;
|
|
54
|
-
const exclude = scope?.exclude;
|
|
55
|
-
if (exclude && exclude.length > 0 && matchesAnyPrefix(path, exclude)) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
if (!include || include.length === 0) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
return matchesAnyPrefix(path, include);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
41
|
const collectSimpleFindingTargets = (
|
|
65
42
|
condition: Condition,
|
|
66
43
|
facts: ReadonlyArray<FactInput>,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { RuleDefinition } from '../rules/RuleDefinition';
|
|
2
|
+
|
|
3
|
+
type RuleScope = RuleDefinition['scope'];
|
|
4
|
+
|
|
5
|
+
const SPECIAL_REGEX_CHARS = /[|\\{}()[\]^$+?.]/;
|
|
6
|
+
const regexCache = new Map<string, RegExp>();
|
|
7
|
+
|
|
8
|
+
const normalize = (value: string): string => {
|
|
9
|
+
return value.replace(/\\/g, '/');
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const escapeRegexChar = (value: string): string => {
|
|
13
|
+
return SPECIAL_REGEX_CHARS.test(value) ? `\\${value}` : value;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const toGlobRegex = (pattern: string): RegExp => {
|
|
17
|
+
const cached = regexCache.get(pattern);
|
|
18
|
+
if (cached) {
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let regex = '^';
|
|
23
|
+
for (let index = 0; index < pattern.length;) {
|
|
24
|
+
if (pattern.startsWith('**/', index)) {
|
|
25
|
+
regex += '(?:.*/)?';
|
|
26
|
+
index += 3;
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (pattern.startsWith('**', index)) {
|
|
30
|
+
regex += '.*';
|
|
31
|
+
index += 2;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const char = pattern[index];
|
|
36
|
+
if (char === '*') {
|
|
37
|
+
regex += '[^/]*';
|
|
38
|
+
index += 1;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
regex += escapeRegexChar(char);
|
|
43
|
+
index += 1;
|
|
44
|
+
}
|
|
45
|
+
regex += '$';
|
|
46
|
+
|
|
47
|
+
const compiled = new RegExp(regex);
|
|
48
|
+
regexCache.set(pattern, compiled);
|
|
49
|
+
return compiled;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const matchesPattern = (path: string, pattern: string): boolean => {
|
|
53
|
+
const normalizedPath = normalize(path);
|
|
54
|
+
const normalizedPattern = normalize(pattern);
|
|
55
|
+
|
|
56
|
+
const wildcardIndex = normalizedPattern.indexOf('*');
|
|
57
|
+
if (wildcardIndex === -1) {
|
|
58
|
+
return normalizedPath.startsWith(normalizedPattern);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const prefix = normalizedPattern.slice(0, wildcardIndex);
|
|
62
|
+
if (prefix.length > 0 && normalizedPath.startsWith(prefix)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return toGlobRegex(normalizedPattern).test(normalizedPath);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const matchesAnyPattern = (path: string, patterns: ReadonlyArray<string>): boolean => {
|
|
70
|
+
return patterns.some((pattern) => matchesPattern(path, pattern));
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const matchesScope = (path: string, scope?: RuleScope): boolean => {
|
|
74
|
+
const include = scope?.include;
|
|
75
|
+
const exclude = scope?.exclude;
|
|
76
|
+
|
|
77
|
+
if (exclude && exclude.length > 0 && matchesAnyPattern(path, exclude)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (!include || include.length === 0) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
return matchesAnyPattern(path, include);
|
|
84
|
+
};
|