@brunosouzas/stackledger 0.5.0 → 0.5.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 CHANGED
@@ -32,7 +32,7 @@ stackledger is a small, local-first tool for people and small companies who want
32
32
 
33
33
  ## Status
34
34
 
35
- Early development; the latest release on npm is `@brunosouzas/stackledger` 0.5.0. The catalogue format, the `validate`, `map`, `build` and `report` commands, the `mcp` server, Mac discovery (`stackledger discover` and `stackledger drift`), the agent skills check and map (`stackledger skills validate` and `stackledger skills map`) and the Skills section of the site (`stackledger build --skills`) work from npm or from source (see [Usage](#usage)). The order of the rest is in the [roadmap](docs/roadmap.md).
35
+ Early development; the latest release on npm is `@brunosouzas/stackledger` 0.5.1. The catalogue format, the `validate`, `map`, `build` and `report` commands, the `mcp` server, Mac discovery (`stackledger discover` and `stackledger drift`), the agent skills check and map (`stackledger skills validate` and `stackledger skills map`) and the Skills section of the site (`stackledger build --skills`) work from npm or from source (see [Usage](#usage)). The order of the rest is in the [roadmap](docs/roadmap.md).
36
36
 
37
37
  For a separate catalogue repository, copy the [pipeline template](examples/catalogue-repository/). Set up [protected hosting](docs/hosting.md) before the first deploy. The fictitious Northwind catalogue and its skill set run as a [demo](docs/demo.md) of the corporate mode, Software and Skills, at <https://stackledger-demo.pages.dev/>; it is protected by Cloudflare Access and only the owner can sign in, so for you it shows the sign-in page, which is the point. The [release guide](docs/release.md) covers npm publication, provenance and the SBOM.
38
38
 
@@ -88,8 +88,8 @@ stackledger does not call any AI model. Instead, a read-only [MCP](https://model
88
88
  Use npm with Node.js 22.12 or later. The package is `@brunosouzas/stackledger` from 0.4.1, the same code as 0.4.0; versions up to 0.4.0 were published as `stackledger`, now deprecated, and the command is `stackledger` in both. Version 0.4.0 adds the home page (the map moves to `/map/`, the default title becomes `stackledger`, `spec.site.home`), whole station names on both maps and rule counts on the skills map, and skips hidden folders in a catalogue; 0.3.0 added the Skills section of `stackledger build` (`--skills`, `spec.skills.folders`, `stackledger-skills.yaml`); 0.2.0 added the agent skills commands (`skills validate`, `.stackledgerignore`, `skills map`); 0.1.0 has the catalogue commands only.
89
89
 
90
90
  ```sh
91
- npx @brunosouzas/stackledger@0.5.0 --help
92
- npx @brunosouzas/stackledger@0.5.0 validate /path/to/catalogue
91
+ npx @brunosouzas/stackledger@0.5.1 --help
92
+ npx @brunosouzas/stackledger@0.5.1 validate /path/to/catalogue
93
93
  ```
94
94
 
95
95
  To run it from source (for development, or a change not yet on npm):
@@ -112,15 +112,15 @@ cd /path/to/skills && node /path/to/stackledger/dist/cli.js skills map . --out d
112
112
 
113
113
  | Command | Does | Status |
114
114
  |---|---|---|
115
- | `stackledger validate [folder]` | Checks a catalogue and reports each problem with file, line and field. Exit 0: no errors (warnings allowed); 1: catalogue errors; 2: usage or folder problem | Available (npm 0.5.0, source) |
116
- | `stackledger mcp <folder> [--view full\|staff]` | Serves the catalogue read-only to AI agents over MCP on stdio; see [docs/mcp.md](docs/mcp.md). Exit 2: usage or folder problem | Available (npm 0.5.0, source) |
117
- | `stackledger map <folder> [--view full\|staff] [--theme light\|dark] [--date YYYY-MM-DD]` | Draws a self-contained SVG on stdout; diagnostics and suggestions on stderr. Exit 0 even with catalogue errors; 2 for usage/folder problems. See [docs/map.md](docs/map.md) | Available (npm 0.5.0, source) |
118
- | `stackledger build <folder> --out <dir> [--date YYYY-MM-DD] [--skills <folder>]...` | Builds the `full` and `staff` static sites into `<dir>/full/` and `<dir>/staff/` (only `full` in the personal mode), with `_headers`, `robots.txt` and `_redirects`, replacing an earlier build atomically; with a skill set, both sites get the Skills section ([Skills on the site](#skills-on-the-site)); report on stderr. Exit 0 even with catalogue or skill-set errors; 1: internal failure, a broken `Settings` that sets `spec.skills`, a skills folder with nothing in it or two items with one page name (the earlier build is left as it was); 2: usage or folder problem. See [docs/site.md](docs/site.md) | Available (npm 0.5.0, source) |
119
- | `stackledger report <folder> [--date YYYY-MM-DD] [--days N] [--format text\|json\|csv\|ics]` | Prints the licence report of the `full` view on stdout: renewals in the next `--days` (default 90), recurring cost per currency by owner, payer and zone, one-off and planned costs, incomplete licences; or the renewal calendar. Exit 0 even with catalogue errors; 1: the report could not be computed or written; 2: usage or folder problem. See [docs/reports.md](docs/reports.md) | Available (npm 0.5.0, source) |
120
- | `stackledger discover` | Reads what this Mac has installed (Homebrew, App Store, applications, launchd, mise, npm, pipx), with every program in the macOS sandbox, and writes `~/.stackledger/<machine>/snapshot.json`; one summary line per source on stdout. Exit 0 also with skipped sources; 1: not macOS, no sandbox or the file could not be written safely; 2: usage problem. See [docs/discovery.md](docs/discovery.md) | Available (npm 0.5.0, source) |
121
- | `stackledger drift <folder> [--snapshot <file>] [--format text\|json] [--scaffold <dir>]` | Compares the snapshot with the catalogue through `stackledger/<source>` annotations: what is not declared (with the annotation to add), what is missing, what could not be checked, and `dependsOn` relations to confirm; `--scaffold` writes draft component files into a new folder outside the catalogue. Exit 0 even with catalogue errors; 1: internal or write failure; 2: usage, folder or snapshot problem. See [docs/discovery.md](docs/discovery.md) | Available (npm 0.5.0, source) |
122
- | `stackledger skills validate [folder...] [--json]` | Checks agent skills, playbooks, agents and rules read from the given folders (default: the current folder) as one set, and reports each problem with file, line and field. Exit 0: no errors (warnings allowed); 1: errors; 2: usage or folder problem. See [docs/skills.md](docs/skills.md) | Available (npm 0.5.0, source) |
123
- | `stackledger skills map [folder...] --out <folder> [--check]` | Writes Markdown pages with Mermaid diagrams of the set's declared relations into `<folder>`: an index and one page per skill, playbook and agent, byte for byte the same on every machine; `--check` writes nothing and lists what is out of date. Exit 0: written (also with errors in the set) or up to date; 1: out of date with `--check`, nothing found in a given folder, the folder changed during the run or a write failed; 2: usage or folder problem. See [docs/skills.md](docs/skills.md#map-in-the-repository) | Available (npm 0.5.0, source) |
115
+ | `stackledger validate [folder]` | Checks a catalogue and reports each problem with file, line and field. Exit 0: no errors (warnings allowed); 1: catalogue errors; 2: usage or folder problem | Available (npm 0.5.1, source) |
116
+ | `stackledger mcp <folder> [--view full\|staff]` | Serves the catalogue read-only to AI agents over MCP on stdio; see [docs/mcp.md](docs/mcp.md). Exit 2: usage or folder problem | Available (npm 0.5.1, source) |
117
+ | `stackledger map <folder> [--view full\|staff] [--theme light\|dark] [--date YYYY-MM-DD]` | Draws a self-contained SVG on stdout; diagnostics and suggestions on stderr. Exit 0 even with catalogue errors; 2 for usage/folder problems. See [docs/map.md](docs/map.md) | Available (npm 0.5.1, source) |
118
+ | `stackledger build <folder> --out <dir> [--date YYYY-MM-DD] [--skills <folder>]...` | Builds the `full` and `staff` static sites into `<dir>/full/` and `<dir>/staff/` (only `full` in the personal mode), with `_headers`, `robots.txt` and `_redirects`, replacing an earlier build atomically; with a skill set, both sites get the Skills section ([Skills on the site](#skills-on-the-site)); report on stderr. Exit 0 even with catalogue or skill-set errors; 1: internal failure, a broken `Settings` that sets `spec.skills`, a skills folder with nothing in it or two items with one page name (the earlier build is left as it was); 2: usage or folder problem. See [docs/site.md](docs/site.md) | Available (npm 0.5.1, source) |
119
+ | `stackledger report <folder> [--date YYYY-MM-DD] [--days N] [--format text\|json\|csv\|ics]` | Prints the licence report of the `full` view on stdout: renewals in the next `--days` (default 90), recurring cost per currency by owner, payer and zone, one-off and planned costs, incomplete licences; or the renewal calendar. Exit 0 even with catalogue errors; 1: the report could not be computed or written; 2: usage or folder problem. See [docs/reports.md](docs/reports.md) | Available (npm 0.5.1, source) |
120
+ | `stackledger discover` | Reads what this Mac has installed (Homebrew, App Store, applications, launchd, mise, npm, pipx), with every program in the macOS sandbox, and writes `~/.stackledger/<machine>/snapshot.json`; one summary line per source on stdout. Exit 0 also with skipped sources; 1: not macOS, no sandbox or the file could not be written safely; 2: usage problem. See [docs/discovery.md](docs/discovery.md) | Available (npm 0.5.1, source) |
121
+ | `stackledger drift <folder> [--snapshot <file>] [--format text\|json] [--scaffold <dir>]` | Compares the snapshot with the catalogue through `stackledger/<source>` annotations: what is not declared (with the annotation to add), what is missing, what could not be checked, and `dependsOn` relations to confirm; `--scaffold` writes draft component files into a new folder outside the catalogue. Exit 0 even with catalogue errors; 1: internal or write failure; 2: usage, folder or snapshot problem. See [docs/discovery.md](docs/discovery.md) | Available (npm 0.5.1, source) |
122
+ | `stackledger skills validate [folder...] [--json]` | Checks agent skills, playbooks, agents and rules read from the given folders (default: the current folder) as one set, and reports each problem with file, line and field. Exit 0: no errors (warnings allowed); 1: errors; 2: usage or folder problem. See [docs/skills.md](docs/skills.md) | Available (npm 0.5.1, source) |
123
+ | `stackledger skills map [folder...] --out <folder> [--check]` | Writes Markdown pages with Mermaid diagrams of the set's declared relations into `<folder>`: an index and one page per skill, playbook and agent, byte for byte the same on every machine; `--check` writes nothing and lists what is out of date. Exit 0: written (also with errors in the set) or up to date; 1: out of date with `--check`, nothing found in a given folder, the folder changed during the run or a write failed; 2: usage or folder problem. See [docs/skills.md](docs/skills.md#map-in-the-repository) | Available (npm 0.5.1, source) |
124
124
 
125
125
  `validate`, `mcp`, `map`, `report`, `drift` and `skills validate` only read files (`drift --scaffold` writes only inside the new folder it names); `build` and `skills map` write only inside their output folder; `discover` writes only its snapshot file. None of them makes network calls or sends telemetry, and none edits the catalogue. The text output and error messages of `validate`, `report`, `discover`, `drift` and `skills validate` carry no control characters from file names, options, catalogue or snapshot text, and their JSON output writes U+007F to U+009F as `\u` escapes; `build` and `mcp` keep their own rules, described in their documents.
126
126
 
@@ -32,7 +32,7 @@ concurrency:
32
32
  cancel-in-progress: false
33
33
 
34
34
  env:
35
- STACKLEDGER: "@brunosouzas/stackledger@0.5.0"
35
+ STACKLEDGER: "@brunosouzas/stackledger@0.5.1"
36
36
  WRANGLER: wrangler@4.151.3
37
37
  GITLEAKS_VERSION: 8.30.1
38
38
  # SHA-256 of gitleaks_8.30.1_linux_x64.tar.gz, from the release's checksums file.
@@ -10,7 +10,7 @@ catalog/ the catalogue: every YAML file below it is r
10
10
  README.md this file; replace it with your own
11
11
  ```
12
12
 
13
- The catalogue lives in `catalog/` so that stackledger never reads the workflow's own YAML (0.3.0 and earlier read hidden folders such as `.github/`; this template pins 0.5.0 (`@brunosouzas/stackledger`), which skips them, so the folder now only keeps the catalogue apart from the repository files). `catalog/catalog-info.yaml` holds one fictitious component, so the copy validates and builds as it is; replace it with yours ([catalogue format](https://github.com/brunosouzas/stackledger/blob/main/docs/catalogue-format.md)).
13
+ The catalogue lives in `catalog/` so that stackledger never reads the workflow's own YAML (0.3.0 and earlier read hidden folders such as `.github/`; this template pins 0.5.1 (`@brunosouzas/stackledger`), which skips them, so the folder now only keeps the catalogue apart from the repository files). `catalog/catalog-info.yaml` holds one fictitious component, so the copy validates and builds as it is; replace it with yours ([catalogue format](https://github.com/brunosouzas/stackledger/blob/main/docs/catalogue-format.md)).
14
14
 
15
15
  ## Personal or corporate
16
16
 
@@ -89,8 +89,8 @@ To fix forward, revert the bad commit on `main`; the push deploys the result. St
89
89
  With Node.js 22.12 or later:
90
90
 
91
91
  ```sh
92
- npx --yes @brunosouzas/stackledger@0.5.0 validate catalog
93
- npx --yes @brunosouzas/stackledger@0.5.0 build catalog --out ../catalogue-site --date "$(date -u +%F)"
92
+ npx --yes @brunosouzas/stackledger@0.5.1 validate catalog
93
+ npx --yes @brunosouzas/stackledger@0.5.1 build catalog --out ../catalogue-site --date "$(date -u +%F)"
94
94
  ```
95
95
 
96
96
  Build outside the repository, so the build is never committed.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@brunosouzas/stackledger",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@brunosouzas/stackledger",
9
- "version": "0.5.0",
9
+ "version": "0.5.1",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@brunosouzas/design-system": "0.3.1",
12
+ "@brunosouzas/design-system": "0.4.0",
13
13
  "@fontsource/heebo": "5.3.0",
14
14
  "@fontsource/lato": "5.3.0",
15
15
  "@fontsource/signika": "5.3.0",
@@ -500,9 +500,9 @@
500
500
  ]
501
501
  },
502
502
  "node_modules/@brunosouzas/design-system": {
503
- "version": "0.3.1",
504
- "resolved": "https://registry.npmjs.org/@brunosouzas/design-system/-/design-system-0.3.1.tgz",
505
- "integrity": "sha512-XvB8kOznNZoaeUavAq2SuCrW0Gqd9tQbTw/yixajyKpSxzHQGyfPXKY45yB9cMkr5gPETHaaBM4etuQlFz41Gw==",
503
+ "version": "0.4.0",
504
+ "resolved": "https://registry.npmjs.org/@brunosouzas/design-system/-/design-system-0.4.0.tgz",
505
+ "integrity": "sha512-wly8sSN0V8xN6UwgdwKrQ2q7/CgpPAk/BWRxIP8rLajGIDTC1lIPjyXJOSzzdpD+EY8UhSIHjUabe3AR0VE6nw==",
506
506
  "license": "Apache-2.0",
507
507
  "bin": {
508
508
  "brunosouzas-cover": "dist/scripts/cover.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosouzas/stackledger",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "description": "Govern your software stack and licences, drawn as a metro map",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  "test:perf": "vitest run --config vitest.perf.config.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@brunosouzas/design-system": "0.3.1",
44
+ "@brunosouzas/design-system": "0.4.0",
45
45
  "@fontsource/heebo": "5.3.0",
46
46
  "@fontsource/lato": "5.3.0",
47
47
  "@fontsource/signika": "5.3.0",
@@ -58,7 +58,11 @@
58
58
  justify-content: center;
59
59
  }
60
60
 
61
+ /* catalogue-site "Map shown size": the frame is as wide as the map it holds, centred in the column. */
61
62
  .map-frame {
63
+ width: fit-content;
64
+ max-width: 100%;
65
+ margin-inline: auto;
62
66
  overflow: auto;
63
67
  border: 1px solid var(--color-border);
64
68
  border-radius: var(--radius);
@@ -75,9 +79,12 @@
75
79
  cursor: grabbing;
76
80
  }
77
81
 
82
+ /* A map is never shown larger than its drawn size: width auto takes the SVG's width attribute (its
83
+ initial viewBox width, src/map/svg.ts), max-width shrinks it when the frame has less room. */
78
84
  .map-canvas svg {
79
85
  display: block;
80
- width: 100%;
86
+ width: auto;
87
+ max-width: 100%;
81
88
  height: auto;
82
89
  }
83
90