@akon-labs/nexus-cli 0.1.5 → 0.1.7

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 (94) hide show
  1. package/CHANGELOG.md +29 -7
  2. package/README.md +2 -3
  3. package/dist/cli/require-login.d.ts.map +1 -1
  4. package/dist/cli/require-login.js +1 -1
  5. package/dist/cli/require-login.js.map +1 -1
  6. package/dist/cli.js +155 -213
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/config.js +1 -1
  9. package/dist/config.js.map +1 -1
  10. package/dist/core/auth-guidance.d.ts.map +1 -1
  11. package/dist/core/auth-guidance.js +3 -2
  12. package/dist/core/auth-guidance.js.map +1 -1
  13. package/dist/core/auto-model.d.ts +9 -0
  14. package/dist/core/auto-model.d.ts.map +1 -0
  15. package/dist/core/auto-model.js +11 -0
  16. package/dist/core/auto-model.js.map +1 -0
  17. package/dist/core/extensions/loader.d.ts.map +1 -1
  18. package/dist/core/extensions/loader.js +4 -8
  19. package/dist/core/extensions/loader.js.map +1 -1
  20. package/dist/core/model-resolver.d.ts.map +1 -1
  21. package/dist/core/model-resolver.js +2 -1
  22. package/dist/core/model-resolver.js.map +1 -1
  23. package/dist/core/models-dev-catalog.d.ts.map +1 -1
  24. package/dist/core/models-dev-catalog.js +11 -7
  25. package/dist/core/models-dev-catalog.js.map +1 -1
  26. package/dist/core/sdk.d.ts +1 -1
  27. package/dist/core/sdk.d.ts.map +1 -1
  28. package/dist/core/sdk.js +1 -1
  29. package/dist/core/sdk.js.map +1 -1
  30. package/dist/core/slash-commands.d.ts.map +1 -1
  31. package/dist/core/slash-commands.js +1 -1
  32. package/dist/core/slash-commands.js.map +1 -1
  33. package/dist/core/tools/websearch.d.ts.map +1 -1
  34. package/dist/core/tools/websearch.js +52 -37
  35. package/dist/core/tools/websearch.js.map +1 -1
  36. package/dist/extensions/gitnexus/device-auth.d.ts.map +1 -1
  37. package/dist/extensions/gitnexus/device-auth.js +2 -1
  38. package/dist/extensions/gitnexus/device-auth.js.map +1 -1
  39. package/dist/extensions/gitnexus/gateway.d.ts +0 -2
  40. package/dist/extensions/gitnexus/gateway.d.ts.map +1 -1
  41. package/dist/extensions/gitnexus/gateway.js +10 -22
  42. package/dist/extensions/gitnexus/gateway.js.map +1 -1
  43. package/dist/extensions/gitnexus/index.d.ts.map +1 -1
  44. package/dist/extensions/gitnexus/index.js +10 -4
  45. package/dist/extensions/gitnexus/index.js.map +1 -1
  46. package/dist/extensions/web-access.d.ts +1 -6
  47. package/dist/extensions/web-access.d.ts.map +1 -1
  48. package/dist/extensions/web-access.js +8 -21
  49. package/dist/extensions/web-access.js.map +1 -1
  50. package/dist/index.d.ts +1 -1
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +159 -213
  53. package/dist/index.js.map +1 -1
  54. package/dist/main.d.ts.map +1 -1
  55. package/dist/main.js +1 -1
  56. package/dist/main.js.map +1 -1
  57. package/dist/migrations.d.ts.map +1 -1
  58. package/dist/migrations.js +2 -2
  59. package/dist/migrations.js.map +1 -1
  60. package/dist/modes/interactive/components/command-palette.d.ts.map +1 -1
  61. package/dist/modes/interactive/components/command-palette.js +2 -2
  62. package/dist/modes/interactive/components/command-palette.js.map +1 -1
  63. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  64. package/dist/modes/interactive/components/model-selector.js +18 -7
  65. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  66. package/dist/modes/interactive/interactive-mode.d.ts +0 -5
  67. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  68. package/dist/modes/interactive/interactive-mode.js +22 -128
  69. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  70. package/dist/rpc-entry.js +155 -213
  71. package/dist/vendor/ai.js +12 -12
  72. package/docs/compaction.md +1 -1
  73. package/docs/rpc.md +1 -1
  74. package/docs/settings.md +1 -1
  75. package/docs/usage.md +0 -2
  76. package/examples/extensions/border-status-editor.ts +1 -6
  77. package/examples/extensions/custom-compaction.ts +1 -1
  78. package/examples/extensions/custom-footer.ts +1 -1
  79. package/examples/extensions/custom-provider-anthropic/index.ts +3 -3
  80. package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
  81. package/examples/extensions/gondolin/index.ts +1 -1
  82. package/examples/extensions/handoff.ts +2 -2
  83. package/examples/extensions/hello.ts +1 -1
  84. package/examples/extensions/plan-mode/index.ts +1 -1
  85. package/examples/extensions/preset.ts +1 -1
  86. package/examples/extensions/qna.ts +1 -1
  87. package/examples/extensions/sandbox/index.ts +1 -1
  88. package/examples/extensions/subagent/index.ts +3 -3
  89. package/examples/extensions/summarize.ts +1 -1
  90. package/examples/extensions/tic-tac-toe.ts +1 -1
  91. package/examples/extensions/todo.ts +1 -1
  92. package/examples/extensions/tool-override.ts +1 -1
  93. package/npm-shrinkwrap.json +2 -2
  94. package/package.json +1 -1
