@timekast/factory 1.18.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,7 @@ import { applyPlan, defaultBackupDir, validateStagedManifest } from '../lib/atom
36
36
  import { CLIError } from '../lib/cli-error.js';
37
37
  import { CLAUDE_MD_FILE, PROFILES } from '../lib/constants.js';
38
38
  import { hasLockfile, writeInitialLockfile } from '../lib/lockfile.js';
39
- import { detectProfile, insertFactoryUpdateScript, } from '../lib/package-json.js';
39
+ import { detectProfile, emptyShippedE2EPort, insertFactoryUpdateScript, } from '../lib/package-json.js';
40
40
  import { runPreflight } from '../lib/preflight.js';
41
41
  import { detectRepo } from '../lib/repo-detection.js';
42
42
  import { downloadProfileTarball, stageProfileTarball } from '../lib/unpack.js';
@@ -85,6 +85,7 @@ export async function runAdd(flags = { core: false, full: false }) {
85
85
  mineAll: false,
86
86
  resume: false,
87
87
  verify: false,
88
+ dryRun: false,
88
89
  commit: false,
89
90
  noCommit: false,
90
91
  // A legacy `add` redirect is never a beta channel operation.
@@ -162,6 +163,10 @@ export async function runAdd(flags = { core: false, full: false }) {
162
163
  if (existsSync(pkgPath)) {
163
164
  try {
164
165
  scriptAction = insertFactoryUpdateScript(pkgPath).action;
166
+ // Same maintenance `update` does: a repo that adopts the brain now gets the shipped
167
+ // `ports.e2e: 3006` emptied here, instead of waiting for a later `factory update`.
168
+ // Conditional — a port the dev chose is never touched.
169
+ emptyShippedE2EPort(pkgPath);
165
170
  }
166
171
  catch {
167
172
  scriptAction = 'none'; // invalid package.json — skip the alias, brain still installed