@youtyan/code-viewer 0.6.3 → 0.6.5
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 +14 -12
- package/dist/code-viewer.js +2395 -203
- package/package.json +4 -3
- package/skills/code-viewer-journal/SKILL.md +131 -0
- package/web/app.js +2609 -265
- package/web/index.html +1 -0
- package/web/style.css +1653 -169
- package/web/vendor/README.md +10 -6
- package/web/vendor/THIRD_PARTY_NOTICES.txt +41 -1
- package/web/vendor/highlight.js/highlight.min.js +47301 -1213
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youtyan/code-viewer",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Local browser-based code and git diff viewer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "bun run build:web && bun run build:server",
|
|
31
|
-
"build:web": "bun build --target=browser --format=iife --outfile=web/app.js web-src/app.ts && bun build --target=browser --format=esm --outfile=web/mermaid.js web-src/mermaid-entry.ts && bun build --target=browser --format=esm --outfile=web/shiki.js web-src/shiki-entry.ts && node scripts/generate-third-party-notices.mjs",
|
|
31
|
+
"build:web": "bun build --target=browser --format=iife --outfile=web/app.js web-src/app.ts && bun build --target=browser --format=esm --outfile=web/mermaid.js web-src/mermaid-entry.ts && bun build --target=browser --format=esm --outfile=web/shiki.js web-src/shiki-entry.ts && bun build --target=browser --format=iife --outfile=web/vendor/highlight.js/highlight.min.js web-src/highlight-entry.ts && node scripts/generate-third-party-notices.mjs",
|
|
32
32
|
"build:server": "bun build --target=node --format=esm --outfile=dist/code-viewer.js web-src/server/cli.ts",
|
|
33
33
|
"check": "bun run typecheck",
|
|
34
34
|
"typecheck": "tsc --noEmit",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test:postgres:down": "docker compose -f data/test/postgresql/docker-compose.yml down -v",
|
|
50
50
|
"test": "bun test",
|
|
51
51
|
"lint": "biome lint web-src package.json biome.jsonc",
|
|
52
|
-
"verify": "bun run check && bun run lint && bun run check:format && bun run build && bun run check:bundle && bun run test && node --check web/app.js && node --check web/mermaid.js && node --check web/shiki.js && node --check dist/code-viewer.js && node dist/code-viewer.js --help && node scripts/node-smoke.mjs",
|
|
52
|
+
"verify": "bun run check && bun run lint && bun run check:format && bun run build && bun run check:bundle && bun run test && node --check web/app.js && node --check web/mermaid.js && node --check web/shiki.js && node --check web/vendor/highlight.js/highlight.min.js && node --check dist/code-viewer.js && node dist/code-viewer.js --help && node scripts/node-smoke.mjs",
|
|
53
53
|
"pack:dry": "npm pack --dry-run",
|
|
54
54
|
"prepack": "bun run build",
|
|
55
55
|
"prepublishOnly": "bun run verify"
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@happy-dom/global-registrator": "^20.10.6",
|
|
69
69
|
"@types/bun": "1.3.13",
|
|
70
70
|
"@types/markdown-it": "14.1.2",
|
|
71
|
+
"highlight.js": "11.9.0",
|
|
71
72
|
"markdown-it": "14.1.1",
|
|
72
73
|
"markdown-it-anchor": "9.2.0",
|
|
73
74
|
"markdown-it-footnote": "4.0.0",
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-viewer-journal
|
|
3
|
+
description: Use when reading, creating, updating, claiming, completing, or linking code-viewer Work Log tasks through the `code-viewer journal` CLI. Triggers on "work log", "journal task", "task queue", "AI task", "GitHub Issue", "ワークログ", "タスク管理", "タスク一覧", "Issue紐づけ".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# code-viewer journal
|
|
7
|
+
|
|
8
|
+
Operate code-viewer Work Log tasks through the CLI. The CLI is the contract;
|
|
9
|
+
do not edit `.code-viewer/daily-journal.json` or `.code-viewer/tasks.json`
|
|
10
|
+
directly.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- A code-viewer server must already be running for the repository
|
|
15
|
+
(the human starts it with: `code-viewer`). The journal CLI never starts one.
|
|
16
|
+
- Run from inside the repository, or pass `--cwd <repo>`.
|
|
17
|
+
- If `code-viewer` is not on PATH, prefix every command with
|
|
18
|
+
`npx -y @youtyan/code-viewer`.
|
|
19
|
+
- For GitHub Issue listing or linking, `gh` must be installed. Check with:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
code-viewer doctor --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The `github.gh` row reports whether `gh --version` works. Doctor does not
|
|
26
|
+
inspect GitHub auth metadata.
|
|
27
|
+
|
|
28
|
+
## Read tasks
|
|
29
|
+
|
|
30
|
+
Use JSON whenever another agent step will parse the result:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
code-viewer journal tasks --json
|
|
34
|
+
code-viewer journal tasks --status todo --label ai-ready --json
|
|
35
|
+
code-viewer journal task-next --label ai-ready --limit 5 --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Guidelines:
|
|
39
|
+
|
|
40
|
+
- Use `task-next` for execution order; do not invent your own sort unless the
|
|
41
|
+
human asked for it.
|
|
42
|
+
- Treat labels as filters, priority as importance, and board order as human
|
|
43
|
+
ordering.
|
|
44
|
+
- Do not process `draft` tasks unless the human explicitly asked for drafts.
|
|
45
|
+
|
|
46
|
+
## Create tasks
|
|
47
|
+
|
|
48
|
+
Create local tasks through `task-add`:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
code-viewer journal task-add \
|
|
52
|
+
--title "Implement example workflow" \
|
|
53
|
+
--status todo \
|
|
54
|
+
--priority p1 \
|
|
55
|
+
--label ai-ready \
|
|
56
|
+
--label backend \
|
|
57
|
+
--body "Acceptance criteria and notes."
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use `--dry-run` before generated or bulk task creation:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
code-viewer journal task-add --title "Check task shape" --label ai-ready --dry-run
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Update tasks
|
|
67
|
+
|
|
68
|
+
Use `task-update` for title, status, priority, labels, due/source dates, and
|
|
69
|
+
body changes:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
code-viewer journal task-update <task-id> --status doing
|
|
73
|
+
code-viewer journal task-update <task-id> --priority p0 --label ai-ready --label ui
|
|
74
|
+
code-viewer journal task-update <task-id> --title "New title" --body "Updated notes."
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
When replacing labels, pass every label that should remain. Use
|
|
78
|
+
`--clear-labels` only when the task should end with no labels.
|
|
79
|
+
|
|
80
|
+
## Claim and finish
|
|
81
|
+
|
|
82
|
+
Claim exactly one task before editing code:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
code-viewer journal task-claim <task-id> --by agent --wip-limit 1
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Mark the task done with a concrete verification note:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
code-viewer journal task-done <task-id> --by agent --note "Implemented and verified with bun test."
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## GitHub Issues
|
|
95
|
+
|
|
96
|
+
List GitHub Issues read-only:
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
code-viewer journal github-issues --repo owner/repo --json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Link an issue to the local board without updating GitHub:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
code-viewer journal task-link-issue 123 --repo owner/repo --status draft --label ai-ready
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Rules:
|
|
109
|
+
|
|
110
|
+
- Never copy the GitHub Issue body into a local task.
|
|
111
|
+
- `task-link-issue` reads only metadata needed for the local link.
|
|
112
|
+
- The local task receives `github` and `issue-<number>` labels automatically.
|
|
113
|
+
- Put private planning notes in the local task body or a later
|
|
114
|
+
`task-update`, not in GitHub.
|
|
115
|
+
|
|
116
|
+
## Daily entries
|
|
117
|
+
|
|
118
|
+
Use daily entries for work not already represented by a task:
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
code-viewer journal add --date today --label ai --body "..."
|
|
122
|
+
code-viewer journal list --limit 7 --json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Full reference
|
|
126
|
+
|
|
127
|
+
Before composing non-trivial commands, read the complete agent guide:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
code-viewer journal agent-help
|
|
131
|
+
```
|