First leaf-migration tranche of epic #1267 (after T0 #1268). Migrate the via-core callers of the two leaves T0 created to import from the leaf modules directly, and stop core re-exporting their symbols: - checkAgentsInstalled: docs.cts, verify.cts, init.cts -> agent-install-check.cjs - gitWorktreeInfoInternal: init.cts -> git-base-branch.cjs - getAgentsDir had no external via-core caller (internal to the leaf) core no longer re-exports getAgentsDir / checkAgentsInstalled / gitWorktreeInfoInternal; the now-unused agent-install-check + git-base-branch requires are dropped from core; the shim-identity assertions for these are deleted (behaviour tests retained). Convergence lint stays green (0 new). No behaviour change. Closes #1277 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
10
src/core.cts
10
src/core.cts
@@ -51,10 +51,6 @@ const {
|
||||
import phaseLocatorModule = require('./phase-locator.cjs');
|
||||
const { searchPhaseInDir, findPhaseInternal, getArchivedPhaseDirs } = phaseLocatorModule;
|
||||
import { findProjectRoot } from './project-root.cjs';
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
import agentInstallCheck = require('./agent-install-check.cjs');
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
import gitBaseBranch = require('./git-base-branch.cjs');
|
||||
|
||||
// ─── Config Loader Module (extracted from core, ADR-857 phase 2e / #885) ─────
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
@@ -123,8 +119,7 @@ const {
|
||||
|
||||
// ─── Agent installation validation (#1371) ───────────────────────────────────
|
||||
// getAgentsDir and checkAgentsInstalled moved to agent-install-check.cjs (T0 #1268).
|
||||
// The destructured bindings above (from agentInstallCheck) make them available to
|
||||
// core-internal callers; core.cjs re-exports both symbols by reference for back-compat.
|
||||
// Re-exports removed in T1 (#1277); callers import directly from agent-install-check.cjs.
|
||||
|
||||
// ─── Model alias resolution ───────────────────────────────────────────────────
|
||||
// RUNTIME_OVERRIDE_TIERS, _warnedConfigKeys, _warnUnknownProfileOverrides, and
|
||||
@@ -192,7 +187,6 @@ export = {
|
||||
resolveModelPolicy,
|
||||
KNOWN_PROVIDERS,
|
||||
pathExistsInternal,
|
||||
gitWorktreeInfoInternal: gitBaseBranch.gitWorktreeInfoInternal,
|
||||
generateSlugInternal,
|
||||
getMilestoneInfo,
|
||||
getMilestonePhaseFilter,
|
||||
@@ -219,8 +213,6 @@ export = {
|
||||
filterSummaryFiles,
|
||||
getPhaseFileStats,
|
||||
readSubdirectories,
|
||||
getAgentsDir: agentInstallCheck.getAgentsDir,
|
||||
checkAgentsInstalled: agentInstallCheck.checkAgentsInstalled,
|
||||
timeAgo,
|
||||
pruneOrphanedWorktrees: worktreeSafety.pruneOrphanedWorktrees,
|
||||
inspectWorktreeHealth,
|
||||
|
||||
@@ -14,7 +14,10 @@ import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
import core = require('./core.cjs');
|
||||
const { output, loadConfig, resolveModelInternal, pathExistsInternal, toPosixPath, checkAgentsInstalled } = core;
|
||||
const { output, loadConfig, resolveModelInternal, pathExistsInternal, toPosixPath } = core;
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
import agentInstallCheck = require('./agent-install-check.cjs');
|
||||
const { checkAgentsInstalled } = agentInstallCheck;
|
||||
import { platformReadSync } from './shell-command-projection.cjs';
|
||||
|
||||
// ─── Constants ────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -25,6 +25,12 @@ import { validatePath, loadTrustedGlobalRoots } from './security.cjs';
|
||||
import { getGlobalSkillDir, getGlobalSkillDisplayPath, getGlobalSkillsBase } from './runtime-homes.cjs';
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports -- frontmatter.cjs is an export= CommonJS module
|
||||
import frontmatterMod = require('./frontmatter.cjs');
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports -- agent-install-check.cjs is an export= CommonJS module
|
||||
import agentInstallCheck = require('./agent-install-check.cjs');
|
||||
const { checkAgentsInstalled } = agentInstallCheck;
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports -- git-base-branch.cjs is an export= CommonJS module
|
||||
import gitBaseBranch = require('./git-base-branch.cjs');
|
||||
const { gitWorktreeInfoInternal } = gitBaseBranch;
|
||||
|
||||
const {
|
||||
loadConfig,
|
||||
@@ -34,7 +40,6 @@ const {
|
||||
findPhaseInternal,
|
||||
getRoadmapPhaseInternal,
|
||||
pathExistsInternal,
|
||||
gitWorktreeInfoInternal,
|
||||
generateSlugInternal,
|
||||
getMilestoneInfo,
|
||||
getMilestonePhaseFilter,
|
||||
@@ -44,7 +49,6 @@ const {
|
||||
toPosixPath,
|
||||
output,
|
||||
error,
|
||||
checkAgentsInstalled,
|
||||
phaseTokenMatches,
|
||||
} = core;
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ import { PACKAGE_NAME } from './package-identity.cjs';
|
||||
import { formatGsdSlash, resolveRuntime } from './runtime-slash.cjs';
|
||||
import { detectSchemaFiles, checkSchemaDrift } from './schema-detect.cjs';
|
||||
import { isCanonicalPlanningFile } from './artifacts.cjs';
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports -- agent-install-check.cjs is an export= CommonJS module
|
||||
import agentInstallCheck = require('./agent-install-check.cjs');
|
||||
const { checkAgentsInstalled } = agentInstallCheck;
|
||||
|
||||
const {
|
||||
loadConfig,
|
||||
@@ -40,7 +43,6 @@ const {
|
||||
extractCurrentMilestone,
|
||||
output,
|
||||
error,
|
||||
checkAgentsInstalled,
|
||||
CONFIG_DEFAULTS,
|
||||
inspectWorktreeHealth,
|
||||
} = core;
|
||||
|
||||
Reference in New Issue
Block a user