@vybestack/llxprt-code 0.1.19 → 0.1.20

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 (158) hide show
  1. package/README.md +9 -0
  2. package/dist/package.json +5 -5
  3. package/dist/src/auth/oauth-manager.spec.js +4 -4
  4. package/dist/src/auth/oauth-manager.spec.js.map +1 -1
  5. package/dist/src/commands/mcp/list.js +1 -1
  6. package/dist/src/commands/mcp/list.js.map +1 -1
  7. package/dist/src/config/config.d.ts +2 -1
  8. package/dist/src/config/config.js +174 -19
  9. package/dist/src/config/config.js.map +1 -1
  10. package/dist/src/config/keyBindings.js +4 -0
  11. package/dist/src/config/keyBindings.js.map +1 -1
  12. package/dist/src/config/settingsSchema.d.ts +18 -9
  13. package/dist/src/config/settingsSchema.js +18 -9
  14. package/dist/src/config/settingsSchema.js.map +1 -1
  15. package/dist/src/config/trustedFolders.d.ts +36 -0
  16. package/dist/src/config/trustedFolders.js +112 -0
  17. package/dist/src/config/trustedFolders.js.map +1 -0
  18. package/dist/src/gemini.js +8 -16
  19. package/dist/src/gemini.js.map +1 -1
  20. package/dist/src/generated/git-commit.d.ts +1 -1
  21. package/dist/src/generated/git-commit.js +1 -1
  22. package/dist/src/nonInteractiveCli.js +3 -4
  23. package/dist/src/nonInteractiveCli.js.map +1 -1
  24. package/dist/src/providers/logging/git-stats.js +0 -1
  25. package/dist/src/providers/logging/git-stats.js.map +1 -1
  26. package/dist/src/providers/providerConfigUtils.js +1 -1
  27. package/dist/src/providers/providerConfigUtils.js.map +1 -1
  28. package/dist/src/services/BuiltinCommandLoader.js +2 -0
  29. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  30. package/dist/src/services/todo-continuation/todoContinuationService.d.ts +0 -1
  31. package/dist/src/services/todo-continuation/todoContinuationService.js +2 -1
  32. package/dist/src/services/todo-continuation/todoContinuationService.js.map +1 -1
  33. package/dist/src/ui/App.js +33 -27
  34. package/dist/src/ui/App.js.map +1 -1
  35. package/dist/src/ui/IdeIntegrationNudge.js +5 -4
  36. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
  37. package/dist/src/ui/commands/authCommand.js +1 -1
  38. package/dist/src/ui/commands/authCommand.js.map +1 -1
  39. package/dist/src/ui/commands/directoryCommand.js +2 -4
  40. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  41. package/dist/src/ui/commands/ideCommand.js +4 -4
  42. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  43. package/dist/src/ui/commands/keyCommand.js +1 -1
  44. package/dist/src/ui/commands/keyCommand.js.map +1 -1
  45. package/dist/src/ui/commands/keyfileCommand.js +1 -1
  46. package/dist/src/ui/commands/keyfileCommand.js.map +1 -1
  47. package/dist/src/ui/commands/mcpCommand.js +10 -6
  48. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  49. package/dist/src/ui/commands/setCommand.js +43 -3
  50. package/dist/src/ui/commands/setCommand.js.map +1 -1
  51. package/dist/src/ui/commands/setupGithubCommand.js +5 -16
  52. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  53. package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
  54. package/dist/src/ui/commands/terminalSetupCommand.js +41 -0
  55. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
  56. package/dist/src/ui/commands/types.d.ts +1 -0
  57. package/dist/src/ui/commands/types.js.map +1 -1
  58. package/dist/src/ui/components/AuthDialog.js +7 -12
  59. package/dist/src/ui/components/AuthDialog.js.map +1 -1
  60. package/dist/src/ui/components/AuthInProgress.js +5 -4
  61. package/dist/src/ui/components/AuthInProgress.js.map +1 -1
  62. package/dist/src/ui/components/DebugProfiler.js +5 -4
  63. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  64. package/dist/src/ui/components/DetailedMessagesDisplay.js +4 -4
  65. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
  66. package/dist/src/ui/components/EditorSettingsDialog.js +6 -5
  67. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  68. package/dist/src/ui/components/ErrorBoundary.js +2 -2
  69. package/dist/src/ui/components/ErrorBoundary.js.map +1 -1
  70. package/dist/src/ui/components/FolderTrustDialog.js +5 -4
  71. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  72. package/dist/src/ui/components/InputPrompt.js +7 -1
  73. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  74. package/dist/src/ui/components/LoggingDialog.js +5 -1
  75. package/dist/src/ui/components/LoggingDialog.js.map +1 -1
  76. package/dist/src/ui/components/SettingsDialog.js +12 -10
  77. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  78. package/dist/src/ui/components/ShellConfirmationDialog.js +5 -4
  79. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
  80. package/dist/src/ui/components/ThemeDialog.js +6 -5
  81. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  82. package/dist/src/ui/components/TodoPanel.js +2 -2
  83. package/dist/src/ui/components/TodoPanel.js.map +1 -1
  84. package/dist/src/ui/components/messages/InfoMessage.js +1 -1
  85. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
  86. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +7 -6
  87. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  88. package/dist/src/ui/components/shared/RadioButtonSelect.js +11 -9
  89. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
  90. package/dist/src/ui/components/shared/text-buffer.js +32 -10
  91. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  92. package/dist/src/ui/components/shared/vim-buffer-actions.js +2 -1
  93. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
  94. package/dist/src/ui/containers/SessionController.js +23 -23
  95. package/dist/src/ui/containers/SessionController.js.map +1 -1
  96. package/dist/src/ui/hooks/atCommandProcessor.js +1 -1
  97. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  98. package/dist/src/ui/hooks/slashCommandProcessor.js +7 -1
  99. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  100. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +5 -5
  101. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
  102. package/dist/src/ui/hooks/useFocus.d.ts +4 -0
  103. package/dist/src/ui/hooks/useFocus.js +4 -4
  104. package/dist/src/ui/hooks/useFocus.js.map +1 -1
  105. package/dist/src/ui/hooks/useFolderTrust.d.ts +3 -2
  106. package/dist/src/ui/hooks/useFolderTrust.js +24 -9
  107. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  108. package/dist/src/ui/hooks/useGeminiStream.js +81 -23
  109. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  110. package/dist/src/ui/hooks/useKeypress.d.ts +9 -1
  111. package/dist/src/ui/hooks/useKeypress.js +191 -8
  112. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  113. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +15 -0
  114. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +20 -0
  115. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
  116. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +5 -4
  117. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
  118. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +5 -4
  119. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -1
  120. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +5 -4
  121. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -1
  122. package/dist/src/ui/reducers/sessionReducer.js +1 -0
  123. package/dist/src/ui/reducers/sessionReducer.js.map +1 -1
  124. package/dist/src/ui/utils/kittyProtocolDetector.d.ts +13 -0
  125. package/dist/src/ui/utils/kittyProtocolDetector.js +88 -0
  126. package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -0
  127. package/dist/src/ui/utils/platformConstants.d.ts +38 -0
  128. package/dist/src/ui/utils/platformConstants.js +39 -0
  129. package/dist/src/ui/utils/platformConstants.js.map +1 -0
  130. package/dist/src/ui/utils/renderLoopDetector.js +3 -3
  131. package/dist/src/ui/utils/renderLoopDetector.js.map +1 -1
  132. package/dist/src/ui/utils/terminalSetup.d.ts +30 -0
  133. package/dist/src/ui/utils/terminalSetup.js +281 -0
  134. package/dist/src/ui/utils/terminalSetup.js.map +1 -0
  135. package/dist/src/utils/checks.d.ts +19 -0
  136. package/dist/src/utils/checks.js +24 -0
  137. package/dist/src/utils/checks.js.map +1 -0
  138. package/dist/src/utils/privacy/ConversationDataRedactor.d.ts +0 -2
  139. package/dist/src/utils/privacy/ConversationDataRedactor.js +4 -37
  140. package/dist/src/utils/privacy/ConversationDataRedactor.js.map +1 -1
  141. package/dist/src/zed-integration/acp.d.ts +63 -0
  142. package/dist/src/{acp → zed-integration}/acp.js +76 -44
  143. package/dist/src/zed-integration/acp.js.map +1 -0
  144. package/dist/src/zed-integration/schema.d.ts +11679 -0
  145. package/dist/src/zed-integration/schema.js +305 -0
  146. package/dist/src/zed-integration/schema.js.map +1 -0
  147. package/dist/src/zed-integration/zedIntegration.d.ts +10 -0
  148. package/dist/src/{acp/acpPeer.js → zed-integration/zedIntegration.js} +333 -188
  149. package/dist/src/zed-integration/zedIntegration.js.map +1 -0
  150. package/dist/tsconfig.tsbuildinfo +1 -1
  151. package/package.json +5 -5
  152. package/dist/src/acp/acp.d.ts +0 -208
  153. package/dist/src/acp/acp.js.map +0 -1
  154. package/dist/src/acp/acpPeer.d.ts +0 -8
  155. package/dist/src/acp/acpPeer.js.map +0 -1
  156. package/dist/src/ui/utils/errorParsing.d.ts +0 -7
  157. package/dist/src/ui/utils/errorParsing.js +0 -106
  158. package/dist/src/ui/utils/errorParsing.js.map +0 -1
