@agentconnect/cli 0.1.3 → 0.1.5

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.
@@ -4,7 +4,8 @@ export declare function listClaudeModels(): Promise<ModelInfo[]>;
4
4
  export declare function listClaudeRecentModels(): Promise<ModelInfo[]>;
5
5
  export declare function ensureClaudeInstalled(): Promise<InstallResult>;
6
6
  export declare function getClaudeStatus(): Promise<ProviderStatus>;
7
+ export declare function updateClaude(): Promise<ProviderStatus>;
7
8
  export declare function loginClaude(options?: ProviderLoginOptions): Promise<{
8
9
  loggedIn: boolean;
9
10
  }>;
10
- export declare function runClaudePrompt({ prompt, resumeSessionId, model, cwd, onEvent, signal, }: RunPromptOptions): Promise<RunPromptResult>;
11
+ export declare function runClaudePrompt({ prompt, resumeSessionId, model, cwd, providerDetailLevel, onEvent, signal, }: RunPromptOptions): Promise<RunPromptResult>;
@@ -2,8 +2,9 @@ import type { ProviderStatus, ModelInfo, RunPromptOptions, RunPromptResult, Inst
2
2
  export declare function getCodexCommand(): string;
3
3
  export declare function ensureCodexInstalled(): Promise<InstallResult>;
4
4
  export declare function getCodexStatus(): Promise<ProviderStatus>;
5
+ export declare function updateCodex(): Promise<ProviderStatus>;
5
6
  export declare function loginCodex(): Promise<{
6
7
  loggedIn: boolean;
7
8
  }>;
8
9
  export declare function listCodexModels(): Promise<ModelInfo[]>;
9
- export declare function runCodexPrompt({ prompt, resumeSessionId, model, reasoningEffort, repoRoot, cwd, onEvent, signal, }: RunPromptOptions): Promise<RunPromptResult>;
10
+ export declare function runCodexPrompt({ prompt, resumeSessionId, model, reasoningEffort, repoRoot, cwd, providerDetailLevel, onEvent, signal, }: RunPromptOptions): Promise<RunPromptResult>;
@@ -0,0 +1,10 @@
1
+ import type { ProviderStatus, RunPromptOptions, RunPromptResult, InstallResult, ModelInfo, ProviderLoginOptions } from '../types.js';
2
+ export declare function getCursorCommand(): string;
3
+ export declare function listCursorModels(): Promise<ModelInfo[]>;
4
+ export declare function ensureCursorInstalled(): Promise<InstallResult>;
5
+ export declare function getCursorStatus(): Promise<ProviderStatus>;
6
+ export declare function updateCursor(): Promise<ProviderStatus>;
7
+ export declare function loginCursor(options?: ProviderLoginOptions): Promise<{
8
+ loggedIn: boolean;
9
+ }>;
10
+ export declare function runCursorPrompt({ prompt, resumeSessionId, model, repoRoot, cwd, providerDetailLevel, onEvent, signal, }: RunPromptOptions): Promise<RunPromptResult>;
@@ -1,6 +1,7 @@
1
1
  import type { ProviderStatus, ProviderLoginOptions, ModelInfo, RunPromptOptions, RunPromptResult, InstallResult } from '../types.js';
2
2
  export declare function ensureLocalInstalled(): Promise<InstallResult>;
3
3
  export declare function getLocalStatus(): Promise<ProviderStatus>;
4
+ export declare function updateLocal(): Promise<ProviderStatus>;
4
5
  export declare function loginLocal(options?: ProviderLoginOptions): Promise<{
5
6
  loggedIn: boolean;
6
7
  }>;
@@ -8,6 +8,7 @@ export interface SplitCommandResult {
8
8
  export declare function splitCommand(value: string | string[] | undefined): SplitCommandResult;
9
9
  export declare function resolveWindowsCommand(command: string): string;
10
10
  export declare function resolveCommandPath(command: string): string | null;
11
+ export declare function resolveCommandRealPath(command: string): string | null;
11
12
  export declare function commandExists(command: string): boolean;
12
13
  export interface RunCommandOptions extends SpawnOptions {
13
14
  input?: string;
package/dist/types.d.ts CHANGED
@@ -11,7 +11,7 @@ export interface RpcSuccess {
11
11
  id: RpcId;
12
12
  result: Record<string, unknown>;
13
13
  }
14
- export type RpcErrorCode = 'AC_ERR_UNAUTHORIZED' | 'AC_ERR_NOT_INSTALLED' | 'AC_ERR_INVALID_ARGS' | 'AC_ERR_UNSUPPORTED' | 'AC_ERR_INTERNAL' | 'AC_ERR_FS_READ' | 'AC_ERR_FS_WRITE' | 'AC_ERR_FS_LIST' | 'AC_ERR_FS_STAT' | 'AC_ERR_PROCESS' | 'AC_ERR_NET' | 'AC_ERR_BACKEND';
14
+ export type RpcErrorCode = 'AC_ERR_UNAUTHORIZED' | 'AC_ERR_NOT_INSTALLED' | 'AC_ERR_INVALID_ARGS' | 'AC_ERR_UNSUPPORTED' | 'AC_ERR_BUSY' | 'AC_ERR_INTERNAL' | 'AC_ERR_FS_READ' | 'AC_ERR_FS_WRITE' | 'AC_ERR_FS_LIST' | 'AC_ERR_FS_STAT' | 'AC_ERR_PROCESS' | 'AC_ERR_NET' | 'AC_ERR_BACKEND';
15
15
  export interface RpcError {
16
16
  jsonrpc: '2.0';
17
17
  id: RpcId;
@@ -22,7 +22,7 @@ export interface RpcError {
22
22
  };
23
23
  }
24
24
  export type RpcResponse = RpcSuccess | RpcError;
25
- export type ProviderId = 'claude' | 'codex' | 'local';
25
+ export type ProviderId = 'claude' | 'codex' | 'cursor' | 'local';
26
26
  export interface AppManifestEntry {
27
27
  type: 'web';
28
28
  path: string;
@@ -85,11 +85,24 @@ export interface ProviderStatus {
85
85
  installed: boolean;
86
86
  loggedIn: boolean;
87
87
  version?: string;
88
+ updateAvailable?: boolean;
89
+ latestVersion?: string;
90
+ updateCheckedAt?: number;
91
+ updateSource?: 'cli' | 'npm' | 'bun' | 'brew' | 'winget' | 'script' | 'unknown';
92
+ updateCommand?: string;
93
+ updateMessage?: string;
94
+ updateInProgress?: boolean;
88
95
  }
89
96
  export interface ProviderInfo extends ProviderStatus {
90
97
  id: ProviderId;
91
98
  name: string;
92
99
  }
100
+ export type ProviderDetailLevel = 'minimal' | 'raw';
101
+ export interface ProviderDetail {
102
+ eventType: string;
103
+ data?: Record<string, unknown>;
104
+ raw?: unknown;
105
+ }
93
106
  export interface ReasoningEffort {
94
107
  id: string;
95
108
  label: string;
@@ -112,15 +125,25 @@ export interface ProviderLoginOptions {
112
125
  loginExperience?: 'embedded' | 'terminal';
113
126
  }
114
127
  export interface SessionEvent {
115
- type: 'delta' | 'final' | 'usage' | 'status' | 'error' | 'raw_line' | 'provider_event';
128
+ type: 'delta' | 'final' | 'usage' | 'status' | 'error' | 'raw_line' | 'message' | 'thinking' | 'tool_call' | 'detail';
116
129
  text?: string;
117
130
  message?: string;
118
131
  line?: string;
119
132
  provider?: ProviderId;
120
- event?: Record<string, unknown>;
133
+ providerDetail?: ProviderDetail;
121
134
  providerSessionId?: string | null;
122
135
  inputTokens?: number;
123
136
  outputTokens?: number;
137
+ role?: 'system' | 'user' | 'assistant';
138
+ content?: string;
139
+ contentParts?: unknown;
140
+ status?: 'thinking' | 'idle' | 'error';
141
+ phase?: 'delta' | 'start' | 'completed' | 'error';
142
+ name?: string;
143
+ callId?: string;
144
+ input?: unknown;
145
+ output?: unknown;
146
+ timestampMs?: number;
124
147
  }
125
148
  export interface RunPromptOptions {
126
149
  prompt: string;
@@ -129,6 +152,7 @@ export interface RunPromptOptions {
129
152
  reasoningEffort?: string | null;
130
153
  repoRoot?: string;
131
154
  cwd?: string;
155
+ providerDetailLevel?: ProviderDetailLevel;
132
156
  signal?: AbortSignal;
133
157
  onEvent: (event: SessionEvent) => void;
134
158
  }
@@ -146,6 +170,7 @@ export interface Provider {
146
170
  name: string;
147
171
  ensureInstalled(): Promise<InstallResult>;
148
172
  status(): Promise<ProviderStatus>;
173
+ update(): Promise<ProviderStatus>;
149
174
  login(options?: ProviderLoginOptions): Promise<{
150
175
  loggedIn: boolean;
151
176
  }>;
@@ -161,6 +186,7 @@ export interface SessionState {
161
186
  reasoningEffort: string | null;
162
187
  cwd?: string;
163
188
  repoRoot?: string;
189
+ providerDetailLevel?: ProviderDetailLevel;
164
190
  }
165
191
  export interface BackendState {
166
192
  status: 'starting' | 'running' | 'stopped' | 'error' | 'disabled';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentconnect/cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/rayzhudev/agent-connect",