@alecsibilia/luca 13.0.0-alpha.13 → 13.0.0-alpha.14

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.
Files changed (41) hide show
  1. package/dist/chunks/branch.mjs +8 -8
  2. package/dist/chunks/checks.mjs +8 -8
  3. package/dist/chunks/claim-verify.mjs +1 -1
  4. package/dist/chunks/classify.mjs +1 -1
  5. package/dist/chunks/confidence.mjs +8 -8
  6. package/dist/chunks/hook.mjs +17 -7
  7. package/dist/chunks/init.mjs +3 -3
  8. package/dist/chunks/luca-gitignore.mjs +2 -2
  9. package/dist/chunks/phase.mjs +8 -8
  10. package/dist/chunks/plan.mjs +8 -8
  11. package/dist/chunks/pr-review.mjs +8 -8
  12. package/dist/chunks/preferences.mjs +8 -8
  13. package/dist/chunks/repair.mjs +1 -1
  14. package/dist/chunks/repo.mjs +8 -8
  15. package/dist/chunks/retro.mjs +6 -6
  16. package/dist/chunks/roadmap.mjs +8 -8
  17. package/dist/chunks/rules.mjs +6 -6
  18. package/dist/chunks/state.mjs +8 -8
  19. package/dist/chunks/stray-local-install.mjs +1 -1
  20. package/dist/chunks/telemetry.mjs +1 -1
  21. package/dist/chunks/todo.mjs +8 -8
  22. package/dist/chunks/vault-init.mjs +2 -2
  23. package/dist/chunks/verification.mjs +6 -6
  24. package/dist/chunks/workflow.mjs +8 -8
  25. package/dist/claude/.claude/hooks/context-refresher.ts +2 -1
  26. package/dist/claude/.claude/hooks/continuation-messages.ts +2 -1
  27. package/dist/claude/.claude/hooks/pipeline-guard.ts +2 -1
  28. package/dist/index.mjs +1 -1
  29. package/dist/shared/{luca.DpeRJDkV.mjs → luca.92gxSuz7.mjs} +1 -1
  30. package/dist/shared/{luca.D_sXMXRZ.mjs → luca.B4XKevaZ.mjs} +4 -4
  31. package/dist/shared/{luca.DYSBzNqG.mjs → luca.BRGd51XD.mjs} +1 -1
  32. package/dist/shared/{luca.BKflEntw.mjs → luca.Bg_VHA2r.mjs} +1 -1
  33. package/dist/shared/{luca.B-u10ROM.mjs → luca.C466HI-y.mjs} +1 -1
  34. package/dist/shared/{luca.CbIDM-ci.mjs → luca.CZfqdBsl.mjs} +6 -6
  35. package/dist/shared/{luca.BKsihSAK.mjs → luca.D-08LKzR.mjs} +1 -1
  36. package/dist/shared/{luca.Dmpy9SlE.mjs → luca.D1iTA_aN.mjs} +2 -2
  37. package/dist/shared/{luca.3OdFfCDq.mjs → luca.DBcPn3_9.mjs} +2 -2
  38. package/dist/shared/{luca.BDFQnOdW.mjs → luca.DnzyY7Vh.mjs} +28 -5
  39. package/dist/shared/{luca.B15qErL2.mjs → luca.OxvM40dI.mjs} +1 -1
  40. package/dist/shared/{luca.YEUgoPFK.mjs → luca.S_KvKqlx.mjs} +2 -2
  41. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { t as lucaBranchGuardTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { t as lucaBranchGuardTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const guardCommand = defineCommand({
23
23
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { s as lucaChecksRunTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { s as lucaChecksRunTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const runCommand = defineCommand({
23
23
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import { resolve } from 'pathe';
3
- import { v as verifyFile } from '../shared/luca.BDFQnOdW.mjs';
3
+ import { v as verifyFile } from '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import { C as ClassifyComplexityInputSchema } from '../shared/luca.BDFQnOdW.mjs';
2
+ import { C as ClassifyComplexityInputSchema } from '../shared/luca.DnzyY7Vh.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'node:path';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.BDFQnOdW.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.B15qErL2.mjs';
2
+ import '../shared/luca.DnzyY7Vh.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.OxvM40dI.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,18 +8,18 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as readConfidenceJournal, b as renderConfidenceJournalMarkdown, g as getConfidenceSummary } from '../shared/luca.YEUgoPFK.mjs';
11
+ import { r as readConfidenceJournal, b as renderConfidenceJournalMarkdown, g as getConfidenceSummary } from '../shared/luca.S_KvKqlx.mjs';
12
12
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
13
13
  import 'zod';
14
- import { v as lucaConfidenceLogTool } from '../shared/luca.CbIDM-ci.mjs';
15
- import '../shared/luca.DpeRJDkV.mjs';
16
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
14
+ import { v as lucaConfidenceLogTool } from '../shared/luca.CZfqdBsl.mjs';
15
+ import '../shared/luca.92gxSuz7.mjs';
16
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
17
17
  import 'node:os';
18
- import '../shared/luca.BKflEntw.mjs';
18
+ import '../shared/luca.Bg_VHA2r.mjs';
19
19
  import 'consola';
20
20
  import '../shared/luca.BAqmbI4n.mjs';
21
21
  import '../shared/luca.CQ3g1xrD.mjs';
22
- import '../shared/luca.Dmpy9SlE.mjs';
22
+ import '../shared/luca.D1iTA_aN.mjs';
23
23
 
24
24
  function selectConfidenceGateActions(entries) {
25
25
  const auto = [];
@@ -1,18 +1,18 @@
1
1
  import { defineCommand } from 'citty';
2
- import { c as coarsePhaseOf, t as toLucaRelative, a as classifyWritePath, b as TMP_PATH_PATTERN, A as AUDIT_PATH_PATTERN, W as WAVE_FILE_RE } from '../shared/luca.BDFQnOdW.mjs';
3
- import { l as loadCurrentState, S as STEP_ARTIFACTS, r as resolveActiveSlug } from '../shared/luca.B15qErL2.mjs';
2
+ import { c as coarsePhaseOf, t as toLucaRelative, a as classifyWritePath, b as TMP_PATH_PATTERN, A as AUDIT_PATH_PATTERN, W as WAVE_FILE_RE } from '../shared/luca.DnzyY7Vh.mjs';
3
+ import { l as loadCurrentState, S as STEP_ARTIFACTS, r as resolveActiveSlug } from '../shared/luca.OxvM40dI.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
7
- import { p as phasePathFor } from '../shared/luca.BKflEntw.mjs';
7
+ import { p as phasePathFor } from '../shared/luca.Bg_VHA2r.mjs';
8
8
  import 'node:crypto';
9
9
  import 'node:module';
10
10
  import 'node:url';
11
11
  import 'node:child_process';
12
+ import { tmpdir } from 'node:os';
12
13
  import { parse } from 'shell-quote';
13
- import { l as lucaStateClaimOwnerTool } from '../shared/luca.DpeRJDkV.mjs';
14
+ import { l as lucaStateClaimOwnerTool } from '../shared/luca.92gxSuz7.mjs';
14
15
  import 'zod';
15
- import 'node:os';
16
16
 
17
17
  const STAGE_TOOL_MATRIX = {
18
18
  IDLE: {
@@ -572,6 +572,9 @@ async function handleStageGateHook(opts) {
572
572
  const sessionId = parsed.session_id ?? parsed.sessionId;
573
573
  const cwd = opts.cwd ?? process.cwd();
574
574
  const homedir = opts.homedir ?? process.env.HOME;
575
+ const tmpdirs = opts.tmpdirs ?? [process.env.TMPDIR, tmpdir()].filter(
576
+ (d) => Boolean(d)
577
+ );
575
578
  const state = await loadCurrentState({ cwd });
576
579
  if (toolName === "Bash" && sessionId && state.ownerSessionId !== sessionId && isStateAdvanceCommand(
577
580
  toolInput?.command ?? ""
@@ -600,9 +603,14 @@ async function handleStageGateHook(opts) {
600
603
  return { exitCode: 0, toolName, toolInput, decision: "allow" };
601
604
  }
602
605
  const relTarget = toLucaRelative(targetPath, cwd);
603
- const pc = classifyWritePath(targetPath, { homedir, cwd });
606
+ const pc = classifyWritePath(targetPath, { homedir, cwd, tmpdirs });
604
607
  if (pc.class === "denied") {
605
608
  pathBlockReason = `${toolName} to '${targetPath}' is always denied: ${pc.reason ?? "forbidden path"}`;
609
+ } else if (pc.class === "ephemeral") {
610
+ log(
611
+ `stage-gate: ${toolName} to '${targetPath}' is ephemeral scratch \u2014 allowing`
612
+ );
613
+ return { exitCode: 0, toolName, toolInput, decision: "allow" };
606
614
  } else if (pc.class === "planning-general" || pc.class === "planning-audit") {
607
615
  const gate = artifactPathGate(relTarget, state.pipelineStep, state);
608
616
  if (gate.kind === "block") {
@@ -630,7 +638,7 @@ async function handleStageGateHook(opts) {
630
638
  pathBlockReason = `Bash command is always denied: ${bashResult.reason ?? "forbidden command"}`;
631
639
  } else {
632
640
  for (const target of bashResult.targetPaths) {
633
- const pc = classifyWritePath(target, { homedir });
641
+ const pc = classifyWritePath(target, { homedir, tmpdirs });
634
642
  if (pc.class === "denied") {
635
643
  pathBlockReason = `Bash writes to denied path '${target}': ${pc.reason ?? "forbidden path"}`;
636
644
  break;
@@ -779,6 +787,8 @@ function pathClassToToolCategory(c) {
779
787
  return "planning-write-general";
780
788
  case "planning-audit":
781
789
  return "planning-write-audit";
790
+ case "ephemeral":
791
+ throw new Error("pathClassToToolCategory called with ephemeral");
782
792
  case "denied":
783
793
  throw new Error("pathClassToToolCategory called with denied");
784
794
  }
@@ -1,17 +1,17 @@
1
1
  import * as p from '@clack/prompts';
2
2
  import { defineCommand, runMain } from 'citty';
3
3
  import { join } from 'pathe';
4
- import { w as writeProjectSkeleton } from '../shared/luca.DYSBzNqG.mjs';
4
+ import { w as writeProjectSkeleton } from '../shared/luca.BRGd51XD.mjs';
5
5
  import { existsSync, statSync, chmodSync } from 'node:fs';
6
6
  import { readFile, writeFile, rename, unlink, mkdir, readdir, copyFile } from 'node:fs/promises';
7
7
  import { homedir } from 'node:os';
8
8
  import { join as join$1, dirname, delimiter } from 'node:path';
9
9
  import { d as defaultClaudeHome, a as defaultAntigravityHome, r as resolveBundledArtifactsForHooks, i as installSkills } from '../shared/luca.41dcdyd6.mjs';
10
- import { d as detectProjectContext, s as suggestVaultName, a as autoCreateVault, w as writeVaultConfig } from '../shared/luca.B-u10ROM.mjs';
10
+ import { d as detectProjectContext, s as suggestVaultName, a as autoCreateVault, w as writeVaultConfig } from '../shared/luca.C466HI-y.mjs';
11
11
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
12
12
  import { M as MuninndbInstallResultSchema, r as resolvePlatformTarget, g as getLucaHomePaths, a as MUNINNDB_BINARY_NAME, b as getCommonBinaryPaths, c as resolveMuninndbPort, d as checkMuninndbService, e as MuninndbServiceStatusSchema, w as waitForMuninndbHealthy, f as ensureLucaHome, h as checkMuninndbBinary } from '../shared/luca.BfjhRHhj.mjs';
13
13
  import { c as checkPrerequisites, p as promptBunInstall } from '../shared/luca.DTomPq7I.mjs';
14
- import '../shared/luca.BDFQnOdW.mjs';
14
+ import '../shared/luca.DnzyY7Vh.mjs';
15
15
  import 'zod';
16
16
  import 'node:child_process';
17
17
  import 'node:crypto';
@@ -1,11 +1,11 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { readFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { e as ensureLucaGitignore, L as LUCA_GITIGNORE_ENTRIES } from '../shared/luca.DYSBzNqG.mjs';
4
+ import { e as ensureLucaGitignore, L as LUCA_GITIGNORE_ENTRIES } from '../shared/luca.BRGd51XD.mjs';
5
5
  import 'node:os';
6
6
  import 'pathe';
7
7
  import 'node:url';
8
- import '../shared/luca.BDFQnOdW.mjs';
8
+ import '../shared/luca.DnzyY7Vh.mjs';
9
9
  import 'zod';
10
10
  import 'node:child_process';
11
11
  import 'node:crypto';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { c as lucaPhaseCurrentTool, d as lucaPhaseAdvanceTool, e as lucaPhaseArchiveTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { c as lucaPhaseCurrentTool, d as lucaPhaseAdvanceTool, e as lucaPhaseArchiveTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const currentCommand = defineCommand({
23
23
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as lucaPlanLintTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { f as lucaPlanLintTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const lintCommand = defineCommand({
23
23
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { o as lucaPrReviewDetectConvergenceTool, p as lucaPrReviewFilterStaleTool, q as lucaPrReviewRegressionCheckTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { o as lucaPrReviewDetectConvergenceTool, p as lucaPrReviewFilterStaleTool, q as lucaPrReviewRegressionCheckTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const filterStaleCommand = defineCommand({
23
23
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { i as lucaPreferencesReadTool, j as lucaPreferencesWriteTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { i as lucaPreferencesReadTool, j as lucaPreferencesWriteTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const readCommand = defineCommand({
23
23
  meta: {
@@ -2,7 +2,7 @@ import { defineCommand } from 'citty';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { readFile, rm } from 'node:fs/promises';
4
4
  import { join } from 'node:path';
5
- import { l as lucaStateSchema } from '../shared/luca.BDFQnOdW.mjs';
5
+ import { l as lucaStateSchema } from '../shared/luca.DnzyY7Vh.mjs';
6
6
  import 'node:crypto';
7
7
  import 'node:module';
8
8
  import 'node:url';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as lucaRepoCleanupApplyTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { r as lucaRepoCleanupApplyTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const cleanupApplyCommand = defineCommand({
23
23
  meta: {
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.BDFQnOdW.mjs';
2
+ import '../shared/luca.DnzyY7Vh.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'node:path';
@@ -7,14 +7,14 @@ import 'node:crypto';
7
7
  import 'node:module';
8
8
  import 'node:url';
9
9
  import 'node:child_process';
10
- import { a as analyzeRun, g as gatherRunArtifacts, r as renderPostmortemMarkdown, c as computePostmortemExitCode } from '../shared/luca.D_sXMXRZ.mjs';
11
- import { l as listRuns } from '../shared/luca.YEUgoPFK.mjs';
10
+ import { a as analyzeRun, g as gatherRunArtifacts, r as renderPostmortemMarkdown, c as computePostmortemExitCode } from '../shared/luca.B4XKevaZ.mjs';
11
+ import { l as listRuns } from '../shared/luca.S_KvKqlx.mjs';
12
12
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
13
13
  import 'zod';
14
14
  import 'node:os';
15
- import '../shared/luca.Dmpy9SlE.mjs';
16
- import '../shared/luca.BKflEntw.mjs';
17
- import '../shared/luca.BKsihSAK.mjs';
15
+ import '../shared/luca.D1iTA_aN.mjs';
16
+ import '../shared/luca.Bg_VHA2r.mjs';
17
+ import '../shared/luca.D-08LKzR.mjs';
18
18
  import 'pathe';
19
19
  import 'consola';
20
20
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { g as lucaRoadmapReadTool, h as lucaRoadmapCreateTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { g as lucaRoadmapReadTool, h as lucaRoadmapCreateTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const readCommand = defineCommand({
23
23
  meta: {
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import { join as join$1 } from 'pathe';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import { existsSync, readdirSync, statSync, readFileSync } from 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import { isAbsolute, resolve, join, extname } from 'node:path';
@@ -8,14 +8,14 @@ import 'node:crypto';
8
8
  import { createRequire } from 'node:module';
9
9
  import { pathToFileURL } from 'node:url';
10
10
  import 'node:child_process';
11
- import { a as analyzeRun, g as gatherRunArtifacts } from '../shared/luca.D_sXMXRZ.mjs';
12
- import { l as listRuns } from '../shared/luca.YEUgoPFK.mjs';
11
+ import { a as analyzeRun, g as gatherRunArtifacts } from '../shared/luca.B4XKevaZ.mjs';
12
+ import { l as listRuns } from '../shared/luca.S_KvKqlx.mjs';
13
13
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
14
14
  import 'zod';
15
15
  import 'node:os';
16
- import '../shared/luca.Dmpy9SlE.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
18
- import '../shared/luca.BKsihSAK.mjs';
16
+ import '../shared/luca.D1iTA_aN.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
+ import '../shared/luca.D-08LKzR.mjs';
19
19
  import 'consola';
20
20
 
21
21
  let tsModuleCache = void 0;
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { l as lucaStateSetCurrentPhaseTool, a as lucaStateAdvanceTool, b as lucaStateReadTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import { l as lucaStateClaimOwnerTool } from '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { l as lucaStateSetCurrentPhaseTool, a as lucaStateAdvanceTool, b as lucaStateReadTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import { l as lucaStateClaimOwnerTool } from '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const readCommand = defineCommand({
23
23
  meta: {
@@ -1,7 +1,7 @@
1
1
  import { existsSync, lstatSync } from 'node:fs';
2
2
  import { rm, writeFile, readdir, rmdir } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import '../shared/luca.BDFQnOdW.mjs';
4
+ import '../shared/luca.DnzyY7Vh.mjs';
5
5
  import 'node:crypto';
6
6
  import 'node:module';
7
7
  import 'node:url';
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import { R as RunIdSchema, L as LUCA_DIR_ROOT, T as TelemetryRecordSchema } from '../shared/luca.BDFQnOdW.mjs';
2
+ import { R as RunIdSchema, L as LUCA_DIR_ROOT, T as TelemetryRecordSchema } from '../shared/luca.DnzyY7Vh.mjs';
3
3
  import { mkdirSync, appendFileSync } from 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import { join, dirname } from 'node:path';
@@ -1,4 +1,4 @@
1
- import { d as TodoPriority } from '../shared/luca.BDFQnOdW.mjs';
1
+ import { d as TodoPriority } from '../shared/luca.DnzyY7Vh.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:fs/promises';
4
4
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:url';
8
8
  import 'node:child_process';
9
9
  import { defineCommand } from 'citty';
10
10
  import 'zod';
11
- import { k as lucaTodoUpdateTool, m as lucaTodoListTool, n as lucaTodoAddTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { k as lucaTodoUpdateTool, m as lucaTodoListTool, n as lucaTodoAddTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, b as readJsonPayload, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const addCommand = defineCommand({
23
23
  meta: {
@@ -1,5 +1,5 @@
1
1
  import { existsSync, mkdirSync } from 'node:fs';
2
- import '../shared/luca.BDFQnOdW.mjs';
2
+ import '../shared/luca.DnzyY7Vh.mjs';
3
3
  import 'node:fs/promises';
4
4
  import 'node:path';
5
5
  import { l as loadCurrentConfig } from '../shared/luca.CQ3g1xrD.mjs';
@@ -10,7 +10,7 @@ import 'node:child_process';
10
10
  import * as p from '@clack/prompts';
11
11
  import { defineCommand } from 'citty';
12
12
  import { join } from 'pathe';
13
- import { d as detectProjectContext, r as runVaultWizard, w as writeVaultConfig, b as writeApiKeyToEnv, e as ensureEnvInGitignore, v as verifyVaultConnection } from '../shared/luca.B-u10ROM.mjs';
13
+ import { d as detectProjectContext, r as runVaultWizard, w as writeVaultConfig, b as writeApiKeyToEnv, e as ensureEnvInGitignore, v as verifyVaultConnection } from '../shared/luca.C466HI-y.mjs';
14
14
  import 'zod';
15
15
  import 'node:os';
16
16
  import '../shared/luca.BZc5veeE.mjs';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.BDFQnOdW.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.B15qErL2.mjs';
2
+ import '../shared/luca.DnzyY7Vh.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.OxvM40dI.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,13 +8,13 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as readVerificationResult, a as aggregateVerificationResults } from '../shared/luca.Dmpy9SlE.mjs';
12
- import { l as listPhaseSlugs } from '../shared/luca.BKsihSAK.mjs';
11
+ import { r as readVerificationResult, a as aggregateVerificationResults } from '../shared/luca.D1iTA_aN.mjs';
12
+ import { l as listPhaseSlugs } from '../shared/luca.D-08LKzR.mjs';
13
13
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
14
- import { r as rejectUnknownFlags } from '../shared/luca.3OdFfCDq.mjs';
14
+ import { r as rejectUnknownFlags } from '../shared/luca.DBcPn3_9.mjs';
15
15
  import 'zod';
16
16
  import 'node:os';
17
- import '../shared/luca.BKflEntw.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import 'pathe';
19
19
  import 'consola';
20
20
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.BDFQnOdW.mjs';
3
+ import '../shared/luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,16 +8,16 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { u as lucaWorkflowResetTool } from '../shared/luca.CbIDM-ci.mjs';
12
- import '../shared/luca.DpeRJDkV.mjs';
13
- import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.3OdFfCDq.mjs';
11
+ import { u as lucaWorkflowResetTool } from '../shared/luca.CZfqdBsl.mjs';
12
+ import '../shared/luca.92gxSuz7.mjs';
13
+ import { r as rejectUnknownFlags, a as runWriteHandler } from '../shared/luca.DBcPn3_9.mjs';
14
14
  import 'node:os';
15
- import '../shared/luca.B15qErL2.mjs';
16
- import '../shared/luca.YEUgoPFK.mjs';
17
- import '../shared/luca.BKflEntw.mjs';
15
+ import '../shared/luca.OxvM40dI.mjs';
16
+ import '../shared/luca.S_KvKqlx.mjs';
17
+ import '../shared/luca.Bg_VHA2r.mjs';
18
18
  import '../shared/luca.BAqmbI4n.mjs';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
- import '../shared/luca.Dmpy9SlE.mjs';
20
+ import '../shared/luca.D1iTA_aN.mjs';
21
21
 
22
22
  const resetCommand = defineCommand({
23
23
  meta: {
@@ -13604,7 +13604,8 @@ var LucaArtifactKind = exports_external.enum([
13604
13604
  "milestone.audit",
13605
13605
  "telemetry.run",
13606
13606
  "archive.phase",
13607
- "tmp.handoff"
13607
+ "tmp.handoff",
13608
+ "tmp.preview"
13608
13609
  ]);
13609
13610
  var PhaseSlugSchema = exports_external.string().regex(PHASE_SLUG_RE, {
13610
13611
  message: 'Phase slug must be <NN-kebab-case>, e.g. "01-auth-rewrite" (NN zero-padded).'
@@ -13598,7 +13598,8 @@ var LucaArtifactKind = exports_external.enum([
13598
13598
  "milestone.audit",
13599
13599
  "telemetry.run",
13600
13600
  "archive.phase",
13601
- "tmp.handoff"
13601
+ "tmp.handoff",
13602
+ "tmp.preview"
13602
13603
  ]);
13603
13604
  var PhaseSlugSchema = exports_external.string().regex(PHASE_SLUG_RE, {
13604
13605
  message: 'Phase slug must be <NN-kebab-case>, e.g. "01-auth-rewrite" (NN zero-padded).'
@@ -13598,7 +13598,8 @@ var LucaArtifactKind = exports_external.enum([
13598
13598
  "milestone.audit",
13599
13599
  "telemetry.run",
13600
13600
  "archive.phase",
13601
- "tmp.handoff"
13601
+ "tmp.handoff",
13602
+ "tmp.preview"
13602
13603
  ]);
13603
13604
  var PhaseSlugSchema = exports_external.string().regex(PHASE_SLUG_RE, {
13604
13605
  message: 'Phase slug must be <NN-kebab-case>, e.g. "01-auth-rewrite" (NN zero-padded).'
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineCommand, runMain as runMain$1 } from 'citty';
2
2
  import 'pathe';
3
3
 
4
4
  async function resolveVersion() {
5
- return "13.0.0-alpha.13";
5
+ return "13.0.0-alpha.14";
6
6
  }
7
7
  const LUCA_VERSION = await resolveVersion();
8
8
 
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { mkdir, writeFile, rename, rm, open, stat, readFile } from 'node:fs/promises';
3
3
  import { dirname, join } from 'node:path';
4
- import { D as lucaStateSchemaTolerant } from './luca.BDFQnOdW.mjs';
4
+ import { D as lucaStateSchemaTolerant } from './luca.DnzyY7Vh.mjs';
5
5
  import 'node:crypto';
6
6
  import 'node:module';
7
7
  import 'node:url';
@@ -1,4 +1,4 @@
1
- import './luca.BDFQnOdW.mjs';
1
+ import './luca.DnzyY7Vh.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:fs/promises';
4
4
  import 'node:path';
@@ -6,9 +6,9 @@ import 'node:crypto';
6
6
  import 'node:module';
7
7
  import 'node:url';
8
8
  import 'node:child_process';
9
- import { r as readConfidenceJournal, a as readLedgerForRun } from './luca.YEUgoPFK.mjs';
10
- import { r as readVerificationResult } from './luca.Dmpy9SlE.mjs';
11
- import { l as listPhaseSlugs } from './luca.BKsihSAK.mjs';
9
+ import { r as readConfidenceJournal, a as readLedgerForRun } from './luca.S_KvKqlx.mjs';
10
+ import { r as readVerificationResult } from './luca.D1iTA_aN.mjs';
11
+ import { l as listPhaseSlugs } from './luca.D-08LKzR.mjs';
12
12
 
13
13
  function fingerprint(input) {
14
14
  let hash = 0;
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { l as lucaStateSchema } from './luca.BDFQnOdW.mjs';
4
+ import { l as lucaStateSchema } from './luca.DnzyY7Vh.mjs';
5
5
  import 'node:crypto';
6
6
  import 'node:module';
7
7
  import 'node:url';
@@ -1,4 +1,4 @@
1
- import { P as PhaseSlugSchema, L as LUCA_DIR_ROOT, F as PHASE_FILE_PATHS } from './luca.BDFQnOdW.mjs';
1
+ import { P as PhaseSlugSchema, L as LUCA_DIR_ROOT, F as PHASE_FILE_PATHS } from './luca.DnzyY7Vh.mjs';
2
2
 
3
3
  function phasePathFor(slug, file) {
4
4
  PhaseSlugSchema.parse(slug);
@@ -1,7 +1,7 @@
1
1
  import { existsSync, chmodSync } from 'node:fs';
2
2
  import { join, basename } from 'pathe';
3
3
  import { writeFile } from 'node:fs/promises';
4
- import './luca.BDFQnOdW.mjs';
4
+ import './luca.DnzyY7Vh.mjs';
5
5
  import 'node:path';
6
6
  import 'node:crypto';
7
7
  import 'node:module';
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { P as PhaseSlugSchema, L as LUCA_DIR_ROOT, e as ProjectPreferencesSchema, V as VerificationResultSchema, f as ConfidenceCategorySchema, g as ConfidenceLevelSchema, h as lucaRootPaths, S as ShadowScanFindingSchema, i as RoadmapPhaseSchema, l as lucaStateSchema, j as PipelineStep, k as isLegalTransition, m as PIPELINE_TRANSITIONS, n as PIPELINE_STEP_TO_COARSE_PHASE, o as PipelineStepValues, p as TodoIdSchema, q as TodoAreaSchema, d as TodoPriority, s as slugFromTitle, r as TodoSchema, u as todoConceptFor, w as TodoStatus, x as TODO_CONCEPT_PREFIX, y as VerificationRefSchema } from './luca.BDFQnOdW.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug, S as STEP_ARTIFACTS } from './luca.B15qErL2.mjs';
2
+ import { P as PhaseSlugSchema, L as LUCA_DIR_ROOT, e as ProjectPreferencesSchema, V as VerificationResultSchema, f as ConfidenceCategorySchema, g as ConfidenceLevelSchema, h as lucaRootPaths, S as ShadowScanFindingSchema, i as RoadmapPhaseSchema, l as lucaStateSchema, j as PipelineStep, k as isLegalTransition, m as PIPELINE_TRANSITIONS, n as PIPELINE_STEP_TO_COARSE_PHASE, o as PipelineStepValues, p as TodoIdSchema, q as TodoAreaSchema, d as TodoPriority, s as slugFromTitle, r as TodoSchema, u as todoConceptFor, w as TodoStatus, x as TODO_CONCEPT_PREFIX, y as VerificationRefSchema } from './luca.DnzyY7Vh.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug, S as STEP_ARTIFACTS } from './luca.OxvM40dI.mjs';
4
4
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
5
5
  import { readFile, readdir, mkdir, rename, appendFile, unlink, rm } from 'node:fs/promises';
6
6
  import { join, resolve, dirname, relative, sep } from 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import { spawnSync } from 'node:child_process';
11
- import { c as appendConfidenceEntry, d as appendLedger } from './luca.YEUgoPFK.mjs';
12
- import { m as mutateState, w as writeAtomicFile, a as withStateLock } from './luca.DpeRJDkV.mjs';
13
- import { p as phasePathFor } from './luca.BKflEntw.mjs';
11
+ import { c as appendConfidenceEntry, d as appendLedger } from './luca.S_KvKqlx.mjs';
12
+ import { m as mutateState, w as writeAtomicFile, a as withStateLock } from './luca.92gxSuz7.mjs';
13
+ import { p as phasePathFor } from './luca.Bg_VHA2r.mjs';
14
14
  import { s as sanitizeControlChars } from './luca.BAqmbI4n.mjs';
15
15
  import { l as loadCurrentConfig } from './luca.CQ3g1xrD.mjs';
16
- import { f as findCriterion } from './luca.Dmpy9SlE.mjs';
16
+ import { f as findCriterion } from './luca.D1iTA_aN.mjs';
17
17
 
18
18
  function archivedPhasePathFor(slug) {
19
19
  PhaseSlugSchema.parse(slug);
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readdirSync } from 'node:fs';
2
2
  import { join } from 'pathe';
3
- import { E as PHASE_SLUG_RE } from './luca.BDFQnOdW.mjs';
3
+ import { E as PHASE_SLUG_RE } from './luca.DnzyY7Vh.mjs';
4
4
  import 'node:fs/promises';
5
5
  import 'node:path';
6
6
  import 'node:crypto';
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- import { V as VerificationResultSchema } from './luca.BDFQnOdW.mjs';
4
- import { p as phasePathFor } from './luca.BKflEntw.mjs';
3
+ import { V as VerificationResultSchema } from './luca.DnzyY7Vh.mjs';
4
+ import { p as phasePathFor } from './luca.Bg_VHA2r.mjs';
5
5
 
6
6
  function readVerificationResult(opts) {
7
7
  const p = join(opts.cwd, phasePathFor(opts.slug, "verify"));
@@ -1,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import './luca.BDFQnOdW.mjs';
3
- import { W as WRITE_COMMAND_PHASES, l as loadCurrentState } from './luca.B15qErL2.mjs';
2
+ import './luca.DnzyY7Vh.mjs';
3
+ import { W as WRITE_COMMAND_PHASES, l as loadCurrentState } from './luca.OxvM40dI.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import 'node:crypto';
@@ -153,6 +153,7 @@ const SEMVER_TAG_RE = /^v\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$
153
153
  const REVIEWER_NAME_RE = /^[a-z][a-z0-9-]*[a-z0-9]$/;
154
154
  const RUN_ID_RE = /^[A-Za-z0-9_-]+$/;
155
155
  const TMP_FILE_RE = /^[a-z][a-z0-9-]*\.json$/;
156
+ const TMP_PREVIEW_FILE_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.[a-z0-9]+$/i;
156
157
  const LUCA_DIR_ROOT = ".luca";
157
158
  const lucaRootPaths = {
158
159
  state: `${LUCA_DIR_ROOT}/state.json`,
@@ -203,7 +204,10 @@ z.enum([
203
204
  "archive.phase",
204
205
  // Ephemeral CLI-handoff scratch (.luca/tmp/<name>.json) — repo-scoped,
205
206
  // gitignored, not a pipeline artifact.
206
- "tmp.handoff"
207
+ "tmp.handoff",
208
+ // Ephemeral browser preview (.luca/tmp/previews/<name>) — repo-scoped,
209
+ // gitignored, not a pipeline artifact. Allowed in any pipelineStep.
210
+ "tmp.preview"
207
211
  ]);
208
212
  const PhaseSlugSchema = z.string().regex(PHASE_SLUG_RE, {
209
213
  message: 'Phase slug must be <NN-kebab-case>, e.g. "01-auth-rewrite" (NN zero-padded).'
@@ -249,6 +253,18 @@ const SYSTEM_DIR_PATTERN = /^\/(etc|usr|var|System|bin|sbin)(\/|$)/;
249
253
  const GIT_DIR_PATTERN = /(^|\/)\.git(\/|$)/;
250
254
  const HOME_DENIED_SUBDIRS = [".claude", ".luca"];
251
255
  const SHARED_TMP_LUCA_PATTERN = /^\/(private\/)?tmp\/luca-/;
256
+ const BUILTIN_TMP_PREFIXES = ["/tmp/", "/private/tmp/"];
257
+ function isEphemeralOsTemp(path, tmpdirs) {
258
+ const p = path.replace(/\\/g, "/");
259
+ if (!p.startsWith("/")) return false;
260
+ const prefixes = [...BUILTIN_TMP_PREFIXES];
261
+ for (const dir of tmpdirs) {
262
+ if (!dir) continue;
263
+ const norm = dir.replace(/\\/g, "/").replace(/\/+$/, "");
264
+ if (norm.startsWith("/")) prefixes.push(`${norm}/`);
265
+ }
266
+ return prefixes.some((prefix) => p.startsWith(prefix));
267
+ }
252
268
  const reAnchorless = (re) => re.source.replace(/^\^/, "").replace(/\$$/, "");
253
269
  const AUDIT_PATH_PATTERN = new RegExp(
254
270
  `^\\.luca/phases/${reAnchorless(PHASE_SLUG_RE)}/audits/${reAnchorless(
@@ -278,16 +294,19 @@ function classifyWritePath(path, opts = {}) {
278
294
  reason: "writes under .git/ are never allowed"
279
295
  };
280
296
  }
281
- if (SYSTEM_DIR_PATTERN.test(path)) {
297
+ if (SHARED_TMP_LUCA_PATTERN.test(path)) {
282
298
  return {
283
299
  class: "denied",
284
- reason: "writes under system directories (/etc, /usr, /var, /System, /bin, /sbin) are never allowed"
300
+ reason: "luca CLI handoff payloads must be repo-scoped \u2014 write to .luca/tmp/<kebab-name>.json instead (shared /tmp/luca-* files collide across concurrently-running repos)"
285
301
  };
286
302
  }
287
- if (SHARED_TMP_LUCA_PATTERN.test(path)) {
303
+ if (isEphemeralOsTemp(path, opts.tmpdirs ?? [])) {
304
+ return { class: "ephemeral" };
305
+ }
306
+ if (SYSTEM_DIR_PATTERN.test(path)) {
288
307
  return {
289
308
  class: "denied",
290
- reason: "luca CLI handoff payloads must be repo-scoped \u2014 write to .luca/tmp/<kebab-name>.json instead (shared /tmp/luca-* files collide across concurrently-running repos)"
309
+ reason: "writes under system directories (/etc, /usr, /var, /System, /bin, /sbin) are never allowed"
291
310
  };
292
311
  }
293
312
  for (const subdir of HOME_DENIED_SUBDIRS) {
@@ -309,6 +328,10 @@ function classifyWritePath(path, opts = {}) {
309
328
  }
310
329
  const rel = toLucaRelative(path, opts.cwd);
311
330
  if (rel.startsWith(".luca/") || rel === ".luca") {
331
+ const preview = rel.match(/^\.luca\/tmp\/previews\/([^/]+)$/);
332
+ if (preview && TMP_PREVIEW_FILE_RE.test(preview[1])) {
333
+ return { class: "ephemeral" };
334
+ }
312
335
  if (AUDIT_PATH_PATTERN.test(rel)) {
313
336
  return { class: "planning-audit" };
314
337
  }
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { readFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { D as lucaStateSchemaTolerant, P as PhaseSlugSchema } from './luca.BDFQnOdW.mjs';
4
+ import { D as lucaStateSchemaTolerant, P as PhaseSlugSchema } from './luca.DnzyY7Vh.mjs';
5
5
 
6
6
  async function loadCurrentState(opts) {
7
7
  const statePath = join(opts.cwd, ".luca", "state.json");
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync, mkdirSync, appendFileSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
- import { h as lucaRootPaths, z as LedgerEntrySchema, B as ConfidenceEntrySchema } from './luca.BDFQnOdW.mjs';
4
- import { p as phasePathFor } from './luca.BKflEntw.mjs';
3
+ import { h as lucaRootPaths, z as LedgerEntrySchema, B as ConfidenceEntrySchema } from './luca.DnzyY7Vh.mjs';
4
+ import { p as phasePathFor } from './luca.Bg_VHA2r.mjs';
5
5
 
6
6
  function appendLedger(opts) {
7
7
  const entry = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alecsibilia/luca",
3
3
  "description": "Luca — spec-driven agentic development workflow for Claude Code (umbrella; bundles luca-cli, luca-core, luca-tools)",
4
- "version": "13.0.0-alpha.13",
4
+ "version": "13.0.0-alpha.14",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Alec Sibilia <sibilia.alec@gmail.com>",
7
7
  "homepage": "https://github.com/asibilia/luca-framework#readme",