@a3s-lab/code 0.4.7 → 0.6.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.
- package/package.json +1 -1
- package/proto/code_agent.proto +99 -2
package/package.json
CHANGED
package/proto/code_agent.proto
CHANGED
|
@@ -22,6 +22,7 @@ service CodeAgentService {
|
|
|
22
22
|
rpc GetSession(GetSessionRequest) returns (GetSessionResponse);
|
|
23
23
|
rpc ConfigureSession(ConfigureSessionRequest) returns (ConfigureSessionResponse);
|
|
24
24
|
rpc GetMessages(GetMessagesRequest) returns (GetMessagesResponse);
|
|
25
|
+
rpc RestoreSession(RestoreSessionRequest) returns (RestoreSessionResponse);
|
|
25
26
|
|
|
26
27
|
// === Code Generation ===
|
|
27
28
|
rpc Generate(GenerateRequest) returns (GenerateResponse);
|
|
@@ -34,6 +35,8 @@ service CodeAgentService {
|
|
|
34
35
|
rpc UnloadSkill(UnloadSkillRequest) returns (UnloadSkillResponse);
|
|
35
36
|
rpc ListSkills(ListSkillsRequest) returns (ListSkillsResponse);
|
|
36
37
|
rpc GetSkill(GetSkillRequest) returns (GetSkillResponse);
|
|
38
|
+
rpc SearchSkills(SearchSkillsRequest) returns (SearchSkillsResponse);
|
|
39
|
+
rpc InstallSkill(InstallSkillRequest) returns (InstallSkillResponse);
|
|
37
40
|
|
|
38
41
|
// === Context Management ===
|
|
39
42
|
rpc GetContextUsage(GetContextUsageRequest) returns (GetContextUsageResponse);
|
|
@@ -90,6 +93,8 @@ service CodeAgentService {
|
|
|
90
93
|
rpc SearchMemories(SearchMemoriesRequest) returns (SearchMemoriesResponse);
|
|
91
94
|
rpc GetMemoryStats(GetMemoryStatsRequest) returns (GetMemoryStatsResponse);
|
|
92
95
|
rpc ClearMemories(ClearMemoriesRequest) returns (ClearMemoriesResponse);
|
|
96
|
+
rpc DeleteMemory(DeleteMemoryRequest) returns (DeleteMemoryResponse);
|
|
97
|
+
rpc SummarizeMemories(SummarizeMemoriesRequest) returns (SummarizeMemoriesResponse);
|
|
93
98
|
|
|
94
99
|
// === MCP (Model Context Protocol) ===
|
|
95
100
|
rpc RegisterMcpServer(RegisterMcpServerRequest) returns (RegisterMcpServerResponse);
|
|
@@ -248,12 +253,15 @@ message SessionConfig {
|
|
|
248
253
|
bool auto_compact = 6;
|
|
249
254
|
StorageType storage_type = 7;
|
|
250
255
|
float auto_compact_threshold = 8; // Context usage threshold (0.0-1.0) for auto-compaction, default 0.80
|
|
256
|
+
bool planning_enabled = 9; // Enable planning phase before execution
|
|
257
|
+
bool goal_tracking = 10; // Enable goal tracking
|
|
251
258
|
}
|
|
252
259
|
|
|
253
260
|
enum StorageType {
|
|
254
261
|
STORAGE_TYPE_UNSPECIFIED = 0;
|
|
255
262
|
STORAGE_TYPE_MEMORY = 1;
|
|
256
263
|
STORAGE_TYPE_FILE = 2;
|
|
264
|
+
STORAGE_TYPE_CUSTOM = 3;
|
|
257
265
|
}
|
|
258
266
|
|
|
259
267
|
message Session {
|
|
@@ -294,6 +302,16 @@ message ListSessionsResponse {
|
|
|
294
302
|
repeated Session sessions = 1;
|
|
295
303
|
}
|
|
296
304
|
|
|
305
|
+
message RestoreSessionRequest {
|
|
306
|
+
string session_id = 1;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
message RestoreSessionResponse {
|
|
310
|
+
bool success = 1;
|
|
311
|
+
string session_id = 2;
|
|
312
|
+
string message = 3;
|
|
313
|
+
}
|
|
314
|
+
|
|
297
315
|
message GetSessionRequest {
|
|
298
316
|
string session_id = 1;
|
|
299
317
|
}
|
|
@@ -476,6 +494,7 @@ message Skill {
|
|
|
476
494
|
bool disable_model_invocation = 4;
|
|
477
495
|
string content = 5; // Markdown instructions
|
|
478
496
|
map<string, string> metadata = 6;
|
|
497
|
+
string kind = 7; // "instruction" (default), "tool", "agent"
|
|
479
498
|
}
|
|
480
499
|
|
|
481
500
|
// Tool permission pattern
|
|
@@ -492,6 +511,40 @@ message GetSkillResponse {
|
|
|
492
511
|
repeated Skill skills = 1;
|
|
493
512
|
}
|
|
494
513
|
|
|
514
|
+
// Search skills in the ecosystem
|
|
515
|
+
message SearchSkillsRequest {
|
|
516
|
+
string query = 1; // Search query keywords
|
|
517
|
+
uint32 limit = 2; // Max results (default: 10, max: 30)
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
message SearchSkillsResponse {
|
|
521
|
+
repeated SkillSearchResult results = 1;
|
|
522
|
+
uint32 total_count = 2;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
message SkillSearchResult {
|
|
526
|
+
string name = 1; // Repository full name (owner/repo)
|
|
527
|
+
string description = 2;
|
|
528
|
+
string url = 3; // GitHub URL
|
|
529
|
+
uint64 stars = 4;
|
|
530
|
+
repeated string topics = 5;
|
|
531
|
+
string install_source = 6; // Source string for install_skill
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// Install a skill from GitHub
|
|
535
|
+
message InstallSkillRequest {
|
|
536
|
+
string source = 1; // owner/repo or owner/repo@skill-name
|
|
537
|
+
bool global = 2; // Install globally (~/.a3s/skills/) vs project-local
|
|
538
|
+
optional string session_id = 3;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
message InstallSkillResponse {
|
|
542
|
+
bool success = 1;
|
|
543
|
+
string message = 2;
|
|
544
|
+
string installed_path = 3; // Path where skill was saved
|
|
545
|
+
string skill_name = 4; // Name of installed skill
|
|
546
|
+
}
|
|
547
|
+
|
|
495
548
|
// ============================================================================
|
|
496
549
|
// Context Management Messages
|
|
497
550
|
// ============================================================================
|
|
@@ -1143,6 +1196,29 @@ message ClearMemoriesResponse {
|
|
|
1143
1196
|
uint64 cleared_count = 2;
|
|
1144
1197
|
}
|
|
1145
1198
|
|
|
1199
|
+
message DeleteMemoryRequest {
|
|
1200
|
+
string session_id = 1;
|
|
1201
|
+
string memory_id = 2;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
message DeleteMemoryResponse {
|
|
1205
|
+
bool success = 1;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
message SummarizeMemoriesRequest {
|
|
1209
|
+
string session_id = 1;
|
|
1210
|
+
repeated string tags = 2;
|
|
1211
|
+
uint32 limit = 3;
|
|
1212
|
+
optional uint32 recent_hours = 4;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
message SummarizeMemoriesResponse {
|
|
1216
|
+
string summary = 1;
|
|
1217
|
+
uint32 memory_count = 2;
|
|
1218
|
+
bool stored = 3;
|
|
1219
|
+
string summary_memory_id = 4;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1146
1222
|
// ============================================================================
|
|
1147
1223
|
// MCP (Model Context Protocol) Messages
|
|
1148
1224
|
// ============================================================================
|
|
@@ -1171,6 +1247,8 @@ message McpServerConfigProto {
|
|
|
1171
1247
|
McpTransport transport = 2;
|
|
1172
1248
|
bool enabled = 3;
|
|
1173
1249
|
map<string, string> env = 4;
|
|
1250
|
+
// Per-tool execution timeout in seconds (default: 60, 0 = use default)
|
|
1251
|
+
uint32 tool_timeout_secs = 5;
|
|
1174
1252
|
}
|
|
1175
1253
|
|
|
1176
1254
|
// Register MCP server
|
|
@@ -1373,6 +1451,12 @@ enum CronJobStatus {
|
|
|
1373
1451
|
CRON_JOB_STATUS_RUNNING = 3;
|
|
1374
1452
|
}
|
|
1375
1453
|
|
|
1454
|
+
// Cron job type
|
|
1455
|
+
enum CronJobType {
|
|
1456
|
+
CRON_JOB_TYPE_SHELL = 0; // Execute as shell command (default)
|
|
1457
|
+
CRON_JOB_TYPE_AGENT = 1; // Execute as agent prompt
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1376
1460
|
// Cron execution status
|
|
1377
1461
|
enum CronExecutionStatus {
|
|
1378
1462
|
CRON_EXECUTION_STATUS_UNKNOWN = 0;
|
|
@@ -1382,12 +1466,21 @@ enum CronExecutionStatus {
|
|
|
1382
1466
|
CRON_EXECUTION_STATUS_CANCELLED = 4;
|
|
1383
1467
|
}
|
|
1384
1468
|
|
|
1469
|
+
// Agent configuration for agent-mode cron jobs
|
|
1470
|
+
message CronAgentConfig {
|
|
1471
|
+
string model = 1; // LLM model identifier
|
|
1472
|
+
string api_key = 2; // API key for the LLM provider
|
|
1473
|
+
optional string workspace = 3; // Workspace directory override
|
|
1474
|
+
optional string system_prompt = 4; // System prompt override
|
|
1475
|
+
optional string base_url = 5; // Base URL override for the LLM API
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1385
1478
|
// Cron job definition
|
|
1386
1479
|
message CronJob {
|
|
1387
1480
|
string id = 1; // Unique job identifier
|
|
1388
1481
|
string name = 2; // Human-readable job name
|
|
1389
1482
|
string schedule = 3; // Cron expression (5 fields: min hour day month weekday)
|
|
1390
|
-
string command = 4; // Command to execute
|
|
1483
|
+
string command = 4; // Command to execute (shell) or prompt (agent)
|
|
1391
1484
|
CronJobStatus status = 5; // Current job status
|
|
1392
1485
|
uint64 timeout_ms = 6; // Execution timeout in milliseconds
|
|
1393
1486
|
int64 created_at = 7; // Creation timestamp (Unix ms)
|
|
@@ -1397,6 +1490,8 @@ message CronJob {
|
|
|
1397
1490
|
uint64 run_count = 11; // Total successful run count
|
|
1398
1491
|
uint64 fail_count = 12; // Total failed run count
|
|
1399
1492
|
optional string working_dir = 13; // Working directory for command execution
|
|
1493
|
+
CronJobType job_type = 14; // Job type: shell (default) or agent
|
|
1494
|
+
optional CronAgentConfig agent_config = 15; // Agent config (required when job_type is AGENT)
|
|
1400
1495
|
}
|
|
1401
1496
|
|
|
1402
1497
|
// Cron job execution record
|
|
@@ -1424,8 +1519,10 @@ message ListCronJobsResponse {
|
|
|
1424
1519
|
message CreateCronJobRequest {
|
|
1425
1520
|
string name = 1; // Job name (required)
|
|
1426
1521
|
string schedule = 2; // Schedule expression - cron syntax or natural language
|
|
1427
|
-
string command = 3; // Command to execute (required)
|
|
1522
|
+
string command = 3; // Command to execute or agent prompt (required)
|
|
1428
1523
|
optional uint64 timeout_ms = 4; // Execution timeout (default: 60000)
|
|
1524
|
+
CronJobType job_type = 5; // Job type: shell (default) or agent
|
|
1525
|
+
optional CronAgentConfig agent_config = 6; // Agent config (required when job_type is AGENT)
|
|
1429
1526
|
}
|
|
1430
1527
|
|
|
1431
1528
|
message CreateCronJobResponse {
|