@karmaniverous/stan-core 0.9.4 → 0.10.1

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.
@@ -127,6 +127,20 @@ type CreateArchiveFromFilesOptions = {
127
127
  /** Optional callback for a deterministic selection report (engine remains silent by default). */
128
128
  onSelectionReport?: (report: SelectionReport) => void;
129
129
  };
130
+ /**
131
+ * Create `stanPath/output/archive.tar` (or custom file name) from an explicit
132
+ * allowlist of repo-relative paths.
133
+ *
134
+ * This is used by context mode, where archive selection must be allowlist-only
135
+ * rather than the default denylist-driven selection.
136
+ *
137
+ * @param cwd - Repo root.
138
+ * @param stanPath - STAN workspace folder.
139
+ * @param relFiles - Repo-relative POSIX paths to include (files only).
140
+ * @param options - See {@link CreateArchiveFromFilesOptions}.
141
+ * @returns Absolute path to the created tar.
142
+ */
143
+ declare function createArchiveFromFiles(cwd: string, stanPath: string, relFiles: string[], options?: CreateArchiveFromFilesOptions): Promise<string>;
130
144
 
131
145
  /**
132
146
  * Creates a "meta" archive (system docs + dependency meta/state, plus optional
@@ -712,6 +726,7 @@ declare const createArchiveDiffWithDependencyContext: (args: {
712
726
  updateSnapshot?: SnapshotUpdateMode;
713
727
  includeOutputDirInDiff?: boolean;
714
728
  onArchiveWarnings?: (text: string) => void;
729
+ onSelectionReport?: (report: SelectionReport) => void;
715
730
  };
716
731
  }) => Promise<CreateArchiveDiffWithDependencyContextResult>;
717
732
 
@@ -829,7 +844,7 @@ declare const buildDependencyMeta: (args: BuildDependencyMetaArgs) => Promise<Bu
829
844
  * @module
830
845
  */
831
846
 
832
- type CreateContextArchiveOptions = Pick<CreateArchiveFromFilesOptions, 'fileName' | 'onArchiveWarnings'> & {
847
+ type CreateContextArchiveOptions = Pick<CreateArchiveFromFilesOptions, 'fileName' | 'onArchiveWarnings' | 'onSelectionReport'> & {
833
848
  /** Context mode should remain allowlist-only; output dir inclusion is rarely desired. */
834
849
  includeOutputDir?: false;
835
850
  };
@@ -871,6 +886,7 @@ declare const createContextArchiveDiffWithDependencyContext: (args: {
871
886
  snapshotFileName?: string;
872
887
  includeOutputDirInDiff?: boolean;
873
888
  onArchiveWarnings?: (text: string) => void;
889
+ onSelectionReport?: (report: SelectionReport) => void;
874
890
  };
875
891
  }) => Promise<CreateContextArchiveDiffResult>;
876
892
 
@@ -995,5 +1011,5 @@ declare const assembleSystemMonolith: (cwd: string, stanPath: string) => Promise
995
1011
 
996
1012
  declare const CORE_VERSION: string;
997
1013
 
998
- export { CORE_VERSION, DEFAULT_OPEN_COMMAND, DEFAULT_STAN_PATH, applyPatchPipeline, applyWithJsDiff, assembleSystemMonolith, buildDependencyMeta, computeContextAllowlistPlan, computeSelectedNodeIds, createArchive, createArchiveDiff, createArchiveDiffFromFiles, createArchiveDiffWithDependencyContext, createArchiveWithDependencyContext, createContextArchiveDiffWithDependencyContext, createContextArchiveWithDependencyContext, createMetaArchive, dependencyMapFileSchema, dependencyMapNodeSchema, dependencyMetaFileSchema, dependencyMetaNodeSchema, dependencyStateEntrySchema, dependencyStateFileSchema, detectAndCleanPatch, ensureOutputDir, executeFileOps, expandEntry, findConfigPathSync, getPackagedSystemPromptPath, loadConfig, loadConfigSync, makeGlobMatcher, parseDependencyStateFile, parseFileOpsBlock, prepareDependencyContext, prepareImports, resolveStanPath, resolveStanPathSync, stageDependencyContext, stagePreparedDependencyContext, summarizeContextAllowlistBudget, validateDependencySelection, validateDependencySelectionOrThrow, writeArchiveSnapshot, writeArchiveSnapshotFromFiles, writeDependencyMapFile, writeDependencyMetaFile };
1014
+ export { CORE_VERSION, DEFAULT_OPEN_COMMAND, DEFAULT_STAN_PATH, applyPatchPipeline, applyWithJsDiff, assembleSystemMonolith, buildDependencyMeta, computeContextAllowlistPlan, computeSelectedNodeIds, createArchive, createArchiveDiff, createArchiveDiffFromFiles, createArchiveDiffWithDependencyContext, createArchiveFromFiles, createArchiveWithDependencyContext, createContextArchiveDiffWithDependencyContext, createContextArchiveWithDependencyContext, createMetaArchive, dependencyMapFileSchema, dependencyMapNodeSchema, dependencyMetaFileSchema, dependencyMetaNodeSchema, dependencyStateEntrySchema, dependencyStateFileSchema, detectAndCleanPatch, ensureOutputDir, executeFileOps, expandEntry, findConfigPathSync, getPackagedSystemPromptPath, loadConfig, loadConfigSync, makeGlobMatcher, parseDependencyStateFile, parseFileOpsBlock, prepareDependencyContext, prepareImports, resolveStanPath, resolveStanPathSync, stageDependencyContext, stagePreparedDependencyContext, summarizeContextAllowlistBudget, validateDependencySelection, validateDependencySelectionOrThrow, writeArchiveSnapshot, writeArchiveSnapshotFromFiles, writeDependencyMapFile, writeDependencyMetaFile };
999
1015
  export type { ApplyResult, AssembleResult, AttemptCapture, BudgetEntry, BudgetSource, BuildDependencyMetaArgs, BuildDependencyMetaResult, ContextAllowlistBudget, ContextAllowlistPlan, ContextConfig, ContextModeSelection, CreateArchiveDiffWithDependencyContextResult, CreateArchiveFromFilesOptions, CreateArchiveOptions, CreateArchiveWithDependencyContextResult, CreateContextArchiveDiffResult, CreateContextArchiveOptions, CreateContextArchiveResult, DependencyContextInputs, DependencyMapFile, DependencyMapNode, DependencyMetaFile, DependencyMetaNode, DependencyStateEntry, DependencyStateFile, DependencyValidationMismatch, FileOp, FileOpsPlan, ImportsMap, JsDiffOutcome, NodeSource, NormalizedDependencyStateEntry, OpResult, PipelineOutcome, PrepareDependencyContextResult, SelectionReport, SelectionReportCounts, SnapshotUpdateMode, StageDependencyContextArgs, StageDependencyContextResult, StagePreparedDependencyContextResult, StagedEntry, ValidateDependencySelectionResult };
package/package.json CHANGED
@@ -151,5 +151,5 @@
151
151
  },
152
152
  "type": "module",
153
153
  "types": "dist/types/index.d.ts",
154
- "version": "0.9.4"
154
+ "version": "0.10.1"
155
155
  }