Merge remote-tracking branch 'origin/master' into codex/pr224-rfc-rewrite

# Conflicts:
#	docs/architecture.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	scripts/doc-budgets.manifest.json
#	scripts/gen-doc-graphs.ts
This commit is contained in:
Tianyi Cui
2026-07-11 20:38:25 +08:00
154 changed files with 13524 additions and 5857 deletions

View File

@@ -205,6 +205,15 @@ const SERVICE_ROLES: ServiceRole[] = [
consumers: ['tool-web'],
note: 'Search and fetch providers register into one ctx.web seam; tool-web owns the stable model-facing names.',
},
{
key: 'workflows',
pkg: 'workflow',
title: 'Workflow script engine',
mode: 'seam',
implementations: ['workflow-workerthread'],
consumers: ['tool-workflow'],
note: 'One engine per context (bash shape, no named-provider registry); the worker-thread engine fans agent() calls out through ctx.subagents.',
},
]
const DYNAMIC_EVENT_DISPATCHERS: Array<{ event: string; pkg: string; method: string }> = [
@@ -217,6 +226,14 @@ const DYNAMIC_EVENT_DISPATCHERS: Array<{ event: string; pkg: string; method: str
// routes through the same contained dispatch (see emitLifecycle in
// dsh-subagent), so the AST scan cannot attribute it either.
{ event: 'subagent/provider-removed', pkg: 'subagent', method: 'events.dispatch' },
// The workflow/* lifecycle events dispatch the same way, for the same
// per-listener-containment reason (WorkflowService.emitWorkflowEvent).
{ event: 'workflow/start', pkg: 'workflow', method: 'events.dispatch' },
{ event: 'workflow/phase', pkg: 'workflow', method: 'events.dispatch' },
{ event: 'workflow/log', pkg: 'workflow', method: 'events.dispatch' },
{ event: 'workflow/agent-start', pkg: 'workflow', method: 'events.dispatch' },
{ event: 'workflow/agent-end', pkg: 'workflow', method: 'events.dispatch' },
{ event: 'workflow/end', pkg: 'workflow', method: 'events.dispatch' },
]
function generatedHeader(title: string): string[] {