cngkit 1.1.18 → 1.1.19

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 (74) hide show
  1. package/README.md +86 -11
  2. package/dist/chunk-3A6GRNEV.js +1590 -0
  3. package/dist/chunk-3A6GRNEV.js.map +1 -0
  4. package/dist/{chunk-FJ34NVQ4.js → chunk-7SO75QXJ.js} +538 -68
  5. package/dist/chunk-7SO75QXJ.js.map +1 -0
  6. package/dist/chunk-DBA3BZXP.js +231 -0
  7. package/dist/chunk-DBA3BZXP.js.map +1 -0
  8. package/dist/{chunk-IB5B3BLY.js → chunk-GBONV6XP.js} +16 -4
  9. package/dist/chunk-GBONV6XP.js.map +1 -0
  10. package/dist/{chunk-C7HFDK4S.js → chunk-L6ZVQRSY.js} +207 -31
  11. package/dist/chunk-L6ZVQRSY.js.map +1 -0
  12. package/dist/{chunk-ZA4YOWPB.js → chunk-NGEWD4BW.js} +2 -1
  13. package/dist/chunk-TYDIBWZV.js +35 -0
  14. package/dist/chunk-TYDIBWZV.js.map +1 -0
  15. package/dist/{chunk-TWQDLZ6F.js → chunk-X4E7NAN4.js} +2 -2
  16. package/dist/cli.js +55 -14
  17. package/dist/cli.js.map +1 -1
  18. package/dist/commands/coderoom/index.js +6 -6
  19. package/dist/commands/coderoom/index.js.map +1 -1
  20. package/dist/commands/coderoom/join.js +5 -5
  21. package/dist/commands/coderoom/share.js +5 -5
  22. package/dist/commands/hookify/index.js +6 -6
  23. package/dist/commands/hookify/index.js.map +1 -1
  24. package/dist/commands/hookify/ingest.js +52 -13
  25. package/dist/commands/hookify/ingest.js.map +1 -1
  26. package/dist/commands/hooks/index.js +25 -0
  27. package/dist/commands/hooks/index.js.map +1 -0
  28. package/dist/commands/hooks/install.js +40 -0
  29. package/dist/commands/hooks/install.js.map +1 -0
  30. package/dist/commands/hooks/uninstall.js +40 -0
  31. package/dist/commands/hooks/uninstall.js.map +1 -0
  32. package/dist/commands/index.js +5 -5
  33. package/dist/commands/index.js.map +1 -1
  34. package/dist/commands/knowledges/audiences.js +6 -6
  35. package/dist/commands/knowledges/cat.js +31 -0
  36. package/dist/commands/knowledges/cat.js.map +1 -0
  37. package/dist/commands/knowledges/files.js +6 -6
  38. package/dist/commands/knowledges/find.js +66 -0
  39. package/dist/commands/knowledges/find.js.map +1 -0
  40. package/dist/commands/knowledges/glob.js +6 -6
  41. package/dist/commands/knowledges/grep.js +6 -6
  42. package/dist/commands/knowledges/head.js +41 -0
  43. package/dist/commands/knowledges/head.js.map +1 -0
  44. package/dist/commands/knowledges/index.js +6 -6
  45. package/dist/commands/knowledges/index.js.map +1 -1
  46. package/dist/commands/knowledges/list.js +7 -7
  47. package/dist/commands/knowledges/list.js.map +1 -1
  48. package/dist/commands/knowledges/ls.js +16 -7
  49. package/dist/commands/knowledges/ls.js.map +1 -1
  50. package/dist/commands/knowledges/read.js +6 -6
  51. package/dist/commands/knowledges/realpath.js +31 -0
  52. package/dist/commands/knowledges/realpath.js.map +1 -0
  53. package/dist/commands/knowledges/search.js +6 -6
  54. package/dist/commands/knowledges/stat.js +31 -0
  55. package/dist/commands/knowledges/stat.js.map +1 -0
  56. package/dist/commands/knowledges/status.js +6 -6
  57. package/dist/commands/knowledges/tail.js +41 -0
  58. package/dist/commands/knowledges/tail.js.map +1 -0
  59. package/dist/commands/knowledges/tree.js +46 -0
  60. package/dist/commands/knowledges/tree.js.map +1 -0
  61. package/dist/commands/login.js +3 -3
  62. package/dist/commands/scrub.js +3 -3
  63. package/dist/commands/transcripts.js +6 -6
  64. package/dist/commands/transcripts.js.map +1 -1
  65. package/package.json +2 -2
  66. package/dist/chunk-C7HFDK4S.js.map +0 -1
  67. package/dist/chunk-CBIVTEZP.js +0 -222
  68. package/dist/chunk-CBIVTEZP.js.map +0 -1
  69. package/dist/chunk-FJ34NVQ4.js.map +0 -1
  70. package/dist/chunk-IB5B3BLY.js.map +0 -1
  71. package/dist/chunk-KSW6QT5Q.js +0 -628
  72. package/dist/chunk-KSW6QT5Q.js.map +0 -1
  73. /package/dist/{chunk-ZA4YOWPB.js.map → chunk-NGEWD4BW.js.map} +0 -0
  74. /package/dist/{chunk-TWQDLZ6F.js.map → chunk-X4E7NAN4.js.map} +0 -0
