cngkit 1.1.13 → 1.1.15

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.
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  readBackendHealth
3
- } from "./chunk-FGPQZ6ZK.js";
3
+ } from "./chunk-CSP6OWQH.js";
4
4
  import {
5
5
  createPeerId,
6
6
  createRoomCode,
7
7
  resolveApiBaseUrl
8
- } from "./chunk-TSPDBGJM.js";
8
+ } from "./chunk-U6XERHCZ.js";
9
9
 
10
10
  // src/features/coderoom/run-coderoom-command.ts
11
11
  import process2 from "process";
@@ -412,4 +412,4 @@ export {
412
412
  runShareCommand,
413
413
  runJoinCommand
414
414
  };
415
- //# sourceMappingURL=chunk-QGU4QBLQ.js.map
415
+ //# sourceMappingURL=chunk-55BKHXBM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveApiBaseUrl
3
- } from "./chunk-TSPDBGJM.js";
3
+ } from "./chunk-U6XERHCZ.js";
4
4
  import {
5
5
  __export
6
6
  } from "./chunk-PZ5AY32C.js";
@@ -3231,4 +3231,4 @@ export {
3231
3231
  createCngApiClient,
3232
3232
  readBackendHealth
3233
3233
  };
3234
- //# sourceMappingURL=chunk-FGPQZ6ZK.js.map
3234
+ //# sourceMappingURL=chunk-CSP6OWQH.js.map
@@ -1,10 +1,10 @@
1
1
  // src/cli/help-specs.ts
2
2
  var commandList = [
3
- "- `cngkit login` - open Curly.ng login.",
4
- "- `cngkit coderoom ...` - unite developers in a live shared code room.",
5
- "- `cngkit scrub [path]` - scan for secrets and optionally mask them inline.",
3
+ "- `cngkit login` - open Curly.ng login, or print the URL in headless shells.",
4
+ "- `cngkit coderoom ...` - share or join a live developer room for a working tree.",
5
+ "- `cngkit scrub [path]` - scan for secrets; rewrite only when `--yes` is passed.",
6
6
  "- `cngkit transcripts ...` - list, read, and grep local Claude/Codex transcripts.",
7
- "- `cngkit knowledges ...` - read the hosted Harness catalog."
7
+ "- `cngkit knowledges ...` - search and read the hosted Harness knowledge catalog."
8
8
  ].join("\n");
9
9
  var coderoomCommandList = [
10
10
  "- `share [room-code]` - start a live room from the current directory.",
@@ -26,9 +26,16 @@ var helpTopics = [
26
26
  aliases: ["", "overview", "help"],
27
27
  body: `# cngkit
28
28
 
29
- Curly.ng operator CLI for backend-connected repo sync, secret scrubbing, and Harness knowledges access.
29
+ Curly.ng operator CLI for shared code rooms, safe local cleanup, local agent transcripts, and hosted Harness knowledges.
30
30
 
31
- ## Usage
31
+ ## Run Now
32
+
33
+ \`\`\`bash
34
+ npx --yes cngkit@latest --help
35
+ npx --yes cngkit@latest knowledges search "cloudflare backend" --limit 3
36
+ \`\`\`
37
+
38
+ ## Installed Usage
32
39
 
33
40
  \`\`\`bash
34
41
  cngkit <command> [options]
@@ -38,9 +45,10 @@ cngkit <command> [options]
38
45
 
39
46
  ${commandList}
40
47
 
41
- ## Progressive Help
48
+ ## Help Map
42
49
 
43
50
  \`\`\`bash
51
+ cngkit help <topic>
44
52
  cngkit <command> --help
45
53
  cngkit coderoom --help
46
54
  cngkit coderoom <subcommand> --help
@@ -49,7 +57,13 @@ cngkit knowledges --help
49
57
  cngkit knowledges <subcommand> --help
50
58
  \`\`\`
51
59
 
52
- The CLI intentionally prints plain Markdown or line-oriented text with no color-only state, tables that require terminal width, or hidden interactive prompts. Add \`--json\` to read-only knowledges commands when another agent or tool needs structured backend data.
60
+ ## AI And Scripts
61
+
62
+ - Help is Markdown in pipes and colorized Markdown in interactive terminals.
63
+ - Text output is line-oriented; commands do not rely on color-only state.
64
+ - Use \`--json\` on read-only knowledges commands for typed backend payloads.
65
+ - Use \`CNGKIT_COLOR=never\` for logs, screenshots, and strict plain text.
66
+ - Use \`npm_config_progress=false npx --yes cngkit@latest ...\` for clean one-shot npx captures.
53
67
 
54
68
  ## Backend
55
69
 
@@ -68,18 +82,19 @@ CNGKIT_API_BASE_URL=<url> cngkit ...
68
82
  aliases: ["login"],
69
83
  body: `# cngkit login
70
84
 
71
- Open Curly.ng login in a browser. In headless environments, print the URL so an agent can surface it to the operator.
85
+ Open Curly.ng login in a browser. In headless shells, print the URL so an agent can show it to the operator.
72
86
 
73
87
  ## Usage
74
88
 
75
89
  \`\`\`bash
90
+ npx --yes cngkit@latest login
76
91
  cngkit login
77
92
  \`\`\`
78
93
 
79
- ## Output Contract
94
+ ## Output
80
95
 
81
96
  - First line names the login URL being opened.
82
- - If no local browser opener exists, the CLI prints a direct URL.
97
+ - If no browser opener exists, the CLI prints a direct URL.
83
98
  - No credentials are printed or persisted by this command.
84
99
  `
85
100
  },
@@ -88,9 +103,9 @@ cngkit login
88
103
  aliases: ["transcripts", "transcript"],
89
104
  body: `# cngkit transcripts
90
105
 
91
- Read local agent transcript JSONL files from \`~/.codex/sessions\`, \`~/.codex/archived_sessions\`, \`~/.claude/projects\`, and \`~/.claude/history.jsonl\`.
106
+ Read local Claude and Codex transcript JSONL files.
92
107
 
93
- This is local operator tooling. It does not call the Curly backend and it does not upload transcript content.
108
+ This is local-only operator tooling. It does not call Curly.ng and it does not upload transcript content.
94
109
 
95
110
  ## Usage
96
111
 
@@ -100,6 +115,13 @@ cngkit transcripts read <path-or-session-id> [--source all|codex|claude] [--limi
100
115
  cngkit transcripts grep <query> [--source all|codex|claude] [--limit <n>] [--file-limit <n>] [--include-internal] [--json]
101
116
  \`\`\`
102
117
 
118
+ ## Sources
119
+
120
+ - \`~/.codex/sessions\`
121
+ - \`~/.codex/archived_sessions\`
122
+ - \`~/.claude/projects\`
123
+ - \`~/.claude/history.jsonl\`
124
+
103
125
  ## Defaults
104
126
 
105
127
  - \`list\`: newest 12 transcript files.
@@ -107,7 +129,7 @@ cngkit transcripts grep <query> [--source all|codex|claude] [--limit <n>] [--fil
107
129
  - \`grep\`: first 80 matching user/assistant entries from the newest 60 files.
108
130
  - \`--source\`: \`all\`.
109
131
 
110
- ## Output Contract
132
+ ## Output
111
133
 
112
134
  - Text mode prints source, role, timestamp when available, and extracted message text.
113
135
  - Internal developer/system payloads and hook/tool noise are skipped unless \`--include-internal\` is passed.
@@ -119,9 +141,7 @@ cngkit transcripts grep <query> [--source all|codex|claude] [--limit <n>] [--fil
119
141
  aliases: ["coderoom", "code-room", "repo-sync"],
120
142
  body: `# cngkit coderoom
121
143
 
122
- Coderoom is the fast way to unite developers around one working tree. It gives a pair or team a temporary shared room over the Curly backend so one developer can share local file changes and another can join from their own machine.
123
-
124
- It is intentionally closer to a Drive-like project room than a raw socket command: the room code is the shared folder link, each connected machine is a collaborator, and the file stream is the activity feed. The browser experience at \`/coderoom\` provides the helper surface for copying commands and explaining the room model.
144
+ Create or join a temporary live room for sharing a working tree over the Curly backend.
125
145
 
126
146
  ## Usage
127
147
 
@@ -136,17 +156,17 @@ ${coderoomCommandList}
136
156
  ## Common Flow
137
157
 
138
158
  \`\`\`bash
139
- cngkit coderoom share
140
- cngkit coderoom join <room-code>
159
+ npx --yes cngkit@latest coderoom share
160
+ npx --yes cngkit@latest coderoom join <room-code>
141
161
  \`\`\`
142
162
 
143
- ## Backend Contract
163
+ ## Behavior
144
164
 
145
165
  - Connects to \`/api/cng/sync/:roomCode\` on the configured Curly backend.
146
166
  - Uses WebSocket transport backed by the \`CngSyncRoom\` Durable Object.
147
167
  - Sends an initial snapshot, then file and delete events.
148
168
  - Last received change wins.
149
- - Current rooms are live relays, not durable cloud storage. The Drive-like frontend is the collaboration shell around that live primitive.
169
+ - Current rooms are live relays, not durable cloud storage.
150
170
  `
151
171
  },
