Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/memory/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ import {
} from './shared.js';
import { reindexAll, reindexSingleFile } from './indexing.js';
import { launchSpec } from '../core/exec-name.js';
import {
type HostToolchainProfile,
renderHostToolchainManagedBlock,
resolveHostToolchainProfile,
} from './host-toolchain.js';

function slug(value: string) {
return value
Expand Down Expand Up @@ -382,7 +387,7 @@ function tryExec(bin: string, args: string[]): string {
}

/** Scan hardware + project root info to seed profile when no legacy data exists */
export function scanSystemProfile(): string {
export function scanSystemProfile(hostToolchain?: HostToolchainProfile): string {
const lines: string[] = [];

// Hardware
Expand All @@ -407,6 +412,14 @@ export function scanSystemProfile(): string {
const bunVer = tryExec('bun', ['--version']);
if (bunVer) lines.push(`- bun: ${bunVer}`);

// Durable host capabilities are a managed profile section. Discovery is
// intentionally tool-specific and stores only absolute paths, safe version
// tokens, provenance labels, and verification results.
lines.push('');
lines.push(renderHostToolchainManagedBlock(hostToolchain ?? resolveHostToolchainProfile(null, {
workingDir: settings["workingDir"] || process.cwd(),
})));

// Working directory / project root
const wd = settings["workingDir"] || process.cwd();
lines.push('');
Expand Down
Loading