package/README.md CHANGED
@@ -42,16 +42,18 @@ cngkit coderoom join <room-code>
42
42
  cngkit scrub [path]
43
43
  cngkit transcripts list --limit 12
44
44
  cngkit knowledges search Cloudflare --limit 3
45
- cngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
45
+ cngkit knowledges cat /libraries/lib-cloudflare/TOPIC.md
46
+ cngkit hooks install
46
47
  printf '{"hook":"PreToolUse"}' | cngkit hookify ingest --event PreToolUse
47
48
  ```
48
49
 
49
- The CLI currently has five main jobs:
50
+ The CLI currently has six main jobs:
50
51
 
51
52
  - **Coderoom**: start or join a live shared working-tree room.
52
53
  - **Scrub**: scan local files for secrets and optionally mask them inline.
53
54
  - **Transcripts**: inspect local Claude and Codex transcript files from the terminal.
54
- - **Knowledges**: search and read the hosted Harness knowledge catalog.
55
+ - **Knowledges**: traverse, search, and read the hosted Harness knowledge catalog.
56
+ - **Hooks**: install Hookify forwarding hooks into supported AI-assisted coding tools.
55
57
  - **Hookify**: forward local hook events to Curly.ng for server-side hook processing.
56
58
 
57
59
  ## Coderoom
@@ -93,6 +95,17 @@ Check catalog health:
93
95
  cngkit knowledges status
94
96
  ```
95
97
 
98
+ Browse the catalog like a remote filesystem:
99
+
100
+ ```bash
101
+ cngkit knowledges ls /
102
+ cngkit knowledges ls /libraries/lib-cloudflare -l
103
+ cngkit knowledges tree /libraries --depth 2
104
+ cngkit knowledges ls /libraries/lib-cloudflare
105
+ cngkit knowledges stat /libraries/lib-cloudflare/TOPIC.md
106
+ cngkit knowledges realpath /libraries/lib-cloudflare
107
+ ```
108
+
96
109
  Find relevant knowledge:
97
110
 
98
111
  ```bash
@@ -102,7 +115,16 @@ cngkit knowledges search Cloudflare --limit 3
102
115
  Read a catalog file:
103
116
 
104
117
  ```bash
105
- cngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
118
+ cngkit knowledges cat /libraries/lib-cloudflare/TOPIC.md
119
+ cngkit knowledges head /libraries/lib-cloudflare/TOPIC.md -n 20
120
+ cngkit knowledges tail /libraries/lib-cloudflare/TOPIC.md -n 20
121
+ cngkit knowledges read /libraries/lib-cloudflare/TOPIC.md --limit 80
122
+ ```
123
+
124
+ Find paths by shell-style filters:
125
+
126
+ ```bash
127
+ cngkit knowledges find /libraries -name "*cloudflare*" -type f
106
128
  ```
107
129
 
108
130
  List matching files:
@@ -121,21 +143,37 @@ Return JSON for another tool:
121
143
 
122
144
  ```bash
123
145
  cngkit knowledges status --json
146
+ cngkit --format json knowledges ls /
147
+ cngkit --format json knowledges tree /libraries --depth 2
148
+ cngkit --format json knowledges find /libraries -name "*cloudflare*" -type f
149
+ cngkit --format json knowledges stat /libraries/lib-cloudflare/TOPIC.md
124
150
  cngkit --format json knowledges search "vector search" --limit 5
125
151
  ```
126
152
 
127
153
  Catalog path shortcuts are supported. For example:
128
154
 
129
155
  ```text
130
- /libraries/lib-cloudflare/SUBSKILL.md
156
+ /libraries/lib-cloudflare/TOPIC.md
131
157
  ```
132
158
 
133
159
  maps to:
134
160
 
135
161
  ```text