@@ -3,59 +3,82 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export class ClientConnection {
6
+ /* ACP defines a schema for a simple (experimental) JSON-RPC protocol that allows GUI applications to interact with agents. */
7
+ import { z } from 'zod';
8
+ import * as schema from './schema.js';
9
+ export * from './schema.js';
10
+ export class AgentSideConnection {
7
11
  #connection;
8
- constructor(agent, input, output) {
9
- this.#connection = new Connection(agent(this), input, output);
12
+ constructor(toAgent, input, output) {
13
+ const agent = toAgent(this);
14
+ const handler = async (method, params) => {
15
+ switch (method) {
16
+ case schema.AGENT_METHODS.initialize: {
17
+ const validatedParams = schema.initializeRequestSchema.parse(params);
18
+ return agent.initialize(validatedParams);
19
+ }
20
+ case schema.AGENT_METHODS.session_new: {
21
+ const validatedParams = schema.newSessionRequestSchema.parse(params);
22
+ return agent.newSession(validatedParams);
23
+ }
24
+ case schema.AGENT_METHODS.session_load: {
25
+ if (!agent.loadSession) {
26
+ throw RequestError.methodNotFound();
27
+ }
28
+ const validatedParams = schema.loadSessionRequestSchema.parse(params);
29
+ return agent.loadSession(validatedParams);
30
+ }
31
+ case schema.AGENT_METHODS.authenticate: {
32
+ const validatedParams = schema.authenticateRequestSchema.parse(params);
33
+ return agent.authenticate(validatedParams);
34
+ }
35
+ case schema.AGENT_METHODS.session_prompt: {
36
+ const validatedParams = schema.promptRequestSchema.parse(params);
37
+ return agent.prompt(validatedParams);
38
+ }
39
+ case schema.AGENT_METHODS.session_cancel: {
40
+ const validatedParams = schema.cancelNotificationSchema.parse(params);
41
+ return agent.cancel(validatedParams);
42
+ }
43
+ default:
44
+ throw RequestError.methodNotFound(method);
45
+ }
46
+ };
47
+ this.#connection = new Connection(handler, input, output);
10
48
  }
11
49
  /**
12
- * Streams part of an assistant response to the client
50
+ * Streams new content to the client including text, tool calls, etc.
13
51
  */
14
- async streamAssistantMessageChunk(params) {
15
- await this.#connection.sendRequest('streamAssistantMessageChunk', params);
52
+ async sessionUpdate(params) {
53
+ return await this.#connection.sendNotification(schema.CLIENT_METHODS.session_update, params);
16
54
  }
17
55
  /**
18
- * Request confirmation before running a tool
56
+ * Request permission before running a tool
19
57
  *
20
- * When allowed, the client returns a [`ToolCallId`] which can be used
21
- * to update the tool call's `status` and `content` as it runs.
58
+ * The agent specifies a series of permission options with different granularity,
59
+ * and the client returns the chosen one.
22
60
  */
23
- requestToolCallConfirmation(params) {
24
- return this.#connection.sendRequest('requestToolCallConfirmation', params);
61
+ async requestPermission(params) {
62
+ return await this.#connection.sendRequest(schema.CLIENT_METHODS.session_request_permission, params);
25
63
  }
26
- /**
27
- * pushToolCall allows the agent to start a tool call
28
- * when it does not need to request permission to do so.
29
- *
30
- * The returned id can be used to update the UI for the tool
31
- * call as needed.
32
- */
33
- pushToolCall(params) {
34
- return this.#connection.sendRequest('pushToolCall', params);
64
+ async readTextFile(params) {
65
+ return await this.#connection.sendRequest(schema.CLIENT_METHODS.fs_read_text_file, params);
35
66
  }
36
- /**
37
- * updateToolCall allows the agent to update the content and status of the tool call.
38
- *
39
- * The new content replaces what is currently displayed in the UI.
40
- *
41
- * The [`ToolCallId`] is included in the response of
42
- * `pushToolCall` or `requestToolCallConfirmation` respectively.
43
- */
44
- async updateToolCall(params) {
45
- await this.#connection.sendRequest('updateToolCall', params);
67
+ async writeTextFile(params) {
68
+ return await this.#connection.sendRequest(schema.CLIENT_METHODS.fs_write_text_file, params);
46
69
  }
47
70
  }
48
71
  class Connection {
49
72
  #pendingResponses = new Map();
50
73
  #nextRequestId = 0;
51
- #delegate;
74
+ #handler;
52
75
  #peerInput;
53
76
  #writeQueue = Promise.resolve();
54
77
  #textEncoder;
55
- constructor(delegate, peerInput, peerOutput) {
78
+ constructor(handler, peerInput, peerOutput) {
79
+ this.#handler = handler;
56
80
  this.#peerInput = peerInput;
57
81
  this.#textEncoder = new TextEncoder();
58
- this.#delegate = delegate;
59
82
  this.#receive(peerOutput);
60
83
  }
61
84
  async #receive(output) {
@@ -75,31 +98,36 @@ class Connection {
75
98
  }
76
99
  }
77
100
  async #processMessage(message) {
78
- if ('method' in message) {
79
- const response = await this.#tryCallDelegateMethod(message.method, message.params);
101
+ if ('method' in message && 'id' in message) {
102
+ // It's a request
103
+ const response = await this.#tryCallHandler(message.method, message.params);
80
104
  await this.#sendMessage({
81
105
  jsonrpc: '2.0',
82
106
  id: message.id,
83
107
  ...response,
84
108
  });
85
109
  }
86
- else {
110
+ else if ('method' in message) {
111
+ // It's a notification
112
+ await this.#tryCallHandler(message.method, message.params);
113
+ }
114
+ else if ('id' in message) {
115
+ // It's a response
87
116
  this.#handleResponse(message);
88
117
  }
89
118
  }
90
- async #tryCallDelegateMethod(method, params) {
91
- const methodName = method;
92
- if (typeof this.#delegate[methodName] !== 'function') {
93
- return RequestError.methodNotFound(method).toResult();
94
- }
119
+ async #tryCallHandler(method, params) {
95
120
  try {
96
- const result = await this.#delegate[methodName](params);
121
+ const result = await this.#handler(method, params);
97
122
  return { result: result ?? null };
98
123
  }
99
124
  catch (error) {
100
125
  if (error instanceof RequestError) {
101
126
  return error.toResult();
102
127
  }
128
+ if (error instanceof z.ZodError) {
129
+ return RequestError.invalidParams(JSON.stringify(error.format(), undefined, 2)).toResult();
130
+ }
103
131
  let details;
104
132
  if (error instanceof Error) {
105
133
  details = error.message;
@@ -133,6 +161,9 @@ class Connection {
133
161
  await this.#sendMessage({ jsonrpc: '2.0', id, method, params });
134
162
  return responsePromise;
135
163
  }
164
+ async sendNotification(method, params) {
165
+ await this.#sendMessage({ jsonrpc: '2.0', method, params });
166
+ }
136
167
  async #sendMessage(json) {
137
168
  const content = JSON.stringify(json) + '\n';
138
169
  this.#writeQueue = this.#writeQueue
@@ -178,6 +209,9 @@ export class RequestError extends Error {
178
209
  static internalError(details) {
179
210
  return new RequestError(-32603, 'Internal error', details);
180
211
  }
212
+ static authRequired(details) {
213
+ return new RequestError(-32000, 'Authentication required', details);
214
+ }
181
215
  toResult() {
182
216
  return {
183
217
  error: {
@@ -188,6 +222,4 @@ export class RequestError extends Error {
188
222
  };
189
223
  }
190
224
  }
191
- // Protocol types
192
- export const LATEST_PROTOCOL_VERSION = '0.0.9';
193
225
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