@hongmaple0820/scale-engine 0.49.0 → 0.50.2
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.en.md +2 -2
- package/README.md +2 -2
- package/dist/api/DashboardHttpConfig.d.ts +28 -0
- package/dist/api/DashboardHttpConfig.js +110 -0
- package/dist/api/DashboardHttpConfig.js.map +1 -0
- package/dist/api/cli.js +102 -11
- package/dist/api/cli.js.map +1 -1
- package/dist/api/http.d.ts +1 -0
- package/dist/api/http.js +52 -0
- package/dist/api/http.js.map +1 -0
- package/dist/artifact/types.d.ts +5 -0
- package/dist/artifact/types.js.map +1 -1
- package/dist/bootstrap/DependencyBootstrap.d.ts +1 -0
- package/dist/bootstrap/DependencyBootstrap.js +14 -3
- package/dist/bootstrap/DependencyBootstrap.js.map +1 -1
- package/dist/cli/cortexApplyCommand.d.ts +26 -0
- package/dist/cli/cortexApplyCommand.js +74 -0
- package/dist/cli/cortexApplyCommand.js.map +1 -0
- package/dist/cli/cortexCandidateCommands.d.ts +42 -0
- package/dist/cli/cortexCandidateCommands.js +119 -0
- package/dist/cli/cortexCandidateCommands.js.map +1 -0
- package/dist/cli/cortexCommands.d.ts +31 -0
- package/dist/cli/cortexCommands.js +102 -17
- package/dist/cli/cortexCommands.js.map +1 -1
- package/dist/cli/engineBootstrap.d.ts +1 -1
- package/dist/cli/engineBootstrap.js +2 -0
- package/dist/cli/engineBootstrap.js.map +1 -1
- package/dist/cli/evalCommands.js +1 -0
- package/dist/cli/evalCommands.js.map +1 -1
- package/dist/cli/phaseCommands.d.ts +28 -0
- package/dist/cli/phaseCommands.js +148 -9
- package/dist/cli/phaseCommands.js.map +1 -1
- package/dist/cli/runtimeSkillCommands.js +12 -2
- package/dist/cli/runtimeSkillCommands.js.map +1 -1
- package/dist/cli/shieldCommands.d.ts +1 -0
- package/dist/cli/shieldCommands.js +20 -7
- package/dist/cli/shieldCommands.js.map +1 -1
- package/dist/cli/workflowEvidenceCommands.d.ts +120 -0
- package/dist/cli/workflowEvidenceCommands.js +228 -2
- package/dist/cli/workflowEvidenceCommands.js.map +1 -1
- package/dist/cortex/AutoFixEventObservations.d.ts +11 -0
- package/dist/cortex/AutoFixEventObservations.js +72 -0
- package/dist/cortex/AutoFixEventObservations.js.map +1 -0
- package/dist/cortex/GateEvidenceObservations.d.ts +22 -0
- package/dist/cortex/GateEvidenceObservations.js +179 -0
- package/dist/cortex/GateEvidenceObservations.js.map +1 -0
- package/dist/cortex/GovernanceMetrics.d.ts +2 -0
- package/dist/cortex/GovernanceMetrics.js +112 -22
- package/dist/cortex/GovernanceMetrics.js.map +1 -1
- package/dist/cortex/InstinctApplicationRecorder.d.ts +28 -0
- package/dist/cortex/InstinctApplicationRecorder.js +145 -0
- package/dist/cortex/InstinctApplicationRecorder.js.map +1 -0
- package/dist/cortex/InstinctCandidateAudit.d.ts +3 -0
- package/dist/cortex/InstinctCandidateAudit.js +39 -0
- package/dist/cortex/InstinctCandidateAudit.js.map +1 -0
- package/dist/cortex/InstinctCandidateReview.d.ts +32 -0
- package/dist/cortex/InstinctCandidateReview.js +125 -0
- package/dist/cortex/InstinctCandidateReview.js.map +1 -0
- package/dist/cortex/InstinctExtractor.d.ts +1 -0
- package/dist/cortex/InstinctExtractor.js +24 -17
- package/dist/cortex/InstinctExtractor.js.map +1 -1
- package/dist/cortex/InstinctRuntimeEvidence.d.ts +14 -0
- package/dist/cortex/InstinctRuntimeEvidence.js +120 -0
- package/dist/cortex/InstinctRuntimeEvidence.js.map +1 -0
- package/dist/cortex/InstinctStore.d.ts +31 -4
- package/dist/cortex/InstinctStore.js +120 -20
- package/dist/cortex/InstinctStore.js.map +1 -1
- package/dist/cortex/SessionInjector.d.ts +1 -0
- package/dist/cortex/SessionInjector.js +54 -4
- package/dist/cortex/SessionInjector.js.map +1 -1
- package/dist/dashboard/DashboardServer.d.ts +237 -0
- package/dist/dashboard/DashboardServer.js +1083 -19
- package/dist/dashboard/DashboardServer.js.map +1 -1
- package/dist/dashboard/spa/assets/index-VYBCLBje.js +11 -0
- package/dist/dashboard/spa/assets/index-VhwY_ac1.css +1 -0
- package/dist/dashboard/spa/assets/naive-ui-BQy2AJkt.js +3340 -0
- package/dist/dashboard/spa/assets/vendor-BPU6aOYA.js +3 -0
- package/dist/dashboard/spa/assets/vue-CQQMb5Wi.js +17 -0
- package/dist/dashboard/spa/index.html +16 -0
- package/dist/env/EnvironmentDoctor.js +12 -7
- package/dist/env/EnvironmentDoctor.js.map +1 -1
- package/dist/eval/WorkflowEval.d.ts +9 -0
- package/dist/eval/WorkflowEval.js +348 -2
- package/dist/eval/WorkflowEval.js.map +1 -1
- package/dist/memory/MemoryBrain.d.ts +13 -0
- package/dist/memory/MemoryBrain.js +47 -0
- package/dist/memory/MemoryBrain.js.map +1 -1
- package/dist/memory/MemoryFabric.d.ts +14 -1
- package/dist/memory/MemoryFabric.js +72 -8
- package/dist/memory/MemoryFabric.js.map +1 -1
- package/dist/memory/MemoryLearning.d.ts +1 -0
- package/dist/memory/MemoryLearning.js +6 -3
- package/dist/memory/MemoryLearning.js.map +1 -1
- package/dist/memory/MemoryProviders.d.ts +8 -1
- package/dist/memory/MemoryProviders.js +143 -29
- package/dist/memory/MemoryProviders.js.map +1 -1
- package/dist/runtime/AiOsRuntime.d.ts +14 -1
- package/dist/runtime/AiOsRuntime.js +59 -3
- package/dist/runtime/AiOsRuntime.js.map +1 -1
- package/dist/runtime/RuntimeDoctor.js +3 -1
- package/dist/runtime/RuntimeDoctor.js.map +1 -1
- package/dist/runtime/RuntimeEvidenceLedger.d.ts +6 -0
- package/dist/runtime/RuntimeEvidenceLedger.js +52 -1
- package/dist/runtime/RuntimeEvidenceLedger.js.map +1 -1
- package/dist/runtime/SessionLedger.d.ts +2 -0
- package/dist/runtime/SessionLedger.js +4 -0
- package/dist/runtime/SessionLedger.js.map +1 -1
- package/dist/setup/SetupVerification.js +53 -5
- package/dist/setup/SetupVerification.js.map +1 -1
- package/dist/shield/PolicyCompiler.js +73 -12
- package/dist/shield/PolicyCompiler.js.map +1 -1
- package/dist/shield/ProtectedPaths.js +4 -2
- package/dist/shield/ProtectedPaths.js.map +1 -1
- package/dist/skills/SkillCatalog.d.ts +2 -0
- package/dist/skills/SkillCatalog.js +8 -0
- package/dist/skills/SkillCatalog.js.map +1 -1
- package/dist/skills/SkillDoctor.d.ts +19 -2
- package/dist/skills/SkillDoctor.js +163 -13
- package/dist/skills/SkillDoctor.js.map +1 -1
- package/dist/tools/SafeCommandRunner.d.ts +1 -0
- package/dist/tools/SafeCommandRunner.js +1 -0
- package/dist/tools/SafeCommandRunner.js.map +1 -1
- package/dist/tools/ToolCapabilityRegistry.js +25 -3
- package/dist/tools/ToolCapabilityRegistry.js.map +1 -1
- package/dist/tools/ToolOrchestrator.js +21 -0
- package/dist/tools/ToolOrchestrator.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflow/AgentLoopReadiness.d.ts +103 -0
- package/dist/workflow/AgentLoopReadiness.js +371 -0
- package/dist/workflow/AgentLoopReadiness.js.map +1 -0
- package/dist/workflow/EcosystemReadinessGate.d.ts +46 -0
- package/dist/workflow/EcosystemReadinessGate.js +126 -0
- package/dist/workflow/EcosystemReadinessGate.js.map +1 -0
- package/dist/workflow/EngineeringStandards.js +48 -3
- package/dist/workflow/EngineeringStandards.js.map +1 -1
- package/dist/workflow/GateCatalog.js +9 -0
- package/dist/workflow/GateCatalog.js.map +1 -1
- package/dist/workflow/GovernanceTemplatePacks.js +2 -26
- package/dist/workflow/GovernanceTemplatePacks.js.map +1 -1
- package/dist/workflow/GovernanceTemplates.js +8 -1
- package/dist/workflow/GovernanceTemplates.js.map +1 -1
- package/dist/workflow/ReleaseDeploymentLedger.d.ts +63 -0
- package/dist/workflow/ReleaseDeploymentLedger.js +154 -0
- package/dist/workflow/ReleaseDeploymentLedger.js.map +1 -0
- package/dist/workflow/ReviewAnalyzer.js +50 -3
- package/dist/workflow/ReviewAnalyzer.js.map +1 -1
- package/dist/workflow/SessionPreamble.d.ts +7 -0
- package/dist/workflow/SessionPreamble.js +48 -9
- package/dist/workflow/SessionPreamble.js.map +1 -1
- package/dist/workflow/VerificationCommands.d.ts +1 -0
- package/dist/workflow/VerificationCommands.js.map +1 -1
- package/dist/workflow/VerificationProfile.d.ts +5 -0
- package/dist/workflow/VerificationProfile.js +26 -0
- package/dist/workflow/VerificationProfile.js.map +1 -1
- package/dist/workflow/VerificationSchema.d.ts +3 -0
- package/dist/workflow/VerificationSchema.js +6 -0
- package/dist/workflow/VerificationSchema.js.map +1 -1
- package/dist/workflow/WorkflowEffectiveness.d.ts +97 -0
- package/dist/workflow/WorkflowEffectiveness.js +302 -0
- package/dist/workflow/WorkflowEffectiveness.js.map +1 -0
- package/dist/workflow/WorkflowEffectivenessRenderer.d.ts +2 -0
- package/dist/workflow/WorkflowEffectivenessRenderer.js +67 -0
- package/dist/workflow/WorkflowEffectivenessRenderer.js.map +1 -0
- package/dist/workflow/WorkflowEffectivenessScoring.d.ts +6 -0
- package/dist/workflow/WorkflowEffectivenessScoring.js +243 -0
- package/dist/workflow/WorkflowEffectivenessScoring.js.map +1 -0
- package/dist/workflow/gates/GateSystem.d.ts +16 -0
- package/dist/workflow/gates/GateSystem.js +208 -41
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/gates/MetaGovernanceGates.js +269 -8
- package/dist/workflow/gates/MetaGovernanceGates.js.map +1 -1
- package/docs/reference/cli.md +2 -1
- package/docs/start/agent-governance-demo.md +1 -1
- package/docs/workflow/ASSESSMENT_INDEX.md +326 -0
- package/docs/workflow/COMPARATIVE_ANALYSIS.md +422 -0
- package/docs/workflow/EXECUTIVE_SUMMARY.md +310 -0
- package/docs/workflow/IMPROVEMENT_CHECKLIST.md +518 -0
- package/docs/workflow/IMPROVEMENT_ROADMAP.md +707 -0
- package/docs/workflow/README.md +9 -1
- package/docs/workflow/templates/github-actions-scale-preflight.yml +4 -1
- package/package.json +10 -3
- package/scripts/workflow/run-vitest.mjs +123 -0
package/README.en.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-0.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-0.50.2-orange?style=flat-square" alt="version" />
|
|
3
3
|
<img src="https://img.shields.io/badge/platforms-22-blue?style=flat-square" alt="platforms" />
|
|
4
4
|
<img src="https://img.shields.io/badge/agents-12-blue?style=flat-square" alt="agents" />
|
|
5
5
|
<img src="https://img.shields.io/badge/tests-verified-brightgreen?style=flat-square" alt="tests" />
|
|
6
|
-
<img src="https://img.shields.io/badge/npm-0.
|
|
6
|
+
<img src="https://img.shields.io/badge/npm-0.50.2-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
[](https://repostars.dev/?repos=hongmaple0820%2Fscale-engine&theme=copper)
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-0.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-0.50.2-orange?style=flat-square" alt="version" />
|
|
3
3
|
<img src="https://img.shields.io/badge/platforms-22-blue?style=flat-square" alt="platforms" />
|
|
4
4
|
<img src="https://img.shields.io/badge/agents-22-blue?style=flat-square" alt="agents" />
|
|
5
5
|
<img src="https://img.shields.io/badge/tests-verified-brightgreen?style=flat-square" alt="tests" />
|
|
6
|
-
<img src="https://img.shields.io/badge/npm-0.
|
|
6
|
+
<img src="https://img.shields.io/badge/npm-0.50.2-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
[](https://repostars.dev/?repos=hongmaple0820%2Fscale-engine&theme=copper)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DashboardProjectSummary } from '../dashboard/DashboardServer.js';
|
|
2
|
+
export interface DashboardHttpEnv {
|
|
3
|
+
SCALE_DASHBOARD_HOST?: string;
|
|
4
|
+
HOST?: string;
|
|
5
|
+
SCALE_DASHBOARD_PORT?: string;
|
|
6
|
+
PORT?: string;
|
|
7
|
+
SCALE_DASHBOARD_AUTO_PORT?: string;
|
|
8
|
+
SCALE_DASHBOARD_PROJECT_DIR?: string;
|
|
9
|
+
SCALE_DASHBOARD_PROJECTS?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DashboardPortConfig {
|
|
12
|
+
port: number;
|
|
13
|
+
auto: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DashboardLaunchProject extends DashboardProjectSummary {
|
|
16
|
+
port: number;
|
|
17
|
+
host: string;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DashboardLaunchPlan {
|
|
21
|
+
host: string;
|
|
22
|
+
projects: DashboardLaunchProject[];
|
|
23
|
+
}
|
|
24
|
+
export declare function parseDashboardPort(value: string | undefined, fallback?: number): DashboardPortConfig;
|
|
25
|
+
export declare function parseDashboardProjects(env: DashboardHttpEnv, cwd?: string): DashboardProjectSummary[];
|
|
26
|
+
export declare function resolveDashboardLaunchPlan(env?: DashboardHttpEnv, cwd?: string): Promise<DashboardLaunchPlan>;
|
|
27
|
+
export declare function findAvailablePort(startPort: number, host: string): Promise<number>;
|
|
28
|
+
export declare function assertDashboardProjectsExist(projects: DashboardProjectSummary[]): string[];
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { createServer } from 'node:net';
|
|
3
|
+
import { basename, join, resolve } from 'node:path';
|
|
4
|
+
export function parseDashboardPort(value, fallback = 3210) {
|
|
5
|
+
if (!value)
|
|
6
|
+
return { port: fallback, auto: false };
|
|
7
|
+
const trimmed = value.trim().toLowerCase();
|
|
8
|
+
if (trimmed === 'auto')
|
|
9
|
+
return { port: fallback, auto: true };
|
|
10
|
+
const port = Number(trimmed);
|
|
11
|
+
if (!Number.isInteger(port) || port <= 0 || port > 65535) {
|
|
12
|
+
throw new Error(`Invalid dashboard port: ${value}`);
|
|
13
|
+
}
|
|
14
|
+
return { port, auto: false };
|
|
15
|
+
}
|
|
16
|
+
export function parseDashboardProjects(env, cwd = process.cwd()) {
|
|
17
|
+
const multi = env.SCALE_DASHBOARD_PROJECTS?.trim();
|
|
18
|
+
if (multi) {
|
|
19
|
+
return multi
|
|
20
|
+
.split(';')
|
|
21
|
+
.map(entry => entry.trim())
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.map((entry, index) => parseProjectEntry(entry, cwd, index));
|
|
24
|
+
}
|
|
25
|
+
const projectDir = resolve(env.SCALE_DASHBOARD_PROJECT_DIR ?? cwd);
|
|
26
|
+
return [projectSummary(projectDir)];
|
|
27
|
+
}
|
|
28
|
+
export async function resolveDashboardLaunchPlan(env = process.env, cwd = process.cwd()) {
|
|
29
|
+
const host = env.SCALE_DASHBOARD_HOST ?? env.HOST ?? '0.0.0.0';
|
|
30
|
+
const portConfig = parseDashboardPort(env.SCALE_DASHBOARD_PORT ?? env.PORT, 3210);
|
|
31
|
+
const projects = parseDashboardProjects(env, cwd);
|
|
32
|
+
const autoPort = portConfig.auto || truthy(env.SCALE_DASHBOARD_AUTO_PORT) || projects.length > 1;
|
|
33
|
+
let nextPort = portConfig.port;
|
|
34
|
+
const launchProjects = [];
|
|
35
|
+
for (const project of projects) {
|
|
36
|
+
const port = autoPort ? await findAvailablePort(nextPort, host) : nextPort;
|
|
37
|
+
const url = dashboardUrl(host, port);
|
|
38
|
+
launchProjects.push({
|
|
39
|
+
...project,
|
|
40
|
+
port,
|
|
41
|
+
host,
|
|
42
|
+
url,
|
|
43
|
+
current: false,
|
|
44
|
+
});
|
|
45
|
+
nextPort = port + 1;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
host,
|
|
49
|
+
projects: launchProjects.map(project => ({ ...project, current: false })),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export async function findAvailablePort(startPort, host) {
|
|
53
|
+
for (let port = startPort; port <= 65535; port += 1) {
|
|
54
|
+
if (await canListen(port, host))
|
|
55
|
+
return port;
|
|
56
|
+
}
|
|
57
|
+
throw new Error(`No available dashboard port at or above ${startPort}`);
|
|
58
|
+
}
|
|
59
|
+
function parseProjectEntry(entry, cwd, index) {
|
|
60
|
+
const [rawName, rawPath] = splitProjectEntry(entry);
|
|
61
|
+
const projectDir = resolve(cwd, rawPath);
|
|
62
|
+
const name = rawName || basename(projectDir) || `project-${index + 1}`;
|
|
63
|
+
return projectSummary(projectDir, name);
|
|
64
|
+
}
|
|
65
|
+
function splitProjectEntry(entry) {
|
|
66
|
+
const separator = entry.includes('|') ? '|' : entry.includes('=') ? '=' : '';
|
|
67
|
+
if (!separator)
|
|
68
|
+
return [undefined, entry];
|
|
69
|
+
const [name, ...rest] = entry.split(separator);
|
|
70
|
+
const path = rest.join(separator).trim();
|
|
71
|
+
return [name.trim() || undefined, path || entry];
|
|
72
|
+
}
|
|
73
|
+
function projectSummary(projectDir, name = basename(projectDir) || 'project') {
|
|
74
|
+
const scaleDir = join(projectDir, '.scale');
|
|
75
|
+
const id = safeProjectId(name);
|
|
76
|
+
return {
|
|
77
|
+
id,
|
|
78
|
+
name,
|
|
79
|
+
projectDir,
|
|
80
|
+
scaleDir,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function dashboardUrl(host, port) {
|
|
84
|
+
const displayHost = host === '0.0.0.0' || host === '::' ? 'localhost' : host;
|
|
85
|
+
return `http://${displayHost}:${port}`;
|
|
86
|
+
}
|
|
87
|
+
function truthy(value) {
|
|
88
|
+
return ['1', 'true', 'yes', 'on'].includes(String(value ?? '').trim().toLowerCase());
|
|
89
|
+
}
|
|
90
|
+
function safeProjectId(name) {
|
|
91
|
+
const base = name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
|
|
92
|
+
return base || 'project';
|
|
93
|
+
}
|
|
94
|
+
function canListen(port, host) {
|
|
95
|
+
return new Promise(resolveListen => {
|
|
96
|
+
const server = createServer();
|
|
97
|
+
server.unref();
|
|
98
|
+
server.once('error', () => resolveListen(false));
|
|
99
|
+
server.once('listening', () => {
|
|
100
|
+
server.close(() => resolveListen(true));
|
|
101
|
+
});
|
|
102
|
+
server.listen({ port, host });
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
export function assertDashboardProjectsExist(projects) {
|
|
106
|
+
return projects
|
|
107
|
+
.filter(project => !existsSync(project.projectDir))
|
|
108
|
+
.map(project => project.projectDir);
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=DashboardHttpConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardHttpConfig.js","sourceRoot":"","sources":["../../src/api/DashboardHttpConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA6BnD,MAAM,UAAU,kBAAkB,CAAC,KAAyB,EAAE,QAAQ,GAAG,IAAI;IAC3E,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IAC1C,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;IAC5B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAA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 @@ import { normalizeLanguage } from '../i18n/Language.js';
|
|
|
22
22
|
import { EvidenceStore } from '../workflow/EvidenceStore.js';
|
|
23
23
|
import { ReviewStore } from '../workflow/ReviewStore.js';
|
|
24
24
|
import { WorkflowEngine } from '../workflow/WorkflowEngine.js';
|
|
25
|
-
import { resolveVerificationTargets, } from '../workflow/VerificationProfile.js';
|
|
26
|
-
import {
|
|
25
|
+
import { loadVerificationMatrix, resolveVerificationTargets, } from '../workflow/VerificationProfile.js';
|
|
26
|
+
import { evaluateEcosystemReadinessGate } from '../workflow/EcosystemReadinessGate.js';
|
|
27
|
+
import { CORE_GATE_CATALOG, META_GATE_CATALOG, preflightGateStages } from '../workflow/GateCatalog.js';
|
|
27
28
|
import { gatesCommand } from '../cli/gateStatusCommands.js';
|
|
28
29
|
import { scoreCommand } from '../cli/scoreCommands.js';
|
|
29
30
|
import { promptCommand } from '../cli/promptCommands.js';
|
|
@@ -75,6 +76,12 @@ import { SCALE_ENGINE_VERSION } from '../version.js';
|
|
|
75
76
|
const SCALE_DIR = process.env.SCALE_DIR ?? '.scale';
|
|
76
77
|
const PROJECT_DIR = process.env.SCALE_PROJECT_DIR ?? process.cwd();
|
|
77
78
|
const DB_PATH = join(SCALE_DIR, 'scale.db');
|
|
79
|
+
const GATE_BLOCKING_BY_STAGE = new Map([...CORE_GATE_CATALOG, ...META_GATE_CATALOG]
|
|
80
|
+
.filter(gate => gate.stage)
|
|
81
|
+
.map(gate => [gate.stage, gate.blocking]));
|
|
82
|
+
function isBlockingGateStage(stage) {
|
|
83
|
+
return GATE_BLOCKING_BY_STAGE.get(stage) ?? true;
|
|
84
|
+
}
|
|
78
85
|
function governanceModeFromScenario(scenario) {
|
|
79
86
|
if (scenario === 'critical')
|
|
80
87
|
return 'critical';
|
|
@@ -116,6 +123,8 @@ function commandEvidence(command, exitCode, summary) {
|
|
|
116
123
|
}
|
|
117
124
|
function normalizePreflightProfile(value) {
|
|
118
125
|
const normalized = String(value ?? 'quick').trim().toLowerCase();
|
|
126
|
+
if (normalized === 'fast-lane' || normalized === 'fastlane')
|
|
127
|
+
return 'fast-lane';
|
|
119
128
|
if (normalized === 'full' || normalized === 'ci')
|
|
120
129
|
return normalized;
|
|
121
130
|
return 'quick';
|
|
@@ -123,6 +132,55 @@ function normalizePreflightProfile(value) {
|
|
|
123
132
|
function gatesForPreflightProfile(profile) {
|
|
124
133
|
return preflightGateStages(profile);
|
|
125
134
|
}
|
|
135
|
+
function resolvePreflightVerificationProfile(projectDir, scaleDir, requestedProfile, preflightProfile) {
|
|
136
|
+
const warnings = [];
|
|
137
|
+
const matrix = loadVerificationMatrix(projectDir, scaleDir);
|
|
138
|
+
const profiles = matrix?.profiles ?? {};
|
|
139
|
+
const explicitProfile = typeof requestedProfile === 'string' && requestedProfile.trim()
|
|
140
|
+
? requestedProfile.trim()
|
|
141
|
+
: undefined;
|
|
142
|
+
if (explicitProfile) {
|
|
143
|
+
const explicitCandidate = resolveVerificationProfileCandidate(profiles, explicitProfile) ?? explicitProfile;
|
|
144
|
+
const matchingPreflightProfile = resolveVerificationProfileCandidate(profiles, preflightVerificationProfileCandidates(preflightProfile));
|
|
145
|
+
if (preflightProfile === 'fast-lane' &&
|
|
146
|
+
matrix?.defaultProfile &&
|
|
147
|
+
explicitProfile === matrix.defaultProfile &&
|
|
148
|
+
matchingPreflightProfile &&
|
|
149
|
+
matchingPreflightProfile !== explicitCandidate) {
|
|
150
|
+
warnings.push(`fast-lane preflight selected verification profile "${matchingPreflightProfile}" instead of default profile "${explicitProfile}" to avoid running the default full test command.`);
|
|
151
|
+
return { profile: matchingPreflightProfile, warnings };
|
|
152
|
+
}
|
|
153
|
+
return { profile: explicitCandidate, warnings };
|
|
154
|
+
}
|
|
155
|
+
for (const candidate of preflightVerificationProfileCandidates(preflightProfile)) {
|
|
156
|
+
if (profiles[candidate])
|
|
157
|
+
return { profile: candidate, warnings };
|
|
158
|
+
}
|
|
159
|
+
return { profile: undefined, warnings };
|
|
160
|
+
}
|
|
161
|
+
function preflightVerificationProfileCandidates(profile) {
|
|
162
|
+
if (profile === 'fast-lane')
|
|
163
|
+
return ['fast-lane', 'fastLane', 'fastlane'];
|
|
164
|
+
return [profile];
|
|
165
|
+
}
|
|
166
|
+
function resolveVerificationProfileCandidate(profiles, requested) {
|
|
167
|
+
const candidates = Array.isArray(requested) ? requested : [requested];
|
|
168
|
+
for (const candidate of candidates) {
|
|
169
|
+
if (profiles[candidate])
|
|
170
|
+
return candidate;
|
|
171
|
+
}
|
|
172
|
+
return undefined;
|
|
173
|
+
}
|
|
174
|
+
function latestBlockingEvidenceFailure(records) {
|
|
175
|
+
const latestByGate = new Map();
|
|
176
|
+
for (const record of records) {
|
|
177
|
+
if (!isBlockingGateStage(record.gate))
|
|
178
|
+
continue;
|
|
179
|
+
if (!latestByGate.has(record.gate))
|
|
180
|
+
latestByGate.set(record.gate, record);
|
|
181
|
+
}
|
|
182
|
+
return Array.from(latestByGate.values()).find(record => !record.passed);
|
|
183
|
+
}
|
|
126
184
|
function shouldSkipPreflightCommandTargets(resolved, args) {
|
|
127
185
|
if (!resolved.matrix)
|
|
128
186
|
return false;
|
|
@@ -581,12 +639,14 @@ const preflight = defineCommand({
|
|
|
581
639
|
const scaleDir = resolveScaleDirForProject(projectDir);
|
|
582
640
|
const workflowEngine = createVerificationWorkflowEngine(scaleDir);
|
|
583
641
|
const preflightProfile = normalizePreflightProfile(args['preflight-profile']);
|
|
642
|
+
const verificationProfile = resolvePreflightVerificationProfile(projectDir, scaleDir, args.profile, preflightProfile);
|
|
584
643
|
const resolved = resolveVerificationTargets({
|
|
585
644
|
projectDir,
|
|
586
645
|
scaleDir,
|
|
587
|
-
profile:
|
|
646
|
+
profile: verificationProfile.profile,
|
|
588
647
|
service: args.service,
|
|
589
648
|
});
|
|
649
|
+
resolved.warnings.push(...verificationProfile.warnings);
|
|
590
650
|
let gateStages = gatesForPreflightProfile(preflightProfile);
|
|
591
651
|
if (resolved.targets.some(target => target.config.smoke)) {
|
|
592
652
|
gateStages = ['G8'];
|
|
@@ -605,6 +665,13 @@ const preflight = defineCommand({
|
|
|
605
665
|
scaleDir,
|
|
606
666
|
changedFiles: engineeringStandardsChangedFiles,
|
|
607
667
|
});
|
|
668
|
+
const ecosystemReadiness = await evaluateEcosystemReadinessGate({
|
|
669
|
+
policy: resolved.policy,
|
|
670
|
+
projectDir,
|
|
671
|
+
scaleDir,
|
|
672
|
+
checked: preflightProfile === 'ci',
|
|
673
|
+
skipReason: `ecosystem readiness is only checked by the ci preflight profile; current profile is ${preflightProfile}`,
|
|
674
|
+
});
|
|
608
675
|
const targetResults = [];
|
|
609
676
|
if (!args.json) {
|
|
610
677
|
console.log('\nSCALE Preflight');
|
|
@@ -626,6 +693,15 @@ const preflight = defineCommand({
|
|
|
626
693
|
else {
|
|
627
694
|
console.log(' Engineering standards: skipped');
|
|
628
695
|
}
|
|
696
|
+
if (ecosystemReadiness.checked) {
|
|
697
|
+
const status = ecosystemReadiness.blocked ? 'BLOCKED' : ecosystemReadiness.ok ? 'OK' : 'WARN';
|
|
698
|
+
console.log(` Ecosystem readiness: ${status} (${ecosystemReadiness.mode})`);
|
|
699
|
+
console.log(` Ecosystem tools: ${ecosystemReadiness.summary.installedTools}/${ecosystemReadiness.summary.totalTools}`);
|
|
700
|
+
console.log(` Ecosystem skills: ${ecosystemReadiness.summary.installedWorkflowSkills}/${ecosystemReadiness.summary.totalWorkflowSkills}`);
|
|
701
|
+
}
|
|
702
|
+
else {
|
|
703
|
+
console.log(' Ecosystem readiness: skipped');
|
|
704
|
+
}
|
|
629
705
|
}
|
|
630
706
|
for (const target of commandTargetsSkipped || workspaceSafety.blocked ? [] : resolved.targets) {
|
|
631
707
|
if (!args.json) {
|
|
@@ -665,16 +741,19 @@ const preflight = defineCommand({
|
|
|
665
741
|
}
|
|
666
742
|
const passed = (targetResults.length === 0 || targetResults.every(target => target.passed)) &&
|
|
667
743
|
!workspaceSafety.blocked &&
|
|
668
|
-
!engineeringStandards.blocked
|
|
744
|
+
!engineeringStandards.blocked &&
|
|
745
|
+
!ecosystemReadiness.blocked;
|
|
669
746
|
const result = {
|
|
670
747
|
phase: 'PREFLIGHT',
|
|
671
748
|
profile: resolved.profileName,
|
|
672
749
|
preflightProfile,
|
|
673
750
|
gates: gateStages,
|
|
674
751
|
services: targetResults.map(target => target.service).filter(Boolean),
|
|
752
|
+
warnings: resolved.warnings,
|
|
675
753
|
policy: resolved.policy,
|
|
676
754
|
workspaceSafety,
|
|
677
755
|
engineeringStandards,
|
|
756
|
+
ecosystemReadiness,
|
|
678
757
|
targets: targetResults,
|
|
679
758
|
commandTargetsSkipped,
|
|
680
759
|
passed,
|
|
@@ -698,13 +777,13 @@ const status = defineCommand({
|
|
|
698
777
|
const { store } = getEngine();
|
|
699
778
|
const evidenceStore = new EvidenceStore(SCALE_DIR);
|
|
700
779
|
const reviewStore = new ReviewStore(SCALE_DIR);
|
|
701
|
-
const [specs, plans, tasks
|
|
780
|
+
const [specs, plans, tasks] = await Promise.all([
|
|
702
781
|
store.query({ type: 'Spec', limit: 1 }),
|
|
703
782
|
store.query({ type: 'Plan', limit: 1 }),
|
|
704
783
|
store.query({ type: 'Task', limit: 1 }),
|
|
705
|
-
store.query({ type: 'Release', limit: 1 }),
|
|
706
784
|
]);
|
|
707
785
|
const latestEvidence = evidenceStore.listGateResults(5);
|
|
786
|
+
const latestEvidenceForBlockers = evidenceStore.listGateResults(50);
|
|
708
787
|
const latestReviews = reviewStore.listReviews(5);
|
|
709
788
|
const latestTask = tasks[0];
|
|
710
789
|
const taskPayload = latestTask?.payload;
|
|
@@ -712,12 +791,15 @@ const status = defineCommand({
|
|
|
712
791
|
const currentOpenTasks = workflowState?.openTasks ?? [];
|
|
713
792
|
const nextOpenTask = nextWorkflowOpenTask(currentOpenTasks);
|
|
714
793
|
const blockers = [];
|
|
715
|
-
const latestBlockingEvidence =
|
|
716
|
-
const
|
|
794
|
+
const latestBlockingEvidence = latestBlockingEvidenceFailure(latestEvidenceForBlockers);
|
|
795
|
+
const latestReviewForTask = latestTask
|
|
796
|
+
? reviewStore.listReviews(50).find(record => record.taskId === latestTask.id)
|
|
797
|
+
: undefined;
|
|
717
798
|
if (latestBlockingEvidence)
|
|
718
799
|
blockers.push(`${latestBlockingEvidence.gate}: ${latestBlockingEvidence.blockers.join('; ') || latestBlockingEvidence.status}`);
|
|
719
|
-
if (
|
|
720
|
-
blockers.push(`Review ${
|
|
800
|
+
if (latestReviewForTask && !latestReviewForTask.passed) {
|
|
801
|
+
blockers.push(`Review ${latestReviewForTask.id}: ${latestReviewForTask.summary.critical} critical, ${latestReviewForTask.summary.high} high`);
|
|
802
|
+
}
|
|
721
803
|
if (latestTask && (!taskPayload?.verificationEvidenceIds || taskPayload.verificationEvidenceIds.length === 0)) {
|
|
722
804
|
blockers.push(`Task ${latestTask.id} has no persisted verification evidence`);
|
|
723
805
|
}
|
|
@@ -725,6 +807,8 @@ const status = defineCommand({
|
|
|
725
807
|
blockers.push(`Task ${latestTask.id} has no persisted review evidence`);
|
|
726
808
|
}
|
|
727
809
|
const nextCommand = (() => {
|
|
810
|
+
const taskShipped = taskPayload?.shipPassed === true ||
|
|
811
|
+
Boolean(taskPayload?.shipCommitHash || taskPayload?.shipDeploymentRecordId);
|
|
728
812
|
if (nextOpenTask?.kind === 'command')
|
|
729
813
|
return nextOpenTask.value;
|
|
730
814
|
if (nextOpenTask?.kind === 'blocker')
|
|
@@ -741,7 +825,7 @@ const status = defineCommand({
|
|
|
741
825
|
return `scale verify ${latestTask.id}`;
|
|
742
826
|
if (!taskPayload.reviewEvidenceIds?.length || taskPayload.reviewPassed !== true)
|
|
743
827
|
return `scale review ${latestTask.id}`;
|
|
744
|
-
if (!
|
|
828
|
+
if (!taskShipped)
|
|
745
829
|
return `scale ship ${latestTask.id}`;
|
|
746
830
|
return 'scale evidence list';
|
|
747
831
|
})();
|
|
@@ -759,6 +843,11 @@ const status = defineCommand({
|
|
|
759
843
|
evidenceIds: taskPayload?.verificationEvidenceIds ?? [],
|
|
760
844
|
reviewPassed: taskPayload?.reviewPassed,
|
|
761
845
|
reviewEvidenceIds: taskPayload?.reviewEvidenceIds ?? [],
|
|
846
|
+
shipPassed: taskPayload?.shipPassed,
|
|
847
|
+
shippedAt: taskPayload?.shippedAt,
|
|
848
|
+
shipMode: taskPayload?.shipMode,
|
|
849
|
+
shipCommitHash: taskPayload?.shipCommitHash,
|
|
850
|
+
shipDeploymentRecordId: taskPayload?.shipDeploymentRecordId,
|
|
762
851
|
} : null,
|
|
763
852
|
},
|
|
764
853
|
recentEvidence: latestEvidence.map(record => ({
|
|
@@ -1159,6 +1248,7 @@ const aiOsStatusCommand = defineCommand({
|
|
|
1159
1248
|
console.log(` Context risk: ${report.intelligence.summary.contextQuality.compressionRisk}; omitted ${report.intelligence.summary.contextQuality.omittedSections} section(s), evidence warnings ${report.intelligence.summary.contextQuality.evidenceLossWarnings.length}`);
|
|
1160
1249
|
console.log(` Evaluator gates: ${report.intelligence.summary.evaluatorQuality.requiredGates}; uncertainty ${report.intelligence.summary.evaluatorQuality.averageUncertainty}`);
|
|
1161
1250
|
console.log(` Tool strategy: ${report.intelligence.summary.toolStrategyQuality.totalSteps} step(s), cost ${report.intelligence.summary.toolStrategyQuality.estimatedCostUnits}, fallback ${report.intelligence.summary.toolStrategyQuality.fallbackCoverage}`);
|
|
1251
|
+
console.log(` Agent Loop: ${report.intelligence.summary.agentLoopQuality.status}; ${report.intelligence.summary.agentLoopQuality.readySignals}/6 ready, score ${report.intelligence.summary.agentLoopQuality.score}/100`);
|
|
1162
1252
|
for (const signal of report.intelligence.signals)
|
|
1163
1253
|
console.log(` [${signal.status}] ${signal.id}: ${signal.summary}`);
|
|
1164
1254
|
for (const check of report.checks)
|
|
@@ -1184,6 +1274,7 @@ const aiOsStatusCommand = defineCommand({
|
|
|
1184
1274
|
console.log(` Context risk: ${report.intelligence.summary.contextQuality.compressionRisk}; omitted ${report.intelligence.summary.contextQuality.omittedSections} section(s), evidence warnings ${report.intelligence.summary.contextQuality.evidenceLossWarnings.length}`);
|
|
1185
1275
|
console.log(` Evaluator gates: ${report.intelligence.summary.evaluatorQuality.requiredGates}; uncertainty ${report.intelligence.summary.evaluatorQuality.averageUncertainty}`);
|
|
1186
1276
|
console.log(` Tool strategy: ${report.intelligence.summary.toolStrategyQuality.totalSteps} step(s), cost ${report.intelligence.summary.toolStrategyQuality.estimatedCostUnits}, fallback ${report.intelligence.summary.toolStrategyQuality.fallbackCoverage}`);
|
|
1277
|
+
console.log(` Agent Loop: ${report.intelligence.summary.agentLoopQuality.status}; ${report.intelligence.summary.agentLoopQuality.readySignals}/6 ready, score ${report.intelligence.summary.agentLoopQuality.score}/100`);
|
|
1187
1278
|
for (const signal of report.intelligence.signals)
|
|
1188
1279
|
console.log(` [${signal.status}] ${signal.id}: ${signal.summary}`);
|
|
1189
1280
|
for (const check of report.checks)
|