English | 简体中文
The dev-kit contains public frontend SDK materials committed with the plugin revision. Backend Java dependencies are installed by framework mvn clean install and referenced by Maven coordinates in plugin POMs. Running a plugin still requires a compatible OpenTest desktop; follow the repository first-run guide.
dev-kit.json records product version 2.5.0, frontend API opentest-frontend-2, backend API opentest-backend-2, and SHA-256 checksums for the delivered materials.
| Material | Purpose |
|---|---|
opentest-plugin-sdk-2.5.0.tgz |
Standard plugin contracts, data/reference formats, execution and chart interfaces without a Vue dependency |
opentest-plugin-ui-2.5.0.tgz |
Public Vue controls, measurement helpers, and workspace context types |
opentest-client-generated-0.1.0.tgz |
Generated project/device/measurement communication types and protocol definitions |
SDK package versions, API identifiers, plugin package versions, and contribution configVersion are separate contracts. Read FFT's installation version and configuration version from its manifest; do not copy the plugin version into SDK dependency declarations.
Frontend builds validate the frontend checksums; --backend-only does not read dev-kit. Preserve matching frontend materials. A hash detects changed bytes; it does not authenticate a publisher. Historical opentest-frontend-api material, if present, is not part of the current export manifest and is not the SDK for new plugins.
The following excerpt corresponds to FFT frontend/package.json. Paths are relative to plugins/fft-tools/frontend, within this repository:
{
"devDependencies": {
"@opentest/plugin-sdk": "file:../../../dev-kit/opentest-plugin-sdk-2.5.0.tgz",
"@opentest/plugin-ui": "file:../../../dev-kit/opentest-plugin-ui-2.5.0.tgz",
"@opentest/client-generated": "file:../../../dev-kit/opentest-client-generated-0.1.0.tgz"
}
}This is an excerpt, not a replacement for the full package file. Keep its other pinned dependencies and pnpm-lock.yaml. To run frontend checks directly, start at the plugin repository root:
Push-Location .\plugins\fft-tools\frontend
try {
corepack pnpm@10.6.5 install --frozen-lockfile
if ($LASTEXITCODE -ne 0) { throw 'Frontend dependency installation failed.' }
corepack pnpm@10.6.5 run typecheck
if ($LASTEXITCODE -ne 0) { throw 'Frontend typecheck failed.' }
corepack pnpm@10.6.5 run test
if ($LASTEXITCODE -ne 0) { throw 'Frontend tests failed.' }
corepack pnpm@10.6.5 run build
if ($LASTEXITCODE -ne 0) { throw 'Frontend build failed.' }
} finally {
Pop-Location
}Check each command's exit status before continuing. For the normal combined build, use node tools/build.mjs fft-tools instead; it propagates failures and includes Java and packaging. The frontend-only output is a library, not a standalone web server.
FFT vite.config.ts externalizes both vue and @opentest/plugin-ui:
rollupOptions: {
external: ['vue', '@opentest/plugin-ui'],
output: {
paths: {
vue: '/plugin-host/vue.mjs',
'@opentest/plugin-ui': '/plugin-host/ui.mjs'
}
}
}This is the relevant build configuration excerpt. OpenTest serves those runtime modules; Vue installed for compilation/tests must not become a second runtime copy. Obtain charts through public data objects and disposable chart handles. Do not bundle a LightningChart instance or host pages.
Different factories receive different context types:
| Context location | Use |
|---|---|
activate(context) in frontend/index.ts |
Check identity/API, register contributions, bind language, and return plugin cleanup |
createSettings(context) / createWorkspace(context) in measure entry |
Use the typed measurement context; settings receive business config and selected input IDs, workspaces receive the host's public components/state/workspace/client capabilities |
Do not assume workspace fields also exist on the activation context. The current SDK has no independent offline-analysis page entry. Consult the types delivered by @opentest/plugin-sdk / @opentest/plugin-ui and the corresponding FFT implementation. Workspace context.client.request is routed by the host, which binds the plugin identity, current project and session and checks allowed paths. Do not substitute private stores, Electron bridges, raw credentials, or another checkout's internal imports.
Each page/workspace instance owns its subscriptions and handles. Release them through the relevant dispose/unmount contract, including failed setup. Preserve cancellation and host revocation behavior; language/theme changes must not create shared mutable page instances.
First run this in the host repository's apps/backend directory with JDK 21:
mvn clean install
if ($LASTEXITCODE -ne 0) { throw 'Framework install failed.' }Then build in the plugin repository. Both use Maven's configured local repository (normally %USERPROFILE%\.m2\repository, subject to settings.xml); no JAR copying is needed. Windows and WSL Maven use different user repositories by default, so build both projects in the same environment. The host's pnpm build:backend runs package without installing artifacts into that repository, so it does not replace this install step. Stop the source backend before clean install. The host-root shortcut pnpm prepare:backend-deps installs dependencies and compiles tests but skips test execution.
For only the modules needed by plugins, run mvn -pl crydaq-dependencies,opentest-plugin-api,crydaq-dashboard-standard-processors -am clean install in that host directory. This explicitly includes the BOM and installs the parent POM and required modules.
For a custom repository, add "-Dmaven.repo.local=D:\OpenTestBuild\maven-repository" to the host install command and set $env:OPENTEST_PLUGIN_MAVEN_REPOSITORY = 'D:\OpenTestBuild\maven-repository' before running plugin scripts. Direct Maven commands must receive the same -Dmaven.repo.local; only plugin scripts read this environment variable.
FFT backend/pom.xml targets Java 21 and references installed framework dependencies by Maven coordinates, without a dev-kit/maven file repository. These are the relevant POM sections:
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.opentest.plugins</groupId>
<artifactId>opentest-fft-tools</artifactId>
<version>1.1.4</version>
<properties>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>com.opentest</groupId>
<artifactId>opentest-plugin-api</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>The project version above is an example from this revision; use the version in the actual POM and release manifest. Keep the actual POM's compiler, test dependencies, test plugin, and finalName; the excerpt does not replace them. provided means SDK classes are available for compilation and supplied by the host at runtime. Do not shade/copy those classes into the plugin JAR.
FftToolsPlugin.java registers the measurement provider, supported input purposes, initial configuration, and a passive MeasurementResultCatalog through measureResultCatalogs. FftMeasurement.java owns metadata, defaults, business validation, and selection of FftSelfSpectrumPipeline or BkFftPipeline. FftDashboardProvider.java supplies the editor and result queries, and its execute(ExecutionContext) prepares inputs, compiles a PipelinePlan, and coordinates execution. Nodes call public algorithm services; device acquisition and persistence facilities remain host responsibilities.
Historical WAV replay and recalculation use the recorded input purposes of FftDashboardProvider; the host reads files, binds channels, and delivers data. Analysis catalogs declare metadata without independent offline task factories. The old offline execution and AnalysisServices APIs have been removed; computation uses public algorithm services such as AlgorithmService.
From the plugin repository root, after preparing tools as described in the root README:
node tools/build.mjs fft-toolsThe full command validates dev-kit, installs frozen frontend dependencies, typechecks/tests/builds, runs Java tests and packaging, then creates .otplugin. Both --frontend-only and --backend-only skip archive creation and require JAVA_HOME; frontend builds validate the frontend kit, while backend-only builds do not read it. node tools/package.mjs fft-tools only repackages existing matching outputs. See the root README for commands and runtime installation.
The following is a frontend SDK maintainer operation. After Java API changes, rerun framework mvn clean install and rebuild plugins. When frontend interfaces change:
- Verify host implementation and public TypeScript/Java contracts together. Prepare the dependencies needed by the frontend exporter.
- From the host repository root, export the frontend kit to an explicit destination. The destination below is an example absolute path; the projects need no common parent directory.
$devKitDestination = 'D:\PluginDevelopment\opentest-plugins\dev-kit'
node tools/export-plugin-dev-kit.mjs $devKitDestination- In the plugin project, inspect
dev-kit.json, file versions and checksums together. Default export and--frontend-onlyupdate all three frontend packages and the manifest.--public-frontend-onlyupdates public packages only and must be followed by a complete frontend export. Preserve/reconcile these bilingual usage documents if the exporter rewrites its README. - Update affected frontend dependency paths if versions changed. In
plugins/fft-tools/frontend, runcorepack pnpm@10.6.5 install --no-frozen-lockfileto update the lockfile for the approved material change; review that diff and commit the matching materials/lockfile together. Do not use this command to conceal an unexplained first-clone integrity failure. - Recompile the Java plugin and run the full FFT build. Install into a matching host and verify actual operations. Do not combine old binaries with new declarations or claim runtime compatibility from compilation alone.
For ordinary business/UI changes, keep the existing dev-kit. See the development guide for creating a plugin and the root troubleshooting table for checksum, dependency, authorization and device problems.