ctxr-cli 0.25.0 → 0.26.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.
Files changed (39) hide show
  1. package/dist/commands/publish-check.d.ts +12 -0
  2. package/dist/commands/publish-check.d.ts.map +1 -1
  3. package/dist/commands/publish-check.js +38 -7
  4. package/dist/commands/publish-check.js.map +1 -1
  5. package/dist/commands/serve.d.ts.map +1 -1
  6. package/dist/commands/serve.js +19 -5
  7. package/dist/commands/serve.js.map +1 -1
  8. package/dist/core/approval/sessions.d.ts +1 -1
  9. package/dist/core/approval/sessions.d.ts.map +1 -1
  10. package/dist/core/approval/sessions.js +8 -8
  11. package/dist/core/approval/sessions.js.map +1 -1
  12. package/dist/core/browse/approve.d.ts +6 -3
  13. package/dist/core/browse/approve.d.ts.map +1 -1
  14. package/dist/core/browse/approve.js +70 -25
  15. package/dist/core/browse/approve.js.map +1 -1
  16. package/dist/core/browse/memo.d.ts +7 -0
  17. package/dist/core/browse/memo.d.ts.map +1 -0
  18. package/dist/core/browse/memo.js +56 -0
  19. package/dist/core/browse/memo.js.map +1 -0
  20. package/dist/core/browse/review.d.ts +2 -1
  21. package/dist/core/browse/review.d.ts.map +1 -1
  22. package/dist/core/browse/review.js +10 -4
  23. package/dist/core/browse/review.js.map +1 -1
  24. package/dist/core/browse/serving-state.d.ts +45 -0
  25. package/dist/core/browse/serving-state.d.ts.map +1 -0
  26. package/dist/core/browse/serving-state.js +108 -0
  27. package/dist/core/browse/serving-state.js.map +1 -0
  28. package/dist/core/checks/organize-checks.js +2 -2
  29. package/dist/core/checks/organize-checks.js.map +1 -1
  30. package/dist/core/git/exec.js +6 -7
  31. package/dist/core/git/exec.js.map +1 -1
  32. package/dist/core/publish/lifespan.d.ts +5 -5
  33. package/dist/core/publish/lifespan.d.ts.map +1 -1
  34. package/dist/core/publish/lifespan.js +13 -8
  35. package/dist/core/publish/lifespan.js.map +1 -1
  36. package/dist/version.d.ts +1 -1
  37. package/dist/version.js +1 -1
  38. package/package.json +1 -1
  39. package/templates/skills/ctxr-publish.md +25 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctxr-cli",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "Context store for AI coding agents — markdown and git, catalog and graph retrieval, no vector database.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -96,7 +96,8 @@ this choice. Why: a page filed under a word that names nothing helps no reader.
96
96
 
97
97
  Never start the page's own name with a date (`YYYY-` or `YYYY-MM-DD-`). That naming is reserved for
98
98
  the frozen pages that `ctxr publish new --disposable` makes. The rule applies to the final segment, not
99
- to the folders above it. The command refuses to overwrite an existing folder. If a folder already
99
+ to the folders above it. It does not apply to a PDF file in the page's folder, which starts with its
100
+ render date (step 8). The command refuses to overwrite an existing folder. If a folder already
100
101
  exists for this subject, edit its files directly. Do not run `publish new` again. Why: a rename or an
101
102
  overwrite breaks a link that somebody already has.
102
103
 
@@ -133,6 +134,7 @@ Run `ctxr publish check <path>`. It runs the mechanical half of the checklist:
133
134
  with a real date at the start of its name;
134
135
  - for a permanent page, the note it represents (`represented-note`) and that note's recorded hash
135
136
  (`represented-note-hash`).
137
+ - for each PDF at the page folder's root, a file name that starts with a real date (`pdf-name`).
136
138
 
137
139
  The command reports the page's lifespan. It exits non-zero and names every failing check. Fix all of
138
140
  them before you report the page as ready. The command answers only what the files can show. Why: the
@@ -186,6 +188,28 @@ changed after the stamp. To confirm a stale page, do these steps in order:
186
188
  `ctxr publish stamp` never overwrites a marker. Why: a stamp without a review confirms nothing, so
187
189
  the stale report stays until somebody removes the marker.
188
190
 
191
+ **A PDF of the page.** Make a PDF only when you send the page as a document. Why: every PDF is
192
+ kept, so a PDF for each edit fills the folder.
193
+
194
+ Write the PDF into the page's folder, next to `index.html`. Start its file name with the date you
195
+ render it: `<YYYY-MM-DD>-<name>.pdf`. `ctxr publish check` fails a PDF at the folder root that has no
196
+ real date (`pdf-name`). `ctxr publish check --json` lists each PDF with its address. Give that address
197
+ when you hand on the PDF.
198
+
199
+ A PDF is never a page on its own. A document that you send as a PDF still needs an `index.html`, and
200
+ you print the PDF from it. Why: every command that reads pages finds a page by its `index.html`. The
201
+ stamp on its README then reports the page and its PDFs as stale together.
202
+
203
+ When the page changes, write a new dated PDF. Do not change or remove an earlier PDF. Why: an earlier
204
+ file can be the one a recipient got, and the folder then shows what you sent on each date.
205
+
206
+ Put a PDF that the page uses, but that you did not render, in the page's `assets/` folder. Why:
207
+ `ctxr publish check` reads only the PDFs at the folder root as the page's renderings.
208
+
209
+ The store chooses how to make the PDF. You can print `index.html`, which already has a print rule.
210
+ You can also use the store's own document skill, if it keeps its styled HTML as `index.html`.
211
+ Contexture does not render PDFs.
212
+
189
213
  Never revise a disposable page after it lands. Why: it is a snapshot of one moment, and its link
190
214
  shows that moment. Make a new disposable page instead. Do not remove a disposable page yourself.
191
215
  `ctxr lint` lists disposable pages that are older than 30 days, and the operator decides which to