[{"data":1,"prerenderedAt":706},["ShallowReactive",2],{"navigation":3,"doc-/modules/ai":217,"docs-all-paths":651},[4,19,39,63,87,111,127,195,211],{"title":5,"path":6,"stem":7,"children":8},"Welcome","/welcome","01.welcome",[9,11,15],{"title":5,"path":6,"stem":10},"01.welcome/index",{"title":12,"path":13,"stem":14},"Astar とは（5分）","/welcome/product-in-5-min","01.welcome/01.product-in-5-min",{"title":16,"path":17,"stem":18},"事業文脈","/welcome/business-context","01.welcome/02.business-context",{"title":20,"path":21,"stem":22,"children":23},"Getting Started","/getting-started","02.getting-started",[24,27,31,35],{"title":25,"path":21,"stem":26},"はじめかた","02.getting-started/index",{"title":28,"path":29,"stem":30},"リポジトリ取得と環境構築","/getting-started/repo-setup","02.getting-started/01.repo-setup",{"title":32,"path":33,"stem":34},"日々の開発ループ","/getting-started/dev-loop","02.getting-started/02.dev-loop",{"title":36,"path":37,"stem":38},"検証の 4 層","/getting-started/verification-tiers","02.getting-started/03.verification-tiers",{"title":40,"path":41,"stem":42,"children":43},"Architecture","/architecture","03.architecture",[44,47,51,55,59],{"title":45,"path":41,"stem":46},"アーキテクチャ","03.architecture/index",{"title":48,"path":49,"stem":50},"マルチテナンシーと RLS","/architecture/multi-tenancy-rls","03.architecture/01.multi-tenancy-rls",{"title":52,"path":53,"stem":54},"認可モデル","/architecture/authorization","03.architecture/02.authorization",{"title":56,"path":57,"stem":58},"AI サブシステム","/architecture/ai-subsystem","03.architecture/03.ai-subsystem",{"title":60,"path":61,"stem":62},"データモデル","/architecture/data-model","03.architecture/04.data-model",{"title":64,"path":65,"stem":66,"children":67},"Backend","/backend","04.backend",[68,71,75,79,83],{"title":69,"path":65,"stem":70},"バックエンド","04.backend/index",{"title":72,"path":73,"stem":74},"層構造","/backend/layering","04.backend/01.layering",{"title":76,"path":77,"stem":78},"規約","/backend/conventions","04.backend/02.conventions",{"title":80,"path":81,"stem":82},"テスト","/backend/testing","04.backend/03.testing",{"title":84,"path":85,"stem":86},"マイグレーション","/backend/migrations","04.backend/04.migrations",{"title":88,"path":89,"stem":90,"children":91},"Frontend","/frontend","05.frontend",[92,95,99,103,107],{"title":93,"path":89,"stem":94},"フロントエンド","05.frontend/index",{"title":96,"path":97,"stem":98},"モジュール内部構造","/frontend/module-anatomy","05.frontend/01.module-anatomy",{"title":100,"path":101,"stem":102},"API アクセスの一本道","/frontend/api-access-chain","05.frontend/02.api-access-chain",{"title":104,"path":105,"stem":106},"i18n","/frontend/i18n","05.frontend/03.i18n",{"title":108,"path":109,"stem":110},"デザインシステム","/frontend/design-system","05.frontend/04.design-system",{"title":112,"path":113,"stem":114,"children":115},"Go Agent And Cli","/go-agent-and-cli","06.go-agent-and-cli",[116,119,123],{"title":117,"path":113,"stem":118},"Go agent と CLI","06.go-agent-and-cli/index",{"title":120,"path":121,"stem":122},"Go agent","/go-agent-and-cli/go-agent","06.go-agent-and-cli/01.go-agent",{"title":124,"path":125,"stem":126},"CLI","/go-agent-and-cli/cli","06.go-agent-and-cli/02.cli",{"title":128,"path":129,"stem":130,"children":131},"Modules","/modules","07.modules",[132,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191],{"title":133,"path":129,"stem":134},"モジュール","07.modules/index",{"title":136,"path":137,"stem":138},"テーブル","/modules/table","07.modules/01.table",{"title":140,"path":141,"stem":142},"ドキュメントツリー","/modules/document","07.modules/02.document",{"title":144,"path":145,"stem":146},"AIチャット","/modules/ai","07.modules/03.ai",{"title":148,"path":149,"stem":150},"認証・権限","/modules/auth","07.modules/04.auth",{"title":152,"path":153,"stem":154},"AI取込","/modules/organize","07.modules/05.organize",{"title":156,"path":157,"stem":158},"ストレージ","/modules/storage","07.modules/06.storage",{"title":160,"path":161,"stem":162},"NAS同期","/modules/sync","07.modules/07.sync",{"title":164,"path":165,"stem":166},"ワークスペース","/modules/workspace","07.modules/08.workspace",{"title":168,"path":169,"stem":170},"テナントとメンバーシップ","/modules/tenant-membership","07.modules/09.tenant-membership",{"title":172,"path":173,"stem":174},"検索","/modules/search","07.modules/10.search",{"title":176,"path":177,"stem":178},"表示ビュー","/modules/display","07.modules/11.display",{"title":180,"path":181,"stem":182},"テンプレート","/modules/template","07.modules/12.template",{"title":184,"path":185,"stem":186},"メール","/modules/mail","07.modules/13.mail",{"title":188,"path":189,"stem":190},"電話","/modules/phone","07.modules/14.phone",{"title":192,"path":193,"stem":194},"リアルタイム","/modules/realtime","07.modules/15.realtime",{"title":196,"path":197,"stem":198,"children":199},"Infra And Deploy","/infra-and-deploy","08.infra-and-deploy",[200,203,207],{"title":201,"path":197,"stem":202},"インフラとデプロイ","08.infra-and-deploy/index",{"title":204,"path":205,"stem":206},"環境の種類","/infra-and-deploy/environments","08.infra-and-deploy/01.environments",{"title":208,"path":209,"stem":210},"セルフホスト構成","/infra-and-deploy/self-host","08.infra-and-deploy/02.self-host",{"title":212,"path":213,"stem":214,"children":215},"docs-map","/docs-map","09.docs-map/index",[216],{"title":212,"path":213,"stem":214},{"id":218,"title":144,"body":219,"description":645,"extension":646,"meta":647,"navigation":648,"path":145,"seo":649,"stem":146,"__hash__":650},"docs/07.modules/03.ai.md",{"type":220,"value":221,"toc":635},"minimark",[222,226,230,234,237,310,314,324,459,463,483,538,541,590,594,610],[223,224,144],"h1",{"id":225},"aiチャット",[227,228,229],"h2",{"id":229},"一言でいうと",[231,232,233],"p",{},"Astar 内蔵の AI チャット。単なるメッセージ送受信ではなく、マルチプロバイダー（Vertex AI / OpenAI Direct / Claude Code local / Codex local）に対応した agent ループを持ち、MCP tool を呼び出しながら会話を進め、破壊的な操作は承認ゲートを通してから実行する。UI への進捗表示はすべて SSE（Server-Sent Events）のイベントストリームで駆動される。",[227,235,236],{"id":236},"主要ドメイン概念",[238,239,240,253],"table",{},[241,242,243],"thead",{},[244,245,246,250],"tr",{},[247,248,249],"th",{},"概念",[247,251,252],{},"役割",[254,255,256,270,280,290,302],"tbody",{},[244,257,258,262],{},[259,260,261],"td",{},"Run",[259,263,264,265,269],{},"1回の AI 実行（1メッセージ〜完了までのセッション単位）。",[266,267,268],"code",{},"AiRunController"," が公開する",[244,271,272,277],{},[259,273,274],{},[266,275,276],{},"RunEvent",[259,278,279],{},"Run の進行を表すイベント（text delta / thinking / tool_call_proposed / tool_result / ui_action / done 等）の discriminated union",[244,281,282,287],{},[259,283,284],{},[266,285,286],{},"ToolGate",[259,288,289],{},"tool 呼び出しの承認ゲート。破壊的操作は自動実行せずユーザー承認を待つ",[244,291,292,295],{},[259,293,294],{},"Plan Mode",[259,296,297,298,301],{},"実行前に計画を提示し、承認を得てから実際の tool 実行に進むモード（",[266,299,300],{},"AiPlanController","）",[244,303,304,307],{},[259,305,306],{},"LOCAL_CLI プロバイダ",[259,308,309],{},"ユーザー自身のサブスクリプション（Claude Code / Codex）を Go Agent 経由でブリッジするプロバイダ",[227,311,313],{"id":312},"backend-構造","Backend 構造",[231,315,316,319,320,323],{},[266,317,318],{},"core/ai/"," は ",[266,321,322],{},"core/"," 配下で最大規模のモジュールの一つ。",[325,326,327,382,399,405,419,425,435,445],"ul",{},[328,329,330,333,334,337,338,341,342,344,345,347,348,351,352,355,356,359,360,363,364,337,367,370,371,374,375,378,379],"li",{},[266,331,332],{},"api/controller/",": ",[266,335,336],{},"AIChatController"," / ",[266,339,340],{},"AIChatSessionController","（チャット送受信・セッション）、",[266,343,268],{},"（Run の開始・SSE ストリーム配信）、",[266,346,300],{},"（Plan Mode）、",[266,349,350],{},"AiHandoffProposalController","（人間へのハンドオフ提案）、",[266,353,354],{},"AiMemoryController","（AI メモリ）、",[266,357,358],{},"SkillCatalogController","（スキル一覧）、",[266,361,362],{},"CodeRunToolController","（コード実行 tool）、",[266,365,366],{},"AICreditController",[266,368,369],{},"AdminCreditController","（AI クレジット、課金は ",[266,372,373],{},"billing"," と連携）、",[266,376,377],{},"AIConfigurationController","（プロバイダ設定）、",[266,380,381],{},"VoiceTranscriptionController",[328,383,384,387,388,387,391,394,395,398],{},[266,385,386],{},"domain/service/AgentOrchestrator"," → ",[266,389,390],{},"AgentLoopRunner",[266,392,393],{},"AgentLoopStateMachine",": agent ループの中核。プロンプト構築 (",[266,396,397],{},"AgentSystemPromptBuilder",")・LLM 呼び出し・tool 呼び出しの反復を状態機械として管理する",[328,400,401,404],{},[266,402,403],{},"domain/service/ToolGate",": tool 呼び出しごとに自動実行可否を判定する承認ゲート。破壊的操作はここで止まり、UI 側の承認 UI（3コンポーネント: 単発 Dialog / バッチ Card / 精読 ReviewDialog）を経て再開する",[328,406,407,410,411,414,415,418],{},[266,408,409],{},"domain/service/LocalCliOrchestrator",": LOCAL_CLI プロバイダ（Claude Code/Codex）向けの実行経路。",[266,412,413],{},"AgentOrchestrator"," とは別の配線を持つため、新しい ",[266,416,417],{},"ui_action"," 系イベントを追加するときは両方に配線が要る",[328,420,421,424],{},[266,422,423],{},"infrastructure/provider/",": プロバイダごとのアダプタ（Vertex AI / OpenAI / CLI 系）",[328,426,427,430,431,434],{},[266,428,429],{},"infrastructure/sandbox/",": AI が生成したコードを実行するサンドボックス（",[266,432,433],{},"GraalJsScriptExecutorAdapter"," 等）",[328,436,437,440,441,444],{},[266,438,439],{},"domain/model/RunEvent.kt"," + ",[266,442,443],{},"api/dto/RunEventSerializer.kt",": Run イベントのモデルとシリアライズ",[328,446,447,448,450,451,454,455,458],{},"SSE 配信は ",[266,449,268],{}," が ",[266,452,453],{},"SseEmitter"," で行う（ライブ配信）。加えて ",[266,456,457],{},"infrastructure/persistence/RunEvent*"," がイベントを DB へ永続化し、再接続時のリプレイに使う",[227,460,462],{"id":461},"frontend-構造","Frontend 構造",[231,464,465,468,469,472,473,472,476,472,479,482],{},[266,466,467],{},"app/modules/ai/"," は規約の4分類に加え ",[266,470,471],{},"stores","・",[266,474,475],{},"services",[266,477,478],{},"validators",[266,480,481],{},"utils"," を持つ。",[325,484,485,495,501,507],{},[328,486,487,490,491,494],{},[266,488,489],{},"types/run-event.schema.ts"," と ",[266,492,493],{},"types/run-event.schemas.ts",": Run イベントの Zod スキーマ（下記コールアウト参照）",[328,496,497,500],{},[266,498,499],{},"composables/useEventTransport.ts",": SSE 接続の確立・再接続・イベントの型検証",[328,502,503,506],{},[266,504,505],{},"composables/useExecutionTimeline.ts",": Run イベント列を UI 用のタイムライン（ツールコール・思考・テキスト）に投影する",[328,508,509,333,512,515,516,519,520,523,524,527,528,531,532,531,535],{},[266,510,511],{},"components/",[266,513,514],{},"surface/","（メッセージ・ツールコール表示面）、",[266,517,518],{},"proposal/","（承認 UI）、",[266,521,522],{},"atlas/","（AI が参照するスキーマ・データ構造の可視化）、",[266,525,526],{},"learning/","（学習・フィードバック UI）、",[266,529,530],{},"settings/","、",[266,533,534],{},"admin/",[266,536,537],{},"preview/",[227,539,540],{"id":540},"他モジュールとの辺",[325,542,543,553,567,578,584],{},[328,544,545,548,549,552],{},[266,546,547],{},"mcp",": agent が呼び出す tool 定義（250+ 個）は ",[266,550,551],{},"core/mcp"," が提供する",[328,554,555,558,559,562,563,566],{},[266,556,557],{},"organize",": AI 抽出パイプラインは ",[266,560,561],{},"AIChatServiceAdapter","（",[266,564,565],{},"organize/extraction/infrastructure/adapter/","）経由でこのモジュールの AI 呼び出し基盤を再利用する",[328,568,569,571,572,387,575,577],{},[266,570,373],{},": AI クレジット消費・利用量トラッキングは ",[266,573,574],{},"AICreditService",[266,576,373],{}," 連携",[328,579,580,583],{},[266,581,582],{},"automation",": 自動化ルールから起動される AI メンバー実行も同じ agent ループを通る",[328,585,586,589],{},[266,587,588],{},"agent","（Go Agent）: LOCAL_CLI プロバイダのブリッジ先",[227,591,593],{"id":592},"sse-イベント契約と承認ゲート","SSE イベント契約と承認ゲート",[231,595,596,597,599,600,387,603,606,607,609],{},"Run の進行はすべて ",[266,598,276],{}," の discriminated union として SSE で流れる。UI はこれを ",[266,601,602],{},"useEventTransport",[266,604,605],{},"useExecutionTimeline"," の順で受け取り、実行タイムラインとして描画する。破壊的な tool 呼び出しは ",[266,608,286],{}," が一旦止め、承認 UI（単発 Dialog / バッチ Card / 精読 ReviewDialog）でユーザーの承認を得てから再開する。",[611,612,614],"callout",{"type":613},"warning",[231,615,616,618,619,621,622,562,624,627,628,630,631,634],{},[266,617,276],{}," の Zod スキーマは frontend に2ファイルある：",[266,620,489],{},"（SSE ライブ配信のバリデーション）と ",[266,623,493],{},[266,625,626],{},"eventProjection.ts"," が使う、DB 永続化ペイロードのリプレイ用バリデーション）。新しいイベント種別を追加するときはこの2ファイルを両方更新しないと、ライブ配信は動くのに再接続後のリプレイだけ壊れる、あるいはその逆という非対称バグになる。同様に backend 側も ",[266,629,413],{}," 経路と ",[266,632,633],{},"LocalCliOrchestrator"," 経路の両方に新イベントを配線する必要がある。",{"title":636,"searchDepth":637,"depth":637,"links":638},"",2,[639,640,641,642,643,644],{"id":229,"depth":637,"text":229},{"id":236,"depth":637,"text":236},{"id":312,"depth":637,"text":313},{"id":461,"depth":637,"text":462},{"id":540,"depth":637,"text":540},{"id":592,"depth":637,"text":593},"マルチプロバイダー AI チャット、agent ループ、tool 実行、承認ゲート、SSE イベント契約。backend core/ai ⇄ frontend app/modules/ai の深掘り。","md",{},true,{"title":144,"description":645},"XmrOtdmweD1oz1mMi4ThCbdiMEkcnYdJOd8ivx8T99c",[652,654,655,657,658,659,660,661,662,663,664,665,667,668,669,670,671,673,674,675,676,677,679,681,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,701,702,703,704],{"path":13,"title":653},"Astar とは何か（5分で）",{"path":17,"title":16},{"path":6,"title":656},"ようこそ",{"path":29,"title":28},{"path":33,"title":32},{"path":37,"title":36},{"path":21,"title":25},{"path":49,"title":48},{"path":53,"title":52},{"path":57,"title":56},{"path":61,"title":60},{"path":41,"title":666},"システムアーキテクチャ",{"path":73,"title":72},{"path":77,"title":76},{"path":81,"title":80},{"path":85,"title":84},{"path":65,"title":672},"バックエンドガイド",{"path":97,"title":96},{"path":101,"title":100},{"path":105,"title":104},{"path":109,"title":108},{"path":89,"title":678},"フロントエンドガイド",{"path":121,"title":680},"Go agent — NAS 同期エージェント",{"path":125,"title":682},"astar CLI",{"path":113,"title":117},{"path":137,"title":136},{"path":141,"title":140},{"path":145,"title":144},{"path":149,"title":148},{"path":153,"title":152},{"path":157,"title":156},{"path":161,"title":160},{"path":165,"title":164},{"path":169,"title":168},{"path":173,"title":172},{"path":177,"title":176},{"path":181,"title":180},{"path":185,"title":184},{"path":189,"title":188},{"path":193,"title":192},{"path":129,"title":700},"モジュール索引",{"path":205,"title":204},{"path":209,"title":208},{"path":197,"title":201},{"path":213,"title":705},"docs/ 地図",1785452455323]