Use local npm run dist for built-in plugins, remove SDK CLI dependency, and improve Tauri build/env handling#187
Use local npm run dist for built-in plugins, remove SDK CLI dependency, and improve Tauri build/env handling#187
npm run dist for built-in plugins, remove SDK CLI dependency, and improve Tauri build/env handling#187Conversation
Code Review SummaryIssues Found1. Missing directory creation in
2. Non-code plugins silently skipped
3. Ambiguous bundle selection in
4. Missing error context in
5.
Suggestions
Positive Aspects
Overall: Solid changes with minor improvements needed for robustness. The architectural shift from SDK CLI to local npm is well-executed. |
Code ReviewCritical Issues1. Missing const fs = require('fs'); // Line 2 - exists
const path = require('path'); // Line 3 - existsActually present. Disregard. 2. CI workflows removed SDK install but don't run the new plugin build 3. // OLD
const repoRoot = process.cwd();
// NEW
const { repoRoot, backendDir } = resolvePaths();
Minor Issues4. Misleading warning level in } catch (e) {
console.warn(`Failed to read manifest for ${name}:`, e);This is a recovery path (falls through to fallback), so 5. Non-code plugin warning is verbose console.warn(
`Skipping ${pluginName}: no package.json (non-code plugin; expected to provide prebuilt bundle).`
);This fires on every build for non-code plugins. Could be Suggestions
SummaryThe architectural shift is solid. Main concern is the CI workflow gap—built-in plugins won't be packaged without adding the new script invocation. The |
Code ReviewCritical Issues1. 2. Non-code plugins silently skipped (Backend/scripts/ensure-built-in-plugins.js:228-232) console.warn(`Skipping ${pluginName}: no package.json (non-code plugin; expected to provide prebuilt bundle).`);Minor Issues3. No if (process.argv.includes('--force')) {
runDistCommand(outdated.length ? outdated : findAllPlugins());
}4. Missing error context in Positive Aspects
SummaryThe architectural shift from SDK CLI to local npm is well-executed. The main concerns are the subtle behavioral change in |
|
/oc can you fix this? |
|
fatal: could not read Username for 'https://github.com': No such device or address |
Code ReviewCritical IssuesNone identified. The previous comments about missing CI steps are incorrect—both workflows correctly invoke Minor Issues
Suggestions
Positive Aspects
SummarySolid PR. The architectural shift from SDK CLI to local npm is well-implemented with proper error handling. The minor issues above are polish suggestions rather than blockers. |
|
/oc can you fix this? |
- Added `--force` rebuild plus docs. Co-authored-by: Jordonbc <Jordonbc@users.noreply.github.com>
|
Plugin Bundles
Testing
Next steps:
|
|
User opencode-agent[bot] does not have write permissions |
1 similar comment
|
User opencode-agent[bot] does not have write permissions |
Code ReviewCritical Issues1. if (fs.existsSync(cwdTauriConfig)) {
return { repoRoot: cwdRepoRoot, backendDir: cwdBackendDir };
}
console.warn(`CWD not a repo root (no ${cwdTauriConfig}); using script location.`);2. Missing const unknownArgs = process.argv.filter(a => !a.startsWith('--') || (a !== '--force'));
if (unknownArgs.length > 1) {
console.error(`Unknown arguments: ${unknownArgs.join(', ')}`);
process.exit(1);
}Minor Issues3. Redundant 4. const timeout = new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout waiting for input')), 30000));5. Silent if (!fs.existsSync(filePath)) {
console.debug(`No local env file at ${filePath}, skipping.`);
return;
}6. if (res.error) {
console.error(`Failed to run npm dist for ${pluginName}:`, res.error);
process.exit(1);
}Positive Aspects
SummarySolid PR with well-executed architectural changes. The main concern is the silent behavior change in |






Motivation
openvcs-sdkcargo CLI and make built-in plugin packaging local to each plugin..ovcsparchives into the app bundle.Backenddirectory.Description
openvcs-sdkCLI with a Node script-based flow by addingBackend/scripts/ensure-built-in-plugins.jsimprovements and updating the Justfile to runnode Backend/scripts/ensure-built-in-plugins.jsfor plugin builds.ensure-built-in-plugins.jswithlatestSourceTime,bundleFileNameForPlugin, andcopyPackagedBundleshelpers, added detection to skip non-code plugins, switched packaging to runnpm run distinside each plugin, and copy produced.ovcspfiles intotarget/openvcs/built-in-plugins.cargo install --locked openvcs-sdk --bin cargo-openvcssteps from the GitHub workflowsnightly.ymlandpublish-stable.yml.scripts/tauri-build.jsby addingloadLocalEnv,normalizeSigningKey,promptHidden, andresolvePaths, reading.env.tauri.local, supportingTAURI_SIGNING_PRIVATE_KEY_FILE, prompting for the signing password if needed, settingNO_STRIP, and runningcargo tauri buildfrom theBackenddirectory.Testing
cargo test --workspaceand the frontend checkscd Frontend && npm exec tsc -- -p tsconfig.json --noEmitandcd Frontend && npx vitest run, and they completed successfully.just build pluginsnow runsnode Backend/scripts/ensure-built-in-plugins.jsand that the script exits non-zero when plugin packaging fails to produce.ovcsparchives (behavior exercised by unit/manual runs during development).Codex Task