152
172
  {
@@ -154,7 +174,7 @@ cngkit coderoom join <room-code>
154
174
  aliases: ["coderoom-share"],
155
175
  body: `# cngkit coderoom share
156
176
 
157
- Start a real-time repository sync room from the current directory.
177
+ Start a live repository sync room from the current directory.
158
178
 
159
179
  ## Usage
160
180
 
@@ -162,7 +182,7 @@ Start a real-time repository sync room from the current directory.
162
182
  cngkit coderoom share [room-code]
163
183
  \`\`\`
164
184
 
165
- ## Backend Contract
185
+ ## Behavior
166
186
 
167
187
  - Connects to \`/api/cng/sync/:roomCode\` on the configured Curly backend.
168
188
  - Uses WebSocket transport backed by the \`CngSyncRoom\` Durable Object.
@@ -175,7 +195,7 @@ cngkit coderoom share [room-code]
175
195
  - Preserves files ignored by the repo's \`.gitignore\`.
176
196
  - Sends regular files as base64 payloads in the sync protocol.
177
197
 
178
- ## Output Contract
198
+ ## Output
179
199
 
180
200
  - Prints room code, repo root, peer id, backend health, and concise sync events.
181
201
  - Keeps running until the socket closes or the process receives a termination signal.
@@ -186,7 +206,7 @@ cngkit coderoom share [room-code]
186
206
  aliases: ["coderoom-join"],
187
207
  body: `# cngkit coderoom join
188
208
 
189
- Join an existing real-time repository sync room in the current directory.
209
+ Join an existing live repository sync room from the current directory.
190
210
 
191
211
  ## Usage
192
212
 
@@ -194,11 +214,11 @@ Join an existing real-time repository sync room in the current directory.
194
214
  cngkit coderoom join <room-code>
195
215
  \`\`\`
196
216
 
197
- ## Backend Contract
217
+ ## Behavior
198
218
 
199
219
  Same transport and filesystem contract as \`cngkit coderoom share\`. The supplied room code selects the Durable Object room.
200
220
 
201
- ## Output Contract
221
+ ## Output
202
222
 
203
223
  - Prints backend health, room code, repo root, peer id, and concise sync events.
204
224
  - Missing room code exits with a usage error.
@@ -209,7 +229,7 @@ Same transport and filesystem contract as \`cngkit coderoom share\`. The supplie
209
229
  aliases: ["scrub"],
210
230
  body: `# cngkit scrub
211
231
 
212
- Scan a file or directory for secrets with TruffleHog. Report-only is the default. Inline masking requires \`--yes\`.
232
+ Scan a file or directory for secrets with TruffleHog. Report-only is the default.
213
233
 
214
234
  ## Usage
215
235
 
@@ -218,16 +238,21 @@ cngkit scrub [path]
218
238
  cngkit scrub [path] --yes
219
239
  \`\`\`
220
240
 
241
+ ## Safety
242
+
243
+ - Default mode does not rewrite files.
244
+ - Inline masking rewrites files and requires \`--yes\`.
245
+ - Raw and redacted secret values are never printed.
246
+
221
247
  ## Requirements
222
248
 
223
249
  - \`trufflehog\` must be available on \`PATH\`.
224
250
 
225
- ## Safety Contract
251
+ ## Mask Format
226
252
 
227
- - Default mode does not rewrite files.
228
- - \`--yes\` rewrites detected secret values inline with \`[CNGKIT_SECRET:<detector>:<verified|unverified>]\` placeholders.
229
- - \`--mask\` is accepted as a compatibility alias, but still requires \`--yes\`.
230
- - Raw and redacted secret values are never printed in the report.
253
+ \`\`\`text
254
+ [CNGKIT_SECRET:<detector>:<verified|unverified>]
255
+ \`\`\`
231
256
  `
232
257
  },
233
258
  {
@@ -235,7 +260,7 @@ cngkit scrub [path] --yes
235
260
  aliases: ["knowledges", "knowledge"],
236
261
  body: `# cngkit knowledges
237
262
 
238
- Read the hosted Harness knowledges catalog from the Curly backend. These commands are read-only and use the generated \`@cng/client\` SDK against public backend routes.
263
+ Search and read the hosted Harness knowledges catalog from the Curly backend.
239
264
 
240
265
  ## Usage
241
266
 
@@ -250,6 +275,7 @@ ${knowledgesCommandList}
250
275
  ## Progressive Help
251
276
 
252
277
  \`\`\`bash
278
+ cngkit help knowledges <subcommand>
253
279
  cngkit knowledges <subcommand> --help
254
280
  cngkit knowledges read --help
255
281
  cngkit knowledges grep --help
@@ -259,10 +285,10 @@ cngkit knowledges glob --help
259
285
  ## Common Examples
260
286
 
261
287
  \`\`\`bash
262
- cngkit knowledges search "cloudflare backend" --limit 3
263
- cngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
264
- cngkit knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches
265
- cngkit knowledges glob "**/*.md" --path /libraries/lib-cloudflare
288
+ npx --yes cngkit@latest knowledges search "cloudflare backend" --limit 3
289
+ npx --yes cngkit@latest knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
290
+ npx --yes cngkit@latest knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches
291
+ npx --yes cngkit@latest knowledges glob "**/*.md" --path /libraries/lib-cloudflare
266
292
  \`\`\`
267
293
 
268
294
  ## AI-Friendly Output
@@ -279,7 +305,7 @@ cngkit knowledges glob "**/*.md" --path /libraries/lib-cloudflare
279
305
  aliases: ["knowledges-status", "status"],
280
306
  body: `# cngkit knowledges status
281
307
 
282
- Print remote Harness catalog state from \`GET /api/harness/knowledges/catalog\`.
308
+ Print remote Harness catalog state.
283
309
 
284
310
  ## Usage
285
311
 
@@ -287,7 +313,7 @@ Print remote Harness catalog state from \`GET /api/harness/knowledges/catalog\`.
287
313
  cngkit knowledges status [--json]
288
314
  \`\`\`
289
315
 
290
- ## Output Contract
316
+ ## Output
291
317
 
292
318
  - Text mode prints catalog name, file count, blob count, Vectorize binding, and latest run when present.
293
319
  - \`--json\` prints the backend data payload.
@@ -298,7 +324,7 @@ cngkit knowledges status [--json]
298
324
  aliases: ["knowledges-audiences", "audiences"],
299
325
  body: `# cngkit knowledges audiences
300
326
 
301
- List valid audience filters from \`GET /api/harness/knowledges/audiences\`.
327
+ List valid audience filters for catalog browsing.
302
328
 
303
329
  ## Usage
304
330
 
@@ -306,7 +332,9 @@ List valid audience filters from \`GET /api/harness/knowledges/audiences\`.
306
332
  cngkit knowledges audiences [--json]
307
333
  \`\`\`
308
334
 
309
- Use this before \`cngkit knowledges files --audience <id>\`.
335
+ ## Use When
336
+
337
+ Run this before \`cngkit knowledges files --audience <id>\`.
310
338
  `
311
339
  },
312
340
  {
@@ -314,7 +342,7 @@ Use this before \`cngkit knowledges files --audience <id>\`.
314
342
  aliases: ["knowledges-search", "search"],
315
343
  body: `# cngkit knowledges search
316
344
 
317
- Run semantic search against the Cloudflare Vectorize-backed Harness index.
345
+ Search the hosted Harness index for relevant skills and subskills.
318
346
 
319
347
  ## Usage
320
348
 
@@ -329,7 +357,7 @@ cngkit knowledges search <query> [--limit <n>] [--json]
329
357
  ## Example
330
358
 
331
359
  \`\`\`bash
332
- cngkit knowledges search "cloudflare backend" --limit 3
360
+ npx --yes cngkit@latest knowledges search "cloudflare backend" --limit 3
333
361
  \`\`\`
334
362
  `
335
363
  },
