@karmaniverous/stan-cli 0.11.7 → 0.12.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,7 +2,7 @@
2
2
 
3
3
  # STAN — STAN Tames Autoregressive Nonsense
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/@karmaniverous/stan-cli.svg)](https://www.npmjs.com/package/@karmaniverous/stan-cli) ![Node Current](https://img.shields.io/node/v/@karmaniverous/stan-cli) <!-- TYPEDOC_EXCLUDE --> [![docs](https://img.shields.io/badge/docs-website-blue)](https://docs.karmanivero.us/stan) [![changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](https://github.com/karmaniverous/stan-cli/tree/main/CHANGELOG.md)<!-- /TYPEDOC_EXCLUDE --> [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/karmaniverous/stan-cli/tree/main/LICENSE.md)
5
+ [![npm version](https://img.shields.io/npm/v/@karmaniverous/stan-cli.svg)](https://www.npmjs.com/package/@karmaniverous/stan-cli) ![Node Current](https://img.shields.io/node/v/@karmaniverous/stan-cli) <!-- TYPEDOC_EXCLUDE --> [![docs](https://img.shields.io/badge/docs-website-blue)](https://docs.karmanivero.us/stan) [![changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](https://github.com/karmaniverous/stan-cli/tree/main/CHANGELOG.md)<!-- /TYPEDOC_EXCLUDE --> [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/karmaniverous/stan-cli/tree/main/LICENSE)
6
6
 
7
7
  ![STAN Loop](https://github.com/karmaniverous/stan-cli/raw/main/assets/stan-loop.png)
8
8
 
@@ -100,7 +100,7 @@ scripts:
100
100
  typecheck: npm run typecheck
101
101
  ```
102
102
 
103
- See [STAN Configuration](./docs-src/configuration.md) for more!
103
+ See [STAN Configuration](./guides/configuration.md) for more!
104
104
 
105
105
  ---
106
106
 
@@ -130,7 +130,7 @@ See [STAN Configuration](./docs-src/configuration.md) for more!
130
130
  stan patch -f file.patch # from file
131
131
  ```
132
132
 
133
- See [CLI Usage & Examples](./docs-src/cli-examples.md) for more!
133
+ See [CLI Usage & Examples](./guides/cli-examples.md) for more!
134
134
 
135
135
  ---
136
136
 
@@ -138,23 +138,23 @@ See [CLI Usage & Examples](./docs-src/cli-examples.md) for more!
138
138
 
139
139
  - [API reference](https://docs.karmanivero.us/stan)
140
140
  - Guides:
141
- - [Getting Started](./docs-src/getting-started.md) — Install the CLI, initialize a repo, and attach archives in chat. Recommended chat setup: import the STAN GPT agent into TypingMind (bootloader included; requires GPT‑5 access) via [this link](https://www.typingmind.com/characters/c-01K5X5RVA4N1DWBQWWJBYDNX2W).
142
- - [The STAN Loop](./docs-src/the-stan-loop.md) — How Build & Snapshot → Share & Baseline → Discuss & Patch work together.
143
- - [CLI Usage & Examples](./docs-src/cli-examples.md) — Common flags and invocation patterns, including `-p`, `-P`, `-S`, `-A`, and `-c`.
144
- - [Migration — Namespaced Configuration](./docs-src/migration.md) — Upgrade legacy configs using `stan init` (backs up `.bak`; supports `--dry-run`).
145
- - [Stan Configuration](./docs-src/configuration.md) — All config keys, includes/excludes semantics, and phase‑scoped CLI defaults.
146
- - [Patch Workflow & Diagnostics](./docs-src/patch-workflow.md) — Unified diff policy, diagnostics envelopes, and assistant expectations.
147
- - [Archives & Snapshots](./docs-src/archives-and-snapshots.md) — What goes into `archive.tar`/`archive.diff.tar`, combine mode, and snapshot history. Additional references:
148
-
141
+ - [Getting Started](./guides/getting-started.md) — Install the CLI, initialize a repo, and attach archives in chat. Recommended chat setup: import the STAN GPT agent into TypingMind (bootloader included; requires GPT‑5 access) via [this link](https://www.typingmind.com/characters/c-01K5X5RVA4N1DWBQWWJBYDNX2W).
142
+ - [The STAN Loop](./guides/the-stan-loop.md) — How Build & Snapshot → Share & Baseline → Discuss & Patch work together.
143
+ - [CLI Usage & Examples](./guides/cli-examples.md) — Common flags and invocation patterns, including `-p`, `-P`, `-S`, `-A`, and `-c`.
144
+ - [Migration — Namespaced Configuration](./guides/migration.md) — Upgrade legacy configs using `stan init` (backs up `.bak`; supports `--dry-run`).
145
+ - [Stan Configuration](./guides/configuration.md) — All config keys, includes/excludes semantics, and phase‑scoped CLI defaults.
146
+ - [Patch Workflow & Diagnostics](./guides/patch-workflow.md) — Unified diff policy, diagnostics envelopes, and assistant expectations.
147
+ - [Archives & Snapshots](./guides/archives-and-snapshots.md) — What goes into `archive.tar`/`archive.diff.tar`, combine mode, and snapshot history. Additional references:
148
+ - [Bootloader & Assistant Setup](./guides/bootloader.md) — How the assistant loads `.stan/system/stan.system.md` from attached archives.
149
149
  - The following documents are maintained by STAN and live under `<stanPath>/system/` in your repo:
150
150
  - `stan.project.md` contains your evolving project requirements.
151
- - `stan-todo.md` contains your evolving development plan.
151
+ - `stan.todo.md` contains your evolving development plan.
152
152
 
153
153
  - Case studies:
154
- - [rrstack](./docs-src/case-studies/rrstack.md) — how STAN enabled rapid development in a couple of days.
155
- - Comparison: [Why STAN Over Alternatives?](./docs-src/why-stan-over-alternatives.md)
156
- - Tutorial: [Quickstart (End‑to‑End)](./docs-src/tutorial-quickstart.md)
157
- - FAQ: answers to common questions and pitfalls.
154
+ - [rrstack](./guides/case-studies/rrstack.md) — how STAN enabled rapid development in a couple of days.
155
+ - Comparison: [Why STAN Over Alternatives?](./guides/why-stan-over-alternatives.md)
156
+ - Tutorial: [Quickstart (End‑to‑End)](./guides/tutorial-quickstart.md)
157
+ - [FAQ](./guides/faq.md) answers to common questions and pitfalls.
158
158
  - Contributing: [Dev Quickstart](./contributing.md)
159
159
 
160
160
  ---
@@ -0,0 +1 @@
1
+ "use strict";var t=require("node:fs/promises"),e=require("node:path");const n=1048576;exports.classifyForArchive=async function(s,r){const i=[],a=[],o=[];await Promise.all(r.map(async r=>{const c=r.replace(/\\/g,"/"),l=e.resolve(s,r);let h=0;try{h=(await t.stat(l)).size}catch{return}let u,p=!1;try{p=await(async e=>{try{const n=await t.open(e,"r");try{const t=Buffer.allocUnsafe(8192),{bytesRead:e}=await n.read(t,0,t.length,0);for(let n=0;n<e;n+=1)if(0===t[n])return!0;return!1}finally{await n.close().catch(()=>{})}}catch{return!1}})(l)}catch{p=!1}if(p)a.push({path:c,size:h});else{i.push(c);try{(h<=n||h<5*n)&&(u=(t=>{const e=t.replace(/\r\n/g,"\n");return 0===e.length?0:e.split("\n").length})(await t.readFile(l,"utf8")))}catch{}(h>n||"number"==typeof u&&u>3e3)&&o.push({path:c,size:h,loc:u})}}));const c=[];if(a.length>0){c.push(`Binary files excluded from archive (${a.length.toString()}):`);for(const t of a)c.push(` - ${t.path} (${t.size.toString()} bytes)`);c.push("")}if(o.length>0){c.push(`Large text files (included; consider excludes if unwanted) (${o.length.toString()}):`);for(const t of o){const e=[` - ${t.path}`,`(${t.size.toString()} bytes)`];"number"==typeof t.loc&&e.push(`${t.loc.toString()} LOC`),c.push(e.join(" "))}c.push(""),c.push(`Thresholds: size > ${n.toString()} bytes or LOC > ${3e3.toString()}`)}0===c.length&&c.push("No archive warnings.");const l=c.join("\n")+(c.length?"\n":"");return{textFiles:i,excludedBinaries:a,largeText:o,warningsBody:l}};