@karmaniverous/stan-core 0.8.5 → 0.9.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.
- package/README.md +3 -13
- package/dist/mjs/index.js +1 -1
- package/dist/stan.system.md +67 -42
- package/dist/types/index.d.ts +6 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@ This package exposes the STAN engine as a library:
|
|
|
13
13
|
- Config loading/validation (top‑level `stan-core` in stan.config.yml|json)
|
|
14
14
|
- Imports staging under <stanPath>/imports/<label>/…
|
|
15
15
|
- Imports safety: patch + File Ops refuse to modify <stanPath>/imports/\*\* when the correct stanPath is provided
|
|
16
|
-
- Response‑format validator (optional)
|
|
17
16
|
|
|
18
17
|
For the CLI and TTY runner, see @karmaniverous/stan-cli.
|
|
19
18
|
|
|
@@ -136,14 +135,6 @@ await prepareImports({
|
|
|
136
135
|
});
|
|
137
136
|
```
|
|
138
137
|
|
|
139
|
-
Validate assistant responses (optional utility):
|
|
140
|
-
|
|
141
|
-
```ts
|
|
142
|
-
import { validateResponseMessage } from '@karmaniverous/stan-core';
|
|
143
|
-
const res = validateResponseMessage(replyBody);
|
|
144
|
-
if (!res.ok) console.error(res.errors.join('\n'));
|
|
145
|
-
```
|
|
146
|
-
|
|
147
138
|
## API surface
|
|
148
139
|
|
|
149
140
|
Top‑level (via `import '@karmaniverous/stan-core'`):
|
|
@@ -153,7 +144,6 @@ Top‑level (via `import '@karmaniverous/stan-core'`):
|
|
|
153
144
|
- Patch engine: `applyPatchPipeline`, `detectAndCleanPatch`, `executeFileOps`, `parseFileOpsBlock`
|
|
154
145
|
- Imports: `prepareImports`
|
|
155
146
|
- Config: `loadConfig`, `loadConfigSync`, `resolveStanPath`, `resolveStanPathSync`
|
|
156
|
-
- Validation: `validateResponseMessage`
|
|
157
147
|
|
|
158
148
|
See CHANGELOG for behavior changes. Typedoc site is generated from source.
|
|
159
149
|
|
|
@@ -168,13 +158,13 @@ Core file selection applies in this order:
|
|
|
168
158
|
- `includes` are additive and can re-include paths ignored by `.gitignore`.
|
|
169
159
|
- `excludes` are hard denials and override `includes`.
|
|
170
160
|
|
|
171
|
-
## Meta archive (context-mode thread opener)
|
|
161
|
+
## Meta archive (context-mode thread opener; written as archive.tar)
|
|
172
162
|
|
|
173
|
-
When dependency graph mode is enabled, the engine can create a small
|
|
163
|
+
When dependency graph mode is enabled, the engine can create a small “meta archive” (via `createMetaArchive`) intended as a thread opener. In `stan run --context --meta`, the host writes this archive as `archive.tar` (and does not write a diff archive).
|
|
174
164
|
|
|
175
165
|
- Includes `<stanPath>/system/**` (excluding `<stanPath>/system/.docs.meta.json`)
|
|
176
166
|
- Includes `<stanPath>/context/dependency.meta.json` (required)
|
|
177
|
-
-
|
|
167
|
+
- Includes `<stanPath>/context/dependency.state.json` (v2) when present (the host writes `{ "v": 2, "i": [] }` before archiving for a clean-slate selection)
|
|
178
168
|
- Includes repo-root (top-level) base files selected by current selection config
|
|
179
169
|
- Optionally includes `<stanPath>/output/**` when `includeOutputDir: true` (combine mode); archive files are still excluded by tar filter
|
|
180
170
|
- Excludes staged payloads under `<stanPath>/context/{npm,abs}/**` by omission
|