136
- skills/knowledges/subskills/libraries/lib-cloudflare/SUBSKILL.md
162
+ skills/knowledges/topics/libraries/lib-cloudflare/TOPIC.md
137
163
  ```
138
164
 
165
+ The `knowledges` command set is stateless. It does not keep a working directory and does
166
+ not provide interactive traversal commands; pass the path explicitly on each command.
167
+
168
+ Text output is shell-friendly:
169
+
170
+ - `ls` prints one entry name per line; directories end with `/`. Use `--long` or `-l`
171
+ for the older metadata-heavy tab-separated output.
172
+ - `tree` prints a deterministic plain-text tree; directories end with `/`.
173
+ - `cat`, `head`, and `tail` print raw file content only.
174
+ - `find`, `glob`, and `grep --output-mode files_with_matches` print one path per line.
175
+ - `read`, `glob`, and `realpath` remain useful agent/API-oriented helper commands.
176
+
139
177
  ## Secret Scrubbing
140
178
 
141
179
  `scrub` scans a file or directory with TruffleHog and prints a redacted report.
@@ -172,17 +210,38 @@ Safety notes:
172
210
 
173
211
  ## Hookify
174
212
 
213
+ Use `hooks install` to configure supported local AI-assisted coding tools:
214
+
215
+ ```bash
216
+ cngkit hooks install --dry-run
217
+ cngkit hooks install
218
+ cngkit hooks install --tool codex
219
+ cngkit hooks uninstall --dry-run
220
+ ```
221
+
222
+ The installer currently writes user-level hook configuration for Claude Code and Codex.
223
+ It preserves existing non-cngkit hook handlers, replaces older cngkit Hookify handlers,
224
+ and installs `cngkit hookify ingest --event <EventName>` for every supported hook event
225
+ in each tool. Hook commands use the already-installed `cngkit` binary so hook execution
226
+ does not resolve `cngkit@latest` through npm on every event.
227
+ `hooks uninstall` removes current direct cngkit Hookify handlers and older npm/npx
228
+ `cngkit@latest` handlers, then reports the exact files, handler counts, and event names
229
+ it changed.
230
+
175
231
  `hookify` is the Curly.ng hook processing surface. The first command is intentionally
176
- small: it reads stdin and forwards the raw payload to the backend.
232
+ small: it reads stdin and forwards the raw payload to the backend. The backend can return
233
+ the hook result immediately or return a request id for workflow-backed processing; the CLI
234
+ polls until the final stdout, stderr, and exit code are ready.
177
235
 
178
236
  ```bash
179
237
  cngkit hookify ingest --event PreToolUse < hook-payload.json
180
238
  cngkit hookify ingest --event Stop --async < hook-payload.json
181
239
  ```
182
240
 
183
- The backend response controls stdout and the process exit code. If the backend request
184
- fails, the command falls back to exit code `0` so local hooks do not block work because
185
- the remote service is unavailable.
241
+ The backend response controls stdout and the process exit code. `--async` means the server
242
+ may defer the result behind a request id; it does not mean the local hook returns before the
243
+ final result is known. If the backend request or polling fails, the command falls back to
244
+ exit code `0` so local hooks do not block work because the remote service is unavailable.
186
245
 
187
246
  ## Local Agent Transcripts
188
247
 
@@ -232,7 +291,7 @@ source text:
232
291
  ```bash
233
292
  cngkit --format text --help
234
293
  cngkit --format json knowledges status
235
- cngkit --format markdown knowledges read /libraries/lib-cloudflare/SUBSKILL.md
294
+ cngkit --format markdown knowledges read /libraries/lib-cloudflare/TOPIC.md
236
295
  cngkit --no-color knowledges status
237
296
  ```
238
297
 
@@ -251,6 +310,9 @@ cngkit help knowledges
251
310
  cngkit coderoom --help
252
311
  cngkit knowledges read --help
253
312
  cngkit transcripts --help
313
+ cngkit hooks --help
314
+ cngkit hooks install --help
315
+ cngkit hooks uninstall --help
254
316
  cngkit hookify --help
255
317
  cngkit hookify ingest --help
256
318
  ```
@@ -280,9 +342,22 @@ src/commands/
280
342
  share.tsx cngkit coderoom share
281
343
  join.tsx cngkit coderoom join
282
344
  knowledges/
345
+ ls.tsx cngkit knowledges ls
346
+ tree.tsx cngkit knowledges tree
347
+ cat.tsx cngkit knowledges cat
348
+ head.tsx cngkit knowledges head
349
+ tail.tsx cngkit knowledges tail
350
+ find.tsx cngkit knowledges find
351
+ stat.tsx cngkit knowledges stat
352
+ realpath.tsx cngkit knowledges realpath
283
353
  read.tsx cngkit knowledges read
284
354
  grep.tsx cngkit knowledges grep
285
355
  glob.tsx cngkit knowledges glob
356
+ hooks/
357
+ install.tsx cngkit hooks install
358
+ uninstall.tsx cngkit hooks uninstall
359
+ hookify/
360
+ ingest.tsx cngkit hookify ingest
286
361
  ```
287
362
 
288
363
  The CLI does not hand-roll ANSI escape codes. Status styles go through Ink's built-in