Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 0 additions & 11 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ import { createRateLimiter, createRateLimitMiddleware } from './src/core/rate-li
import * as browser from './src/browser/index.js';

import { ensureMemoryRuntimeReady, hasSoulFile } from './src/memory/runtime.js';
import { refreshHostToolchain } from './src/memory/host-toolchain.js';

import { loadLocales } from './src/core/i18n.js';
import {
Expand Down Expand Up @@ -196,16 +195,6 @@ try {
console.warn('[jaw:memory-init]', (e as Error).message);
}

// #299: resolve the host toolchain ONCE per start, before the first AGENTS.md
// is generated below. Not inside the prompt builder — regenerateB() runs on
// every agent spawn, and probing there would put subprocess lookups in a hot
// path. A failed scan keeps whatever the previous run learned.
try {
refreshHostToolchain();
} catch (e: unknown) {
console.warn('[jaw:toolchain]', (e as Error).message);
}

// Phase 3.1: safe → auto 강제 마이그레이션 (기존 사용자 대응)
if (settings["permissions"] === 'safe') {
settings["permissions"] = 'auto';
Expand Down
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
Loading