@@ -338,7 +366,7 @@ cngkit knowledges search "cloudflare backend" --limit 3
338
366
  aliases: ["knowledges-list", "list"],
339
367
  body: `# cngkit knowledges list
340
368
 
341
- List known subskills from \`GET /api/harness/knowledges/subskills\`, optionally filtered locally by query.
369
+ List hosted Harness subskills, optionally filtered by query.
342
370
 
343
371
  ## Usage
344
372
 
@@ -349,6 +377,12 @@ cngkit knowledges list [query] [--limit <n>] [--json]
349
377
  ## Defaults
350
378
 
351
379
  - \`--limit\`: \`25\`
380
+
381
+ ## Example
382
+
383
+ \`\`\`bash
384
+ cngkit knowledges list cloudflare --limit 10
385
+ \`\`\`
352
386
  `
353
387
  },
354
388
  {
@@ -356,7 +390,7 @@ cngkit knowledges list [query] [--limit <n>] [--json]
356
390
  aliases: ["knowledges-files", "files"],
357
391
  body: `# cngkit knowledges files
358
392
 
359
- List uploaded catalog files from \`GET /api/harness/knowledges/files\`.
393
+ List uploaded Harness catalog files, optionally filtered by query or audience.
360
394
 
361
395
  ## Usage
362
396
 
@@ -369,7 +403,12 @@ cngkit knowledges files [query] [--audience <id>] [--limit <n>] [--json]
369
403
  - \`--limit\`: \`25\`
370
404
  - \`--audience\`: omitted
371
405
 
372
- Run \`cngkit knowledges audiences\` to discover supported audience ids.
406
+ ## Example
407
+
408
+ \`\`\`bash
409
+ cngkit knowledges files cloudflare --limit 10
410
+ cngkit knowledges files "vector search" --audience builders
411
+ \`\`\`
373
412
  `
374
413
  },
375
414
  {
@@ -377,7 +416,7 @@ Run \`cngkit knowledges audiences\` to discover supported audience ids.
377
416
  aliases: ["knowledges-read", "read"],
378
417
  body: `# cngkit knowledges read
379
418
 
380
- Claude-style read tool for hosted Harness catalog files. Backed by \`GET /api/harness/filesystem/read\` and \`HarnessReadQuerySchema\`.
419
+ Read a hosted Harness catalog file by path.
381
420
 
382
421
  ## Usage
383
422
 
@@ -391,7 +430,7 @@ cngkit knowledges read <file-path> [--offset <n>] [--limit <n>] [--json]
391
430
  - \`--offset\`: zero-based starting line. Default: \`0\`.
392
431
  - \`--limit\`: maximum lines. Default in CLI: \`200\`. Backend max: \`2000\`.
393
432
 
394
- ## Output Contract
433
+ ## Output
395
434
 
396
435
  - Text mode prints only the returned file content first.
397
436
  - If truncated, a final bracketed truncation note is printed after the content.
@@ -400,7 +439,7 @@ cngkit knowledges read <file-path> [--offset <n>] [--limit <n>] [--json]
400
439
  ## Example
401
440
 
402
441
  \`\`\`bash
403
- cngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
442
+ npx --yes cngkit@latest knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
404
443
  \`\`\`
405
444
  `
406
445
  },
@@ -409,7 +448,7 @@ cngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80
409
448
  aliases: ["knowledges-grep", "grep"],
410
449
  body: `# cngkit knowledges grep
411
450
 
412
- Claude-style grep tool for hosted Harness catalog files. Backed by \`GET /api/harness/filesystem/grep\` and \`HarnessGrepQuerySchema\`.
451
+ Search inside hosted Harness catalog files with a JavaScript regular expression.
413
452
 
414
453
  ## Usage
415
454
 
@@ -427,7 +466,7 @@ cngkit knowledges grep <pattern> [--path <path>] [--include <glob>] [--output-mo
427
466
  - \`--context\`: context lines around content matches. Default: \`0\`. Backend max: \`20\`.
428
467
  - \`--case-insensitive\`: maps to backend \`case_insensitive=true\`.
429
468
 
430
- ## Output Contract
469
+ ## Output
431
470
 
432
471
  - \`content\`: prints blocks as \`file_path:line_number\`, optional context lines, then \`> matching line\`.
433
472
  - \`files_with_matches\`: prints one matching file path per line.
@@ -437,8 +476,8 @@ cngkit knowledges grep <pattern> [--path <path>] [--include <glob>] [--output-mo
437
476
  ## Examples
438
477
 
439
478
  \`\`\`bash
440
- cngkit knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches
441
- cngkit knowledges grep "Vectorize|D1" --path /libraries/lib-cloudflare --context 2
479
+ npx --yes cngkit@latest knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches
480
+ npx --yes cngkit@latest knowledges grep "Vectorize|D1" --path /libraries/lib-cloudflare --context 2
442
481
  \`\`\`
443
482
  `
444
483
  },
@@ -447,7 +486,7 @@ cngkit knowledges grep "Vectorize|D1" --path /libraries/lib-cloudflare --context
447
486
  aliases: ["knowledges-glob", "glob"],
448
487
  body: `# cngkit knowledges glob
449
488
 
450
- Claude-style glob tool for hosted Harness catalog files. Backed by \`GET /api/harness/filesystem/glob\` and \`HarnessGlobQuerySchema\`.
489
+ Find hosted Harness catalog files by glob pattern.
451
490
 
452
491
  ## Usage
453
492
 
@@ -469,7 +508,7 @@ cngkit knowledges glob [pattern] [--path <path>] [--json]
469
508
  - \`*.SUBSKILL.md\`
470
509
  - \`SKILL.md\`
471
510
 
472
- ## Output Contract
511
+ ## Output
473
512
 
474
513
  - Text mode prints one file path per line.
475
514
  - If truncated, a final bracketed truncation note is printed.
@@ -478,11 +517,12 @@ cngkit knowledges glob [pattern] [--path <path>] [--json]
478
517
  ## Example
479
518
 
480
519
  \`\`\`bash
481
- cngkit knowledges glob "**/*.md" --path /libraries/lib-cloudflare
520
+ npx --yes cngkit@latest knowledges glob "**/*.md" --path /libraries/lib-cloudflare
482
521
  \`\`\`
483
522
  `
484
523
  }
485
524
  ];
525
+ var helpTopicNames = helpTopics.filter((topic) => topic.title !== "cngkit").map((topic) => topic.title).sort();
486
526
  var helpTopicByAlias = /* @__PURE__ */ new Map();
