@shllg/emend 0.2.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/README.md +2 -1
- package/dist/emend.mjs +21082 -19217
- package/dist/publish-worker.mjs +4181 -3998
- package/dist/skills/emend-publish/SKILL.md +15 -7
- package/dist/skills/emend-review/SKILL.md +5 -2
- package/dist/skills/emend-review/references/manifest.md +5 -2
- package/dist/web/assets/App-BGSrPzZU.js +4 -0
- package/dist/web/assets/DiffPane-CnM0c-g-.js +238 -0
- package/dist/web/assets/{app-BrSxOaSi.js → app-CnDYJ1G1.js} +2 -2
- package/dist/web/assets/app-DXKT0r1-.css +2 -0
- package/dist/web/assets/diff-counts-aavca3cx.js +95 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/web/assets/App-DPbforeN.js +0 -4
- package/dist/web/assets/DiffPane-Ck50eAdK.js +0 -238
- package/dist/web/assets/app-RgxpbwFB.css +0 -2
- package/dist/web/assets/diff-counts-MdwymqCR.js +0 -95
|
@@ -17,7 +17,7 @@ Also use it when the user asks to publish or share a document, or to read one on
|
|
|
17
17
|
A document the user asks you to publish may live in the repository.
|
|
18
18
|
Do not publish unasked a file the task adds to the repository, such as docs, specs or tasks.
|
|
19
19
|
Do not use it for source code, for a hunk-review HTML writeup (see "Publish") or for anything the user wants kept out of emend.
|
|
20
|
-
If you
|
|
20
|
+
If you wrote it elsewhere, copy it into a doc root as step 1 says.
|
|
21
21
|
|
|
22
22
|
## Steps
|
|
23
23
|
|
|
@@ -27,9 +27,9 @@ If you already wrote the document elsewhere, such as in a temporary folder, copy
|
|
|
27
27
|
emend renders Markdown on its server: GFM tables, code colours, and ```` ```mermaid ```` fences become diagrams.
|
|
28
28
|
An HTML document's own scripts never run, and nothing loads from other hosts.
|
|
29
29
|
Use no CDN scripts, styles or fonts.
|
|
30
|
-
|
|
31
|
-
Markdown
|
|
32
|
-
Keep
|
|
30
|
+
For HTML, keep images and styles beside the file, using relative paths.
|
|
31
|
+
Markdown shows no local images yet; use HTML for images.
|
|
32
|
+
Keep it out of hidden folders: folder publishing skips dotfiles and hidden folders.
|
|
33
33
|
Tell the user the path of the file you wrote.
|
|
34
34
|
2. Publish it with the command under "Publish" below.
|
|
35
35
|
Stdout is the review URL alone.
|
|
@@ -45,9 +45,17 @@ If you already wrote the document elsewhere, such as in a temporary folder, copy
|
|
|
45
45
|
|
|
46
46
|
## Publish
|
|
47
47
|
|
|
48
|
-
Run
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
Run from the document's repository, or name a path under a doc root the user allowed.
|
|
49
|
+
Use a short, plain title; titles starting with `--` are refused.
|
|
50
|
+
|
|
51
|
+
`emend publish <file>` also takes any UTF-8 text file: config, script, SQL or log.
|
|
52
|
+
It shows these as source with line comments. Add `--source` to show Markdown or HTML as source.
|
|
53
|
+
A folder walk skips secret-looking filenames (not Markdown or HTML), binary, oversized or unreadable
|
|
54
|
+
files, text shown as source holding a private key, and folders named `secret(s)` or `credential(s)` in any case below the folder argument.
|
|
55
|
+
Below a folder argument, HTML assets in those folders or holding a private key are skipped too; other assets are not checked.
|
|
56
|
+
Explicit file or folder arguments publish as named; never name a credential file or secrets folder.
|
|
57
|
+
Warnings stop after 20 (`SHORTCUT_LIMITS.warnings`), then count further skips.
|
|
58
|
+
Each folder argument gets a published-file count.
|
|
51
59
|
|
|
52
60
|
If an emend error line mentions an agent sandbox, show the user that line and stop.
|
|
53
61
|
Do not run emend another way, retry it outside the sandbox, ask for escalated permissions,
|
|
@@ -172,7 +172,7 @@ A writeup can show images, such as before and after screenshots of a UI change.
|
|
|
172
172
|
- List it under `media` in the manifest with a `path` and a `source`.
|
|
173
173
|
- Reference it from any writeup section with ``. The alt text becomes the caption.
|
|
174
174
|
- Put a before and an after image in one paragraph, with alt text "Before" and "After", to show them side by side.
|
|
175
|
-
- Use PNG, JPEG, GIF, WebP or AVIF only. Each file is at most
|
|
175
|
+
- Use PNG, JPEG, GIF, WebP or AVIF only. Each file is at most 25 MiB. A review holds at most 50.
|
|
176
176
|
- Only listed paths render. Any other image reference in the writeup is dropped.
|
|
177
177
|
- Remote image URLs do not show. List the file under `media` instead.
|
|
178
178
|
- Images do not render in Markdown docs.
|
|
@@ -198,7 +198,10 @@ Each ref must be unique within its topic.
|
|
|
198
198
|
|
|
199
199
|
Read [the manifest example](references/manifest.md) before creating the manifest. Replace the
|
|
200
200
|
synthetic values with the review's paths, commit hashes and text. Docs use `source` only when
|
|
201
|
-
their local filename differs from the published path.
|
|
201
|
+
their local filename differs from the published path. Choose each doc's optional `view`:
|
|
202
|
+
`"rendered"` (the default for Markdown and HTML) or `"source"` for literal text with line comments.
|
|
203
|
+
Any other UTF-8 text file is a doc shown as source with line comments. One path may appear once
|
|
204
|
+
rendered and once as source; you decide per file.
|
|
202
205
|
When the work has a pull request, fixes an issue or opened one, add each URL to `links` with a
|
|
203
206
|
short label such as `PR #42`. Use only URLs you have seen; never guess one. The review header
|
|
204
207
|
shows them. When emend knows the repository's web address (see `repoUrl` in the manifest
|
|
@@ -136,7 +136,10 @@ It must end in the same kind of extension as `path`.
|
|
|
136
136
|
A doc's `source` must be inside the repository's worktree or inside a folder the user listed in
|
|
137
137
|
`docRoots` in emend's own configuration.
|
|
138
138
|
When publish prints `source is outside the allowed doc roots`, stop and ask the user to run `emend config add docRoots <folder>` for that folder, or to move the doc into the repository. Never run `emend config` or edit emend's configuration yourself.
|
|
139
|
-
|
|
139
|
+
A doc's optional `view` is `"rendered"` or `"source"`. Markdown and HTML render by default;
|
|
140
|
+
use `"source"` to read their literal text with line comments. Any other UTF-8 text file is a doc
|
|
141
|
+
shown as source with line comments. One path may appear once rendered and once as source.
|
|
142
|
+
Choose the view per file. Markdown renders as safe blocks; the writeup stays Markdown.
|
|
140
143
|
|
|
141
144
|
Set optional `main` to `"writeup"` or a declared doc path to choose the opening page, even with an empty writeup.
|
|
142
145
|
Without `main`, the app opens a nonempty writeup, then the first doc in manifest order, then the diff, or Writeup if nothing exists.
|
|
@@ -160,7 +163,7 @@ Each entry is `{ "path": "media/before.png", "source": ".shots/before.png" }`.
|
|
|
160
163
|
- Reference it from any writeup section with ``. The alt text becomes the caption.
|
|
161
164
|
- Put a before and an after image in one paragraph, with alt text "Before" and "After", to show them side by side.
|
|
162
165
|
- Use PNG, JPEG, GIF, WebP or AVIF only. The source must end in the same extension as `path`.
|
|
163
|
-
- Each file is at most
|
|
166
|
+
- Each file is at most 25 MiB. A review holds at most 50.
|
|
164
167
|
- `path` has no segment that starts with `.`, has no `:` and is unique.
|
|
165
168
|
- Remote image URLs do not show. List the file under `media` instead.
|
|
166
169
|
- Only listed paths render. Images do not render in Markdown docs.
|