mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-19 19:13:31 -04:00
a9ae1a6778
Matrix Protocol: - docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS - src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation - docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local) MCP Server Integration: - docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs - docs/mcp-curiosity-mapping.md: Gap-to-capability mapping Node Sync Architecture: - src/services/node-sync-service.ts: WebSocket peer sync + presence detection - src/services/node-sync-service.test.ts: Unit tests - docs/node-sync-architecture.md: Architecture docs Triad Resilience: - scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity - docs/triad-resilience.md: Recovery procedures - .secure/deployment-logs/README.md: Schema v2 - skills/triad-heartbeat/SKILL.md: Corruption check integration NPM Publish Workflow: - scripts/npm-publish.mjs: version, changelog, validate, publish, rollback - .github/workflows/npm-publish.yml: GitHub Actions with provenance - docs/npm-publish-guide.md: Complete documentation All deliverables tested in Docker before production.
41 lines
1.4 KiB
TypeScript
Executable File
41 lines
1.4 KiB
TypeScript
Executable File
import fs from "node:fs/promises";
|
|
import path from "node:path";
|
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
|
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
export function getA2uiPaths(env = process.env) {
|
|
const srcDir = env.OPENCLAW_A2UI_SRC_DIR ?? path.join(repoRoot, "src", "canvas-host", "a2ui");
|
|
const outDir = env.OPENCLAW_A2UI_OUT_DIR ?? path.join(repoRoot, "dist", "canvas-host", "a2ui");
|
|
return { srcDir, outDir };
|
|
}
|
|
|
|
export async function copyA2uiAssets({ srcDir, outDir }: { srcDir: string; outDir: string }) {
|
|
const skipMissing = process.env.OPENCLAW_A2UI_SKIP_MISSING === "1";
|
|
try {
|
|
await fs.stat(path.join(srcDir, "index.html"));
|
|
await fs.stat(path.join(srcDir, "a2ui.bundle.js"));
|
|
} catch (err) {
|
|
const message = 'Missing A2UI bundle assets. Run "pnpm canvas:a2ui:bundle" and retry.';
|
|
if (skipMissing) {
|
|
console.warn(`${message} Skipping copy (OPENCLAW_A2UI_SKIP_MISSING=1).`);
|
|
return;
|
|
}
|
|
throw new Error(message, { cause: err });
|
|
}
|
|
await fs.mkdir(path.dirname(outDir), { recursive: true });
|
|
await fs.cp(srcDir, outDir, { recursive: true });
|
|
}
|
|
|
|
async function main() {
|
|
const { srcDir, outDir } = getA2uiPaths();
|
|
await copyA2uiAssets({ srcDir, outDir });
|
|
}
|
|
|
|
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
|
|
main().catch((err) => {
|
|
console.error(String(err));
|
|
process.exit(1);
|
|
});
|
|
}
|