487
527
  for (const topic of helpTopics) {
488
528
  for (const alias of topic.aliases) {
@@ -491,7 +531,14 @@ for (const topic of helpTopics) {
491
531
  }
492
532
  function formatCngkitHelp(topicName) {
493
533
  const normalizedTopicName = normalizeHelpTopicName(topicName);
494
- return (helpTopicByAlias.get(normalizedTopicName) ?? helpTopicByAlias.get(""))?.body.trim() ?? "";
534
+ const topic = helpTopicByAlias.get(normalizedTopicName);
535
+ if (topic) {
536
+ return topic.body.trim();
537
+ }
538
+ if (normalizedTopicName === "") {
539
+ return helpTopicByAlias.get("")?.body.trim() ?? "";
540
+ }
541
+ return formatUnknownHelpTopic(normalizedTopicName);
495
542
  }
496
543
  function formatKnowledgesHelp(topicName) {
497
544
  const normalizedTopicName = normalizeHelpTopicName(topicName);
@@ -501,9 +548,25 @@ function formatKnowledgesHelp(topicName) {
501
548
  function normalizeHelpTopicName(value) {
502
549
  return value?.trim().toLowerCase().replace(/\s+/g, "-") ?? "";
503
550
  }
551
+ function formatUnknownHelpTopic(topicName) {
552
+ return `# cngkit help
553
+
554
+ No help topic named \`${topicName}\`.
555
+
556
+ ## Available Topics
557
+
558
+ ${helpTopicNames.map((name) => `- \`${name}\``).join("\n")}
559
+
560
+ ## Usage
561
+
562
+ \`\`\`bash
563
+ cngkit help <topic>
564
+ cngkit <command> --help
565
+ \`\`\``;
566
+ }
504
567
 
505
568
  export {
506
569
  formatCngkitHelp,
507
570
  formatKnowledgesHelp
508
571
  };
509
- //# sourceMappingURL=chunk-S6LINZSY.js.map
572
+ //# sourceMappingURL=chunk-IG7DJU7W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli/help-specs.ts"],"sourcesContent":["type HelpTopic = {\n title: string;\n aliases: string[];\n body: string;\n};\n\nconst commandList = [\n \"- `cngkit login` - open Curly.ng login, or print the URL in headless shells.\",\n \"- `cngkit coderoom ...` - share or join a live developer room for a working tree.\",\n \"- `cngkit scrub [path]` - scan for secrets; rewrite only when `--yes` is passed.\",\n \"- `cngkit transcripts ...` - list, read, and grep local Claude/Codex transcripts.\",\n \"- `cngkit knowledges ...` - search and read the hosted Harness knowledge catalog.\",\n].join(\"\\n\");\n\nconst coderoomCommandList = [\n \"- `share [room-code]` - start a live room from the current directory.\",\n \"- `join <room-code>` - join another developer's live room from the current directory.\",\n].join(\"\\n\");\n\nconst knowledgesCommandList = [\n \"- `status` - print remote catalog state.\",\n \"- `audiences` - list valid audience filters.\",\n \"- `search <query>` - semantic search over Cloudflare Vectorize-backed records.\",\n \"- `list [query]` - list known subskills.\",\n \"- `files [query]` - list uploaded catalog files.\",\n \"- `read <file-path>` - Claude-style file read.\",\n \"- `grep <pattern>` - Claude-style content search.\",\n \"- `glob [pattern]` - Claude-style file discovery.\",\n].join(\"\\n\");\n\nconst helpTopics: HelpTopic[] = [\n {\n title: \"cngkit\",\n aliases: [\"\", \"overview\", \"help\"],\n body: `# cngkit\n\nCurly.ng operator CLI for shared code rooms, safe local cleanup, local agent transcripts, and hosted Harness knowledges.\n\n## Run Now\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest --help\nnpx --yes cngkit@latest knowledges search \"cloudflare backend\" --limit 3\n\\`\\`\\`\n\n## Installed Usage\n\n\\`\\`\\`bash\ncngkit <command> [options]\n\\`\\`\\`\n\n## Commands\n\n${commandList}\n\n## Help Map\n\n\\`\\`\\`bash\ncngkit help <topic>\ncngkit <command> --help\ncngkit coderoom --help\ncngkit coderoom <subcommand> --help\ncngkit transcripts --help\ncngkit knowledges --help\ncngkit knowledges <subcommand> --help\n\\`\\`\\`\n\n## AI And Scripts\n\n- Help is Markdown in pipes and colorized Markdown in interactive terminals.\n- Text output is line-oriented; commands do not rely on color-only state.\n- Use \\`--json\\` on read-only knowledges commands for typed backend payloads.\n- Use \\`CNGKIT_COLOR=never\\` for logs, screenshots, and strict plain text.\n- Use \\`npm_config_progress=false npx --yes cngkit@latest ...\\` for clean one-shot npx captures.\n\n## Backend\n\nDefault API: \\`https://curly.ng\\`\n\nOverride with:\n\n\\`\\`\\`bash\ncngkit --api-base-url <url> ...\nCNGKIT_API_BASE_URL=<url> cngkit ...\n\\`\\`\\`\n`,\n },\n {\n title: \"login\",\n aliases: [\"login\"],\n body: `# cngkit login\n\nOpen Curly.ng login in a browser. In headless shells, print the URL so an agent can show it to the operator.\n\n## Usage\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest login\ncngkit login\n\\`\\`\\`\n\n## Output\n\n- First line names the login URL being opened.\n- If no browser opener exists, the CLI prints a direct URL.\n- No credentials are printed or persisted by this command.\n`,\n },\n {\n title: \"transcripts\",\n aliases: [\"transcripts\", \"transcript\"],\n body: `# cngkit transcripts\n\nRead local Claude and Codex transcript JSONL files.\n\nThis is local-only operator tooling. It does not call Curly.ng and it does not upload transcript content.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit transcripts list [--source all|codex|claude] [--limit <n>] [--json]\ncngkit transcripts read <path-or-session-id> [--source all|codex|claude] [--limit <n>] [--include-internal] [--json]\ncngkit transcripts grep <query> [--source all|codex|claude] [--limit <n>] [--file-limit <n>] [--include-internal] [--json]\n\\`\\`\\`\n\n## Sources\n\n- \\`~/.codex/sessions\\`\n- \\`~/.codex/archived_sessions\\`\n- \\`~/.claude/projects\\`\n- \\`~/.claude/history.jsonl\\`\n\n## Defaults\n\n- \\`list\\`: newest 12 transcript files.\n- \\`read\\`: newest 80 user/assistant entries from the selected file.\n- \\`grep\\`: first 80 matching user/assistant entries from the newest 60 files.\n- \\`--source\\`: \\`all\\`.\n\n## Output\n\n- Text mode prints source, role, timestamp when available, and extracted message text.\n- Internal developer/system payloads and hook/tool noise are skipped unless \\`--include-internal\\` is passed.\n- Direct file paths, home-relative paths, and partial session ids are accepted by \\`read\\`.\n`,\n },\n {\n title: \"coderoom\",\n aliases: [\"coderoom\", \"code-room\", \"repo-sync\"],\n body: `# cngkit coderoom\n\nCreate or join a temporary live room for sharing a working tree over the Curly backend.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit coderoom <subcommand> [options]\n\\`\\`\\`\n\n## Subcommands\n\n${coderoomCommandList}\n\n## Common Flow\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest coderoom share\nnpx --yes cngkit@latest coderoom join <room-code>\n\\`\\`\\`\n\n## Behavior\n\n- Connects to \\`/api/cng/sync/:roomCode\\` on the configured Curly backend.\n- Uses WebSocket transport backed by the \\`CngSyncRoom\\` Durable Object.\n- Sends an initial snapshot, then file and delete events.\n- Last received change wins.\n- Current rooms are live relays, not durable cloud storage.\n`,\n },\n {\n title: \"coderoom share\",\n aliases: [\"coderoom-share\"],\n body: `# cngkit coderoom share\n\nStart a live repository sync room from the current directory.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit coderoom share [room-code]\n\\`\\`\\`\n\n## Behavior\n\n- Connects to \\`/api/cng/sync/:roomCode\\` on the configured Curly backend.\n- Uses WebSocket transport backed by the \\`CngSyncRoom\\` Durable Object.\n- Sends an initial snapshot, then file and delete events.\n- Last received change wins.\n\n## Filesystem Contract\n\n- Preserves \\`.git/\\`.\n- Preserves files ignored by the repo's \\`.gitignore\\`.\n- Sends regular files as base64 payloads in the sync protocol.\n\n## Output\n\n- Prints room code, repo root, peer id, backend health, and concise sync events.\n- Keeps running until the socket closes or the process receives a termination signal.\n`,\n },\n {\n title: \"coderoom join\",\n aliases: [\"coderoom-join\"],\n body: `# cngkit coderoom join\n\nJoin an existing live repository sync room from the current directory.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit coderoom join <room-code>\n\\`\\`\\`\n\n## Behavior\n\nSame transport and filesystem contract as \\`cngkit coderoom share\\`. The supplied room code selects the Durable Object room.\n\n## Output\n\n- Prints backend health, room code, repo root, peer id, and concise sync events.\n- Missing room code exits with a usage error.\n`,\n },\n {\n title: \"scrub\",\n aliases: [\"scrub\"],\n body: `# cngkit scrub\n\nScan a file or directory for secrets with TruffleHog. Report-only is the default.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit scrub [path]\ncngkit scrub [path] --yes\n\\`\\`\\`\n\n## Safety\n\n- Default mode does not rewrite files.\n- Inline masking rewrites files and requires \\`--yes\\`.\n- Raw and redacted secret values are never printed.\n\n## Requirements\n\n- \\`trufflehog\\` must be available on \\`PATH\\`.\n\n## Mask Format\n\n\\`\\`\\`text\n[CNGKIT_SECRET:<detector>:<verified|unverified>]\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges\",\n aliases: [\"knowledges\", \"knowledge\"],\n body: `# cngkit knowledges\n\nSearch and read the hosted Harness knowledges catalog from the Curly backend.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges <subcommand> [options]\n\\`\\`\\`\n\n## Subcommands\n\n${knowledgesCommandList}\n\n## Progressive Help\n\n\\`\\`\\`bash\ncngkit help knowledges <subcommand>\ncngkit knowledges <subcommand> --help\ncngkit knowledges read --help\ncngkit knowledges grep --help\ncngkit knowledges glob --help\n\\`\\`\\`\n\n## Common Examples\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest knowledges search \"cloudflare backend\" --limit 3\nnpx --yes cngkit@latest knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80\nnpx --yes cngkit@latest knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches\nnpx --yes cngkit@latest knowledges glob \"**/*.md\" --path /libraries/lib-cloudflare\n\\`\\`\\`\n\n## AI-Friendly Output\n\n- Default output is line-oriented and intended to be directly usable by agents.\n- \\`read\\` prints file content with no wrapper before any truncation note.\n- \\`grep --output-mode content\\` prints \\`path:line\\` blocks.\n- \\`grep --output-mode files_with_matches\\` and \\`glob\\` print one path per line.\n- \\`--json\\` prints the typed backend data payload for machine consumption.\n`,\n },\n {\n title: \"knowledges status\",\n aliases: [\"knowledges-status\", \"status\"],\n body: `# cngkit knowledges status\n\nPrint remote Harness catalog state.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges status [--json]\n\\`\\`\\`\n\n## Output\n\n- Text mode prints catalog name, file count, blob count, Vectorize binding, and latest run when present.\n- \\`--json\\` prints the backend data payload.\n`,\n },\n {\n title: \"knowledges audiences\",\n aliases: [\"knowledges-audiences\", \"audiences\"],\n body: `# cngkit knowledges audiences\n\nList valid audience filters for catalog browsing.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges audiences [--json]\n\\`\\`\\`\n\n## Use When\n\nRun this before \\`cngkit knowledges files --audience <id>\\`.\n`,\n },\n {\n title: \"knowledges search\",\n aliases: [\"knowledges-search\", \"search\"],\n body: `# cngkit knowledges search\n\nSearch the hosted Harness index for relevant skills and subskills.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges search <query> [--limit <n>] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`--limit\\`: \\`5\\`\n\n## Example\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest knowledges search \"cloudflare backend\" --limit 3\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges list\",\n aliases: [\"knowledges-list\", \"list\"],\n body: `# cngkit knowledges list\n\nList hosted Harness subskills, optionally filtered by query.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges list [query] [--limit <n>] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`--limit\\`: \\`25\\`\n\n## Example\n\n\\`\\`\\`bash\ncngkit knowledges list cloudflare --limit 10\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges files\",\n aliases: [\"knowledges-files\", \"files\"],\n body: `# cngkit knowledges files\n\nList uploaded Harness catalog files, optionally filtered by query or audience.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges files [query] [--audience <id>] [--limit <n>] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`--limit\\`: \\`25\\`\n- \\`--audience\\`: omitted\n\n## Example\n\n\\`\\`\\`bash\ncngkit knowledges files cloudflare --limit 10\ncngkit knowledges files \"vector search\" --audience builders\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges read\",\n aliases: [\"knowledges-read\", \"read\"],\n body: `# cngkit knowledges read\n\nRead a hosted Harness catalog file by path.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges read <file-path> [--offset <n>] [--limit <n>] [--json]\n\\`\\`\\`\n\n## Inputs\n\n- \\`file-path\\`: normalized catalog path. Shorthand paths such as \\`/libraries/lib-cloudflare/SUBSKILL.md\\` are expanded to \\`skills/knowledges/subskills/libraries/lib-cloudflare/SUBSKILL.md\\`.\n- \\`--offset\\`: zero-based starting line. Default: \\`0\\`.\n- \\`--limit\\`: maximum lines. Default in CLI: \\`200\\`. Backend max: \\`2000\\`.\n\n## Output\n\n- Text mode prints only the returned file content first.\n- If truncated, a final bracketed truncation note is printed after the content.\n- \\`--json\\` prints \\`{ file_path, content, total_lines, offset, limit, truncated }\\`.\n\n## Example\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges grep\",\n aliases: [\"knowledges-grep\", \"grep\"],\n body: `# cngkit knowledges grep\n\nSearch inside hosted Harness catalog files with a JavaScript regular expression.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges grep <pattern> [--path <path>] [--include <glob>] [--output-mode <mode>] [--context <n>] [--case-insensitive] [--json]\n\\`\\`\\`\n\n## Inputs\n\n- \\`pattern\\`: JavaScript regular expression source.\n- \\`--path\\`: catalog path prefix. Default: \\`skills\\`.\n- \\`--include\\`: filename include filter. Default: \\`*\\`.\n- Modes: content, files_with_matches, or count.\n- \\`--output-mode\\`: \\`content\\`, \\`files_with_matches\\`, or \\`count\\`. Default: \\`content\\`.\n- \\`--context\\`: context lines around content matches. Default: \\`0\\`. Backend max: \\`20\\`.\n- \\`--case-insensitive\\`: maps to backend \\`case_insensitive=true\\`.\n\n## Output\n\n- \\`content\\`: prints blocks as \\`file_path:line_number\\`, optional context lines, then \\`> matching line\\`.\n- \\`files_with_matches\\`: prints one matching file path per line.\n- \\`count\\`: prints \\`file_path: match_count\\` lines.\n- \\`--json\\` prints the typed backend response union.\n\n## Examples\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches\nnpx --yes cngkit@latest knowledges grep \"Vectorize|D1\" --path /libraries/lib-cloudflare --context 2\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges glob\",\n aliases: [\"knowledges-glob\", \"glob\"],\n body: `# cngkit knowledges glob\n\nFind hosted Harness catalog files by glob pattern.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges glob [pattern] [--path <path>] [--json]\n\\`\\`\\`\n\n## Inputs\n\n- \\`pattern\\`: supported glob pattern. CLI default: \\`**/*.md\\`.\n- \\`--path\\`: catalog path prefix. Default: \\`skills\\`.\n\n## Supported Patterns\n\n- \\`**/*.md\\`\n- \\`**/*.SUBSKILL.md\\`\n- \\`**/SKILL.md\\`\n- \\`*.md\\`\n- \\`*.SUBSKILL.md\\`\n- \\`SKILL.md\\`\n\n## Output\n\n- Text mode prints one file path per line.\n- If truncated, a final bracketed truncation note is printed.\n- \\`--json\\` prints \\`{ files, total_files, truncated }\\`.\n\n## Example\n\n\\`\\`\\`bash\nnpx --yes cngkit@latest knowledges glob \"**/*.md\" --path /libraries/lib-cloudflare\n\\`\\`\\`\n`,\n },\n];\n\nconst helpTopicNames = helpTopics\n .filter((topic) => topic.title !== \"cngkit\")\n .map((topic) => topic.title)\n .sort();\n\nconst helpTopicByAlias = new Map<string, HelpTopic>();\n\nfor (const topic of helpTopics) {\n for (const alias of topic.aliases) {\n helpTopicByAlias.set(alias, topic);\n }\n}\n\nexport function formatCngkitHelp(topicName?: string): string {\n const normalizedTopicName = normalizeHelpTopicName(topicName);\n const topic = helpTopicByAlias.get(normalizedTopicName);\n\n if (topic) {\n return topic.body.trim();\n }\n\n if (normalizedTopicName === \"\") {\n return helpTopicByAlias.get(\"\")?.body.trim() ?? \"\";\n }\n\n return formatUnknownHelpTopic(normalizedTopicName);\n}\n\nexport function formatKnowledgesHelp(topicName?: string): string {\n const normalizedTopicName = normalizeHelpTopicName(topicName);\n const topicKey = normalizedTopicName ? `knowledges-${normalizedTopicName}` : \"knowledges\";\n return formatCngkitHelp(topicKey);\n}\n\nfunction normalizeHelpTopicName(value: string | undefined): string {\n return value?.trim().toLowerCase().replace(/\\s+/g, \"-\") ?? \"\";\n}\n\nfunction formatUnknownHelpTopic(topicName: string): string {\n return `# cngkit help\n\nNo help topic named \\`${topicName}\\`.\n\n## Available Topics\n\n${helpTopicNames.map((name) => `- \\`${name}\\``).join(\"\\n\")}\n\n## Usage\n\n\\`\\`\\`bash\ncngkit help <topic>\ncngkit <command> --help\n\\`\\`\\``;\n}\n"],"mappings":";AAMA,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AO,uBAAuB,mBAAmB;AACnD;AAEO,SAAS,qBAAqB,WAA4B;AAC/D,QAAM,sBAAsB,uBAAuB,SAAS;AAC5D,QAAM,WAAW,sBAAsB,cAAc,mBAAmB,KAAK;AAC7E,SAAO,iBAAiB,QAAQ;AAClC;AAEA,SAAS,uBAAuB,OAAmC;AACjE,SAAO,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,QAAQ,GAAG,KAAK;AAC7D;AAEA,SAAS,uBAAuB,WAA2B;AACzD,SAAO;AAAA;AAAA,wBAEe,SAAS;AAAA;AAAA;AAAA;AAAA,EAI/B,eAAe,IAAI,CAAC,SAAS,OAAO,IAAI,IAAI,EAAE,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ1D;","names":[]}
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-QZEB4VMX.js";
7
7
  import {
8
8
  createCngApiClient
9
- } from "./chunk-FGPQZ6ZK.js";
9
+ } from "./chunk-CSP6OWQH.js";
10
10
 
11
11
  // src/features/knowledges/knowledges-api.ts
12
12
  function createKnowledgesApi(options) {
@@ -316,4 +316,4 @@ export {
316
316
  runKnowGrepCommand,
317
317
  runKnowGlobCommand
318
318
  };
319
- //# sourceMappingURL=chunk-7GF42VON.js.map
319
+ //# sourceMappingURL=chunk-TNYB67MX.js.map
@@ -1,7 +1,7 @@
1
1
  // src/shared/config.ts
2
2
  import { randomBytes, randomUUID } from "crypto";
3
3
  import process from "process";
4
- var packageVersion = "1.1.13";
4
+ var packageVersion = "1.1.15";
5
5
  var defaultApiBaseUrl = "https://curly.ng";
6
6
  function resolveApiBaseUrl(options) {
7
7
  return options.apiBaseUrl ?? process.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;
@@ -19,4 +19,4 @@ export {
19
19
  createRoomCode,
20
20
  createPeerId
21
21
  };
22
- //# sourceMappingURL=chunk-TSPDBGJM.js.map
22
+ //# sourceMappingURL=chunk-U6XERHCZ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shared/config.ts"],"sourcesContent":["import { randomBytes, randomUUID } from \"node:crypto\";\nimport process from \"node:process\";\n\nexport const packageVersion = \"1.1.13\";\nexport const defaultApiBaseUrl = \"https://curly.ng\";\n\nexport type GlobalCommandOptions = {\n apiBaseUrl?: string;\n};\n\nexport function resolveApiBaseUrl(options: GlobalCommandOptions): string {\n return options.apiBaseUrl ?? process.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;\n}\n\nexport function createRoomCode(): string {\n return randomBytes(4).toString(\"hex\").toUpperCase();\n}\n\nexport function createPeerId(): string {\n return randomUUID();\n}\n"],"mappings":";AAAA,SAAS,aAAa,kBAAkB;AACxC,OAAO,aAAa;AAEb,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAM1B,SAAS,kBAAkB,SAAuC;AACvE,SAAO,QAAQ,cAAc,QAAQ,IAAI,uBAAuB;AAClE;AAEO,SAAS,iBAAyB;AACvC,SAAO,YAAY,CAAC,EAAE,SAAS,KAAK,EAAE,YAAY;AACpD;AAEO,SAAS,eAAuB;AACrC,SAAO,WAAW;AACpB;","names":[]}
1
+ {"version":3,"sources":["../src/shared/config.ts"],"sourcesContent":["import { randomBytes, randomUUID } from \"node:crypto\";\nimport process from \"node:process\";\n\nexport const packageVersion = \"1.1.15\";\nexport const defaultApiBaseUrl = \"https://curly.ng\";\n\nexport type GlobalCommandOptions = {\n apiBaseUrl?: string;\n};\n\nexport function resolveApiBaseUrl(options: GlobalCommandOptions): string {\n return options.apiBaseUrl ?? process.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;\n}\n\nexport function createRoomCode(): string {\n return randomBytes(4).toString(\"hex\").toUpperCase();\n}\n\nexport function createPeerId(): string {\n return randomUUID();\n}\n"],"mappings":";AAAA,SAAS,aAAa,kBAAkB;AACxC,OAAO,aAAa;AAEb,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAM1B,SAAS,kBAAkB,SAAuC;AACvE,SAAO,QAAQ,cAAc,QAAQ,IAAI,uBAAuB;AAClE;AAEO,SAAS,iBAAyB;AACvC,SAAO,YAAY,CAAC,EAAE,SAAS,KAAK,EAAE,YAAY;AACpD;AAEO,SAAS,eAAuB;AACrC,SAAO,WAAW;AACpB;","names":[]}
package/dist/cli.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  formatCngkitHelp,
4
4
  formatKnowledgesHelp
5
- } from "./chunk-S6LINZSY.js";
5
+ } from "./chunk-IG7DJU7W.js";
6
6
  import {
7
7
  packageVersion
8
- } from "./chunk-TSPDBGJM.js";
8
+ } from "./chunk-U6XERHCZ.js";
9
9
  import {
10
10
  consoleOutput,
11
11
  formatError
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatCngkitHelp
3
- } from "../../chunk-S6LINZSY.js";
3
+ } from "../../chunk-IG7DJU7W.js";
4
4
  import {
5
5
  GlobalOptionsSchema
6
6
  } from "../../chunk-MLKBG5YJ.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  runJoinCommand
