Compare commits
2 Commits
88b91a2c55
...
37c44a7942
| Author | SHA1 | Date | |
|---|---|---|---|
| 37c44a7942 | |||
| 62dbed8075 |
|
|
@ -27,7 +27,7 @@ Protocol に外部 API として載せる段階ではない。まず Worker 内
|
|||
|
||||
- Worker 内部に reusable internal worker runner を追加する。
|
||||
- runner は少なくとも次を受け取れる。
|
||||
- purpose / name。
|
||||
- slug / name。
|
||||
- system prompt。
|
||||
- initial user input。
|
||||
- tool definitions / limited tool registry。
|
||||
|
|
|
|||
|
|
@ -11,16 +11,12 @@ root = ".yoi/tickets"
|
|||
|
||||
[ticket.roles.intake]
|
||||
profile = "builtin:intake"
|
||||
workflow = "ticket-intake-workflow"
|
||||
|
||||
[ticket.roles.orchestrator]
|
||||
profile = "builtin:orchestrator"
|
||||
workflow = "ticket-orchestrator-routing"
|
||||
|
||||
[ticket.roles.coder]
|
||||
profile = "builtin:coder"
|
||||
workflow = "multi-agent-workflow"
|
||||
|
||||
[ticket.roles.reviewer]
|
||||
profile = "builtin:reviewer"
|
||||
workflow = "multi-agent-workflow"
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ use llm_engine::{Engine, EngineError};
|
|||
|
||||
/// Specification for a single internal worker run.
|
||||
pub(crate) struct InternalWorkerSpec {
|
||||
/// Stable purpose label for audit/debug/persistence metadata.
|
||||
pub purpose: &'static str,
|
||||
/// Stable slug for audit/debug/future persistence metadata.
|
||||
pub slug: &'static str,
|
||||
/// System prompt for the isolated engine.
|
||||
pub system_prompt: String,
|
||||
/// Initial user input for the isolated engine.
|
||||
|
|
@ -33,7 +33,7 @@ pub(crate) struct InternalWorkerSpec {
|
|||
/// Result metadata for an internal worker run.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub(crate) struct InternalWorkerRunResult {
|
||||
pub purpose: &'static str,
|
||||
pub slug: &'static str,
|
||||
/// Last usage event observed for this internal run.
|
||||
pub usage: Option<UsageEvent>,
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ pub(crate) struct InternalWorkerRunResult {
|
|||
/// Error metadata for an internal worker run.
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct InternalWorkerRunError {
|
||||
pub purpose: &'static str,
|
||||
pub slug: &'static str,
|
||||
pub source: EngineError,
|
||||
/// Last usage event observed before the failure, if any.
|
||||
pub usage: Option<UsageEvent>,
|
||||
|
|
@ -52,7 +52,7 @@ pub(crate) async fn run_internal_worker(
|
|||
spec: InternalWorkerSpec,
|
||||
) -> Result<InternalWorkerRunResult, InternalWorkerRunError> {
|
||||
let InternalWorkerSpec {
|
||||
purpose,
|
||||
slug,
|
||||
system_prompt,
|
||||
input,
|
||||
client,
|
||||
|
|
@ -82,9 +82,9 @@ pub(crate) async fn run_internal_worker(
|
|||
.clone();
|
||||
|
||||
match run_result {
|
||||
Ok(_output) => Ok(InternalWorkerRunResult { purpose, usage }),
|
||||
Ok(_output) => Ok(InternalWorkerRunResult { slug, usage }),
|
||||
Err(source) => Err(InternalWorkerRunError {
|
||||
purpose,
|
||||
slug,
|
||||
source,
|
||||
usage,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -3133,7 +3133,7 @@ impl<C: LlmClient, St: Store> Worker<C, St> {
|
|||
let ctx = Arc::new(extract::ExtractWorkerContext::new());
|
||||
let input_text = extract::build_extract_input(&items_to_extract);
|
||||
let internal_result = run_internal_worker(InternalWorkerSpec {
|
||||
purpose: "memory_extract",
|
||||
slug: "memory-extract",
|
||||
system_prompt: extract_system_prompt,
|
||||
input: input_text,
|
||||
client,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user