@animus-ui/extract 0.1.11 → 0.1.12

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 (103) hide show
  1. package/README.md +47 -0
  2. package/crates/extract-v2/animus-extract-v2.darwin-arm64.node +0 -0
  3. package/crates/extract-v2/animus-extract-v2.linux-arm64-gnu.node +0 -0
  4. package/crates/extract-v2/animus-extract-v2.linux-x64-gnu.node +0 -0
  5. package/crates/extract-v2/index.d.ts +17 -98
  6. package/dist/index.cjs +11 -6
  7. package/dist/index.mjs +2 -2
  8. package/dist/pipeline/analyze-project-args.d.ts +0 -12
  9. package/dist/pipeline/analyze-project-args.d.ts.map +1 -1
  10. package/dist/pipeline/assemble-stylesheet.d.ts +0 -35
  11. package/dist/pipeline/assemble-stylesheet.d.ts.map +1 -1
  12. package/dist/pipeline/asset-placeholders.d.ts +0 -25
  13. package/dist/pipeline/asset-placeholders.d.ts.map +1 -1
  14. package/dist/pipeline/content-hash.d.ts +0 -7
  15. package/dist/pipeline/content-hash.d.ts.map +1 -1
  16. package/dist/pipeline/core-options.d.ts +27 -93
  17. package/dist/pipeline/core-options.d.ts.map +1 -1
  18. package/dist/pipeline/correlate-external-tokens.d.ts +10 -18
  19. package/dist/pipeline/correlate-external-tokens.d.ts.map +1 -1
  20. package/dist/pipeline/discover-files.d.ts +1 -9
  21. package/dist/pipeline/discover-files.d.ts.map +1 -1
  22. package/dist/pipeline/discover-packages.d.ts +18 -154
  23. package/dist/pipeline/discover-packages.d.ts.map +1 -1
  24. package/dist/pipeline/dynamic-prop-config.d.ts +4 -19
  25. package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -1
  26. package/dist/pipeline/engine-adapter.d.ts +16 -52
  27. package/dist/pipeline/engine-adapter.d.ts.map +1 -1
  28. package/dist/pipeline/engine-retirement.d.ts +0 -19
  29. package/dist/pipeline/engine-retirement.d.ts.map +1 -1
  30. package/dist/pipeline/error-diagnostics.d.ts +0 -24
  31. package/dist/pipeline/error-diagnostics.d.ts.map +1 -1
  32. package/dist/pipeline/index.d.ts +9 -8
  33. package/dist/pipeline/index.d.ts.map +1 -1
  34. package/dist/pipeline/internal-wire.d.ts +2 -0
  35. package/dist/pipeline/internal-wire.d.ts.map +1 -0
  36. package/dist/pipeline/manifest-diagnostics.d.ts +32 -37
  37. package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -1
  38. package/dist/pipeline/manifest-schema.d.ts +117 -0
  39. package/dist/pipeline/manifest-schema.d.ts.map +1 -0
  40. package/dist/pipeline/mdx-preprocessor.d.ts +9 -33
  41. package/dist/pipeline/mdx-preprocessor.d.ts.map +1 -1
  42. package/dist/pipeline/path-aliases.d.ts +0 -19
  43. package/dist/pipeline/path-aliases.d.ts.map +1 -1
  44. package/dist/pipeline/post-process-css.d.ts +0 -8
  45. package/dist/pipeline/post-process-css.d.ts.map +1 -1
  46. package/dist/pipeline/prefix.d.ts +3 -10
  47. package/dist/pipeline/prefix.d.ts.map +1 -1
  48. package/dist/pipeline/replacement-plans.d.ts +10 -34
  49. package/dist/pipeline/replacement-plans.d.ts.map +1 -1
  50. package/dist/pipeline/resolve-asset.d.ts +4 -7
  51. package/dist/pipeline/resolve-asset.d.ts.map +1 -1
  52. package/dist/pipeline/run-analysis.d.ts +15 -27
  53. package/dist/pipeline/run-analysis.d.ts.map +1 -1
  54. package/dist/pipeline/source-corpus.d.ts +25 -0
  55. package/dist/pipeline/source-corpus.d.ts.map +1 -0
  56. package/dist/pipeline/source-identity.d.ts +23 -53
  57. package/dist/pipeline/source-identity.d.ts.map +1 -1
  58. package/dist/pipeline/source-ingestion.d.ts +48 -53
  59. package/dist/pipeline/source-ingestion.d.ts.map +1 -1
  60. package/dist/pipeline/static-css.d.ts +4 -13
  61. package/dist/pipeline/static-css.d.ts.map +1 -1
  62. package/dist/pipeline/structural-self-check.d.ts +0 -20
  63. package/dist/pipeline/structural-self-check.d.ts.map +1 -1
  64. package/dist/pipeline/svelte-source-adapter.d.ts +5 -12
  65. package/dist/pipeline/svelte-source-adapter.d.ts.map +1 -1
  66. package/dist/pipeline/system-config.d.ts +15 -32
  67. package/dist/pipeline/system-config.d.ts.map +1 -1
  68. package/dist/pipeline/system-props-module.d.ts +0 -15
  69. package/dist/pipeline/system-props-module.d.ts.map +1 -1
  70. package/dist/pipeline/timing-waterfall.d.ts +0 -11
  71. package/dist/pipeline/timing-waterfall.d.ts.map +1 -1
  72. package/dist/pipeline/tsconfig-paths.d.ts +2 -3
  73. package/dist/pipeline/tsconfig-paths.d.ts.map +1 -1
  74. package/dist/pipeline/unit-fallback.d.ts +0 -5
  75. package/dist/pipeline/unit-fallback.d.ts.map +1 -1
  76. package/dist/pipeline/utils.d.ts +1 -1
  77. package/dist/pipeline/utils.d.ts.map +1 -1
  78. package/dist/pipeline/watch-keys.d.ts +0 -10
  79. package/dist/pipeline/watch-keys.d.ts.map +1 -1
  80. package/dist/{pipeline-lkbOoyAr.mjs → pipeline-DeEENy5C.mjs} +1940 -2263
  81. package/dist/{pipeline-ojNeABi0.cjs → pipeline-x1yBZ2UP.cjs} +1970 -2269
  82. package/dist/session/extraction-session.d.ts +110 -316
  83. package/dist/session/extraction-session.d.ts.map +1 -1
  84. package/dist/session/index.d.ts +6 -20
  85. package/dist/session/index.d.ts.map +1 -1
  86. package/dist/session/published-set.d.ts +45 -25
  87. package/dist/session/published-set.d.ts.map +1 -1
  88. package/dist/session/resolve-packages.d.ts +6 -7
  89. package/dist/session/resolve-packages.d.ts.map +1 -1
  90. package/dist/session/session-paths.d.ts +38 -72
  91. package/dist/session/session-paths.d.ts.map +1 -1
  92. package/dist/session/singleton.d.ts +32 -71
  93. package/dist/session/singleton.d.ts.map +1 -1
  94. package/dist/session/timing.d.ts +0 -5
  95. package/dist/session/timing.d.ts.map +1 -1
  96. package/dist/session/turbopack-orchestrator.d.ts +17 -33
  97. package/dist/session/turbopack-orchestrator.d.ts.map +1 -1
  98. package/dist/session.cjs +530 -677
  99. package/dist/session.mjs +517 -672
  100. package/index-v2.js +0 -9
  101. package/package.json +9 -8
  102. package/dist/pipeline/external-keyframes.d.ts +0 -23
  103. package/dist/pipeline/external-keyframes.d.ts.map +0 -1