3
- } from "../../chunk-QGU4QBLQ.js";
4
- import "../../chunk-FGPQZ6ZK.js";
5
- import "../../chunk-TSPDBGJM.js";
3
+ } from "../../chunk-55BKHXBM.js";
4
+ import "../../chunk-CSP6OWQH.js";
5
+ import "../../chunk-U6XERHCZ.js";
6
6
  import {
7
7
  GlobalOptionsSchema,
8
8
  RequiredRoomCodeArgsSchema
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  runShareCommand
3
- } from "../../chunk-QGU4QBLQ.js";
4
- import "../../chunk-FGPQZ6ZK.js";
5
- import "../../chunk-TSPDBGJM.js";
3
+ } from "../../chunk-55BKHXBM.js";
4
+ import "../../chunk-CSP6OWQH.js";
5
+ import "../../chunk-U6XERHCZ.js";
6
6
  import {
7
7
  GlobalOptionsSchema,
8
8
  OptionalRoomCodeArgsSchema
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatCngkitHelp
3
- } from "../chunk-S6LINZSY.js";
3
+ } from "../chunk-IG7DJU7W.js";
4
4
  import {
5
5
  CommandRunner
6
6
  } from "../chunk-JX33GP2L.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowAudiencesCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  JsonOutputOptionsSchema