@@ -318,7 +318,7 @@ import { convertToLlm, serializeConversation } from "@akon-labs/nexus-cli";
318
318
 
319
319
  nexus.on("session_before_compact", async (event, ctx) => {
320
320
  const { preparation } = event;
321
-
321
+
322
322
  // Convert AgentMessage[] to Message[], then serialize to text
323
323
  const conversationText = serializeConversation(
324
324
  convertToLlm(preparation.messagesToSummarize)
package/docs/rpc.md CHANGED
@@ -827,7 +827,7 @@ Each command has:
827
827
  - `"path"`: Explicit path via CLI or settings
828
828
  - `path`: Absolute file path to the command source (optional)
829
829
 
830
- **Note**: Built-in TUI commands (`/settings`, `/hotkeys`, etc.) are not included. They are handled only in interactive mode and would not execute if sent via `prompt`.
830
+ **Note**: Built-in TUI commands (`/settings`, `/model`, etc.) are not included. They are handled only in interactive mode and would not execute if sent via `prompt`.
831
831
 
832
832
  ## Events
833
833
 
package/docs/settings.md CHANGED
@@ -30,7 +30,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
30
30
  | `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
31
31
  | `defaultModel` | string | - | Default model ID |
32
32
  | `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
33
- | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
33
+ | `hideThinkingBlock` | boolean | `true` | Hide thinking blocks in output |
34
34
  | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
35
35
  | `thinkingBudgets` | object | - | Custom token budgets per thinking level |
36
36
 
package/docs/usage.md CHANGED
@@ -58,7 +58,6 @@ Type `/` in the editor to open command completion. Extensions can register custo
58
58
  | `/import <file>` | Import and resume a session from a JSONL file |
59
59
  | `/share` | Upload as private GitHub gist with shareable HTML link |
60
60
  | `/reload` | Reload keybindings, extensions, skills, prompts, themes, and context files |
61
- | `/hotkeys` | Show all keyboard shortcuts |
62
61
  | `/quit` | Quit nexus |
63
62
 
64
63
  ## Message Queue
@@ -303,4 +302,3 @@ nexus --exclude-tools ask_question
303
302
  Nexus keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
304
303
 
305
304
  It includes a built-in MCP adapter, but intentionally leaves sub-agents, permission popups, plan mode, to-dos, and background bash to extensions, packages, containers, or external tools such as tmux.
306
-
@@ -1,9 +1,4 @@
1
- import {
2
- CustomEditor,
3
- type ExtensionAPI,
4
- type ExtensionContext,
5
- type KeybindingsManager,
6
- } from "@akon-labs/nexus-cli";
1
+ import { CustomEditor, type ExtensionAPI, type ExtensionContext, type KeybindingsManager } from "@akon-labs/nexus-cli";
7
2
  import type { Component, EditorTheme, TUI } from "@akon-labs/nexus-cli/tui";
8
3
  import { truncateToWidth, visibleWidth } from "@akon-labs/nexus-cli/tui";
9
4
 
@@ -13,9 +13,9 @@
13
13
  * pi --extension examples/extensions/custom-compaction.ts
14
14
  */
15
15
 
16
- import { uuidv7 } from "@akon-labs/nexus-cli/ai";
17
16
  import type { ExtensionAPI } from "@akon-labs/nexus-cli";
18
17
  import { convertToLlm, serializeConversation } from "@akon-labs/nexus-cli";
18
+ import { uuidv7 } from "@akon-labs/nexus-cli/ai";
19
19
 
20
20
  export default function (pi: ExtensionAPI) {
21
21
  pi.on("session_before_compact", async (event, ctx) => {
@@ -8,8 +8,8 @@
8
8
  * Token stats come from ctx.sessionManager/ctx.model (already accessible).
9
9
  */
10
10
 
11
- import type { AssistantMessage } from "@akon-labs/nexus-cli/ai";
12
11
  import type { ExtensionAPI } from "@akon-labs/nexus-cli";
12
+ import type { AssistantMessage } from "@akon-labs/nexus-cli/ai";
13
13
  import { truncateToWidth, visibleWidth } from "@akon-labs/nexus-cli/tui";
14
14
 
15
15
  export default function (pi: ExtensionAPI) {
@@ -21,8 +21,7 @@
21
21
  * Then use /model to select custom-anthropic/claude-sonnet-4-5
22
22
  */
23
23
 
24
- import Anthropic from "@anthropic-ai/sdk";
25
- import type { ContentBlockParam, MessageCreateParamsStreaming } from "@anthropic-ai/sdk/resources/messages.js";
24
+ import type { ExtensionAPI } from "@akon-labs/nexus-cli";
26
25
  import {
27
26
  type Api,
28
27
  type AssistantMessage,
@@ -43,7 +42,8 @@ import {
43
42
  type ToolCall,
44
43
  type ToolResultMessage,
45
44
  } from "@akon-labs/nexus-cli/ai";
46
- import type { ExtensionAPI } from "@akon-labs/nexus-cli";
45
+ import Anthropic from "@anthropic-ai/sdk";
46
+ import type { ContentBlockParam, MessageCreateParamsStreaming } from "@anthropic-ai/sdk/resources/messages.js";
47
47
 
48
48
  // =============================================================================
49
49
  // OAuth implementation adapted for the legacy extension compatibility interface.
@@ -9,6 +9,7 @@
9
9
  * # Then /login gitlab-duo, or set GITLAB_TOKEN=glpat-...
10
10
  */
11
11
 
12
+ import type { ExtensionAPI } from "@akon-labs/nexus-cli";
12
13
  import {
13
14
  type Api,
14
15
  type AssistantMessageEventStream,
@@ -22,7 +23,6 @@ import {
22
23
  type SimpleStreamOptions,
23
24
  type ThinkingLevelMap,
24
25
  } from "@akon-labs/nexus-cli/ai";
25
- import type { ExtensionAPI } from "@akon-labs/nexus-cli";
26
26
 
27
27
  // =============================================================================
28
28
  // Constants
@@ -20,7 +20,6 @@
20
20
  */
21
21
 
22
22
  import path from "node:path";
23
- import { RealFSProvider, VM } from "@earendil-works/gondolin";
24
23
  import type { ExtensionAPI, ExtensionContext } from "@akon-labs/nexus-cli";
25
24
  import {
26
25
  type BashOperations,
@@ -43,6 +42,7 @@ import {
43
42
  truncateLine,
44
43
  type WriteOperations,
45
44
  } from "@akon-labs/nexus-cli";
45
+ import { RealFSProvider, VM } from "@earendil-works/gondolin";
46
46
 
47
47
  const GUEST_WORKSPACE = "/workspace";
48
48
  const DEFAULT_GREP_LIMIT = 100;
@@ -12,10 +12,10 @@
12
12
  * The generated prompt appears as a draft in the editor for review/editing.
13
13
  */
14
14
 
15
- import type { AgentMessage } from "@akon-labs/nexus-cli/agent-core";
16
- import { type Message, uuidv7 } from "@akon-labs/nexus-cli/ai";
17
15
  import type { ExtensionAPI, SessionEntry } from "@akon-labs/nexus-cli";
18
16
  import { BorderedLoader, convertToLlm, serializeConversation } from "@akon-labs/nexus-cli";
17
+ import type { AgentMessage } from "@akon-labs/nexus-cli/agent-core";
18
+ import { type Message, uuidv7 } from "@akon-labs/nexus-cli/ai";
19
19
 
20
20
  const SYSTEM_PROMPT = `You are a context transfer assistant. Given a conversation history and the user's goal for a new thread, generate a focused prompt that:
21
21
 
@@ -2,8 +2,8 @@
2
2
  * Hello Tool - Minimal custom tool example
3
3
  */
4
4
 
5
- import { Type } from "@akon-labs/nexus-cli/ai";
6
5
  import { defineTool, type ExtensionAPI } from "@akon-labs/nexus-cli";
6
+ import { Type } from "@akon-labs/nexus-cli/ai";
7
7
 
8
8
  const helloTool = defineTool({
9
9
  name: "hello",
@@ -12,9 +12,9 @@
12
12
  * - Progress tracking widget during execution
13
13
  */
14
14
 
15
+ import type { ExtensionAPI, ExtensionContext } from "@akon-labs/nexus-cli";
15
16
  import type { AgentMessage } from "@akon-labs/nexus-cli/agent-core";
16
17
  import type { AssistantMessage, TextContent } from "@akon-labs/nexus-cli/ai";
17
- import type { ExtensionAPI, ExtensionContext } from "@akon-labs/nexus-cli";
18
18
  import { Key } from "@akon-labs/nexus-cli/tui";
19
19
  import { extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.ts";
20
20
 
@@ -40,9 +40,9 @@
40
40
 
41
41
  import { existsSync, readFileSync } from "node:fs";
42
42
  import { join } from "node:path";
43
- import type { Api, Model } from "@akon-labs/nexus-cli/ai";
44
43
  import type { ExtensionAPI, ExtensionContext } from "@akon-labs/nexus-cli";
45
44
  import { CONFIG_DIR_NAME, DynamicBorder, getAgentDir } from "@akon-labs/nexus-cli";
45
+ import type { Api, Model } from "@akon-labs/nexus-cli/ai";
46
46
  import { Container, Key, type SelectItem, SelectList, Text } from "@akon-labs/nexus-cli/tui";
47
47
 
48
48
  // Preset configuration
@@ -7,9 +7,9 @@
7
7
  * 3. Loads the result into the editor for user to fill in answers
8
8
  */
9
9
 
10
- import type { UserMessage } from "@akon-labs/nexus-cli/ai";
11
10
  import type { ExtensionAPI } from "@akon-labs/nexus-cli";
12
11
  import { BorderedLoader } from "@akon-labs/nexus-cli";
12
+ import type { UserMessage } from "@akon-labs/nexus-cli/ai";
13
13
 
14
14
  const SYSTEM_PROMPT = `You are a question extractor. Given text from a conversation, extract any questions that need answering and format them for the user to fill in.
15
15
 
@@ -44,9 +44,9 @@
44
44
  import { spawn } from "node:child_process";
45
45
  import { existsSync, readFileSync } from "node:fs";
46
46
  import { join } from "node:path";
47
- import { SandboxManager, type SandboxRuntimeConfig } from "@anthropic-ai/sandbox-runtime";
48
47
  import type { ExtensionAPI } from "@akon-labs/nexus-cli";
49
48
  import { type BashOperations, CONFIG_DIR_NAME, createBashTool, getAgentDir } from "@akon-labs/nexus-cli";
49
+ import { SandboxManager, type SandboxRuntimeConfig } from "@anthropic-ai/sandbox-runtime";
50
50
 
51
51
  interface SandboxConfig extends SandboxRuntimeConfig {
52
52
  enabled?: boolean;
@@ -16,9 +16,6 @@ import { spawn } from "node:child_process";
16
16
  import * as fs from "node:fs";
17
17
  import * as os from "node:os";
18
18
  import * as path from "node:path";
19
- import type { AgentToolResult } from "@akon-labs/nexus-cli/agent-core";
20
- import type { Message } from "@akon-labs/nexus-cli/ai";
21
- import { StringEnum } from "@akon-labs/nexus-cli/ai";
22
19
  import {
23
20
  CONFIG_DIR_NAME,
24
21
  type ExtensionAPI,
@@ -26,6 +23,9 @@ import {
26
23
  getMarkdownTheme,
27
24
  withFileMutationQueue,
28
25
  } from "@akon-labs/nexus-cli";
26
+ import type { AgentToolResult } from "@akon-labs/nexus-cli/agent-core";
27
+ import type { Message } from "@akon-labs/nexus-cli/ai";
28
+ import { StringEnum } from "@akon-labs/nexus-cli/ai";
29
29
  import { Container, Markdown, Spacer, Text } from "@akon-labs/nexus-cli/tui";
30
30
  import { Type } from "typebox";
31
31
  import { type AgentConfig, type AgentScope, discoverAgents } from "./agents.ts";
@@ -1,6 +1,6 @@
1
- import { uuidv7 } from "@akon-labs/nexus-cli/ai";
2
1
  import type { ExtensionAPI, ExtensionCommandContext } from "@akon-labs/nexus-cli";
3
2
  import { DynamicBorder, getMarkdownTheme } from "@akon-labs/nexus-cli";
3
+ import { uuidv7 } from "@akon-labs/nexus-cli/ai";
4
4
  import { Container, Markdown, matchesKey, Text } from "@akon-labs/nexus-cli/tui";
5
5
 
6
6
  type ContentBlock = {
@@ -17,8 +17,8 @@
17
17
  * separate variables. Only the agent cursor is ever exposed to the agent.
18
18
  */
19
19
 
20
- import { StringEnum } from "@akon-labs/nexus-cli/ai";
21
20
  import type { ExtensionAPI, ExtensionContext, Theme, ToolExecutionMode } from "@akon-labs/nexus-cli";
21
+ import { StringEnum } from "@akon-labs/nexus-cli/ai";
22
22
  import { type Component, matchesKey, Text, truncateToWidth, visibleWidth } from "@akon-labs/nexus-cli/tui";
23
23
  import { Type } from "typebox";
24
24
 
@@ -10,8 +10,8 @@
10
10
  * correct for that point in history.
11
11
  */
12
12
 
13
- import { StringEnum } from "@akon-labs/nexus-cli/ai";
14
13
  import type { ExtensionAPI, ExtensionContext, Theme } from "@akon-labs/nexus-cli";
14
+ import { StringEnum } from "@akon-labs/nexus-cli/ai";
15
15
  import { matchesKey, Text, truncateToWidth } from "@akon-labs/nexus-cli/tui";
16
16
  import { Type } from "typebox";
17
17
 
@@ -20,8 +20,8 @@
20
20
  * pi -e ./tool-override.ts
21
21
  */
22
22
 
23
- import type { TextContent } from "@akon-labs/nexus-cli/ai";
24
23
  import { type ExtensionAPI, getAgentDir, withFileMutationQueue } from "@akon-labs/nexus-cli";
24
+ import type { TextContent } from "@akon-labs/nexus-cli/ai";
25
25
  import { constants, readFileSync } from "fs";
26
26
  import { access, appendFile, readFile } from "fs/promises";
27
27
  import { join, resolve } from "path";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@akon-labs/nexus-cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@akon-labs/nexus-cli",
9
- "version": "0.1.5",
9
+ "version": "0.1.7",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "0.91.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akon-labs/nexus-cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "GitNexus-native coding agent CLI",
5
5
  "type": "module",
6
6
  "piConfig": {