@f5xc-salesdemos/xcsh 2.1.0 → 2.2.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +15 -11
  3. package/dist/core/export-html/template.js +14 -14
  4. package/dist/core/package-manager.d.ts.map +1 -1
  5. package/dist/core/package-manager.js +4 -4
  6. package/dist/core/package-manager.js.map +1 -1
  7. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  8. package/dist/modes/interactive/components/extension-editor.js +1 -1
  9. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  10. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  11. package/dist/modes/interactive/interactive-mode.js +1 -1
  12. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  13. package/docs/compaction.md +6 -2
  14. package/docs/custom-provider.md +3 -2
  15. package/docs/development.md +1 -0
  16. package/docs/extensions.md +30 -4
  17. package/docs/json.md +2 -0
  18. package/docs/keybindings.md +10 -10
  19. package/docs/models.md +12 -4
  20. package/docs/packages.md +1 -0
  21. package/docs/providers.md +6 -1
  22. package/docs/rpc.md +50 -2
  23. package/docs/sdk.md +12 -0
  24. package/docs/session.md +11 -0
  25. package/docs/settings.md +13 -13
  26. package/docs/skills.md +5 -1
  27. package/docs/terminal-setup.md +2 -0
  28. package/docs/termux.md +10 -0
  29. package/docs/themes.md +9 -8
  30. package/docs/tmux.md +1 -1
  31. package/docs/tree.md +10 -2
  32. package/docs/tui.md +5 -2
  33. package/examples/README.md +3 -0
  34. package/examples/extensions/README.md +13 -11
  35. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  36. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  37. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  38. package/examples/extensions/doom-overlay/README.md +3 -1
  39. package/examples/extensions/plan-mode/README.md +4 -0
  40. package/examples/extensions/qna.ts +2 -2
  41. package/examples/extensions/subagent/README.md +12 -3
  42. package/examples/extensions/subagent/index.ts +1 -1
  43. package/examples/extensions/truncated-tool.ts +1 -1
  44. package/examples/extensions/with-deps/package.json +1 -1
  45. package/examples/sdk/README.md +2 -2
  46. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -2,35 +2,54 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.2.0] - 2026-04-08
