baller-maester 0.1.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-05-14
9
+
10
+ ### Added
11
+ - **`maester publish` per-document state prompt** — the publish walkthrough now asks per published document for a state choice: `draft`, `canon`, or "file header" (defer to inline state in the file). `draft` / `canon` are persisted as a `state:` field on the document entry in `maester.yaml`; "file header" omits the field so each file's own inline state (or the default `draft`) governs at sync time. Covers both the README.md auto-add path and explicit per-document additions, mirroring the `maester init` prompt added in v0.2.0.
12
+
13
+ ## [0.2.1] - 2026-05-14
14
+
15
+ ### Fixed
16
+ - **npm publish provenance** — added `repository`, `bugs`, and `homepage` fields to `package.json` so sigstore provenance validation matches the GitHub repository URL. Without these, `npm publish --provenance` failed with `422 Unprocessable Entity` because `repository.url` defaulted to an empty string.
17
+
18
+ ## [0.2.0] - 2026-05-14
19
+
20
+ ### Added
21
+ - **`maester init` per-entry state prompt** — when the user declares an explicit `includes` list during citadel initialization, the walkthrough now asks per entry for a state choice: `draft`, `canon`, or "file header" (defer to inline state in the file). `draft` / `canon` are persisted as the enriched `{ path, state }` object form in `citadel.yaml`; "file header" keeps the bare-string form so each file's own inline state (or the default `draft`) governs at sync time. Manifest-driven sources are unaffected.
22
+
8
23
  ## [0.1.0] - 2026-05-13
9
24
 
10
25
  ### Added
package/dist/cli/main.js CHANGED
@@ -1172,7 +1172,7 @@ function dedupeTargets(targets) {
1172
1172
 
1173
1173
  // package.json
1174
1174
  var package_default = {
1175
- version: "0.1.0"};
1175
+ version: "0.3.0"};
1176
1176
  var PACKAGE_VERSION = package_default.version;
1177
1177
 
1178
1178
  // src/core/skill/version.ts
@@ -1546,16 +1546,39 @@ async function collectIncludes(ctx) {
1546
1546
  message: "Includes \u2014 repo-relative paths or globs, comma- or whitespace-separated. At least one required.",
1547
1547
  placeholder: "docs/**/*.md, README.md",
1548
1548
  validate: (value) => {
1549
- const entries = parseIncludesEntries(value);
1550
- if (entries.length === 0) return "At least one includes entry is required.";
1551
- for (const entry of entries) {
1549
+ const entries2 = parseIncludesEntries(value);
1550
+ if (entries2.length === 0) return "At least one includes entry is required.";
1551
+ for (const entry of entries2) {
1552
1552
  const result = validateIncludesEntry(entry);
1553
1553
  if (!result.ok) return `'${entry}': ${result.reason}`;
1554
1554
  }
1555
1555
  return void 0;
1556
1556
  }
1557
1557
  });
1558
- return parseIncludesEntries(raw);
1558
+ const paths = parseIncludesEntries(raw);
1559
+ const entries = [];
1560
+ for (const path5 of paths) {
1561
+ const choice = await ctx.prompts.select({
1562
+ message: `State for '${path5}'?`,
1563
+ initialValue: "file-header",
1564
+ options: [
1565
+ { value: "draft", label: "draft", hint: "tag this entry as draft" },
1566
+ { value: "canon", label: "canon", hint: "tag this entry as canon" },
1567
+ {
1568
+ value: "file-header",
1569
+ label: "file header",
1570
+ hint: "no rule; defer to inline state in each file"
1571
+ }
1572
+ ]
1573
+ });
1574
+ entries.push(buildIncludeEntry(path5, choice));
1575
+ }
1576
+ return entries;
1577
+ }
1578
+ function buildIncludeEntry(path5, choice) {
1579
+ if (choice === "file-header") return path5;
1580
+ const state = choice;
1581
+ return { path: path5, state };
1559
1582
  }
1560
1583
  async function collectAuth(ctx) {
1561
1584
  const authType = await ctx.prompts.select({
@@ -1679,6 +1702,25 @@ function parseTags(value) {
1679
1702
  }
1680
1703
 
1681
1704
  // src/cli/commands/publish.ts
1705
+ function buildPublishedDocumentStateField(choice) {
1706
+ if (choice === "file-header") return {};
1707
+ return { state: choice };
1708
+ }
1709
+ async function askDocumentState(ctx, path5) {
1710
+ return ctx.prompts.select({
1711
+ message: `State for '${path5}'?`,
1712
+ initialValue: "file-header",
1713
+ options: [
1714
+ { value: "draft", label: "draft", hint: "tag this entry as draft" },
1715
+ { value: "canon", label: "canon", hint: "tag this entry as canon" },
1716
+ {
1717
+ value: "file-header",
1718
+ label: "file header",
1719
+ hint: "no rule; defer to inline state in the file"
1720
+ }
1721
+ ]
1722
+ });
1723
+ }
1682
1724
  function registerPublish(program, getContext) {
1683
1725
  program.command("publish").description("Configure this repository as a maester (walkthrough).").action(async () => {
1684
1726
  await runPublish(getContext());
@@ -1702,7 +1744,12 @@ async function runPublish(ctx) {
1702
1744
  initialValue: true
1703
1745
  });
1704
1746
  if (useReadme) {
1705
- documents.push({ path: "README.md", category: "readme" });
1747
+ const stateChoice = await askDocumentState(ctx, "README.md");
1748
+ documents.push({
1749
+ path: "README.md",
1750
+ category: "readme",
1751
+ ...buildPublishedDocumentStateField(stateChoice)
1752
+ });
1706
1753
  ctx.prompts.log.success("Added README.md");
1707
1754
  }
1708
1755
  }
@@ -1771,6 +1818,7 @@ async function collectOneDocument(ctx, repoRoot, existing) {
1771
1818
  ctx.prompts.log.warning(`'${trimmed}' does not yet exist in this repo. Saving anyway.`);
1772
1819
  }
1773
1820
  }
1821
+ const stateChoice = await askDocumentState(ctx, trimmed);
1774
1822
  const description = await ctx.prompts.text({
1775
1823
  message: "Description (optional)",
1776
1824
  placeholder: ""
@@ -1798,7 +1846,8 @@ async function collectOneDocument(ctx, repoRoot, existing) {
1798
1846
  path: trimmed,
1799
1847
  ...trimmedDesc ? { description: trimmedDesc } : {},
1800
1848
  ...trimmedCat ? { category: trimmedCat } : {},
1801
- ...tags.length > 0 ? { tags } : {}
1849
+ ...tags.length > 0 ? { tags } : {},
1850
+ ...buildPublishedDocumentStateField(stateChoice)
1802
1851
  };
1803
1852
  return doc;
1804
1853
  }