@karmaniverous/stan-core 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  # @karmaniverous/stan-core (engine)
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/@karmaniverous/stan-core.svg)](https://www.npmjs.com/package/@karmaniverous/stan-core) ![Node Current](https://img.shields.io/node/v/@karmaniverous/stan-core) <!-- TYPEDOC_EXCLUDE --> [![docs](https://img.shields.io/badge/docs-website-blue)](https://docs.karmanivero.us/stan-core) [![changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](https://github.com/karmaniverous/stan-core/tree/main/CHANGELOG.md)<!-- /TYPEDOC_EXCLUDE --> [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/karmaniverous/stan-core/tree/main/LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/@karmaniverous/stan-core.svg)](https://www.npmjs.com/package/@karmaniverous/stan-core) ![Node Current](https://img.shields.io/node/v/@karmaniverous/stan-core) <!-- TYPEDOC_EXCLUDE --> [![docs](https://img.shields.io/badge/docs-website-blue)](https://docs.karmanivero.us/stan-core) [![changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](https://github.com/karmaniverous/stan-core/tree/main/CHANGELOG.md)<!-- /TYPEDOC_EXCLUDE --> [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/karmaniverous/stan-core/tree/main/LICENSE)
6
6
 
7
7
  This package exposes the STAN engine as a library:
8
8
 
9
9
  - File selection (gitignore + includes/excludes + reserved workspace rules)
10
10
  - Archiving: full archive.tar and diff archive.diff.tar (binary screening)
11
11
  - Patch engine: worktree‑first git apply cascade with jsdiff fallback
12
- - File Ops: safe mv/cp/rm/rmdir/mkdirp block as “pre‑ops”
12
+ - File Ops: safe mv/cp/rm/rmdir/mkdirp block as “pre‑ops”
13
13
  - Config loading/validation (top‑level `stan-core` in stan.config.yml|json)
14
14
  - Imports staging under <stanPath>/imports/<label>/…
15
- - Imports safety: patch + File Ops refuse to modify <stanPath>/imports/** when the correct stanPath is provided
15
+ - Imports safety: patch + File Ops refuse to modify <stanPath>/imports/\*\* when the correct stanPath is provided
16
16
  - Response‑format validator (optional)
17
17
 
18
18
  For the CLI and TTY runner, see @karmaniverous/stan-cli.
@@ -168,32 +168,37 @@ Core file selection applies in this order:
168
168
  - `includes` are additive and can re-include paths ignored by `.gitignore`.
169
169
  - `excludes` are hard denials and override `includes`.
170
170
 
171
- ## Meta archive (context-mode thread opener)
172
-
173
- When dependency graph mode is enabled, the engine can create a small `archive.meta.tar` (via `createMetaArchive`) intended as a thread opener:
174
-
175
- - Includes `<stanPath>/system/**` (excluding `<stanPath>/system/.docs.meta.json`)
176
- - Includes `<stanPath>/context/dependency.meta.json` (required)
177
- - Includes `<stanPath>/context/dependency.state.json` when present
178
- - Includes repo-root (top-level) base files selected by current selection config
179
- - Excludes staged payloads under `<stanPath>/context/{npm,abs}/**` by omission
180
-
181
- ## Dependency graph mode: TypeScript injection (host contract)
182
-
183
- When you call `buildDependencyMeta(...)`, `@karmaniverous/stan-core` delegates dependency graph generation to its peer dependency `@karmaniverous/stan-context`.
184
-
185
- TypeScript must be provided by the host environment (typically `stan-cli`) via either `typescript` (preferred) or `typescriptPath`. `stan-core` does not attempt to resolve or import TypeScript itself; it passes these values through to `stan-context`.
186
-
187
- If neither `typescript` nor `typescriptPath` is provided, `buildDependencyMeta` will throw (the error originates from `stan-context`).
188
-
189
- Minimal example:
190
-
191
- ```ts
192
- import ts from 'typescript';
193
- import { buildDependencyMeta } from '@karmaniverous/stan-core';
194
- await buildDependencyMeta({ cwd: process.cwd(), stanPath: '.stan', typescript: ts });
195
- ```
196
-
171
+ ## Meta archive (context-mode thread opener)
172
+
173
+ When dependency graph mode is enabled, the engine can create a small `archive.meta.tar` (via `createMetaArchive`) intended as a thread opener:
174
+
175
+ - Includes `<stanPath>/system/**` (excluding `<stanPath>/system/.docs.meta.json`)
176
+ - Includes `<stanPath>/context/dependency.meta.json` (required)
177
+ - Omits `<stanPath>/context/dependency.state.json` always (clean slate for selections)
178
+ - Includes repo-root (top-level) base files selected by current selection config
179
+ - Optionally includes `<stanPath>/output/**` when `includeOutputDir: true` (combine mode); archive files are still excluded by tar filter
180
+ - Excludes staged payloads under `<stanPath>/context/{npm,abs}/**` by omission
181
+
182
+ ## Dependency graph mode: TypeScript injection (host contract)
183
+
184
+ When you call `buildDependencyMeta(...)`, `@karmaniverous/stan-core` delegates dependency graph generation to its peer dependency `@karmaniverous/stan-context`.
185
+
186
+ TypeScript must be provided by the host environment (typically `stan-cli`) via either `typescript` (preferred) or `typescriptPath`. `stan-core` does not attempt to resolve or import TypeScript itself; it passes these values through to `stan-context`.
187
+
188
+ If neither `typescript` nor `typescriptPath` is provided, `buildDependencyMeta` will throw (the error originates from `stan-context`).
189
+
190
+ Minimal example:
191
+
192
+ ```ts
193
+ import ts from 'typescript';
194
+ import { buildDependencyMeta } from '@karmaniverous/stan-core';
195
+ await buildDependencyMeta({
196
+ cwd: process.cwd(),
197
+ stanPath: '.stan',
198
+ typescript: ts,
199
+ });
200
+ ```
201
+
197
202
  ## Environment variables
198
203
 
199
204
  See [Env Vars](./guides/env-vars.md) for a complete list of environment variable switches observed by the engine, tests, and release scripts.