@lasso-ai/cli 1.4.5 → 2.0.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 (59) hide show
  1. package/dist/cli/agent.d.ts +10 -89
  2. package/dist/cli/agent.js +66 -1412
  3. package/dist/cli/backends.d.ts +53 -0
  4. package/dist/cli/backends.js +267 -0
  5. package/dist/cli/bridge-old.d.ts +259 -0
  6. package/dist/cli/bridge-old.js +1350 -0
  7. package/dist/cli/bridge.d.ts +22 -12
  8. package/dist/cli/bridge.js +824 -1174
  9. package/dist/cli/host/install.js +12 -1
  10. package/dist/cli/host/next-host-entry.js +0 -2
  11. package/dist/cli/host/vite-host-entry.js +1 -3
  12. package/dist/cli/local-runtime.d.ts +28 -0
  13. package/dist/cli/local-runtime.js +294 -0
  14. package/dist/cli/oneshot.js +177 -961
  15. package/dist/cli/runtime-client.d.ts +310 -0
  16. package/dist/cli/runtime-client.js +178 -0
  17. package/dist/cli/snapshot.d.ts +3 -1
  18. package/dist/cli/snapshot.js +8 -1
  19. package/dist/overlay.js +44 -28
  20. package/dist/runtime/__tests__/adapter-normalization.test.d.ts +1 -0
  21. package/dist/runtime/__tests__/adapter-normalization.test.js +392 -0
  22. package/dist/runtime/__tests__/state-machine.test.d.ts +1 -0
  23. package/dist/runtime/__tests__/state-machine.test.js +107 -0
  24. package/dist/runtime/__tests__/verification-engine.test.d.ts +1 -0
  25. package/dist/runtime/__tests__/verification-engine.test.js +91 -0
  26. package/dist/runtime/__tests__/workspace-guard.test.d.ts +1 -0
  27. package/dist/runtime/__tests__/workspace-guard.test.js +104 -0
  28. package/dist/runtime/adapters/claude-code-adapter.d.ts +46 -0
  29. package/dist/runtime/adapters/claude-code-adapter.js +230 -0
  30. package/dist/runtime/adapters/codex-cli-adapter.d.ts +44 -0
  31. package/dist/runtime/adapters/codex-cli-adapter.js +202 -0
  32. package/dist/runtime/adapters/cursor-adapter.d.ts +47 -0
  33. package/dist/runtime/adapters/cursor-adapter.js +214 -0
  34. package/dist/runtime/adapters/factory.d.ts +19 -0
  35. package/dist/runtime/adapters/factory.js +48 -0
  36. package/dist/runtime/adapters/local-agent-adapter.d.ts +143 -0
  37. package/dist/runtime/adapters/local-agent-adapter.js +408 -0
  38. package/dist/runtime/adapters/opencode-adapter.d.ts +43 -0
  39. package/dist/runtime/adapters/opencode-adapter.js +210 -0
  40. package/dist/runtime/agent-runtime.d.ts +286 -0
  41. package/dist/runtime/agent-runtime.js +8 -0
  42. package/dist/runtime/agent-state-machine.d.ts +67 -0
  43. package/dist/runtime/agent-state-machine.js +234 -0
  44. package/dist/runtime/backend-interface.d.ts +272 -0
  45. package/dist/runtime/backend-interface.js +38 -0
  46. package/dist/runtime/event-mapper.d.ts +11 -0
  47. package/dist/runtime/event-mapper.js +40 -0
  48. package/dist/runtime/index.d.ts +20 -0
  49. package/dist/runtime/index.js +43 -0
  50. package/dist/runtime/local-session-runner.d.ts +60 -0
  51. package/dist/runtime/local-session-runner.js +185 -0
  52. package/dist/runtime/review.d.ts +24 -0
  53. package/dist/runtime/review.js +30 -0
  54. package/dist/runtime/verification-engine.d.ts +71 -0
  55. package/dist/runtime/verification-engine.js +374 -0
  56. package/dist/runtime/workspace-guard.d.ts +70 -0
  57. package/dist/runtime/workspace-guard.js +321 -0
  58. package/docs/local-coding-agents.md +183 -0
  59. package/package.json +22 -3
@@ -1,4 +1,3 @@
1
- import { type SourceChange, type AgentPrompt } from "./agent";
2
1
  import type { CollabConfig } from "./project";
3
2
  import { type TimelineSnapshot } from "./snapshot";
4
3
  export declare const DEFAULT_BRIDGE_PORT = 3056;
@@ -10,6 +9,7 @@ type GitState = {
10
9
  hasRemote?: boolean;
11
10
  remote?: string;
12
11
  };