@@ -1,37 +1,15 @@
1
1
  import type { AnimusCoreOptions, ExternalPackageOutcome } from '../pipeline/index';
2
- /** Options the artifact-publishing session consumes — exactly the shared
3
- * driver core (shared-driver-config). Driver-specific surfaces
4
- * (AnimusNextOptions and the CLI's flag layer) are structurally
5
- * assignable; the session reads only core keys. */
6
2
  export type SessionOptions = AnimusCoreOptions;
7
- import type { SourceEntryOwnership } from '../pipeline/index';
8
- /**
9
- * Module id the Rust emitter injects for the extracted stylesheet — also the
10
- * exact resolve.alias key with-animus registers for it, which the adapter's
11
- * alias harvesting must skip.
12
- */
13
- export declare const ANIMUS_CSS_MODULE_ID = ".animus/styles.css";
14
- /** Watch-cycle change sets, as reported by the bundler's watcher. */
3
+ import type { SourceCorpus } from '../pipeline/index';
4
+ /** Default watcher debounce and the session's status-deadline ceiling.
5
+ * The watcher entry point defaults its debounce from this — one definition. */
6
+ export declare const DEFAULT_WATCH_DEBOUNCE_MS = 75;
15
7
  export interface WatchChanges {
16
8
  modifiedFiles?: ReadonlySet<string>;
17
9
  removedFiles?: ReadonlySet<string>;
18
10
  }
