openclaw-cascade-plugin 1.0.12 → 1.0.14
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.
- package/dist/grpc-client.d.ts +17 -0
- package/dist/grpc-client.d.ts.map +1 -0
- package/dist/grpc-client.js +154 -0
- package/dist/grpc-client.js.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -54
- package/dist/index.js.map +1 -1
- package/dist/test-utils/mocks.d.ts +6 -4
- package/dist/test-utils/mocks.d.ts.map +1 -1
- package/dist/test-utils/mocks.js +24 -14
- package/dist/test-utils/mocks.js.map +1 -1
- package/dist/tools/desktop-automation.d.ts +2 -7
- package/dist/tools/desktop-automation.d.ts.map +1 -1
- package/dist/tools/desktop-automation.js +64 -123
- package/dist/tools/desktop-automation.js.map +1 -1
- package/dist/tools/index.d.ts +3 -10
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -17
- package/dist/tools/index.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +13 -2
- package/proto/cascade.proto +297 -0
- package/PHASE1_SUMMARY.md +0 -191
- package/PHASE3_SUMMARY.md +0 -195
- package/dist/cascade-client.d.ts +0 -53
- package/dist/cascade-client.d.ts.map +0 -1
- package/dist/cascade-client.js +0 -179
- package/dist/cascade-client.js.map +0 -1
- package/dist/python-manager.d.ts +0 -59
- package/dist/python-manager.d.ts.map +0 -1
- package/dist/python-manager.js +0 -190
- package/dist/python-manager.js.map +0 -1
- package/dist/tools/api-tools.d.ts +0 -9
- package/dist/tools/api-tools.d.ts.map +0 -1
- package/dist/tools/api-tools.js +0 -102
- package/dist/tools/api-tools.js.map +0 -1
- package/dist/tools/sandbox-tools.d.ts +0 -9
- package/dist/tools/sandbox-tools.d.ts.map +0 -1
- package/dist/tools/sandbox-tools.js +0 -79
- package/dist/tools/sandbox-tools.js.map +0 -1
- package/dist/tools/web-automation.d.ts +0 -9
- package/dist/tools/web-automation.d.ts.map +0 -1
- package/dist/tools/web-automation.js +0 -471
- package/dist/tools/web-automation.js.map +0 -1
- package/jest.setup.js +0 -19
- package/openclaw-cascade-plugin-1.0.0.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.10.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.11.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.12.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.4.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.6.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.7.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.8.tgz +0 -0
- package/openclaw-cascade-plugin-1.0.9.tgz +0 -0
- package/scripts/postinstall.js +0 -84
- package/src/a2a-client.ts +0 -66
- package/src/cascade-client.test.ts +0 -400
- package/src/cascade-client.ts +0 -198
- package/src/config.test.ts +0 -189
- package/src/config.ts +0 -137
- package/src/index.ts +0 -202
- package/src/python-manager.test.ts +0 -187
- package/src/python-manager.ts +0 -230
- package/src/test-utils/helpers.ts +0 -107
- package/src/test-utils/index.ts +0 -2
- package/src/test-utils/mocks.ts +0 -101
- package/src/tools/a2a-tools.ts +0 -162
- package/src/tools/api-tools.ts +0 -110
- package/src/tools/desktop-automation.test.ts +0 -308
- package/src/tools/desktop-automation.ts +0 -366
- package/src/tools/index.ts +0 -13
- package/src/tools/response-helpers.ts +0 -78
- package/src/tools/sandbox-tools.ts +0 -83
- package/src/tools/tool-registry.ts +0 -51
- package/src/tools/web-automation.test.ts +0 -177
- package/src/tools/web-automation.ts +0 -518
- package/src/types/index.ts +0 -133
- package/src/wsl.ts +0 -53
- package/tsconfig.json +0 -27
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package cascade;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
option csharp_namespace = "Cascade.Proto";
|
|
8
|
+
|
|
9
|
+
// Session-level lifecycle for the Body host.
|
|
10
|
+
service SessionService {
|
|
11
|
+
// Starts an application by name/identifier and initializes any provider state.
|
|
12
|
+
rpc StartApp(StartAppRequest) returns (Status);
|
|
13
|
+
// Resets transient state (cached trees, marks, sessions) without terminating the host.
|
|
14
|
+
rpc ResetState(google.protobuf.Empty) returns (Status);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Automation entry points to query UI and execute actions.
|
|
18
|
+
service AutomationService {
|
|
19
|
+
// Executes an action against a selector on the requested platform.
|
|
20
|
+
rpc PerformAction(Action) returns (Status);
|
|
21
|
+
// Returns the semantic tree snapshot for the requested platform.
|
|
22
|
+
rpc GetSemanticTree(google.protobuf.Empty) returns (SemanticTree);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Vision utilities for tagged screenshots.
|
|
26
|
+
service VisionService {
|
|
27
|
+
// Returns a screenshot with numeric marks mapped to UI elements.
|
|
28
|
+
rpc GetMarkedScreenshot(google.protobuf.Empty) returns (Screenshot);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message StartAppRequest {
|
|
32
|
+
// Friendly application identifier (e.g., process, bundle, or URL).
|
|
33
|
+
string app_name = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message Status {
|
|
37
|
+
bool success = 1;
|
|
38
|
+
string message = 2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message SemanticTree {
|
|
42
|
+
repeated UIElement elements = 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message UIElement {
|
|
46
|
+
// Stable ID within a session; provider is responsible for consistency.
|
|
47
|
+
string id = 1;
|
|
48
|
+
string name = 2;
|
|
49
|
+
ControlType control_type = 3;
|
|
50
|
+
NormalizedRectangle bounding_box = 4;
|
|
51
|
+
string parent_id = 5;
|
|
52
|
+
PlatformSource platform_source = 6;
|
|
53
|
+
// Optional accessibility/automation hints that vary by platform.
|
|
54
|
+
optional string aria_role = 7;
|
|
55
|
+
optional string automation_id = 8;
|
|
56
|
+
optional string value_text = 9;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message Selector {
|
|
60
|
+
PlatformSource platform_source = 1;
|
|
61
|
+
// Provider-specific path components; interpretation is platform-specific but normalized here.
|
|
62
|
+
repeated string path = 2;
|
|
63
|
+
// Optional filters to disambiguate elements.
|
|
64
|
+
optional string id = 3;
|
|
65
|
+
optional string name = 4;
|
|
66
|
+
optional ControlType control_type = 5;
|
|
67
|
+
optional int32 index = 6;
|
|
68
|
+
optional string text_hint = 7;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message Action {
|
|
72
|
+
ActionType action_type = 1;
|
|
73
|
+
Selector selector = 2;
|
|
74
|
+
// Optional payload for the action (text entry, numeric input, or structured JSON).
|
|
75
|
+
oneof payload {
|
|
76
|
+
string text = 3;
|
|
77
|
+
double number = 4;
|
|
78
|
+
string json_payload = 5;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message Screenshot {
|
|
83
|
+
bytes image = 1;
|
|
84
|
+
ImageFormat format = 2;
|
|
85
|
+
repeated Mark marks = 3;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message Mark {
|
|
89
|
+
string element_id = 1;
|
|
90
|
+
string label = 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message NormalizedRectangle {
|
|
94
|
+
// Normalized coordinates (0-1) relative to the capture surface.
|
|
95
|
+
double x = 1;
|
|
96
|
+
double y = 2;
|
|
97
|
+
double width = 3;
|
|
98
|
+
double height = 4;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
enum ActionType {
|
|
102
|
+
ACTION_TYPE_UNSPECIFIED = 0;
|
|
103
|
+
CLICK = 1;
|
|
104
|
+
TYPE_TEXT = 2;
|
|
105
|
+
HOVER = 3;
|
|
106
|
+
FOCUS = 4;
|
|
107
|
+
SCROLL = 5;
|
|
108
|
+
WAIT_VISIBLE = 6;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
enum PlatformSource {
|
|
112
|
+
PLATFORM_SOURCE_UNSPECIFIED = 0;
|
|
113
|
+
WINDOWS = 1;
|
|
114
|
+
JAVA = 2;
|
|
115
|
+
WEB = 3;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
enum ControlType {
|
|
119
|
+
CONTROL_TYPE_UNSPECIFIED = 0;
|
|
120
|
+
BUTTON = 1;
|
|
121
|
+
INPUT = 2;
|
|
122
|
+
COMBO = 3;
|
|
123
|
+
MENU = 4;
|
|
124
|
+
TREE = 5;
|
|
125
|
+
TABLE = 6;
|
|
126
|
+
CUSTOM = 7;
|
|
127
|
+
LISTITEM = 8; // ListItem, checkbox, radio button
|
|
128
|
+
TAB = 9; // TabItem
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
enum ImageFormat {
|
|
132
|
+
IMAGE_FORMAT_UNSPECIFIED = 0;
|
|
133
|
+
PNG = 1;
|
|
134
|
+
JPEG = 2;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Worker agent entry point for executing Skill Maps.
|
|
138
|
+
service WorkerService {
|
|
139
|
+
// Starts a worker run for the given skill map and streams progress events.
|
|
140
|
+
rpc StartWorkerRun(WorkerRunRequest) returns (stream WorkerEvent);
|
|
141
|
+
// Resumes a worker run from a checkpoint and streams progress events.
|
|
142
|
+
rpc ResumeWorkerRun(WorkerResumeRequest) returns (stream WorkerEvent);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Agent-to-Agent communication for coordination between agents under the same user/app.
|
|
146
|
+
service AgentCommService {
|
|
147
|
+
// Registers an agent instance for a user/app context and returns an agent_id.
|
|
148
|
+
rpc RegisterAgent(AgentRegisterRequest) returns (AgentRegisterResponse);
|
|
149
|
+
// Sends a message to a specific agent_id or role.
|
|
150
|
+
rpc SendAgentMessage(AgentMessage) returns (Status);
|
|
151
|
+
// Streams inbox messages for this agent instance (at-least-once delivery).
|
|
152
|
+
rpc StreamAgentInbox(AgentInboxRequest) returns (stream AgentEnvelope);
|
|
153
|
+
// Acknowledge processing of a message to support at-least-once semantics.
|
|
154
|
+
rpc AckAgentMessage(AgentAck) returns (Status);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
message WorkerRunRequest {
|
|
158
|
+
// High-level task description; used for planning skill selection.
|
|
159
|
+
string task = 1;
|
|
160
|
+
// Skill map identifier to execute (loaded from Firestore).
|
|
161
|
+
string skill_id = 2;
|
|
162
|
+
// Optional run identifier; generated if empty.
|
|
163
|
+
string run_id = 3;
|
|
164
|
+
// User/application/auth context for Firestore scoping.
|
|
165
|
+
string user_id = 4;
|
|
166
|
+
string app_id = 5;
|
|
167
|
+
string auth_token = 6;
|
|
168
|
+
// Optional inputs for parameterizing the run (opaque to worker).
|
|
169
|
+
map<string, string> inputs = 7;
|
|
170
|
+
// Dry-run skips side-effectful actions but still walks the plan.
|
|
171
|
+
bool dry_run = 8;
|
|
172
|
+
// Maximum number of replans during execution.
|
|
173
|
+
int32 max_replans = 9;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
message WorkerResumeRequest {
|
|
177
|
+
// Run identifier to resume (checkpoint is loaded via context).
|
|
178
|
+
string run_id = 1;
|
|
179
|
+
string user_id = 2;
|
|
180
|
+
string app_id = 3;
|
|
181
|
+
string auth_token = 4;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
enum WorkerEventType {
|
|
185
|
+
WORKER_EVENT_UNSPECIFIED = 0;
|
|
186
|
+
RUN_STARTED = 1;
|
|
187
|
+
STEP_STARTED = 2;
|
|
188
|
+
STEP_COMPLETED = 3;
|
|
189
|
+
STEP_FAILED = 4;
|
|
190
|
+
CHECKPOINT_SAVED = 5;
|
|
191
|
+
RUN_COMPLETED = 6;
|
|
192
|
+
RUN_FAILED = 7;
|
|
193
|
+
LOG = 8;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
message WorkerEvent {
|
|
197
|
+
string run_id = 1;
|
|
198
|
+
string skill_id = 2;
|
|
199
|
+
WorkerEventType event_type = 3;
|
|
200
|
+
// Index of the step being processed (if applicable).
|
|
201
|
+
int32 step_index = 4;
|
|
202
|
+
// Human-readable summary of the event.
|
|
203
|
+
string message = 5;
|
|
204
|
+
// Optional error details when a step fails.
|
|
205
|
+
string error = 6;
|
|
206
|
+
// Additional metadata such as step IDs or timing.
|
|
207
|
+
map<string, string> metadata = 7;
|
|
208
|
+
// Serialized checkpoint payload (JSON string).
|
|
209
|
+
string checkpoint = 8;
|
|
210
|
+
// True when this event is emitted during planning.
|
|
211
|
+
bool planning_phase = 9;
|
|
212
|
+
// Skills selected in the current plan.
|
|
213
|
+
repeated string selected_skills = 10;
|
|
214
|
+
// Verifier reasoning or summary.
|
|
215
|
+
string verification_result = 11;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// A2A messages ---------------------------------------------------------------
|
|
219
|
+
|
|
220
|
+
message AgentDescriptor {
|
|
221
|
+
// Unique agent instance id (assigned during registration).
|
|
222
|
+
string agent_id = 1;
|
|
223
|
+
// Role of the agent (e.g., explorer, worker, orchestrator).
|
|
224
|
+
string role = 2;
|
|
225
|
+
// Optional run identifier to scope messages.
|
|
226
|
+
string run_id = 3;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
message AgentRegisterRequest {
|
|
230
|
+
// User/application/auth context for scoping.
|
|
231
|
+
string user_id = 1;
|
|
232
|
+
string app_id = 2;
|
|
233
|
+
string auth_token = 3;
|
|
234
|
+
// Optional role and run metadata.
|
|
235
|
+
string role = 4;
|
|
236
|
+
string run_id = 5;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
message AgentRegisterResponse {
|
|
240
|
+
// Assigned agent id for this connection.
|
|
241
|
+
string agent_id = 1;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message AgentMessage {
|
|
245
|
+
// Message identifier for deduplication/idempotency.
|
|
246
|
+
string message_id = 1;
|
|
247
|
+
// User/application scope; must match registration.
|
|
248
|
+
string user_id = 2;
|
|
249
|
+
string app_id = 3;
|
|
250
|
+
// Sender metadata.
|
|
251
|
+
string sender_agent_id = 4;
|
|
252
|
+
string sender_role = 5;
|
|
253
|
+
// Target routing: either direct to agent_id or by role.
|
|
254
|
+
string target_agent_id = 6;
|
|
255
|
+
string target_role = 7;
|
|
256
|
+
// Optional run identifier to scope conversations.
|
|
257
|
+
string run_id = 8;
|
|
258
|
+
// Free-form metadata for routing/diagnostics.
|
|
259
|
+
map<string, string> headers = 9;
|
|
260
|
+
// Payload serialized as JSON string.
|
|
261
|
+
string json_payload = 10;
|
|
262
|
+
// Milliseconds since epoch when created.
|
|
263
|
+
int64 created_at_ms = 11;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
message AgentEnvelope {
|
|
267
|
+
// The delivered message.
|
|
268
|
+
AgentMessage message = 1;
|
|
269
|
+
// Token that must be used to ack this delivery.
|
|
270
|
+
string ack_token = 2;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
message AgentInboxRequest {
|
|
274
|
+
// Agent requesting its inbox.
|
|
275
|
+
string agent_id = 1;
|
|
276
|
+
// User/application scope; must match registration.
|
|
277
|
+
string user_id = 2;
|
|
278
|
+
string app_id = 3;
|
|
279
|
+
// Optional run filter.
|
|
280
|
+
string run_id = 4;
|
|
281
|
+
// Optional role assertion for safety.
|
|
282
|
+
string role = 5;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
message AgentAck {
|
|
286
|
+
// Message and delivery info to mark as processed.
|
|
287
|
+
string message_id = 1;
|
|
288
|
+
string ack_token = 2;
|
|
289
|
+
// Agent acknowledging the message.
|
|
290
|
+
string agent_id = 3;
|
|
291
|
+
string user_id = 4;
|
|
292
|
+
string app_id = 5;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// NOTE: CodeExecutionService has been removed.
|
|
296
|
+
// Cascade now executes non-UI programmatic automation (file transforms) in a sandboxed Python environment.
|
|
297
|
+
|
package/PHASE1_SUMMARY.md
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# Phase 1 Completion Summary
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
Phase 1 of the OpenClaw Plugin for Cascade is **COMPLETE** with comprehensive test coverage.
|
|
5
|
-
|
|
6
|
-
## What Was Built
|
|
7
|
-
|
|
8
|
-
### 1. Project Infrastructure ✅
|
|
9
|
-
- **package.json**: NPM package configuration for `openclaw-cascade-plugin`
|
|
10
|
-
- **tsconfig.json**: TypeScript configuration with strict mode
|
|
11
|
-
- **jest.config.js**: Jest testing framework with coverage requirements (80%+)
|
|
12
|
-
- **jest.setup.js**: Test environment setup
|
|
13
|
-
|
|
14
|
-
### 2. Core Components ✅
|
|
15
|
-
|
|
16
|
-
#### PythonManager (`src/python-manager.ts`)
|
|
17
|
-
- **Purpose**: Auto-detect and manage Python environment
|
|
18
|
-
- **Features**:
|
|
19
|
-
- Auto-detect Python 3.10+ in common locations
|
|
20
|
-
- Auto-install Python on Windows/macOS/Linux
|
|
21
|
-
- Version validation and parsing
|
|
22
|
-
- **Tests**: 13 passing tests
|
|
23
|
-
|
|
24
|
-
#### CascadeMcpClient (`src/cascade-client.ts`)
|
|
25
|
-
- **Purpose**: MCP (Model Context Protocol) client for Cascade communication
|
|
26
|
-
- **Features**:
|
|
27
|
-
- Spawn Python MCP server
|
|
28
|
-
- JSON-RPC communication over stdio
|
|
29
|
-
- Tool calling and listing
|
|
30
|
-
- Request/response handling with timeouts (30s)
|
|
31
|
-
- Error handling and process management
|
|
32
|
-
- **Tests**: 14 passing tests
|
|
33
|
-
|
|
34
|
-
#### Config (`src/config.ts`)
|
|
35
|
-
- **Purpose**: Configuration management and validation
|
|
36
|
-
- **Features**:
|
|
37
|
-
- Load and validate configuration
|
|
38
|
-
- Environment variable expansion ($VAR, %VAR%)
|
|
39
|
-
- Schema validation with helpful error messages
|
|
40
|
-
- Default values management
|
|
41
|
-
- **Tests**: 14 passing tests
|
|
42
|
-
|
|
43
|
-
### 3. Testing Infrastructure ✅
|
|
44
|
-
|
|
45
|
-
#### Test Utilities (`src/test-utils/`)
|
|
46
|
-
- **mocks.ts**: Mock implementations for testing
|
|
47
|
-
- **helpers.ts**: Test helper functions
|
|
48
|
-
- **index.ts**: Re-exports
|
|
49
|
-
|
|
50
|
-
### 4. Plugin Manifest ✅
|
|
51
|
-
- **openclaw.plugin.json**: Complete plugin manifest with:
|
|
52
|
-
- Plugin metadata (id, name, description)
|
|
53
|
-
- JSON Schema for configuration validation
|
|
54
|
-
- UI hints for better UX
|
|
55
|
-
- Support for all configuration options
|
|
56
|
-
|
|
57
|
-
### 5. Entry Point ✅
|
|
58
|
-
- **src/index.ts**: Main plugin entry point
|
|
59
|
-
- Loads and validates configuration
|
|
60
|
-
- Initializes PythonManager
|
|
61
|
-
- Starts MCP client
|
|
62
|
-
- Registers gateway methods and CLI commands
|
|
63
|
-
- Exports types for TypeScript users
|
|
64
|
-
|
|
65
|
-
## Test Coverage
|
|
66
|
-
|
|
67
|
-
### Total Tests: **41 passing**
|
|
68
|
-
|
|
69
|
-
| Component | Tests | Status |
|
|
70
|
-
|-----------|-------|--------|
|
|
71
|
-
| PythonManager | 13 | ✅ PASS |
|
|
72
|
-
| CascadeMcpClient | 14 | ✅ PASS |
|
|
73
|
-
| Config | 14 | ✅ PASS |
|
|
74
|
-
|
|
75
|
-
### Coverage Requirements
|
|
76
|
-
- Branches: 80%
|
|
77
|
-
- Functions: 80%
|
|
78
|
-
- Lines: 80%
|
|
79
|
-
- Statements: 80%
|
|
80
|
-
|
|
81
|
-
## Key Features Implemented
|
|
82
|
-
|
|
83
|
-
### 1. Python Auto-Detection & Installation
|
|
84
|
-
- ✅ Auto-detects Python 3.10+ in system paths
|
|
85
|
-
- ✅ Supports Windows, macOS, and Linux
|
|
86
|
-
- ✅ Auto-installs via appropriate package manager
|
|
87
|
-
- ✅ Validates Python version meets requirements
|
|
88
|
-
|
|
89
|
-
### 2. MCP Communication
|
|
90
|
-
- ✅ JSON-RPC over stdio
|
|
91
|
-
- ✅ Request/response handling with timeouts
|
|
92
|
-
- ✅ Error handling and recovery
|
|
93
|
-
- ✅ Process lifecycle management
|
|
94
|
-
|
|
95
|
-
### 3. Configuration Management
|
|
96
|
-
- ✅ Environment variable expansion
|
|
97
|
-
- ✅ Schema validation
|
|
98
|
-
- ✅ Helpful error messages
|
|
99
|
-
- ✅ Default values
|
|
100
|
-
|
|
101
|
-
### 4. Plugin Integration
|
|
102
|
-
- ✅ OpenClaw plugin manifest
|
|
103
|
-
- ✅ Gateway method registration
|
|
104
|
-
- ✅ CLI command registration
|
|
105
|
-
- ✅ TypeScript type exports
|
|
106
|
-
|
|
107
|
-
## Configuration Options
|
|
108
|
-
|
|
109
|
-
The plugin supports these configuration options (in `openclaw.plugin.json`):
|
|
110
|
-
|
|
111
|
-
```json5
|
|
112
|
-
{
|
|
113
|
-
cascadeGrpcEndpoint: "localhost:50051", // Required
|
|
114
|
-
cascadePythonPath: "/usr/bin/python3", // Optional (auto-detected)
|
|
115
|
-
firestoreProjectId: "your-project", // Optional
|
|
116
|
-
firestoreCredentialsPath: "/path/to/creds", // Optional
|
|
117
|
-
headless: false, // Optional
|
|
118
|
-
actionTimeoutMs: 8000, // Optional
|
|
119
|
-
enableA2A: false, // Optional (explicit opt-in)
|
|
120
|
-
allowedAgents: ["explorer", "worker"], // Optional
|
|
121
|
-
requireAgentConfirmation: true, // Optional
|
|
122
|
-
verbose: false, // Optional
|
|
123
|
-
screenshotMode: "auto", // Optional
|
|
124
|
-
screenshotDir: "~/.openclaw/screenshots" // Optional
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## What's Next (Phase 2)
|
|
129
|
-
|
|
130
|
-
Phase 2 will implement the 25+ tools:
|
|
131
|
-
- Desktop automation tools (9)
|
|
132
|
-
- Web automation tools (14)
|
|
133
|
-
- API tools (2)
|
|
134
|
-
- Sandbox tools (1)
|
|
135
|
-
- A2A tools for agent communication (3)
|
|
136
|
-
|
|
137
|
-
## How to Test
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
cd openclaw-plugin
|
|
141
|
-
npm install
|
|
142
|
-
npm test
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Project Structure
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
openclaw-plugin/
|
|
149
|
-
├── package.json # NPM package
|
|
150
|
-
├── tsconfig.json # TypeScript config
|
|
151
|
-
├── openclaw.plugin.json # Plugin manifest
|
|
152
|
-
├── jest.setup.js # Test setup
|
|
153
|
-
├── src/
|
|
154
|
-
│ ├── index.ts # Entry point
|
|
155
|
-
│ ├── python-manager.ts # Python management
|
|
156
|
-
│ ├── python-manager.test.ts
|
|
157
|
-
│ ├── cascade-client.ts # MCP client
|
|
158
|
-
│ ├── cascade-client.test.ts
|
|
159
|
-
│ ├── config.ts # Configuration
|
|
160
|
-
│ ├── config.test.ts
|
|
161
|
-
│ ├── types/ # Type definitions
|
|
162
|
-
│ │ └── index.ts
|
|
163
|
-
│ └── test-utils/ # Testing utilities
|
|
164
|
-
│ ├── mocks.ts
|
|
165
|
-
│ ├── helpers.ts
|
|
166
|
-
│ └── index.ts
|
|
167
|
-
└── README.md # Plugin documentation
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Success Criteria Met ✅
|
|
171
|
-
|
|
172
|
-
- [x] All tests passing (41/41)
|
|
173
|
-
- [x] Test coverage >80% (target: 80%)
|
|
174
|
-
- [x] No TypeScript errors
|
|
175
|
-
- [x] No linting errors
|
|
176
|
-
- [x] Plugin manifest complete
|
|
177
|
-
- [x] Entry point functional
|
|
178
|
-
- [x] Documentation included
|
|
179
|
-
|
|
180
|
-
## Time Investment
|
|
181
|
-
|
|
182
|
-
- Infrastructure setup: ~30 minutes
|
|
183
|
-
- PythonManager + tests: ~45 minutes
|
|
184
|
-
- CascadeMcpClient + tests: ~60 minutes
|
|
185
|
-
- Config + tests: ~30 minutes
|
|
186
|
-
- Plugin manifest & entry point: ~20 minutes
|
|
187
|
-
- **Total: ~3.5 hours**
|
|
188
|
-
|
|
189
|
-
## Ready for Phase 2
|
|
190
|
-
|
|
191
|
-
The foundation is solid and tested. Ready to implement the 25+ tools in Phase 2!
|
package/PHASE3_SUMMARY.md
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# Phase 3 Completion Summary
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
Phase 3 of the OpenClaw Plugin for Cascade is **COMPLETE** with comprehensive documentation and polish.
|
|
5
|
-
|
|
6
|
-
## Documentation Created
|
|
7
|
-
|
|
8
|
-
### 1. Main README.md (Rewritten)
|
|
9
|
-
- **Purpose**: Project overview and quick start
|
|
10
|
-
- **Sections**:
|
|
11
|
-
- Feature highlights with icons
|
|
12
|
-
- Quick start guide
|
|
13
|
-
- Installation instructions
|
|
14
|
-
- Configuration options
|
|
15
|
-
- Usage examples
|
|
16
|
-
- Architecture diagram
|
|
17
|
-
- Available tools table (29 tools)
|
|
18
|
-
- Links to all documentation
|
|
19
|
-
|
|
20
|
-
### 2. Integration Guide (`docs/openclaw-integration.md`)
|
|
21
|
-
- **Purpose**: Complete setup and usage guide
|
|
22
|
-
- **Sections**:
|
|
23
|
-
- Prerequisites
|
|
24
|
-
- Step-by-step installation
|
|
25
|
-
- Basic and advanced configuration
|
|
26
|
-
- Usage examples (Desktop, Web, A2A)
|
|
27
|
-
- Troubleshooting section
|
|
28
|
-
- Security considerations
|
|
29
|
-
|
|
30
|
-
### 3. Contributing Guide (`CONTRIBUTING.md`)
|
|
31
|
-
- **Purpose**: Developer onboarding
|
|
32
|
-
- **Sections**:
|
|
33
|
-
- Development setup (Plugin, Python, .NET)
|
|
34
|
-
- Project structure
|
|
35
|
-
- How to add tools
|
|
36
|
-
- Testing guidelines
|
|
37
|
-
- PR process
|
|
38
|
-
- Code style guide
|
|
39
|
-
- Areas for contribution
|
|
40
|
-
|
|
41
|
-
### 4. Changelog (`CHANGELOG.md`)
|
|
42
|
-
- **Purpose**: Version history
|
|
43
|
-
- **Content**:
|
|
44
|
-
- Version 1.0.0 with all features
|
|
45
|
-
- Breaking changes policy
|
|
46
|
-
- Upgrade instructions
|
|
47
|
-
- Future plans
|
|
48
|
-
|
|
49
|
-
### 5. Troubleshooting Guide (`docs/troubleshooting.md`)
|
|
50
|
-
- **Purpose**: Common issues and solutions
|
|
51
|
-
- **Categories**:
|
|
52
|
-
- Installation issues
|
|
53
|
-
- Connection problems
|
|
54
|
-
- Tool execution errors
|
|
55
|
-
- A2A issues
|
|
56
|
-
- Configuration problems
|
|
57
|
-
- Performance optimization
|
|
58
|
-
- Debug mode
|
|
59
|
-
|
|
60
|
-
### 6. AGENTS.md Updates
|
|
61
|
-
- **Added**: Complete OpenClaw Plugin section
|
|
62
|
-
- **Content**:
|
|
63
|
-
- What is OpenClaw
|
|
64
|
-
- Getting started
|
|
65
|
-
- Plugin features
|
|
66
|
-
- Development guide
|
|
67
|
-
- Testing commands
|
|
68
|
-
|
|
69
|
-
### 7. Example Configuration (`docs/config-example.json5`)
|
|
70
|
-
- **Purpose**: Reference configuration
|
|
71
|
-
- **Includes**: All available options with comments
|
|
72
|
-
|
|
73
|
-
## Documentation Quality
|
|
74
|
-
|
|
75
|
-
### ✅ Completeness
|
|
76
|
-
- [x] Quick start guide
|
|
77
|
-
- [x] Installation instructions
|
|
78
|
-
- [x] Configuration reference
|
|
79
|
-
- [x] Usage examples
|
|
80
|
-
- [x] Troubleshooting guide
|
|
81
|
-
- [x] Developer guide
|
|
82
|
-
- [x] Contributing guidelines
|
|
83
|
-
- [x] Architecture overview
|
|
84
|
-
- [x] Tool reference
|
|
85
|
-
- [x] API documentation
|
|
86
|
-
|
|
87
|
-
### ✅ Clarity
|
|
88
|
-
- Clear headings and structure
|
|
89
|
-
- Code examples with syntax highlighting
|
|
90
|
-
- Step-by-step instructions
|
|
91
|
-
- Visual diagrams (architecture)
|
|
92
|
-
- Badge/shields for quick info
|
|
93
|
-
|
|
94
|
-
### ✅ User-Friendly
|
|
95
|
-
- Table of contents in long docs
|
|
96
|
-
- Links between related docs
|
|
97
|
-
- Copy-paste ready commands
|
|
98
|
-
- Error messages with solutions
|
|
99
|
-
- Helpful tips and warnings
|
|
100
|
-
|
|
101
|
-
## Files Created/Updated
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
README.md [UPDATED] - Complete rewrite
|
|
105
|
-
CONTRIBUTING.md [NEW] - Contributor guide
|
|
106
|
-
CHANGELOG.md [NEW] - Version history
|
|
107
|
-
docs/
|
|
108
|
-
├── openclaw-integration.md [NEW] - Integration guide
|
|
109
|
-
├── troubleshooting.md [NEW] - Problem solving
|
|
110
|
-
├── config-example.json5 [NEW] - Example config
|
|
111
|
-
AGENTS.md [UPDATED] - OpenClaw section
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Key Features Documented
|
|
115
|
-
|
|
116
|
-
### For Users
|
|
117
|
-
1. **29 Tools** - All tools documented with descriptions
|
|
118
|
-
2. **Quick Start** - Get running in 5 minutes
|
|
119
|
-
3. **Examples** - Real-world usage scenarios
|
|
120
|
-
4. **Configuration** - All 13 config options explained
|
|
121
|
-
5. **Troubleshooting** - Solutions to common problems
|
|
122
|
-
|
|
123
|
-
### For Developers
|
|
124
|
-
1. **Architecture** - How plugin connects to Cascade
|
|
125
|
-
2. **Development Setup** - Step-by-step environment setup
|
|
126
|
-
3. **Adding Tools** - Template and examples
|
|
127
|
-
4. **Testing** - How to write and run tests
|
|
128
|
-
5. **Contributing** - PR process and code style
|
|
129
|
-
|
|
130
|
-
### For Maintainers
|
|
131
|
-
1. **Version History** - Changelog with all features
|
|
132
|
-
2. **Release Process** - How to create releases
|
|
133
|
-
3. **Support Policy** - Version support commitments
|
|
134
|
-
4. **Security** - Opt-in requirements for A2A
|
|
135
|
-
|
|
136
|
-
## Documentation Metrics
|
|
137
|
-
|
|
138
|
-
| Document | Lines | Purpose |
|
|
139
|
-
|----------|-------|---------|
|
|
140
|
-
| README.md | ~400 | Main project docs |
|
|
141
|
-
| openclaw-integration.md | ~450 | Setup guide |
|
|
142
|
-
| CONTRIBUTING.md | ~350 | Developer guide |
|
|
143
|
-
| troubleshooting.md | ~400 | Problem solving |
|
|
144
|
-
| CHANGELOG.md | ~200 | Version history |
|
|
145
|
-
| AGENTS.md updates | ~100 | Agent rules |
|
|
146
|
-
| **Total** | **~1900** | Complete docs |
|
|
147
|
-
|
|
148
|
-
## Next Steps (Phase 4)
|
|
149
|
-
|
|
150
|
-
Phase 4 can include:
|
|
151
|
-
|
|
152
|
-
1. **CI/CD Setup**
|
|
153
|
-
- GitHub Actions workflow
|
|
154
|
-
- Automated testing
|
|
155
|
-
- NPM publishing
|
|
156
|
-
|
|
157
|
-
2. **Additional Content**
|
|
158
|
-
- Video tutorials
|
|
159
|
-
- Example projects
|
|
160
|
-
- Blog posts
|
|
161
|
-
|
|
162
|
-
3. **Advanced Topics**
|
|
163
|
-
- Security hardening guide
|
|
164
|
-
- Performance tuning
|
|
165
|
-
- Custom tool development
|
|
166
|
-
|
|
167
|
-
## Quality Checklist
|
|
168
|
-
|
|
169
|
-
- [x] All 29 tools documented
|
|
170
|
-
- [x] Installation instructions tested
|
|
171
|
-
- [x] Configuration examples provided
|
|
172
|
-
- [x] Troubleshooting guide complete
|
|
173
|
-
- [x] Contributing guidelines clear
|
|
174
|
-
- [x] Code style documented
|
|
175
|
-
- [x] Architecture explained
|
|
176
|
-
- [x] Links between docs working
|
|
177
|
-
- [x] Examples are runnable
|
|
178
|
-
- [x] Error messages helpful
|
|
179
|
-
|
|
180
|
-
## Success Criteria Met ✅
|
|
181
|
-
|
|
182
|
-
- ✅ Comprehensive README
|
|
183
|
-
- ✅ Integration guide
|
|
184
|
-
- ✅ Developer documentation
|
|
185
|
-
- ✅ Troubleshooting guide
|
|
186
|
-
- ✅ Contributing guidelines
|
|
187
|
-
- ✅ Changelog
|
|
188
|
-
- ✅ Example configurations
|
|
189
|
-
- ✅ Updated agent rules
|
|
190
|
-
- ✅ All docs cross-linked
|
|
191
|
-
- ✅ Ready for public use
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
**Phase 3 Complete!** The OpenClaw Plugin is now fully documented and ready for the community! 🎉
|