10
10
  } from "../../chunk-MLKBG5YJ.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowFilesCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  JsonOutputOptionsSchema,
10
10
  OptionalQueryArgsSchema
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowGlobCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  LimitOptionsSchema,
10
10
  OptionalGlobPatternArgsSchema
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowGrepCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  LimitOptionsSchema,
10
10
  RequiredPatternArgsSchema
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatKnowledgesHelp
3
- } from "../../chunk-S6LINZSY.js";
3
+ } from "../../chunk-IG7DJU7W.js";
4
4
  import {
5
5
  GlobalOptionsSchema
6
6
  } from "../../chunk-MLKBG5YJ.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowListCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  LimitOptionsSchema,
10
10
  OptionalQueryArgsSchema
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowReadCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  JsonOutputOptionsSchema,
10
10
  RequiredFilePathArgsSchema
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowSearchCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  LimitOptionsSchema,
10
10
  RequiredQueryArgsSchema
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKnowStatusCommand
3
- } from "../../chunk-7GF42VON.js";
3
+ } from "../../chunk-TNYB67MX.js";
4
4
  import "../../chunk-QZEB4VMX.js";
5
- import "../../chunk-S6LINZSY.js";
6
- import "../../chunk-FGPQZ6ZK.js";
7
- import "../../chunk-TSPDBGJM.js";
5
+ import "../../chunk-IG7DJU7W.js";
6
+ import "../../chunk-CSP6OWQH.js";
7
+ import "../../chunk-U6XERHCZ.js";
8
8
  import {
9
9
  JsonOutputOptionsSchema
10
10
  } from "../../chunk-MLKBG5YJ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveApiBaseUrl
3
- } from "../chunk-TSPDBGJM.js";
3
+ } from "../chunk-U6XERHCZ.js";
4
4
  import {
5
5
  GlobalOptionsSchema
6
6
  } from "../chunk-MLKBG5YJ.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "../chunk-QZEB4VMX.js";