12
+ type Provider = "anthropic" | "openai" | "google" | "nvidia" | "ollama" | "claude_code" | "opencode" | "codex_cli" | "cursor";
13
13
  export type BridgeMessage = {
14
14
  type: "hello";
15
15
  from: "overlay" | "cli";
@@ -18,7 +18,7 @@ export type BridgeMessage = {
18
18
  taskId: string;
19
19
  instruction: string;
20
20
  model: string;
21
- provider?: "anthropic" | "openai" | "google" | "ollama" | "nvidia" | "cli";
21
+ provider?: "anthropic" | "openai" | "google" | "nvidia" | "ollama" | "claude_code" | "opencode" | "codex_cli" | "cursor";
22
22
  messages?: Array<{
23
23
  role: string;
24
24
  content: string;
@@ -26,7 +26,7 @@ export type BridgeMessage = {
26
26
  }>;
27
27
  changesHistory?: Array<{
28
28
  summary: string;
29
- changes: SourceChange[];
29
+ changes: any[];
30
30
  createdAt?: string;
31
31
  }>;
32
32
  context?: {
@@ -53,7 +53,7 @@ export type BridgeMessage = {
53
53
  taskId: string;
54
54
  question: string;
55
55
  model: string;
56
- provider?: "anthropic" | "openai" | "google" | "ollama" | "nvidia" | "cli";
56
+ provider?: "anthropic" | "openai" | "google" | "nvidia" | "ollama" | "claude_code" | "opencode" | "codex_cli" | "cursor";
57
57
  messages?: Array<{
58
58
  role: string;
59
59
  content: string;
@@ -85,7 +85,7 @@ export type BridgeMessage = {
85
85
  } | {
86
86
  type: "apply";
87
87
  taskId: string;
88
- changes: SourceChange[];
88
+ changes: any[];
89
89
  } | {
90
90
  type: "undo";
91
91
  taskId?: string;
@@ -113,7 +113,9 @@ export type BridgeMessage = {
113
113
  } | {
114
114
  type: "git_generate_message";
115
115
  model: string;
116
- provider?: "anthropic" | "openai" | "google" | "ollama" | "nvidia" | "cli";
116
+ provider?: "anthropic" | "openai" | "google" | "nvidia" | "ollama" | "claude_code" | "opencode" | "codex_cli" | "cursor";
117
+ taskId?: string;
118
+ pageContext?: any;
117
119
  } | {
118
120
  type: "git_init";
119
121
  } | {
@@ -137,7 +139,7 @@ export type BridgeMessage = {
137
139
  prompt: string;
138
140
  scope?: "project" | "component";
139
141
  model?: string;
140
- provider?: "anthropic" | "openai" | "google" | "ollama" | "nvidia" | "cli";
142
+ provider?: "anthropic" | "openai" | "google" | "nvidia" | "ollama" | "claude_code" | "opencode" | "codex_cli" | "cursor";
141
143
  messages?: Array<{
142
144
  role: "user" | "assistant";
143
145
  content: string;
@@ -152,11 +154,16 @@ export type BridgeMessage = {
152
154
  } | {
153
155
  type: "delete_snapshot";
154
156
  snapshotId: string;
157
+ } | {
158
+ type: "switch_model";
159
+ taskId: string;
160
+ provider: string;
161
+ modelId: string;
155
162
  };
156
163
  type ModelOption = {
157
164
  id: string;
158
165
  label: string;
159
- provider: "anthropic" | "openai" | "google" | "ollama" | "nvidia" | "cli";
166
+ provider: Provider;
160
167
  locked?: boolean;
161
168
  lockedReason?: string;
162
169
  };
@@ -195,7 +202,7 @@ export type ServerBridgeMessage = {
195
202
  status: "thinking" | "working" | "review" | "error" | "stopped";
196
203
  message: string;
197
204
  detail?: string;
198
- changes?: SourceChange[];
205
+ changes?: any[];
199
206
  thinking?: Array<{
200
207
  title: string;
201
208
  detail?: string;
@@ -205,7 +212,11 @@ export type ServerBridgeMessage = {
205
212
  } | {
206
213
  type: "agent_prompt";
207
214
  taskId: string;
208
- prompt: AgentPrompt;
215
+ prompt: {
216
+ message: string;
217
+ kind: "permission" | "input" | "multiselect";
218
+ options?: string[];
219
+ };
209
220
  } | {
210
221
  type: "page_folders";
211
222
  path: string;
@@ -253,7 +264,6 @@ export declare function restartBridge(port?: number): Promise<{
253
264
  error?: string;
254
265
  }>;
255
266
  export declare function startBridge(cwd?: string, collabConfig?: CollabConfig | null, bridgePort?: number): Promise<{
256
- send: (msg: ServerBridgeMessage) => void;
257
- close(): void;
267
+ ok: boolean;
258
268
  }>;
259
269
  export {};