// Densha Process Network DAG - Strongly Integrated with Kotoba
// プロセスネットワークグラフモデルをDenshaに適用
// ビルド順序: トポロジカルソート
// 問題解決順序: 逆トポロジカルソート
{
// ==========================================
// ノード定義 (Densha Components)
// ==========================================
nodes: {
// Kotoba基盤層 (必須依存)
'kotoba_core': {
name: 'kotoba_core',
path: 'crates/kotoba-core/src/lib.rs',
type: 'foundation',
description: 'Kotobaのコア型定義とIR',
dependencies: [],
provides: ['Value', 'VertexId', 'GraphRef'],
status: 'required_dependency',
build_order: 1,
},
'kotoba_jsonnet': {
name: 'kotoba_jsonnet',
path: 'crates/kotoba-jsonnet/src/lib.rs',
type: 'jsonnet',
description: '完全Jsonnet実装',
dependencies: ['kotoba_core'],
provides: ['JsonnetEvaluator', 'JsonnetParser'],
status: 'required_dependency',
build_order: 2,
},
'kotoba_graph': {
name: 'kotoba_graph',
path: 'crates/kotoba-graph/src/lib.rs',
type: 'graph',
description: 'グラフデータ構造と操作',
dependencies: ['kotoba_core'],
provides: ['Graph', 'Vertex', 'Edge'],
status: 'required_dependency',
build_order: 2,
},
'kotoba_storage': {
name: 'kotoba_storage',
path: 'crates/kotoba-storage/src/lib.rs',
type: 'storage',
description: 'MVCC + Merkle DAGストレージ',
dependencies: ['kotoba_graph'],
provides: ['MerkleStore', 'Storage'],
status: 'required_dependency',
build_order: 3,
},
'kotoba_execution': {
name: 'kotoba_execution',
path: 'crates/kotoba-execution/src/lib.rs',
type: 'execution',
description: 'クエリ実行とプランナー',
dependencies: ['kotoba_graph', 'kotoba_storage'],
provides: ['ExecutionEngine', 'QueryPlanner'],
status: 'required_dependency',
build_order: 4,
},
'kotoba_rewrite': {
name: 'kotoba_rewrite',
path: 'crates/kotoba-rewrite/src/lib.rs',
type: 'rewrite',
description: 'DPOグラフ書き換えエンジン',
dependencies: ['kotoba_graph'],
provides: ['RewriteEngine', 'DpoRewriter'],
status: 'required_dependency',
build_order: 4,
},
'kotoba_kotobas': {
name: 'kotoba_kotobas',
path: 'crates/kotoba-kotobas/src/lib.rs',
type: 'kotobas',
description: 'Kotoba拡張機能 (HTTP, フロントエンド, デプロイ)',
dependencies: ['kotoba_jsonnet'],
provides: ['ConfigParser', 'HttpParser', 'FrontendParser'],
status: 'required_dependency',
build_order: 3,
},
'kotoba2tsx': {
name: 'kotoba2tsx',
path: 'crates/kotoba2tsx/src/lib.rs',
type: 'tsx_generator',
description: 'TypeScript/Reactコード生成',
dependencies: ['kotoba_jsonnet'],
provides: ['TsxGenerator', 'KotobaRenderer'],
status: 'required_dependency',
build_order: 3,
},
'kotoba_server': {
name: 'kotoba_server',
path: 'crates/kotoba-server/src/lib.rs',
type: 'server',
description: 'HTTPサーバーとAPIハンドラー',
dependencies: ['kotoba_kotobas', 'kotoba_execution'],
provides: ['HttpServer', 'ApiHandler'],
status: 'required_dependency',
build_order: 5,
},
// Densha特化層
'densha_config': {
name: 'densha_config',
path: 'src-tauri/config.rs',
type: 'densha',
description: 'Densha設定管理 (Kotoba統合)',
dependencies: ['kotoba_kotobas'],
provides: ['DenshaConfig', 'ProjectConfig'],
status: 'densha_core',
build_order: 6,
},
'densha_router': {
name: 'densha_router',
path: 'src-tauri/router.rs',
type: 'densha',
description: 'ファイルベースルーティング (Kotoba拡張)',
dependencies: ['densha_config', 'kotoba_graph'],
provides: ['Router', 'RouteHandler'],
status: 'densha_core',
build_order: 7,
},
'densha_ui_renderer': {
name: 'densha_ui_renderer',
path: 'src-tauri/kotoba_renderer.rs',
type: 'densha',
description: 'Kotoba2TSX統合UIレンダラー',
dependencies: ['kotoba2tsx', 'densha_config'],
provides: ['KotobaRenderer', 'TSXGenerator'],
status: 'densha_core',
build_order: 8,
},
'densha_server': {
name: 'densha_server',
path: 'src-tauri/server.rs',
type: 'densha',
description: 'Kotoba Server統合Webサーバー',
dependencies: ['kotoba_server', 'densha_router', 'densha_ui_renderer'],
provides: ['DenshaServer', 'WebFramework'],
status: 'densha_core',
build_order: 9,
},
'densha_main': {
name: 'densha_main',
path: 'src-tauri/main.rs',
type: 'densha',
description: 'メイン統合エントリーポイント',
dependencies: ['densha_server'],
provides: ['DenshaCLI', 'MainApp'],
status: 'densha_core',
build_order: 10,
},
},
// ==========================================
// エッジ定義 (依存関係)
// ==========================================
edges: [
// Kotoba基盤依存
{ from: 'kotoba_core', to: 'kotoba_jsonnet' },
{ from: 'kotoba_core', to: 'kotoba_graph' },
{ from: 'kotoba_jsonnet', to: 'kotoba_kotobas' },
{ from: 'kotoba_jsonnet', to: 'kotoba2tsx' },
{ from: 'kotoba_graph', to: 'kotoba_storage' },
{ from: 'kotoba_graph', to: 'kotoba_execution' },
{ from: 'kotoba_graph', to: 'kotoba_rewrite' },
{ from: 'kotoba_storage', to: 'kotoba_execution' },
{ from: 'kotoba_execution', to: 'kotoba_server' },
{ from: 'kotoba_kotobas', to: 'kotoba_server' },
// Densha内部依存
{ from: 'kotoba_kotobas', to: 'densha_config' },
{ from: 'densha_config', to: 'densha_router' },
{ from: 'densha_config', to: 'densha_ui_renderer' },
{ from: 'kotoba2tsx', to: 'densha_ui_renderer' },
{ from: 'kotoba_graph', to: 'densha_router' },
{ from: 'densha_router', to: 'densha_server' },
{ from: 'densha_ui_renderer', to: 'densha_server' },
{ from: 'kotoba_server', to: 'densha_server' },
{ from: 'densha_server', to: 'densha_main' },
],
// ==========================================
// トポロジカルソート (ビルド順序)
// ==========================================
topological_order: [
'kotoba_core',
'kotoba_jsonnet',
'kotoba_graph',
'kotoba_kotobas',
'kotoba2tsx',
'kotoba_storage',
'kotoba_execution',
'kotoba_rewrite',
'kotoba_server',
'densha_config',
'densha_router',
'densha_ui_renderer',
'densha_server',
'densha_main'
],
// ==========================================
// 逆トポロジカルソート (問題解決順序)
// ==========================================
reverse_topological_order: [
'densha_main',
'densha_server',
'densha_ui_renderer',
'densha_router',
'densha_config',
'kotoba_server',
'kotoba_rewrite',
'kotoba_execution',
'kotoba_storage',
'kotoba2tsx',
'kotoba_kotobas',
'kotoba_graph',
'kotoba_jsonnet',
'kotoba_core'
],
// ==========================================
// ビルド設定
// ==========================================
build_config: {
rust_version: '1.70.0',
features: [
'web-server',
'kotoba-core',
'rocksdb'
],
target_platforms: [
'x86_64-unknown-linux-gnu',
'x86_64-apple-darwin',
'x86_64-pc-windows-msvc'
],
},
// ==========================================
// 統合設定
// ==========================================
integration: {
kotoba_version: '0.1.1',
densha_version: '0.1.2',
schema_validation: true,
process_network_model: true,
dag_driven_initialization: true,
strong_coupling: true,
},
// ==========================================
// プロセスネットワーク設定
// ==========================================
process_network: {
enabled: true,
dag_validation: true,
build_order_check: true,
dependency_tracking: true,
error_recovery: true,
hot_reload: true,
},
// ==========================================
// デプロイメント設定
// ==========================================
deployment: {
docker: {
base_image: 'rust:1.70',
build_stages: [
'kotoba-core',
'kotoba-jsonnet',
'densha-config',
'densha-server'
],
},
kubernetes: {
replicas: 3,
resources: {
cpu: '1000m',
memory: '2Gi'
},
},
},
}