7
7
  import {
8
8
  formatCngkitHelp
9
- } from "../chunk-S6LINZSY.js";
9
+ } from "../chunk-IG7DJU7W.js";
10
10
  import {
11
11
  GlobalOptionsSchema,
12
12
  TranscriptArgsSchema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cngkit",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "Opinionated Curly.ng CLI kit for Coderoom collaboration and website tooling.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/help-specs.ts"],"sourcesContent":["type HelpTopic = {\n title: string;\n aliases: string[];\n body: string;\n};\n\nconst commandList = [\n \"- `cngkit login` - open Curly.ng login.\",\n \"- `cngkit coderoom ...` - unite developers in a live shared code room.\",\n \"- `cngkit scrub [path]` - scan for secrets and optionally mask them inline.\",\n \"- `cngkit transcripts ...` - list, read, and grep local Claude/Codex transcripts.\",\n \"- `cngkit knowledges ...` - read the hosted Harness catalog.\",\n].join(\"\\n\");\n\nconst coderoomCommandList = [\n \"- `share [room-code]` - start a live room from the current directory.\",\n \"- `join <room-code>` - join another developer's live room from the current directory.\",\n].join(\"\\n\");\n\nconst knowledgesCommandList = [\n \"- `status` - print remote catalog state.\",\n \"- `audiences` - list valid audience filters.\",\n \"- `search <query>` - semantic search over Cloudflare Vectorize-backed records.\",\n \"- `list [query]` - list known subskills.\",\n \"- `files [query]` - list uploaded catalog files.\",\n \"- `read <file-path>` - Claude-style file read.\",\n \"- `grep <pattern>` - Claude-style content search.\",\n \"- `glob [pattern]` - Claude-style file discovery.\",\n].join(\"\\n\");\n\nconst helpTopics: HelpTopic[] = [\n {\n title: \"cngkit\",\n aliases: [\"\", \"overview\", \"help\"],\n body: `# cngkit\n\nCurly.ng operator CLI for backend-connected repo sync, secret scrubbing, and Harness knowledges access.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit <command> [options]\n\\`\\`\\`\n\n## Commands\n\n${commandList}\n\n## Progressive Help\n\n\\`\\`\\`bash\ncngkit <command> --help\ncngkit coderoom --help\ncngkit coderoom <subcommand> --help\ncngkit transcripts --help\ncngkit knowledges --help\ncngkit knowledges <subcommand> --help\n\\`\\`\\`\n\nThe CLI intentionally prints plain Markdown or line-oriented text with no color-only state, tables that require terminal width, or hidden interactive prompts. Add \\`--json\\` to read-only knowledges commands when another agent or tool needs structured backend data.\n\n## Backend\n\nDefault API: \\`https://curly.ng\\`\n\nOverride with:\n\n\\`\\`\\`bash\ncngkit --api-base-url <url> ...\nCNGKIT_API_BASE_URL=<url> cngkit ...\n\\`\\`\\`\n`,\n },\n {\n title: \"login\",\n aliases: [\"login\"],\n body: `# cngkit login\n\nOpen Curly.ng login in a browser. In headless environments, print the URL so an agent can surface it to the operator.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit login\n\\`\\`\\`\n\n## Output Contract\n\n- First line names the login URL being opened.\n- If no local browser opener exists, the CLI prints a direct URL.\n- No credentials are printed or persisted by this command.\n`,\n },\n {\n title: \"transcripts\",\n aliases: [\"transcripts\", \"transcript\"],\n body: `# cngkit transcripts\n\nRead local agent transcript JSONL files from \\`~/.codex/sessions\\`, \\`~/.codex/archived_sessions\\`, \\`~/.claude/projects\\`, and \\`~/.claude/history.jsonl\\`.\n\nThis is local operator tooling. It does not call the Curly backend and it does not upload transcript content.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit transcripts list [--source all|codex|claude] [--limit <n>] [--json]\ncngkit transcripts read <path-or-session-id> [--source all|codex|claude] [--limit <n>] [--include-internal] [--json]\ncngkit transcripts grep <query> [--source all|codex|claude] [--limit <n>] [--file-limit <n>] [--include-internal] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`list\\`: newest 12 transcript files.\n- \\`read\\`: newest 80 user/assistant entries from the selected file.\n- \\`grep\\`: first 80 matching user/assistant entries from the newest 60 files.\n- \\`--source\\`: \\`all\\`.\n\n## Output Contract\n\n- Text mode prints source, role, timestamp when available, and extracted message text.\n- Internal developer/system payloads and hook/tool noise are skipped unless \\`--include-internal\\` is passed.\n- Direct file paths, home-relative paths, and partial session ids are accepted by \\`read\\`.\n`,\n },\n {\n title: \"coderoom\",\n aliases: [\"coderoom\", \"code-room\", \"repo-sync\"],\n body: `# cngkit coderoom\n\nCoderoom is the fast way to unite developers around one working tree. It gives a pair or team a temporary shared room over the Curly backend so one developer can share local file changes and another can join from their own machine.\n\nIt is intentionally closer to a Drive-like project room than a raw socket command: the room code is the shared folder link, each connected machine is a collaborator, and the file stream is the activity feed. The browser experience at \\`/coderoom\\` provides the helper surface for copying commands and explaining the room model.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit coderoom <subcommand> [options]\n\\`\\`\\`\n\n## Subcommands\n\n${coderoomCommandList}\n\n## Common Flow\n\n\\`\\`\\`bash\ncngkit coderoom share\ncngkit coderoom join <room-code>\n\\`\\`\\`\n\n## Backend Contract\n\n- Connects to \\`/api/cng/sync/:roomCode\\` on the configured Curly backend.\n- Uses WebSocket transport backed by the \\`CngSyncRoom\\` Durable Object.\n- Sends an initial snapshot, then file and delete events.\n- Last received change wins.\n- Current rooms are live relays, not durable cloud storage. The Drive-like frontend is the collaboration shell around that live primitive.\n`,\n },\n {\n title: \"coderoom share\",\n aliases: [\"coderoom-share\"],\n body: `# cngkit coderoom share\n\nStart a real-time repository sync room from the current directory.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit coderoom share [room-code]\n\\`\\`\\`\n\n## Backend Contract\n\n- Connects to \\`/api/cng/sync/:roomCode\\` on the configured Curly backend.\n- Uses WebSocket transport backed by the \\`CngSyncRoom\\` Durable Object.\n- Sends an initial snapshot, then file and delete events.\n- Last received change wins.\n\n## Filesystem Contract\n\n- Preserves \\`.git/\\`.\n- Preserves files ignored by the repo's \\`.gitignore\\`.\n- Sends regular files as base64 payloads in the sync protocol.\n\n## Output Contract\n\n- Prints room code, repo root, peer id, backend health, and concise sync events.\n- Keeps running until the socket closes or the process receives a termination signal.\n`,\n },\n {\n title: \"coderoom join\",\n aliases: [\"coderoom-join\"],\n body: `# cngkit coderoom join\n\nJoin an existing real-time repository sync room in the current directory.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit coderoom join <room-code>\n\\`\\`\\`\n\n## Backend Contract\n\nSame transport and filesystem contract as \\`cngkit coderoom share\\`. The supplied room code selects the Durable Object room.\n\n## Output Contract\n\n- Prints backend health, room code, repo root, peer id, and concise sync events.\n- Missing room code exits with a usage error.\n`,\n },\n {\n title: \"scrub\",\n aliases: [\"scrub\"],\n body: `# cngkit scrub\n\nScan a file or directory for secrets with TruffleHog. Report-only is the default. Inline masking requires \\`--yes\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit scrub [path]\ncngkit scrub [path] --yes\n\\`\\`\\`\n\n## Requirements\n\n- \\`trufflehog\\` must be available on \\`PATH\\`.\n\n## Safety Contract\n\n- Default mode does not rewrite files.\n- \\`--yes\\` rewrites detected secret values inline with \\`[CNGKIT_SECRET:<detector>:<verified|unverified>]\\` placeholders.\n- \\`--mask\\` is accepted as a compatibility alias, but still requires \\`--yes\\`.\n- Raw and redacted secret values are never printed in the report.\n`,\n },\n {\n title: \"knowledges\",\n aliases: [\"knowledges\", \"knowledge\"],\n body: `# cngkit knowledges\n\nRead the hosted Harness knowledges catalog from the Curly backend. These commands are read-only and use the generated \\`@cng/client\\` SDK against public backend routes.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges <subcommand> [options]\n\\`\\`\\`\n\n## Subcommands\n\n${knowledgesCommandList}\n\n## Progressive Help\n\n\\`\\`\\`bash\ncngkit knowledges <subcommand> --help\ncngkit knowledges read --help\ncngkit knowledges grep --help\ncngkit knowledges glob --help\n\\`\\`\\`\n\n## Common Examples\n\n\\`\\`\\`bash\ncngkit knowledges search \"cloudflare backend\" --limit 3\ncngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80\ncngkit knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches\ncngkit knowledges glob \"**/*.md\" --path /libraries/lib-cloudflare\n\\`\\`\\`\n\n## AI-Friendly Output\n\n- Default output is line-oriented and intended to be directly usable by agents.\n- \\`read\\` prints file content with no wrapper before any truncation note.\n- \\`grep --output-mode content\\` prints \\`path:line\\` blocks.\n- \\`grep --output-mode files_with_matches\\` and \\`glob\\` print one path per line.\n- \\`--json\\` prints the typed backend data payload for machine consumption.\n`,\n },\n {\n title: \"knowledges status\",\n aliases: [\"knowledges-status\", \"status\"],\n body: `# cngkit knowledges status\n\nPrint remote Harness catalog state from \\`GET /api/harness/knowledges/catalog\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges status [--json]\n\\`\\`\\`\n\n## Output Contract\n\n- Text mode prints catalog name, file count, blob count, Vectorize binding, and latest run when present.\n- \\`--json\\` prints the backend data payload.\n`,\n },\n {\n title: \"knowledges audiences\",\n aliases: [\"knowledges-audiences\", \"audiences\"],\n body: `# cngkit knowledges audiences\n\nList valid audience filters from \\`GET /api/harness/knowledges/audiences\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges audiences [--json]\n\\`\\`\\`\n\nUse this before \\`cngkit knowledges files --audience <id>\\`.\n`,\n },\n {\n title: \"knowledges search\",\n aliases: [\"knowledges-search\", \"search\"],\n body: `# cngkit knowledges search\n\nRun semantic search against the Cloudflare Vectorize-backed Harness index.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges search <query> [--limit <n>] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`--limit\\`: \\`5\\`\n\n## Example\n\n\\`\\`\\`bash\ncngkit knowledges search \"cloudflare backend\" --limit 3\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges list\",\n aliases: [\"knowledges-list\", \"list\"],\n body: `# cngkit knowledges list\n\nList known subskills from \\`GET /api/harness/knowledges/subskills\\`, optionally filtered locally by query.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges list [query] [--limit <n>] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`--limit\\`: \\`25\\`\n`,\n },\n {\n title: \"knowledges files\",\n aliases: [\"knowledges-files\", \"files\"],\n body: `# cngkit knowledges files\n\nList uploaded catalog files from \\`GET /api/harness/knowledges/files\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges files [query] [--audience <id>] [--limit <n>] [--json]\n\\`\\`\\`\n\n## Defaults\n\n- \\`--limit\\`: \\`25\\`\n- \\`--audience\\`: omitted\n\nRun \\`cngkit knowledges audiences\\` to discover supported audience ids.\n`,\n },\n {\n title: \"knowledges read\",\n aliases: [\"knowledges-read\", \"read\"],\n body: `# cngkit knowledges read\n\nClaude-style read tool for hosted Harness catalog files. Backed by \\`GET /api/harness/filesystem/read\\` and \\`HarnessReadQuerySchema\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges read <file-path> [--offset <n>] [--limit <n>] [--json]\n\\`\\`\\`\n\n## Inputs\n\n- \\`file-path\\`: normalized catalog path. Shorthand paths such as \\`/libraries/lib-cloudflare/SUBSKILL.md\\` are expanded to \\`skills/knowledges/subskills/libraries/lib-cloudflare/SUBSKILL.md\\`.\n- \\`--offset\\`: zero-based starting line. Default: \\`0\\`.\n- \\`--limit\\`: maximum lines. Default in CLI: \\`200\\`. Backend max: \\`2000\\`.\n\n## Output Contract\n\n- Text mode prints only the returned file content first.\n- If truncated, a final bracketed truncation note is printed after the content.\n- \\`--json\\` prints \\`{ file_path, content, total_lines, offset, limit, truncated }\\`.\n\n## Example\n\n\\`\\`\\`bash\ncngkit knowledges read /libraries/lib-cloudflare/SUBSKILL.md --limit 80\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges grep\",\n aliases: [\"knowledges-grep\", \"grep\"],\n body: `# cngkit knowledges grep\n\nClaude-style grep tool for hosted Harness catalog files. Backed by \\`GET /api/harness/filesystem/grep\\` and \\`HarnessGrepQuerySchema\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges grep <pattern> [--path <path>] [--include <glob>] [--output-mode <mode>] [--context <n>] [--case-insensitive] [--json]\n\\`\\`\\`\n\n## Inputs\n\n- \\`pattern\\`: JavaScript regular expression source.\n- \\`--path\\`: catalog path prefix. Default: \\`skills\\`.\n- \\`--include\\`: filename include filter. Default: \\`*\\`.\n- Modes: content, files_with_matches, or count.\n- \\`--output-mode\\`: \\`content\\`, \\`files_with_matches\\`, or \\`count\\`. Default: \\`content\\`.\n- \\`--context\\`: context lines around content matches. Default: \\`0\\`. Backend max: \\`20\\`.\n- \\`--case-insensitive\\`: maps to backend \\`case_insensitive=true\\`.\n\n## Output Contract\n\n- \\`content\\`: prints blocks as \\`file_path:line_number\\`, optional context lines, then \\`> matching line\\`.\n- \\`files_with_matches\\`: prints one matching file path per line.\n- \\`count\\`: prints \\`file_path: match_count\\` lines.\n- \\`--json\\` prints the typed backend response union.\n\n## Examples\n\n\\`\\`\\`bash\ncngkit knowledges grep Cloudflare --path /libraries/lib-cloudflare --output-mode files_with_matches\ncngkit knowledges grep \"Vectorize|D1\" --path /libraries/lib-cloudflare --context 2\n\\`\\`\\`\n`,\n },\n {\n title: \"knowledges glob\",\n aliases: [\"knowledges-glob\", \"glob\"],\n body: `# cngkit knowledges glob\n\nClaude-style glob tool for hosted Harness catalog files. Backed by \\`GET /api/harness/filesystem/glob\\` and \\`HarnessGlobQuerySchema\\`.\n\n## Usage\n\n\\`\\`\\`bash\ncngkit knowledges glob [pattern] [--path <path>] [--json]\n\\`\\`\\`\n\n## Inputs\n\n- \\`pattern\\`: supported glob pattern. CLI default: \\`**/*.md\\`.\n- \\`--path\\`: catalog path prefix. Default: \\`skills\\`.\n\n## Supported Patterns\n\n- \\`**/*.md\\`\n- \\`**/*.SUBSKILL.md\\`\n- \\`**/SKILL.md\\`\n- \\`*.md\\`\n- \\`*.SUBSKILL.md\\`\n- \\`SKILL.md\\`\n\n## Output Contract\n\n- Text mode prints one file path per line.\n- If truncated, a final bracketed truncation note is printed.\n- \\`--json\\` prints \\`{ files, total_files, truncated }\\`.\n\n## Example\n\n\\`\\`\\`bash\ncngkit knowledges glob \"**/*.md\" --path /libraries/lib-cloudflare\n\\`\\`\\`\n`,\n },\n];\n\nconst helpTopicByAlias = new Map<string, HelpTopic>();\n\nfor (const topic of helpTopics) {\n for (const alias of topic.aliases) {\n helpTopicByAlias.set(alias, topic);\n }\n}\n\nexport function formatCngkitHelp(topicName?: string): string {\n const normalizedTopicName = normalizeHelpTopicName(topicName);\n return (helpTopicByAlias.get(normalizedTopicName) ?? helpTopicByAlias.get(\"\"))?.body.trim() ?? \"\";\n}\n\nexport function formatKnowledgesHelp(topicName?: string): string {\n const normalizedTopicName = normalizeHelpTopicName(topicName);\n const topicKey = normalizedTopicName ? `knowledges-${normalizedTopicName}` : \"knowledges\";\n return formatCngkitHelp(topicKey);\n}\n\nfunction normalizeHelpTopicName(value: string | undefined): string {\n return value?.trim().toLowerCase().replace(/\\s+/g, \"-\") ?? \"\";\n}\n"],"mappings":";AAMA,IAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,IAAI;AAEX,IAAM,sBAAsB;AAAA,EAC1B;AAAA,EACA;AACF,EAAE,KAAK,IAAI;AAEX,IAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,IAAI;AAEX,IAAM,aAA0B;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,SAAS,CAAC,IAAI,YAAY,MAAM;AAAA,IAChC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYR,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA0BX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,SAAS,CAAC,OAAO;AAAA,IACjB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBR;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,SAAS,CAAC,eAAe,YAAY;AAAA,IACrC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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