@crewx/sdk 0.9.0-rc.33 → 0.9.0-rc.35
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/config/global-settings.d.ts +19 -0
- package/dist/config/overdrive.d.ts +5 -0
- package/dist/esm/index.js +106 -106
- package/dist/esm/plugins/index.js +93 -93
- package/dist/esm/repository/index.js +98 -98
- package/dist/index.d.ts +2 -0
- package/dist/index.js +107 -107
- package/dist/plugins/index.js +93 -93
- package/dist/repository/index.js +98 -98
- package/dist/repository/task.repository.d.ts +45 -0
- package/package.json +1 -1
- package/templates/agents/default.yaml +76 -124
|
@@ -58,6 +58,20 @@ export interface ReportTaskRow {
|
|
|
58
58
|
error: string | null;
|
|
59
59
|
exitCode: number | null;
|
|
60
60
|
}
|
|
61
|
+
export type TaskEvidenceRow = Pick<TaskRow, 'id' | 'agent_id' | 'status' | 'prompt' | 'started_at' | 'completed_at' | 'thread_id'>;
|
|
62
|
+
export interface ThreadChainTurn {
|
|
63
|
+
id: string;
|
|
64
|
+
agentId: string;
|
|
65
|
+
status: string;
|
|
66
|
+
prompt: string;
|
|
67
|
+
startedAt: string;
|
|
68
|
+
completedAt: string | null;
|
|
69
|
+
}
|
|
70
|
+
export interface ThreadChain {
|
|
71
|
+
threadId: string;
|
|
72
|
+
targetAgentTurnCount: number;
|
|
73
|
+
turns: ThreadChainTurn[];
|
|
74
|
+
}
|
|
61
75
|
export declare const PID_NULL_REAP_GRACE_MS: number;
|
|
62
76
|
export declare class TaskRepository extends BaseSqliteRepository {
|
|
63
77
|
private readonly dbPath?;
|
|
@@ -156,9 +170,40 @@ export declare class TaskRepository extends BaseSqliteRepository {
|
|
|
156
170
|
getAgentUsage(from: string, to: string, workspace?: string): AgentUsageRow[];
|
|
157
171
|
getAgentUsageTrendRaw(from: string, to: string, workspace?: string): TrendRow[];
|
|
158
172
|
findTaskForStop(taskId: string, workspaceId: string): TaskRow | undefined;
|
|
173
|
+
findLatestTaskByMetadata(opts: {
|
|
174
|
+
agentId: string;
|
|
175
|
+
workspaceId: string;
|
|
176
|
+
metaKey: string;
|
|
177
|
+
metaValue: string;
|
|
178
|
+
}): {
|
|
179
|
+
id: string;
|
|
180
|
+
thread_id: string | null;
|
|
181
|
+
status: string;
|
|
182
|
+
result: string | null;
|
|
183
|
+
error: string | null;
|
|
184
|
+
started_at: string;
|
|
185
|
+
completed_at: string | null;
|
|
186
|
+
} | null;
|
|
159
187
|
markTaskFailed(taskId: string, error: string, workspaceId?: string): void;
|
|
160
188
|
findTasksByPromptHint(hint: string, workspaceId?: string): TaskRow[];
|
|
161
189
|
getProviderUsage(from: string, to: string, workspace?: string): ProviderUsageRow[];
|
|
162
190
|
getModelUsage(from: string, to: string, workspace?: string): ModelUsageRow[];
|
|
163
191
|
getTasksForReport(from: string, to: string, workspace?: string): ReportTaskRow[];
|
|
192
|
+
findTaskEvidence(params: {
|
|
193
|
+
workspaceId?: string;
|
|
194
|
+
agents?: string[];
|
|
195
|
+
statuses?: string[];
|
|
196
|
+
from?: string;
|
|
197
|
+
to?: string;
|
|
198
|
+
limit?: number;
|
|
199
|
+
order?: 'ASC' | 'DESC';
|
|
200
|
+
}): TaskEvidenceRow[];
|
|
201
|
+
findThreadChains(params: {
|
|
202
|
+
targetAgentId: string;
|
|
203
|
+
workspaceId?: string;
|
|
204
|
+
from?: string;
|
|
205
|
+
to?: string;
|
|
206
|
+
maxThreads?: number;
|
|
207
|
+
maxTurnsPerThread?: number;
|
|
208
|
+
}): ThreadChain[];
|
|
164
209
|
}
|
package/package.json
CHANGED
|
@@ -423,11 +423,6 @@ documents:
|
|
|
423
423
|
path: "../documents/crewx-manual.md"
|
|
424
424
|
summary: "CrewX User Manual"
|
|
425
425
|
|
|
426
|
-
# 빌트인 에이전트(@claude, @gemini 등)용 가벼운 안내서. 자세한 건 @crewx에게.
|
|
427
|
-
crewx_quick_guide:
|
|
428
|
-
path: "../documents/crewx-quick-guide.md"
|
|
429
|
-
render: true
|
|
430
|
-
|
|
431
426
|
agents:
|
|
432
427
|
- id: "crewx"
|
|
433
428
|
name: "CrewX Assistant"
|
|
@@ -464,127 +459,8 @@ agents:
|
|
|
464
459
|
options:
|
|
465
460
|
execute:
|
|
466
461
|
cli/claude: ["--add-dir=.", "--permission-mode=acceptEdits"]
|
|
467
|
-
cli/gemini: ["--include-directories=."]
|
|
468
462
|
cli/copilot: ["--add-dir=."]
|
|
469
463
|
|
|
470
|
-
- id: "claude"
|
|
471
|
-
name: "Claude AI"
|
|
472
|
-
role: "general"
|
|
473
|
-
team: "Anthropic"
|
|
474
|
-
provider: "cli/claude"
|
|
475
|
-
working_directory: "."
|
|
476
|
-
inline:
|
|
477
|
-
prompt: |
|
|
478
|
-
You are Claude, an AI assistant by Anthropic, integrated as a built-in agent in the CrewX system.
|
|
479
|
-
|
|
480
|
-
## Your Strengths
|
|
481
|
-
- Complex reasoning and analysis
|
|
482
|
-
- Code review and architecture design
|
|
483
|
-
- Detailed explanations
|
|
484
|
-
- Web search capabilities
|
|
485
|
-
|
|
486
|
-
{{#if documents.crewx_quick_guide}}
|
|
487
|
-
<document title="Built-in Agent Guidelines" drilldown="true">
|
|
488
|
-
**Table of Contents:**
|
|
489
|
-
{{{documents.crewx_quick_guide.toc}}}
|
|
490
|
-
|
|
491
|
-
> Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
|
|
492
|
-
</document>
|
|
493
|
-
{{/if}}
|
|
494
|
-
options:
|
|
495
|
-
query: ["--add-dir=.", "--allowed-tools=WebSearch", "--output-format", "stream-json", "--verbose"]
|
|
496
|
-
execute: ["--add-dir=.", "--allowed-tools=WebSearch", "--output-format", "stream-json", "--permission-mode=acceptEdits", "--verbose"]
|
|
497
|
-
|
|
498
|
-
- id: "gemini"
|
|
499
|
-
name: "Google Gemini"
|
|
500
|
-
role: "general"
|
|
501
|
-
team: "Google"
|
|
502
|
-
provider: "cli/gemini"
|
|
503
|
-
working_directory: "."
|
|
504
|
-
inline:
|
|
505
|
-
prompt: |
|
|
506
|
-
You are Gemini, Google's AI model, integrated as a built-in agent in the CrewX system.
|
|
507
|
-
|
|
508
|
-
## Your Strengths
|
|
509
|
-
- Performance optimization
|
|
510
|
-
- Data analysis and mathematical problems
|
|
511
|
-
- Research and information gathering
|
|
512
|
-
- Web search capabilities
|
|
513
|
-
|
|
514
|
-
{{#if documents.crewx_quick_guide}}
|
|
515
|
-
<document title="Built-in Agent Guidelines" drilldown="true">
|
|
516
|
-
**Table of Contents:**
|
|
517
|
-
{{{documents.crewx_quick_guide.toc}}}
|
|
518
|
-
|
|
519
|
-
> Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
|
|
520
|
-
</document>
|
|
521
|
-
{{/if}}
|
|
522
|
-
options:
|
|
523
|
-
query: ["--include-directories=.", "--allowed-tools=web_search"]
|
|
524
|
-
execute: ["--include-directories=.", "--allowed-tools=web_search"]
|
|
525
|
-
|
|
526
|
-
- id: "copilot"
|
|
527
|
-
name: "GitHub Copilot"
|
|
528
|
-
role: "general"
|
|
529
|
-
team: "GitHub"
|
|
530
|
-
provider: "cli/copilot"
|
|
531
|
-
working_directory: "."
|
|
532
|
-
inline:
|
|
533
|
-
prompt: |
|
|
534
|
-
You are GitHub Copilot, an AI coding assistant by GitHub, integrated as a built-in agent in the CrewX system.
|
|
535
|
-
|
|
536
|
-
## Your Strengths
|
|
537
|
-
- Code implementation and generation
|
|
538
|
-
- Best practices and coding standards
|
|
539
|
-
- Testing and debugging
|
|
540
|
-
- Quick code suggestions
|
|
541
|
-
|
|
542
|
-
**IMPORTANT COPILOT-SPECIFIC RULES:**
|
|
543
|
-
- Do NOT use bullet points (●) or other formatting before the tags
|
|
544
|
-
|
|
545
|
-
## Note
|
|
546
|
-
You do not have web search capabilities. For web research, users should use @claude or @gemini.
|
|
547
|
-
|
|
548
|
-
{{#if documents.crewx_quick_guide}}
|
|
549
|
-
<document title="Built-in Agent Guidelines" drilldown="true">
|
|
550
|
-
**Table of Contents:**
|
|
551
|
-
{{{documents.crewx_quick_guide.toc}}}
|
|
552
|
-
|
|
553
|
-
> Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
|
|
554
|
-
</document>
|
|
555
|
-
{{/if}}
|
|
556
|
-
options:
|
|
557
|
-
query: ["--add-dir=."]
|
|
558
|
-
execute: ["--add-dir=."]
|
|
559
|
-
|
|
560
|
-
- id: "codex"
|
|
561
|
-
name: "Codex AI"
|
|
562
|
-
role: "general"
|
|
563
|
-
team: "Codex"
|
|
564
|
-
provider: "cli/codex"
|
|
565
|
-
working_directory: "."
|
|
566
|
-
inline:
|
|
567
|
-
prompt: |
|
|
568
|
-
You are Codex, an AI assistant integrated as a built-in agent in the CrewX system.
|
|
569
|
-
|
|
570
|
-
## Your Strengths
|
|
571
|
-
- Code generation and analysis
|
|
572
|
-
- Development assistance
|
|
573
|
-
- Problem solving
|
|
574
|
-
- Technical documentation
|
|
575
|
-
|
|
576
|
-
{{#if documents.crewx_quick_guide}}
|
|
577
|
-
<document title="Built-in Agent Guidelines" drilldown="true">
|
|
578
|
-
**Table of Contents:**
|
|
579
|
-
{{{documents.crewx_quick_guide.toc}}}
|
|
580
|
-
|
|
581
|
-
> Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
|
|
582
|
-
</document>
|
|
583
|
-
{{/if}}
|
|
584
|
-
options:
|
|
585
|
-
query: ["exec", "--experimental-json"]
|
|
586
|
-
execute: ["exec", "-s", "workspace-write", "--experimental-json"]
|
|
587
|
-
|
|
588
464
|
- id: "self_improve_analyst"
|
|
589
465
|
name: "Self-Improve Analyst"
|
|
590
466
|
role: "Prompt Improvement Analyst"
|
|
@@ -623,5 +499,81 @@ agents:
|
|
|
623
499
|
after review.
|
|
624
500
|
- Output ONLY the JSON specified in the request message — no prose, no
|
|
625
501
|
markdown outside the JSON block.
|
|
502
|
+
- If the target agent's prompt is defined as a crewx.yaml inline block
|
|
503
|
+
rather than a standalone .md file: crewx.yaml itself is never an edit
|
|
504
|
+
target. Instead, evaluate the skill/doc .md files that agent
|
|
505
|
+
references (e.g. `skills/*/SKILL.md`) as the improvement target. If
|
|
506
|
+
no well-supported .md improvement target exists, output exactly `[]`
|
|
507
|
+
(an empty JSON array).
|
|
508
|
+
- Even when there are zero proposals, the output must be JSON only —
|
|
509
|
+
answering in prose is not allowed. (Observed 2026-07-22:
|
|
510
|
+
tsk_wSdT7B5q / tsk_2KD2Kfs2 answered in prose and were treated as
|
|
511
|
+
PARSE_EMPTY.)
|
|
512
|
+
skills:
|
|
513
|
+
include: []
|
|
514
|
+
|
|
515
|
+
- id: "memory_summarizer"
|
|
516
|
+
name: "Memory Summarizer"
|
|
517
|
+
role: "summarizer"
|
|
518
|
+
team: "CrewX"
|
|
519
|
+
description: "메모리 요약 에이전트 - 증분 요약 생성 (HiAgent + MemGAS)"
|
|
520
|
+
provider: ["cli/codex", "cli/claude", "cli/opencode", "cli/copilot"] # Fallback order: codex → claude → opencode → copilot
|
|
521
|
+
working_directory: "."
|
|
522
|
+
env:
|
|
523
|
+
GIT_AUTHOR_NAME: '{{agent.name}}'
|
|
524
|
+
GIT_AUTHOR_EMAIL: crewx+{{agent.id}}@sowonlabs.com
|
|
525
|
+
options:
|
|
526
|
+
query: {}
|
|
527
|
+
inline:
|
|
528
|
+
layout: crewx/minimal
|
|
529
|
+
prompt: |-
|
|
530
|
+
You are a Memory Summarizer Agent. Your job is to create concise summaries of memory entries.
|
|
531
|
+
|
|
532
|
+
## Task
|
|
533
|
+
Given memory entries (and optionally an existing summary), produce an updated summary.
|
|
534
|
+
|
|
535
|
+
## Output Rules
|
|
536
|
+
- Write a concise summary in Korean (3-10 sentences)
|
|
537
|
+
- Highlight key decisions, insights, and action items
|
|
538
|
+
- If existing summary provided, merge new information into it (MemGAS approach)
|
|
539
|
+
- Group related information together
|
|
540
|
+
- Output ONLY the summary text, no headers or formatting prefixes
|
|
541
|
+
- Do NOT include "[ID]" references in the summary
|
|
542
|
+
|
|
543
|
+
## Response Language
|
|
544
|
+
- Always respond in Korean
|
|
545
|
+
- Use clear, concise language
|
|
546
|
+
skills:
|
|
547
|
+
include: []
|
|
548
|
+
|
|
549
|
+
- id: "memory_searcher"
|
|
550
|
+
name: "Memory Searcher"
|
|
551
|
+
role: "searcher"
|
|
552
|
+
team: "CrewX"
|
|
553
|
+
description: "시맨틱 검색 에이전트 - 메모리 항목에서 관련 기억 찾기"
|
|
554
|
+
provider: ["cli/codex", "cli/claude", "cli/opencode", "cli/copilot"] # Fallback order: codex → claude → opencode → copilot
|
|
555
|
+
working_directory: "."
|
|
556
|
+
env:
|
|
557
|
+
GIT_AUTHOR_NAME: '{{agent.name}}'
|
|
558
|
+
GIT_AUTHOR_EMAIL: crewx+{{agent.id}}@sowonlabs.com
|
|
559
|
+
options:
|
|
560
|
+
query: {}
|
|
561
|
+
inline:
|
|
562
|
+
layout: crewx/minimal
|
|
563
|
+
prompt: |-
|
|
564
|
+
You are a Memory Searcher Agent. Your job is to find relevant memories from the provided memory list.
|
|
565
|
+
|
|
566
|
+
## Task
|
|
567
|
+
Given a list of memories and a user query, find the most relevant memories.
|
|
568
|
+
|
|
569
|
+
## Output Rules
|
|
570
|
+
- If relevant memories found: List IDs with brief explanation
|
|
571
|
+
- If no relevant memories: Say "관련 기억 없음"
|
|
572
|
+
- Maximum 5 recommendations
|
|
573
|
+
- Format: [ID] 요약 - 관련 이유
|
|
574
|
+
|
|
575
|
+
## Response Language
|
|
576
|
+
- Always respond in Korean
|
|
577
|
+
- Keep explanations concise
|
|
626
578
|
skills:
|
|
627
579
|
include: []
|