19
- /**
20
- * Bundler-agnostic extraction pipeline: system loading, source discovery
21
- * and ingestion, external-package collection, analysis, stylesheet and
22
- * system-props emission, and watch-cycle diffing.
23
- *
24
- * The webpack adapter (plugin.ts) owns only bundler wiring: hook
25
- * registration, alias harvesting from the compiler config, in-memory asset
26
- * replacement, and translating watch events into `handleWatchUpdate`
27
- * change sets. Keeping this class free of webpack types is deliberate — a
28
- * future Turbopack integration must drive the same session from outside
29
- * the bundler (Turbopack has no compiler-hook surface), reusing everything
30
- * here unchanged.
31
- *
32
- * Outputs are published through the package singleton (shared CSS,
33
- * manifest, system props) and written to `.animus/` on disk.
34
- */
11
+ /** Bundler-agnostic extraction pipeline: system load, source ingestion,
12
+ * analysis, emission, and watch-cycle diffing. Carries no bundler types. */
35
13
  export declare class ExtractionSession {
36
14
  /** Set by the adapter before any pipeline run. */
37
15
  rootDir: string | null;
@@ -41,19 +19,13 @@ export declare class ExtractionSession {
41
19
  /** Physical asset files registered with the host watcher. */
42
20
  assetDependencyPaths: Set<string>;
43
21
  private assetDependencyKeys;
44
- /** Emitter identity override for the system-props module id. Webpack mode
45
- * (null) injects the absolute `.animus/system-props.js` path, resolved by
46
- * NormalModuleReplacement; Turbopack rejects absolute-path imports, so
47
- * its driver sets the virtual id that `resolveAlias` maps to disk. */
22
+ /** System-props module id override. Turbopack rejects absolute-path
23
+ * imports, so its driver sets a virtual id; null injects the abs path. */
48
24
  systemPropsModuleId: string | null;
49
- /** Whether the analysis-inputs hydration corpus is serialized + written.
50
- * False (webpack mode): the loader shares the pipeline process and reads
51
- * the manifest from memory — the corpus is never persisted. True is set
52
- * by the Turbopack orchestration driver, whose isolated loader workers
53
- * replay it (spec: next-turbopack-integration, "Manifest disk artifact" /
54
- * "Webpack mode skips the hydration corpus"). */
25
+ /** Whether the analysis-inputs hydration corpus is written to disk. Only
26
+ * isolated loader workers replay it; an in-process loader reads memory. */
55
27
  persistAnalysisInputs: boolean;
56
- /** Absolute directory prefixes for external DS packages (loader allowlisting). */
28
+ /** Absolute directory prefixes for external packages (loader allowlist). */
57
29
  externalPackageDirs: string[];
58
30
  /** Absolute package dir → owning specifier (cross-source correlation). */
59
31
  private externalDirOwners;
@@ -61,14 +33,11 @@ export declare class ExtractionSession {
61
33
  private externalFileOwners;
62
34
  /** External package specifier → absolute source entry path. */
63
35
  externalSourceEntries: Map<string, string>;
64
- /** SourceId derivation authority for the current generation (openspec:
65
- * external-source-watch-ingestion, design D2) — canonical roots
66
- * realpath'd once per full pipeline; alias→SourceId associations
67
- * recorded while files exist so deletion resolves through the cache. */
36
+ /** SourceId authority for this generation — roots realpath'd once per
37
+ * pipeline; aliases recorded while files exist so deletions resolve. */
68
38
  private sourceIdentity;
69
- /** Canonical admitted external root → declared specifiers (set-valued
70
- * ownership, design D2; duplicate specifiers resolving to one canonical
71
- * root share it). Engine watch wiring and tests read this. */
39
+ /** Canonical admitted external root → declared specifiers; duplicate
40
+ * specifiers resolving to one canonical root share an entry. */
72
41
  externalRootOwners: Map<string, Set<string>>;
73
42
  /** Canonical external root → the extension set its collection walk used
74
43
  * (widened for dist-only roots); rewalks and classification share it. */
@@ -76,110 +45,89 @@ export declare class ExtractionSession {
76
45
  /** Canonical admitted external watch roots — the engine-side watch
77
46
  * surface (webpack contextDependencies / Turbopack watchers). */
78
47
  externalWatchRoots: string[];
79
- /** Canonical external root → (raw sourceKey → {raw content hash, recorded
80
- * abs spelling}): the previous-generation inventory a dirty-root rewalk
81
- * diffs against (design D3). Raw hashes — MDX preprocessing never skews
82
- * the diff; the recorded abs path is a registered deletion alias, so a
83
- * reconstructed deletion always resolves through cached identity. */
48
+ /** Canonical external root → sourceKey → {raw content hash, recorded abs}:
49
+ * the inventory a dirty-root rewalk diffs against, hashed before MDX. */
84
50
  private externalInventory;
85
- /** Sticky diagnostics (design D5/D7): stable key → message, re-surfaced
86
- * on every full pipeline until the underlying condition clears. */
51
+ /** Stable key → message, re-surfaced on every full pipeline until the
52
+ * underlying condition clears. */
87
53
  readonly stickyDiagnostics: Map<string, string>;
88
- /** Volume-membership predicate for the cross-volume gate (design D5).
89
- * Injected seam: the shared predicate only discriminates on Windows
90
- * (win32 semantics are unit-tested via path.win32), so runtime tests
91
- * drive the gate through this. */
54
+ /** Volume-membership predicate for the cross-volume gate. Injected seam:
55
+ * the real predicate only discriminates on Windows, so tests replace it. */
92
56
  sharesProjectVolume: (projectRoot: string, externalRoot: string) => boolean;
93
- /** Orchestrator seams (openspec: external-source-watch-ingestion, design
94
- * D4). `onExternalRootResolved` fires per volume-admitted external root
95
- * DURING collection — after resolution, BEFORE that root's sources are
96
- * walked — so a watching host can open its handle with no blind gap
97
- * between scan and watch. `onExternalRootsCommitted` fires once after a
98
- * successful full-pipeline publication with the complete admitted
99
- * canonical root set (the host's promote/replay/close-old phase; a
100
- * failed pipeline never fires it, so the host rolls back). */
57
+ /** `onExternalRootResolved` fires per admitted root DURING collection,
58
+ * before its walk; `onExternalRootsCommitted` only after publication. */
101
59
  onExternalRootResolved: ((canonicalRoot: string) => void) | null;
102
60
  onExternalRootsCommitted: ((canonicalRoots: string[]) => void) | null;
61
+ /** Fires exactly once per settled `handleWatchUpdate` — the failure cause,
62
+ * or null when clean. Observation never alters delivery. */
63
+ onCycleSettled: ((cause: unknown) => void) | null;
103
64
  private readonly options;
104
65
  private readonly staticCssJson;
105
66
  private system;
106
- /** Discovery-time keyframes diagnostics awaiting the shared surfacing pass. */
107
- private externalKeyframesDiagnostics;
67
+ /** Vocabulary witness diagnostics from the sealed system's registration
68
+ * record, awaiting the shared surfacing pass. */
69
+ private systemVocabularyDiagnostics;
70
+ /** Configured external files that could not be read. Incremental passes
71
+ * re-collect nothing, so they replay these instead of passing strict. */
72
+ private ingestionFailureDiagnostics;
108
73
  /** Full package-resolution map from the last full pipeline — replayed by
109
74
  * incremental passes (sourceEntries alone omits dist-resolved packages). */
110
75
  private lastPackageMap;
111
76
  private fileCache;
112
- analysisEntryCache: Map<string, {
113
- hash: string;
114
- source: string;
115
- }>;
116
- sourceOwnership: Record<string, SourceEntryOwnership>;
77
+ readonly corpus: SourceCorpus;
117
78
  private systemDependencyKeys;
118
79
  /** Loader-reported dependency paths for bundler watch registration. */
119
80
  systemDependencyPaths: string[];
120
81
  private systemDependencyHashes;
121
82
  private lastSystemPropsHash;
122
- /** Per-payload write guards: payloadHash gates rewrites (byte-identical
123
- * payloads leave disk untouched); diskHash is the hash of the CURRENT
124
- * disk bytes (envelope included) recorded in the analysis-commit. null =
125
- * not yet seeded (first publication reads the artifact's envelope so a
126
- * same-session restart never rewrites byte-identical artifacts). */
127
83
  private artifactRecords;
128
- /** Last written analysis-commit; null = seeded from disk on first use. */
84
+ /** Last written analysis-commit; null seeds from disk on first use. Its
85
+ * generation counter is correct only because one session owns the dir. */
129
86
  private lastCommit;
130
- /** Session identity — claimed once per PROCESS (one Next invocation),
131
- * adopted by every subsequent session instance so all compilers share
132
- * one artifact tree (design D2: `next dev`/`next build` co-writing are
133
- * separate processes and therefore separate sessions). */
87
+ /** Release handle for the in-process owner slot AND the directory's
88
+ * on-disk owner record, taken and released as one; null when unheld. */
89
+ private releasePublicationClaim;
90
+ /** Session identity, claimed once per PROCESS and adopted by every later
91
+ * session instance so all compilers share one artifact tree. */
134
92
  readonly sessionId: string;
135
- /** Epoch value of the last published analysis; null = not yet known
136
- * (seeded from the session dir's artifact on first publication so a
137
- * same-session restart with unchanged plans never rewrites bytes). */
93
+ /** Epoch of the last published analysis; null seeds from disk so a
94
+ * same-session restart with unchanged plans rewrites no bytes. */
138
95
  private lastEpochValue;
139
- /** Watcher debounce ceiling feeding status deadlines (design D3). */
96
+ /** Watcher debounce ceiling feeding status deadlines. */
140
97
  debounceCeilingMs: number;
141
98
  /** Test seam: observes every session-artifact write (name, content)
142
99
  * post-rename — write ORDER is part of the transaction contract. */
143
100
  onArtifactWrite: ((name: string, content: string) => void) | null;
144
- /** Status attempt bookkeeping (design D3). */
145
101
  private statusAttemptId;
146
102
  private statusAttemptOpen;
147
- /** Monotonic first-emission witness (openspec: standalone-extraction-cli,
148
- * watch readiness): flips true once the first complete publication
149
- * succeeds and never regresses — every later status write (idle AND
150
- * failed) carries it, so readiness stays observable across attempts. */
103
+ /** Monotonic readiness witness: flips true on the first complete
104
+ * publication and never regresses; every later status write carries it. */
151
105
  private firstEmissionComplete;
152
106
  /** Debounce-window observations pending analysis (sourceKey → hash). */
153
107
  private debouncePending;
154
- /** Session-start hygiene (pruning + legacy cleanup) runs once. */
155
108
  private sessionStartHygieneDone;
156
109
  private lcssTargets;
157
110
  constructor(options: SessionOptions);
158
- /** This session's artifact directory. Requires `rootDir` to be set. */
159
111
  get sessionDir(): string;
160
112
  get verbose(): boolean;
161
113
  private log;
162
114
  private warn;
163
115
  private now;
164
116
  private elapsed;
165
- /** Lazily-computed scan config (options are constructor-fixed, so the
166
- * derivation is stable for the session's lifetime). */
167
- /** Diagnostic prefix label — drivers set their own so a host's errors
168
- * never masquerade as another driver's (inc 05 review S1). The default
169
- * keeps the Next plugin's historical prefix. */
117
+ /** Diagnostic prefix label — drivers set their own so one host's errors
118
+ * never masquerade as another driver's. */
170
119
  driverLabel: string;
171
120
  /** Per-specifier discovery outcomes from the last full collection —
172
121
  * driver-consumed reporting surface (the CLI's summary). */
173
122
  lastExternalOutcomes: ExternalPackageOutcome[];
174
- /** Component count of the last published analysis, or null before the
175
- * first — the CLI's publish path reads this instead of re-parsing the
176
- * manifest JSON every cycle. */
123
+ /** Component count of the last published analysis, null before the first —
124
+ * read by drivers instead of re-parsing the manifest JSON every cycle. */
177
125
  lastComponentCount: number | null;
178
- /** Driver-owned STRUCTURAL exclusions (a CLI outDir inside the root),
179
- * joined to the never-replaceable set — never the user `exclude` list,
180
- * whose presence would flip the replace semantics and silently drop the
181
- * replaceable defaults. Set before the first pipeline run (the scan
182
- * config is memoized). */
126
+ /** When superseded asset copies leave `assets/`: `'full-pipeline'` suits a
127
+ * driver serving the dir in place, `'every-cycle'` one republishing it. */
128
+ staleAssetPruning: 'full-pipeline' | 'every-cycle';
129
+ /** Driver-owned STRUCTURAL exclusions, joined to the never-replaceable set
130
+ * — never the user list, whose presence flips the replace semantics. */
183
131
  structuralExclude: string[];
184
132
  private scanConfigMemo;
185
133
  /** Per-pattern exclusion hit counts from this session's matcher —
@@ -188,259 +136,105 @@ export declare class ExtractionSession {
188
136
  /** Resolve the scan configuration from options — the single source of the
189
137
  * exclude/extension policy shared by the full and incremental pipelines. */
190
138
  private resolveScanConfig;
191
- /**
192
- * Watch entry point: one single-flight analysis transaction per event
193
- * batch (openspec: next-webpack-served-transform-coherence, design D3).
194
- * The first entering session runs the transaction; every concurrent
195
- * entry — same session re-entered, or another compiler's session
196
- * (client/server/RSC each hold their own instance) — joins the in-flight
197
- * promise, so no compiler proceeds against a generation older than the
198
- * one the transaction publishes. A rejected transaction rejects every
199
- * joiner; the gate always clears.
200
- */
139
+ /** One single-flight analysis transaction per event batch: concurrent
140
+ * entries join the in-flight promise; each settled entry reports outcome. */
201
141
  handleWatchUpdate(changes: WatchChanges): Promise<void>;
202
- /**
203
- * Owner-side entry for a batch observed by a NON-OWNING compiler's
204
- * watcher. Serializes behind any in-flight transaction, then runs the
205
- * forwarded batch as its own transaction — never drops it (a forwarded
206
- * batch has no other delivery; content-hash diffing makes an
207
- * already-covered batch a cheap no-op).
208
- */
142
+ private routeWatchUpdate;
143
+ /** Owner-side entry for a batch a non-owning compiler observed. Serializes
144
+ * behind any in-flight transaction — it has no other delivery. */
209
145
  ingestForwardedBatch(changes: WatchChanges): Promise<void>;
210
- /**
211
- * Incremental watch pass: geological reset when the system file changed,
212
- * otherwise content-hash diffing restricted to the watcher's change sets
213
- * (falling back to a full discovery walk when no sets are provided).
214
- */
215
146
  private processWatchUpdate;
216
- /** The shared ingestion policy point (vite-plugin parity BY CODE): the
217
- * capability guard, facts memo, and warn-dedupe lifecycle live in the
218
- * pipeline; this host holds only its prefix, strict flag, and warn sink. */
219
- private sourceIngestor;
220
- /** Prepare one raw-source corpus through the shared adaptation boundary. */
221
- private ingestRawSources;
222
- /** Ingest and apply the shared per-file quarantine: one invalid original
223
- * (an `.mdx` with the optional peer absent, an unsupported `.svelte`
224
- * shape) warns and drops; the rest of the corpus still analyzes. Strict
225
- * mode throws from the shared policy — callers route that into their own
226
- * status/rollback handling. */
227
- private ingestAccepted;
228
- /** Surface parser diagnostics under the shared strict/warn policy. */
229
- private surfaceSourceDiagnostics;
230
- /**
231
- * Correlate diagnostics emitted against generated children back to the
232
- * external package owning their raw original.
233
- */
234
- private projectExternalFileOwners;
235
- /** Publish the raw cache and complete parser projection atomically. */
236
147
  private publishSourceIngestion;
148
+ /** Full analysis + publication, registered in the one in-flight
149
+ * transaction slot; a nested reload leaves the enclosing registration. */
237
150
  runFullPipeline(pending?: Array<[string, string]>): Promise<void>;
238
- /** The per-generation source state runFullPipeline mutates, captured as
239
- * ONE object so the restore below cannot omit a member. The three
240
- * deep-copied fields are the ones later steps mutate in place rather
241
- * than reassign; everything else is rebound wholesale on success. */
151
+ private runPipelineTransaction;
152
+ /** Per-generation source state captured as ONE object so the restore
153
+ * cannot omit a member; deep-copied fields are mutated in place. */
242
154
  private snapshotSourceState;
243
155
  private restoreSourceState;
244
- /**
245
- * Reset analysis state for HMR geological reset. Payload write guards go
246
- * back to null so the next publication reseeds them from the disk
247
- * envelopes — a byte-identical post-reset artifact is still not
248
- * rewritten.
249
- */
156
+ /** Release this session's publication claim so a successor may publish.
157
+ * Idempotent, and scoped to this session's own claim. */
158
+ close(): void;
159
+ /** Reset analysis state for a system reload: write guards go back to null
160
+ * and reseed from the disk envelopes on the next publication. */
250
161
  resetForHmr(): void;
251
- /**
252
- * The (sourceKey, observedSourceHash) pairs of a watch batch — cheap
253
- * evidence for the status file's pending set on the geological-reset
254
- * path, where the batch's component edits ride along with the system
255
- * edit (design D3: loaders wait only on observed inputs).
256
- */
162
+ /** The (sourceKey, observed hash) pairs of a watch batch — the status
163
+ * file's pending set; loaders wait only on observed inputs. */
257
164
  private pendingFromBatch;
258
- /**
259
- * Root-dirty inventory reconciliation (design D3): partition the
260
- * watcher's change sets into explicit FILE events and external ROOT hits
261
- * (a reported path that IS an admitted root, or a directory inside one),
262
- * rewalk each dirty root through the shared discovery policy, diff the
263
- * SourceId+raw-hash inventory against the previous generation, and merge
264
- * the reconstructed created/edited/deleted deltas with the explicit
265
- * events (identity-level dedup happens downstream at the cache gate).
266
- * Deletion falls out of the inventory diff — webpack may report only the
267
- * directory (probe-proven).
268
- */
165
+ /** Rewalk dirty external roots and diff the inventory into created,
166
+ * edited and deleted deltas: a watcher may report only the directory. */
269
167
  private reconcileExternalRoots;
270
- /**
271
- * Route one watcher-reported path (design D1/D2): a project-root member
272
- * (lexical containment — existing local semantics preserved; consumer
273
- * exclude patterns apply) or an admitted external member (identity
274
- * resolution with symlink-escape rejection; package-relative excludes
275
- * mirror the collection walk's filters — guardrail G1, one policy).
276
- * Returns null for dropped paths.
277
- */
168
+ /** Route one watcher path: a project-root member (consumer excludes apply)
169
+ * or an admitted external member (symlink escapes rejected). */
278
170
  private classifyWatchPath;
279
- /** Build full raw originals for one shared adaptation attempt. */
280
- private buildRawEntriesFromCache;
281
- /**
282
- * Run incremental pipeline with cache-aware file entries.
283
- * Reuses system config from the last full pipeline run.
284
- */
285
171
  private runIncrementalPipeline;
286
- /**
287
- * Shared analysis + emit core for both pipelines — the single call site
288
- * that routes every manifest through the shared `runProjectAnalysis`,
289
- * reachable from both runFullPipeline (production) and
290
- * runIncrementalPipeline (HMR).
291
- *
292
- * Owns diagnostic surfacing, CSS assembly + styles.css write guard,
293
- * system-props module emit, and the timing log. The engine's own
294
- * `dev_mode` (reconciliation pruning) is derived separately via
295
- * `engineDevMode` — an explicit `mode` option overrides the pipeline
296
- * path there. For everything else the `devMode` flag is the ONLY
297
- * behavioral fork:
298
- *
299
- * - `false` (production): computes bt.analysis + logs the extraction
300
- * report, and writes system-props.js UNCONDITIONALLY (no
301
- * lastSystemPropsHash guard).
302
- * - `true` (HMR): skips the report log, and guards the system-props.js
303
- * write by lastSystemPropsHash.
304
- *
305
- * The disk artifacts land under the session directory in transaction
306
- * order (design D1): manifest → analysis-inputs (Turbopack orchestration
307
- * only) → styles.css → system-props → analysis-commit →
308
- * replacements-epoch (last, only when moved). The analysis-status file walks starting → analyzing →
309
- * committing → idle around the attempt, landing in `failed` (with the
310
- * diagnostic) on any throw (design D3).
311
- */
172
+ /** Shared analysis + emit core for both pipelines. `devMode` forks only
173
+ * the report log and the system-props write guard. */
312
174
  private analyzeAndEmit;
313
- /**
314
- * The engine's `dev_mode` flag (retain all components vs reconciliation
315
- * pruning) is an EMISSION decision, so an explicit `mode` option wins over
316
- * the pipeline path (core-options: `mode` "decides emitted bytes …
317
- * engine devMode"). Without an explicit mode the historical per-pipeline
318
- * default applies: full = production pruning, incremental = dev retention.
319
- * A pinned-production watch must not flip to unpruned CSS on its first
320
- * incremental republication, and a pinned-development full build must
321
- * retain all components.
322
- */
175
+ /** An explicit `mode` wins over the pipeline path: a pinned-production
176
+ * watch must not emit unpruned CSS on its first incremental republish. */
323
177
  private engineDevMode;
324
178
  private analyzeAndEmitAttempt;
325
179
  /** Open a status attempt (attemptId increments once per burst — a
326
180
  * debouncing pre-write and the analysis that follows share one id). */
327
181
  private beginStatusAttempt;
328
- /** Write the session's analysis-status artifact (design D3). Terminal
329
- * states (idle/failed) close the attempt. */
182
+ /** Write the session's analysis-status artifact. Terminal states
183
+ * (idle/failed) close the attempt. */
330
184
  private writeAnalysisStatus;
331
- /**
332
- * Orchestrator seam (Turbopack watcher): record watch events observed
333
- * during the debounce window so a loader running ahead of the analysis
334
- * has positive evidence to wait on (design D3 'debouncing'). Paths are
335
- * filtered by the scan config and hashed at observation time.
336
- */
185
+ /** Record watch events observed during the debounce window so a loader
186
+ * running ahead of the analysis has evidence to wait on. */
337
187
  noteDebouncedWatchEvents(absPaths: Iterable<string>): void;
338
188
  /** One pending microtask flushes a burst of debounce observations. */
339
189
  private debounceStatusWriteScheduled;
340
- /**
341
- * Write one payload artifact into the session directory, enveloped with
342
- * `{sessionId, generation, replacementEpoch, payloadHash}` and rewritten
343
- * only when the PAYLOAD bytes changed (byte-identical re-analyses leave
344
- * disk untouched — spec: "Unchanged manifest is not rewritten"). The
345
- * recorded diskHash (hash of the enveloped bytes) feeds the
346
- * analysis-commit.
347
- */
190
+ /** Write one enveloped payload artifact, rewritten only when the PAYLOAD
191
+ * bytes changed; the recorded diskHash feeds the analysis-commit. */
348
192
  private publishPayloadArtifact;
349
193
  /** Reconstruct a payload write guard from the on-disk artifact's envelope
350
194
  * (same-session restart: a byte-identical payload must not rewrite). */
351
195
  private seedPayloadRecord;
352
196
  /** Last analysis-commit persisted in this session's directory, or null. */
353
197
  private seedCommitFromDisk;
354
- /**
355
- * Publish the analysis-commit — the transaction identity (design D1).
356
- * Written AFTER every payload and BEFORE the epoch; skipped entirely when
357
- * the payload set (disk hashes) and epoch are unchanged, so a no-op
358
- * re-analysis neither re-keys loader-worker hydration nor burns a
359
- * generation.
360
- */
198
+ /** Publish the analysis-commit: written after every payload and before the
199
+ * epoch, skipped when the payload hashes and epoch are unchanged. */
361
200
  private publishAnalysisCommit;
362
- /**
363
- * Publish the canonical replacement epoch: maintain the session-scoped
364
- * disk witness `{schema, sessionId, epoch}`, rewritten ONLY when the
365
- * epoch VALUE changes so style-only analyses and same-session restarts
366
- * leave bytes and mtime untouched, then expose the value through the
367
- * singleton for the plugin's needBuild fan-out and the loader's catch-up
368
- * re-check. Every VALUE move also reconciles sibling sessions' epoch
369
- * artifacts (below) — the webpack cold-cache validity witness.
370
- */
201
+ /** Maintain the session's epoch witness, rewritten ONLY when the value
202
+ * changes, then expose it through the singleton. */
371
203
  private publishReplacementEpoch;
372
- /**
373
- * Sibling epoch reconciliation — the cross-session half of the webpack
374
- * persistent-cache witness (spec: dev-served-transform-coherence,
375
- * "Offline change invalidates restored modules"). Restored-module
376
- * snapshots reference the epoch artifact of the session that BUILT them;
377
- * with session-scoped trees that file would otherwise sit untouched
378
- * forever, keeping stale snapshots valid. Whenever this session's epoch
379
- * value moves, delete every sibling epoch artifact that disagrees (their
380
- * snapshots must invalidate — restore-on-demand then rebuilds from the
381
- * current generation) and leave agreeing siblings byte-untouched (warm
382
- * restores stay valid). Deleting a stale artifact is pruning, not a
383
- * foreign-session write; races with concurrent sessions are tolerated
384
- * (S14).
385
- */
386
- /** Sibling ids already reconciled away (artifact deleted or absent) —
387
- * nothing left to invalidate for them on later moves. */
388
- private reconciledSiblingIds;
389
204
  /** sessions-root listing memo, keyed by the root dir's mtime — a new or
390
205
  * pruned sibling DIRECTORY moves it; agreeing siblings stay listed. */
391
206
  private siblingListing;
207
+ /** Restored-module snapshots point at the epoch artifact of the session
208
+ * that built them, so a moved epoch deletes every DISAGREEING sibling
209
+ * artifact to invalidate them. Agreeing siblings stay byte-untouched so
210
+ * warm restores keep working; a sibling with a live owner is exempt. */
392
211
  private reconcileSiblingEpochs;
212
+ /** The pid of `siblingDir`'s live owner, or null when nothing proves one.
213
+ * Our own pid is never one — publication is process-exclusive. A missing,
214
+ * undecodable or unreadable claim all mean no owner: the opposite default
215
+ * from the CLI lock check on purpose, so do not unify the two. */
216
+ private liveSiblingOwnerPid;
393
217
  /** Epoch value held by this session's on-disk artifact, or null when
394
218
  * absent, unreadable, or not the expected schema. */
395
219
  private diskEpochValue;
396
- /** True when the flat `.animus/` advisory lock names a live pid — a CLI
397
- * invocation (build mid-publish, or a whole watch run) owns the flat
398
- * tree right now, and any instantaneous inconsistency is its in-flight
399
- * write, not debris. */
220
+ /** True when the flat `.animus/` advisory lock claims the tree. A lock that
221
+ * exists but cannot be decoded claims it too — unknown is never absent. */
400
222
  private cliWriterHoldsLock;
401
- /** Session-start hygiene (design D2): delete legacy flat artifacts
402
- * (unreachable by session-scoped loaders; the standalone CLI is the one
403
- * remaining writer of flat payload names, and its live output is
404
- * fenced off below) and prune sibling session directories older than
405
- * the retention window — never the own dir, tolerating races with
406
- * concurrently-pruning sessions (S14). */
223
+ /** Delete legacy flat artifacts and prune sibling session directories past
224
+ * the retention window — never this session's own dir. */
407
225
  private runSessionStartHygiene;
408
- /** Ensure the session directory exists and write one artifact into it.
409
- * Write-then-rename so cross-process readers (Turbopack loader workers)
410
- * can never observe a torn half-written file. The tmp name carries the
411
- * pid — Next dev evaluates the config in more than one process, and two
412
- * sessions writing the same artifact must not race on one tmp path. */
226
+ /** Write one artifact write-then-rename, so a cross-process reader never
227
+ * sees a torn file; the tmp name carries the pid to keep writers apart. */
413
228
  private writeSessionArtifact;
414
- /**
415
- * asset() placeholder substitution (global-styles-system): resolve each
416
- * referenced specifier through Node resolution, copy the bytes into the
417
- * session directory's `assets/` under a content-hashed name, and
418
- * substitute a RELATIVE url — relative to the session-scoped styles.css,
419
- * which sits beside `assets/`, so the emitted `./assets/<file>` form is
420
- * unchanged. The stylesheet is processed by Next's own CSS pipeline
421
- * (webpack and Turbopack alike), which applies its native asset handling
422
- * — publicPath and output hashing — to relative url() references.
423
- * Unsubstitutable specifiers warn and emit literally in non-strict mode,
424
- * fail the build under `strict: true`.
425
- */
229
+ /** Copy each asset() specifier's bytes into `assets/` under a
230
+ * content-hashed name and substitute a url relative to styles.css. */
426
231
  private substituteAssetReferences;
427
232
  private trackAssetDependency;
428
- /**
429
- * Resolve an asset specifier to an absolute file via the shared pipeline
430
- * resolver (host aliases → Node resolution → package root), with one
431
- * session-local last resort: an already-discovered source entry's package
432
- * root (dist-less workspace kits the shared resolver cannot see).
433
- */
233
+ /** Resolve an asset specifier through the shared resolver, with one
234
+ * last resort: a discovered source entry's package root. */
434
235
  private resolveAssetSpecifier;
435
236
  }
436
- /**
437
- * Sync `.animus/assets/` to the current build's content-hashed file set:
438
- * anything else in the directory is a superseded revision (the copies are
439
- * content-addressed and never overwritten) or the leftover of an asset()
440
- * reference that no longer exists. Failures are tolerated per entry — Next
441
- * dev evaluates the config in more than one process, and a concurrent
442
- * session may have removed (or be about to rewrite) the same file; every
443
- * pass rewrites whatever of its own set is missing, so races self-heal.
444
- */
237
+ /** Sync `assets/` to the current build's file set; per-entry failures are
238
+ * tolerated — a concurrent session may have removed the same file. */
445
239
  export declare function pruneStaleAssets(assetsDir: string, expected: ReadonlySet<string>): void;
446
240
  //# sourceMappingURL=extraction-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extraction-session.d.ts","sourceRoot":"","sources":["../../session/extraction-session.ts"],"names":[],"mappings":"AA+FA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAE3B;;;oDAGoD;AACpD,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAG/C,OAAO,KAAK,EAKV,oBAAoB,EAMrB,MAAM,mBAAmB,CAAC;AAO3B;;;;GAIG;AACH,eAAO,MAAM,oBAAoB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AqD9B;;;uEAGmE;IACnE,OAAO,CAAC,mBAAmB;IAa3B;0DACsD;IACtD,OAAO,CAAC,cAAc;IAetB;gFAC4E;IAC5E,OAAO,CAAC,kBAAkB;IAQ1B;+DAC2D;IAC3D,OAAO,CAAC,sBAAsB;IAqD9B;gFAC4E;IAC5E,OAAO,CAAC,oBAAoB;IAU5B;2EACuE;IACvE,OAAO,CAAC,yBAAyB;IAwEjC,OAAO,CAAC,oBAAoB;IAK5B;iEAC6D;IAC7D,OAAO,CAAC,qBAAqB;CA0B9B;AAED;uEACuE;AACvE,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,IAAI,CAgBN"}
@@ -1,24 +1,10 @@
1
- /**
2
- * `@animus-ui/extract/session` — the artifact-publishing extraction
3
- * session and its watcher orchestration, factored out of the Next plugin
4
- * (openspec: standalone-extraction-cli, D1). Every driver — the Next
5
- * plugin, the standalone CLI, the transform host — is a thin shell over
6
- * this one drive loop; none may fork it.
7
- *
8
- * UNSTABLE SURFACE: this subpath exists for Animus's own drivers; its
9
- * exports are the driver-consumed surface only (deliberately narrower than
10
- * the session modules — internal state mutators, envelope encoders, and
11
- * test seams stay off the published API) and may change without semver
12
- * ceremony until the standalone CLI ships its consumer contract
13
- * (standalone-extraction-cli inc 03/07).
14
- */
15
- export { ANIMUS_CSS_MODULE_ID, ExtractionSession, pruneStaleAssets, } from './extraction-session';
1
+ export { ExtractionSession, pruneStaleAssets } from './extraction-session';
16
2
  export type { SessionOptions, WatchChanges } from './extraction-session';
17
- export { collectSessionAssets, verifyCommitRecord } from './published-set';
18
- export type { SessionAsset } from './published-set';
19
- export { analysisCommitPath, analysisInputsPath, analysisStatusPath, CLI_COMMIT_ARTIFACT, CLI_LOCK_ARTIFACT, MANIFEST_ARTIFACT, manifestPath, readJsonEnvelope, replacementEpochPath, SESSION_ASSETS_DIR, sessionArtifactDir, STYLES_ARTIFACT, stylesPath, SYSTEM_PROPS_ARTIFACT, systemPropsPath, TURBOPACK_SYSTEM_PROPS_ID, } from './session-paths';
3
+ export { checkLockLiveness, CLI_LOCK_HEARTBEAT_INTERVAL_MS, CLI_LOCK_STALE_AFTER_MS, collectSessionAssets, decodeCommitRecord, holdDirectoryClaim, isLockHolderAlive, lockRecordBytes, readCliLockRecord, verifyCommitRecord, } from './published-set';
4
+ export type { CliLockLiveness, CliLockRecord, CommitRecord, SessionAsset, } from './published-set';
5
+ export { analysisCommitPath, analysisInputsPath, analysisStatusPath, ANIMUS_ARTIFACT_DIR, ANIMUS_CSS_MODULE_ID, CLI_COMMIT_ARTIFACT, CLI_LOCK_ARTIFACT, MANIFEST_ARTIFACT, manifestPath, readJsonEnvelope, replacementEpochPath, SESSION_ASSETS_DIR, sessionArtifactDir, STYLES_ARTIFACT, stylesPath, SYSTEM_PROPS_ARTIFACT, systemPropsPath, TURBOPACK_SYSTEM_PROPS_ID, } from './session-paths';
20
6
  export type { AnalysisCommit, AnalysisStatus, SessionEnvelope, } from './session-paths';
21
7
  export { runSessionPipeline, startTurbopackWatcher, } from './turbopack-orchestrator';
22
- export type { TurbopackWatcherHandle } from './turbopack-orchestrator';
23
- export { claimExclusiveSessionOwner, engineApi, getAnalysisPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedSystemProps, setAnalysisPromise, setSharedEngine, } from './singleton';
8
+ export type { TurbopackWatcherHandle, TurbopackWatchOutcome, } from './turbopack-orchestrator';
9
+ export { engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedSystemProps, setAnalysisStartedPromise, setSharedEngine, } from './singleton';
24
10
  //# sourceMappingURL=index.d.ts.map