6
+
7
+ ### Added
8
+ - add Homebrew tap publishing to release pipeline (#15)
9
+
10
+ ## [2.1.1] - 2026-04-08
11
+
12
+ ### Fixed
13
+ - use RELEASE_TOKEN PAT for release pushes to bypass branch protection (#13)
14
+ - use REPO_SETTINGS_TOKEN for release pushes to bypass branch protection
15
+ - resolve pre-commit linting issues across codebase (#3)
16
+
5
17
  ## [2.1.0] - 2026-04-08
6
18
 
7
19
  ### Added
20
+
8
21
  - add governance caller workflows from docs-control
9
22
 
10
23
  ## [2.0.1] - 2026-04-08
11
24
 
12
25
  ### Fixed
26
+
13
27
  - replace deprecated node-domexception with native DOMException stub
14
28
 
15
29
  ## [2.0.0] - 2026-04-08
16
30
 
17
31
  ### Breaking Changes
32
+
18
33
  - rename main CLI package to @f5xc-salesdemos/xcsh
19
34
 
20
35
  ## [1.0.1] - 2026-04-08
21
36
 
22
37
  ### Fixed
38
+
23
39
  - add npm publish and GitHub Release to auto-release workflow
24
40
 
25
41
  ## [1.0.0] - 2026-04-08
26
42
 
27
43
  ### Breaking Changes
44
+
28
45
  - rebrand from pi to xcsh
29
46
 
30
47
  ### Added
48
+
31
49
  - add automatic versioning based on conventional commits
32
50
 
33
51
  ### Fixed
52
+
34
53
  - disable husky pre-commit hooks in auto-release CI
35
54
  - use direct JSON manipulation for version bumping in auto-release
36
55
  - auto-release version bump without clean reinstall
@@ -40,4 +59,5 @@
40
59
  ## [0.1.0] - 2026-04-08
41
60
 
42
61
  ### Added
62
+
43
63
  - Forked from [badlogic/pi-mono](https://github.com/badlogic/pi-mono) and rebranded as xcsh
package/README.md CHANGED
@@ -96,6 +96,7 @@ Then just talk to xcsh. By default, xcsh gives the model four tools: `read`, `wr
96
96
  For each built-in provider, xcsh maintains a list of tool-capable models, updated with every release. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L).
97
97
 
98
98
  **Subscriptions:**
99
+
99
100
  - Anthropic Claude Pro/Max
100
101
  - OpenAI ChatGPT Plus/Pro (Codex)
101
102
  - GitHub Copilot
@@ -103,6 +104,7 @@ For each built-in provider, xcsh maintains a list of tool-capable models, update
103
104
  - Google Antigravity
104
105
 
105
106
  **API keys:**
107
+
106
108
  - Anthropic
107
109
  - OpenAI
108
110
  - Azure OpenAI
@@ -144,7 +146,7 @@ The editor can be temporarily replaced by other UI, like built-in `/settings` or
144
146
  ### Editor
145
147
 
146
148
  | Feature | How |
147
- |---------|-----|
149
+ | --------- | ----- |
148
150
  | File reference | Type `@` to fuzzy-search project files |
149
151
  | Path completion | Tab to complete paths |
150
152
  | Multi-line | Shift+Enter (or Ctrl+Enter on Windows Terminal) |
@@ -158,7 +160,7 @@ Standard editing keybindings for delete word, undo, etc. See [docs/keybindings.m
158
160
  Type `/` in the editor to trigger commands. [Extensions](#extensions) can register custom commands, [skills](#skills) are available as `/skill:name`, and [prompt templates](#prompt-templates) expand via `/templatename`.
159
161
 
160
162
  | Command | Description |
161
- |---------|-------------|
163
+ | --------- | ------------- |
162
164
  | `/login`, `/logout` | OAuth authentication |
163
165
  | `/model` | Switch models |
164
166
  | `/scoped-models` | Enable/disable models for Ctrl+P cycling |
@@ -185,7 +187,7 @@ See `/hotkeys` for the full list. Customize via `~/.xcsh/agent/keybindings.json`
185
187
  **Commonly used:**
186
188
 
187
189
  | Key | Action |
188
- |-----|--------|
190
+ | ----- | -------- |
189
191
  | Ctrl+C | Clear editor |
190
192
  | Ctrl+C twice | Quit |
191
193
  | Escape | Cancel/abort |
@@ -258,7 +260,7 @@ Compaction is lossy. The full history remains in the JSONL file; use `/tree` to
258
260
  Use `/settings` to modify common options, or edit JSON files directly:
259
261
 
260
262
  | Location | Scope |
261
- |----------|-------|
263
+ | ---------- | ------- |
262
264
  | `~/.xcsh/agent/settings.json` | Global (all projects) |
263
265
  | `.xcsh/settings.json` | Project (overrides global) |
264
266
 
@@ -269,6 +271,7 @@ See [docs/settings.md](docs/settings.md) for all options.
269
271
  ## Context Files
270
272
 
271
273
  Pi loads `AGENTS.md` (or `CLAUDE.md`) at startup from:
274
+
272
275
  - `~/.xcsh/agent/AGENTS.md` (global)
273
276
  - Parent directories (walking up from cwd)
274
277
  - Current directory
@@ -326,6 +329,7 @@ export default function (pi: ExtensionAPI) {
326
329
  ```
327
330
 
328
331
  **What's possible:**
332
+
329
333
  - Custom tools (or replace built-in tools entirely)
330
334
  - Sub-agents and plan mode
331
335
  - Custom compaction and summarization
@@ -470,7 +474,7 @@ pi config # Enable/disable package resources
470
474
  ### Modes
471
475
 
472
476
  | Flag | Description |
473
- |------|-------------|
477
+ | ------ | ------------- |
474
478
  | (default) | Interactive mode |
475
479
  | `-p`, `--print` | Print response and exit |
476
480
  | `--mode json` | Output all events as JSON lines (see [docs/json.md](docs/json.md)) |
@@ -486,7 +490,7 @@ cat README.md | xcsh -p "Summarize this text"
486
490
  ### Model Options
487
491
 
488
492
  | Option | Description |
489
- |--------|-------------|
493
+ | -------- | ------------- |
490
494
  | `--provider <name>` | Provider (anthropic, openai, google, etc.) |
491
495
  | `--model <pattern>` | Model pattern or ID (supports `provider/id` and optional `:<thinking>`) |
492
496
  | `--api-key <key>` | API key (overrides env vars) |
@@ -497,7 +501,7 @@ cat README.md | xcsh -p "Summarize this text"
497
501
  ### Session Options
498
502
 
499
503
  | Option | Description |
500
- |--------|-------------|
504
+ | -------- | ------------- |
501
505
  | `-c`, `--continue` | Continue most recent session |
502
506
  | `-r`, `--resume` | Browse and select session |
503
507
  | `--session <path>` | Use specific session file or partial UUID |
@@ -508,7 +512,7 @@ cat README.md | xcsh -p "Summarize this text"
508
512
  ### Tool Options
509
513
 
510
514
  | Option | Description |
511
- |--------|-------------|
515
+ | -------- | ------------- |
512
516
  | `--tools <list>` | Enable specific built-in tools (default: `read,bash,edit,write`) |
513
517
  | `--no-tools` | Disable all built-in tools (extension tools still work) |
514
518
 
@@ -517,7 +521,7 @@ Available built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
517
521
  ### Resource Options
518
522
 
519
523
  | Option | Description |
520
- |--------|-------------|
524
+ | -------- | ------------- |
521
525
  | `-e`, `--extension <source>` | Load extension from path, npm, or git (repeatable) |
522
526
  | `--no-extensions` | Disable extension discovery |
523
527
  | `--skill <path>` | Load skill (repeatable) |
@@ -532,7 +536,7 @@ Combine `--no-*` with explicit flags to load exactly what you need, ignoring set
532
536
  ### Other Options
533
537
 
534
538
  | Option | Description |
535
- |--------|-------------|
539
+ | -------- | ------------- |
536
540
  | `--system-prompt <text>` | Replace default prompt (context files and skills still appended) |
537
541
  | `--append-system-prompt <text>` | Append to system prompt |
538
542
  | `--verbose` | Force verbose startup |
@@ -583,7 +587,7 @@ pi --thinking high "Solve this complex problem"
583
587
  ### Environment Variables
584
588
 
585
589
  | Variable | Description |
586
- |----------|-------------|
590
+ | ---------- | ------------- |
587
591
  | `PI_CODING_AGENT_DIR` | Override config directory (default: `~/.xcsh/agent`) |
588
592
  | `PI_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) |
589
593
  | `PI_SKIP_VERSION_CHECK` | Skip version check at startup |
@@ -76,8 +76,8 @@
76
76
 
77
77
  // Create nodes
78
78
  for (const entry of entries) {
79
- nodeMap.set(entry.id, {
80
- entry,
79
+ nodeMap.set(entry.id, {
80
+ entry,
81
81
  children: [],
82
82
  label: labelMap.get(entry.id)
83
83
  });
@@ -200,7 +200,7 @@
200
200
  const stack = [];
201
201
 
202
202
  // Add roots (prioritize branch containing active leaf)
203
- const orderedRoots = [...roots].sort((a, b) =>
203
+ const orderedRoots = [...roots].sort((a, b) =>
204
204
  Number(containsActive.get(b)) - Number(containsActive.get(a))
205
205
  );
206
206
  for (let i = orderedRoots.length - 1; i >= 0; i--) {
@@ -217,7 +217,7 @@
217
217
  const multipleChildren = children.length > 1;
218
218
 
219
219
  // Order children (active branch first)
220
- const orderedChildren = [...children].sort((a, b) =>
220
+ const orderedChildren = [...children].sort((a, b) =>
221
221
  Number(containsActive.get(b)) - Number(containsActive.get(a))
222
222
  );
223
223
 
@@ -879,8 +879,8 @@
879
879
  const renderResultImages = () => {
880
880
  const images = getResultImages();
881
881
  if (images.length === 0) return '';
882
- return '<div class="tool-images">' +
883
- images.map(img => `<img src="data:${img.mimeType};base64,${img.data}" class="tool-image" />`).join('') +
882
+ return '<div class="tool-images">' +
883
+ images.map(img => `<img src="data:${img.mimeType};base64,${img.data}" class="tool-image" />`).join('') +
884
884
  '</div>';
885
885
  };
886
886
 
@@ -973,7 +973,7 @@
973
973
  } else {
974
974
  html += `<div class="tool-header"><span class="tool-name">${escapeHtml(name)}</span></div>`;
975
975
  }
976
-
976
+
977
977
  if (rendered.resultHtmlCollapsed && rendered.resultHtmlExpanded && rendered.resultHtmlCollapsed !== rendered.resultHtmlExpanded) {
978
978
  // Both collapsed and expanded differ - render expandable section
979
979
  html += `<div class="tool-output expandable ansi-rendered" onclick="this.classList.toggle('expanded')">
@@ -1039,21 +1039,21 @@
1039
1039
  // Check for injected base URL (used when loaded in iframe via srcdoc)
1040
1040
  const baseUrlMeta = document.querySelector('meta[name="pi-share-base-url"]');
1041
1041
  const baseUrl = baseUrlMeta ? baseUrlMeta.content : window.location.href.split('?')[0];
1042
-
1042
+
1043
1043
  const url = new URL(window.location.href);
1044
1044
  // Find the gist ID (first query param without value, e.g., ?abc123)
1045
1045
  const gistId = Array.from(url.searchParams.keys()).find(k => !url.searchParams.get(k));
1046
-
1046
+
1047
1047
  // Build the share URL
1048
1048
  const params = new URLSearchParams();
1049
1049
  params.set('leafId', currentLeafId);
1050
1050
  params.set('targetId', entryId);
1051
-
1051
+
1052
1052
  // If we have an injected base URL (iframe context), use it directly
1053
1053
  if (baseUrlMeta) {
1054
1054
  return `${baseUrl}&${params.toString()}`;
1055
1055
  }
1056
-
1056
+
1057
1057
  // Otherwise build from current location (direct file access)
1058
1058
  url.search = gistId ? `?${gistId}&${params.toString()}` : `?${params.toString()}`;
1059
1059
  return url.toString();
@@ -1073,7 +1073,7 @@
1073
1073
  } catch (err) {
1074
1074
  // Clipboard API failed, try fallback
1075
1075
  }
1076
-
1076
+
1077
1077
  // Fallback for HTTP or when Clipboard API is unavailable
1078
1078
  if (!success) {
1079
1079
  try {
@@ -1089,7 +1089,7 @@
1089
1089
  console.error('Failed to copy:', err);
1090
1090
  }
1091
1091
  }
1092
-
1092
+
1093
1093
  if (success && button) {
1094
1094
  const originalHtml = button.innerHTML;
1095
1095
  button.innerHTML = '✓';
@@ -1137,7 +1137,7 @@
1137
1137
  }
1138
1138
  }
1139
1139
 
1140
- const text = typeof content === 'string' ? content :
1140
+ const text = typeof content === 'string' ? content :
1141
1141
  content.filter(c => c.type === 'text').map(c => c.text).join('\n');
1142
1142
  if (text.trim()) {
1143
1143
  html += `<div class="markdown-content">${safeMarkedParse(text)}</div>`;