Anchor source reconcile under scheduled tasks
This commit is contained in:
parent
de223f0fff
commit
1578ad261f
3 changed files with 20 additions and 6 deletions
|
|
@ -242,12 +242,17 @@ function Invoke-SourceRepoReconcile {
|
|||
)
|
||||
|
||||
$tsxCommand = Join-Path $repoRoot "node_modules\.bin\tsx.cmd"
|
||||
$reconcileScript = Join-Path $repoRoot "scripts\reconcile-source-repos.ts"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $tsxCommand)) {
|
||||
throw "Local tsx launcher is missing at $tsxCommand."
|
||||
}
|
||||
|
||||
$arguments = @("scripts/reconcile-source-repos.ts", "--json")
|
||||
if (-not (Test-Path -LiteralPath $reconcileScript)) {
|
||||
throw "Source repo reconcile script is missing at $reconcileScript."
|
||||
}
|
||||
|
||||
$arguments = @($reconcileScript, "--json")
|
||||
|
||||
if ($CheckOnly) {
|
||||
$arguments += "--check"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import "dotenv/config";
|
||||
|
||||
import { spawn } from "node:child_process";
|
||||
import { join } from "node:path";
|
||||
import { dirname, join, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { config as loadDotEnv } from "dotenv";
|
||||
|
||||
import { loadConfig } from "@voidbot/config";
|
||||
import { FileSourceDocumentArchiveRepository } from "@voidbot/rag";
|
||||
|
|
@ -39,7 +40,14 @@ interface ReconcileSummary {
|
|||
launchedRepos: string[];
|
||||
}
|
||||
|
||||
const scriptPath = fileURLToPath(import.meta.url);
|
||||
const scriptDir = dirname(scriptPath);
|
||||
const voidbotRoot = resolve(scriptDir, "..");
|
||||
|
||||
async function main(): Promise<void> {
|
||||
process.chdir(voidbotRoot);
|
||||
loadDotEnv({ path: join(voidbotRoot, ".env") });
|
||||
|
||||
if (!process.env.DISCORD_OWNER_ID) {
|
||||
process.env.DISCORD_OWNER_ID = "__source_reconcile__";
|
||||
}
|
||||
|
|
@ -82,7 +90,7 @@ async function main(): Promise<void> {
|
|||
};
|
||||
|
||||
if (!options.checkOnly) {
|
||||
const hookSummary = await installSourceIndexPushHooks(process.cwd(), selectedRepos);
|
||||
const hookSummary = await installSourceIndexPushHooks(voidbotRoot, selectedRepos);
|
||||
hookInstall = {
|
||||
installed: hookSummary.installed,
|
||||
updated: hookSummary.updated,
|
||||
|
|
@ -105,7 +113,7 @@ async function main(): Promise<void> {
|
|||
if (!options.checkOnly && reposToIndex.length > 0) {
|
||||
if (options.detached) {
|
||||
for (const repo of reposToIndex) {
|
||||
await launchDetachedRepoIndex(process.cwd(), repo.repoName);
|
||||
await launchDetachedRepoIndex(voidbotRoot, repo.repoName);
|
||||
launchedRepos.push(repo.repoName);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -16,3 +16,4 @@
|
|||
{"ts":"2026-05-01T16:56:41Z","type":"research","status":"ok","note":"Documented the state-distribution and prompt-projection architecture for Aetheria agents: core variables should live as culture-shaped latent state with history transforms and per-agent perceived overlays, while prompts are temporary projections of perceived state. Volatility, attachment-seeking, and distance-seeking are first-class dimensions in the rebuild, not later garnish."}
|
||||
{"ts":"2026-05-01T17:24:56Z","type":"architecture","status":"ok","note":"Moved deeper personality, culture, prompt-projection, and Aetheria persistent-world design notes into the sibling Ghostlight repo so VoidBot remains a consumer instead of the long-term home for that research."}
|
||||
{"ts":"2026-05-02T11:48:55Z","type":"implementation","status":"ok","note":"Source repo indexing now auto-reconciles during startup and watchdog runs, and the source archive is sharded by repo behind a manifest because the old monolithic source-documents.json hit real size limits and broke incremental writes."}
|
||||
{"ts":"2026-05-02T14:05:54Z","type":"implementation","status":"ok","note":"Scheduled-task helpers must anchor repo-relative scripts, dotenv loading, and path resolution to the VoidBot root; relying on cwd keeps sending System32 in to eat them."}
|
||||
|
|
|
|||
Loading…
Reference in a new issue