@schuttdev/kon 0.2.7 → 0.2.9

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 (2) hide show
  1. package/dist/index.js +61 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -136,7 +136,7 @@ var ScriptToolConfigSchema = z.object({
136
136
  var BuiltinToolConfigSchema = z.object({
137
137
  type: z.literal("builtin"),
138
138
  name: z.string(),
139
- builtin: z.enum(["filesystem", "shell"]),
139
+ builtin: z.enum(["filesystem", "shell", "read", "write", "edit", "glob", "grep", "bash"]),
140
140
  description: z.string(),
141
141
  config: z.record(z.unknown()).optional()
142
142
  });
@@ -321,7 +321,7 @@ function createHttpClient(serverUrl, sessionToken) {
321
321
  }
322
322
 
323
323
  // ../cli/src/version.ts
324
- var VERSION = "0.2.7";
324
+ var VERSION = "0.2.9";
325
325
 
326
326
  // ../cli/src/connect.ts
327
327
  async function connect(serverName) {
@@ -430,34 +430,61 @@ kon connect
430
430
 
431
431
  If \`kon connect\` succeeds, you are ready to use tools. If it fails, tell the user.
432
432
 
433
- ## Usage
433
+ ## Discovering tools
434
434
 
435
- ### List available tools
435
+ List all available tools:
436
436
  \`\`\`bash
437
437
  kon list
438
438
  \`\`\`
439
439
 
440
- ### Run a tool
440
+ Get detailed help for a specific tool:
441
441
  \`\`\`bash
442
- kon <tool-name> [args...]
442
+ kon help <tool-name>
443
443
  \`\`\`
444
444
 
445
- Examples:
445
+ ## Core tools
446
+
447
+ These tools may be available depending on the server's configuration. Run \`kon list\` to see what's enabled.
448
+
449
+ ### read \u2014 Read file contents
446
450
  \`\`\`bash
447
- kon shell date
448
- kon fs list Documents
449
- kon shell whoami
451
+ kon read <file> [offset] [limit]
450
452
  \`\`\`
453
+ - \`offset\`: start from this line number (0-based)
454
+ - \`limit\`: max number of lines to return
451
455
 
452
- ### Get help for a tool
456
+ ### write \u2014 Write content to a file
453
457
  \`\`\`bash
454
- kon help <tool-name>
458
+ kon write <file> <content>
455
459
  \`\`\`
456
460
 
457
- ### Switch server (if multiple are configured)
461
+ ### edit \u2014 Replace text in a file
458
462
  \`\`\`bash
459
- kon connect <server-name>
463
+ kon edit <file> <old_string> <new_string> [--all]
464
+ \`\`\`
465
+ - Without \`--all\`: fails if old_string matches multiple locations (provide more context)
466
+ - With \`--all\`: replaces every occurrence
467
+
468
+ ### glob \u2014 Find files by pattern
469
+ \`\`\`bash
470
+ kon glob <pattern> [path]
471
+ \`\`\`
472
+ - Supports \`*\`, \`**\`, \`?\`, \`{a,b}\` syntax
473
+ - Example: \`kon glob "**/*.ts" ~/projects/myapp\`
474
+
475
+ ### grep \u2014 Search file contents
476
+ \`\`\`bash
477
+ kon grep <pattern> [path] [--glob <filter>] [-i] [-n] [-C <num>]
478
+ \`\`\`
479
+ - Uses ripgrep if available, falls back to built-in search
480
+ - Example: \`kon grep "TODO" ~/projects --glob "*.ts"\`
481
+
482
+ ### bash \u2014 Execute shell commands
483
+ \`\`\`bash
484
+ kon bash <command> [args...]
460
485
  \`\`\`
486
+ - Commands are restricted to the server's allowlist
487
+ - Example: \`kon bash git status\`
461
488
 
462
489
  ### File transfer
463
490
  \`\`\`bash
@@ -465,6 +492,26 @@ kon upload <file>
465
492
  kon download <id> <dest>
466
493
  \`\`\`
467
494
 
495
+ ## Other tools
496
+
497
+ The server may have additional tools registered (CLI commands, MCP servers, scripts). Any unknown subcommand is treated as a tool name:
498
+
499
+ \`\`\`bash
500
+ kon <tool-name> [args...]
501
+ \`\`\`
502
+
503
+ For MCP tools, the first arg is the MCP tool name:
504
+ \`\`\`bash
505
+ kon <mcp-tool> <mcp-action> [json-args]
506
+ \`\`\`
507
+
508
+ ## Multiple servers
509
+
510
+ \`\`\`bash
511
+ kon connect <server-name>
512
+ kon status
513
+ \`\`\`
514
+
468
515
  ## Important
469
516
 
470
517
  - Always run the setup block before first use in a new conversation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schuttdev/kon",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "description": "Lightweight gigai client for Claude code execution",
6
6
  "bin": {