Copy disabled (too large)
Download .txt
Showing preview only (15,705K chars total). Download the full file to get everything.
Repository: YaoApp/yao
Branch: main
Commit: e9892784f510
Files: 1900
Total size: 25.3 MB
Directory structure:
gitextract_ug5_rm40/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── issue_report.md
│ ├── actions/
│ │ ├── setup-db/
│ │ │ ├── Dockerfile
│ │ │ └── action.yml
│ │ └── setup-yao/
│ │ └── action.yml
│ ├── codesign/
│ │ └── entitlements.plist
│ ├── env/
│ │ └── sandbox-v2.env
│ └── workflows/
│ ├── build-docker.yml
│ ├── build-linux.yml
│ ├── build-macos.yml
│ ├── notarize-macos.yml
│ ├── pr-receive.yml
│ ├── pr-test.yml
│ ├── release-linux.yml
│ ├── release-macos.yml
│ ├── release.yml
│ ├── unit-test-v1.yml
│ └── unit-test.yml
├── .gitignore
├── COMMERCIAL_LICENSE.md
├── COMMERCIAL_LICENSE.zh-CN.md
├── LICENSE
├── Makefile
├── README.md
├── README.zh-CN.md
├── agent/
│ ├── README.md
│ ├── agent_test.go
│ ├── assistant/
│ │ ├── agent.go
│ │ ├── agent_interrupt_test.go
│ │ ├── agent_next_test.go
│ │ ├── assistant.go
│ │ ├── build.go
│ │ ├── build_content.go
│ │ ├── build_mcp_test.go
│ │ ├── build_prompts_test.go
│ │ ├── build_test.go
│ │ ├── cache.go
│ │ ├── cache_test.go
│ │ ├── chat.go
│ │ ├── chat_test.go
│ │ ├── handlers/
│ │ │ └── stream.go
│ │ ├── history.go
│ │ ├── history_test.go
│ │ ├── hook/
│ │ │ ├── REALWORLD_PERFORMANCE_REPORT.md
│ │ │ ├── create.go
│ │ │ ├── create_bench_test.go
│ │ │ ├── create_mem_test.go
│ │ │ ├── create_nested_test.go
│ │ │ ├── create_test.go
│ │ │ ├── goroutine_leak_test.go
│ │ │ ├── hook.go
│ │ │ ├── next.go
│ │ │ ├── next_test.go
│ │ │ ├── realworld_next_test.go
│ │ │ ├── realworld_stress_test.go
│ │ │ ├── script.go
│ │ │ └── types.go
│ │ ├── llm.go
│ │ ├── load.go
│ │ ├── load_merge_test.go
│ │ ├── load_process_test.go
│ │ ├── load_store_test.go
│ │ ├── load_system.go
│ │ ├── load_test.go
│ │ ├── mcp.go
│ │ ├── mcp_test.go
│ │ ├── next.go
│ │ ├── permission.go
│ │ ├── sandbox.go
│ │ ├── sandbox_debug_test.go
│ │ ├── sandbox_e2e_test.go
│ │ ├── sandbox_integration_test.go
│ │ ├── sandbox_test.go
│ │ ├── sandbox_v2.go
│ │ ├── scripts.go
│ │ ├── scripts_process_test.go
│ │ ├── scripts_test.go
│ │ ├── search.go
│ │ ├── search_auth_db.go
│ │ ├── search_auth_integration_test.go
│ │ ├── search_auth_kb.go
│ │ ├── search_auto_disabled_test.go
│ │ ├── search_auto_full_test.go
│ │ ├── search_auto_hook_disable_test.go
│ │ ├── search_auto_keyword_test.go
│ │ ├── search_auto_web_test.go
│ │ ├── source.go
│ │ ├── trace.go
│ │ ├── types.go
│ │ └── utils.go
│ ├── caller/
│ │ ├── caller.go
│ │ ├── context.go
│ │ ├── integration_test.go
│ │ ├── jsapi.go
│ │ ├── jsapi_test.go
│ │ ├── orchestrator.go
│ │ ├── orchestrator_test.go
│ │ ├── process.go
│ │ ├── process_e2e_test.go
│ │ ├── process_test.go
│ │ ├── sandbox_integration_test.go
│ │ ├── types.go
│ │ └── types_test.go
│ ├── content/
│ │ ├── content.go
│ │ ├── docx/
│ │ │ ├── docx.go
│ │ │ └── docx_test.go
│ │ ├── image/
│ │ │ ├── image.go
│ │ │ └── image_test.go
│ │ ├── link/
│ │ │ └── link.go
│ │ ├── pdf/
│ │ │ ├── pdf.go
│ │ │ └── pdf_test.go
│ │ ├── pptx/
│ │ │ ├── pptx.go
│ │ │ └── pptx_test.go
│ │ ├── text/
│ │ │ ├── text.go
│ │ │ └── text_test.go
│ │ ├── tools/
│ │ │ └── tools.go
│ │ └── types/
│ │ └── types.go
│ ├── context/
│ │ ├── JSAPI.md
│ │ ├── RESOURCE_MANAGEMENT.md
│ │ ├── authorized_test.go
│ │ ├── buffer.go
│ │ ├── buffer_test.go
│ │ ├── chat.go
│ │ ├── chat_test.go
│ │ ├── context.go
│ │ ├── context_test.go
│ │ ├── grpc.go
│ │ ├── interfaces.go
│ │ ├── interrupt.go
│ │ ├── interrupt_test.go
│ │ ├── jsapi.go
│ │ ├── jsapi_agent.go
│ │ ├── jsapi_agent_test.go
│ │ ├── jsapi_agent_v8_test.go
│ │ ├── jsapi_computer.go
│ │ ├── jsapi_helpers.go
│ │ ├── jsapi_llm.go
│ │ ├── jsapi_llm_v8_test.go
│ │ ├── jsapi_mcp.go
│ │ ├── jsapi_mcp_test.go
│ │ ├── jsapi_mcp_v8_test.go
│ │ ├── jsapi_memory_test.go
│ │ ├── jsapi_output_test.go
│ │ ├── jsapi_release_test.go
│ │ ├── jsapi_sandbox.go
│ │ ├── jsapi_sandbox_test.go
│ │ ├── jsapi_search.go
│ │ ├── jsapi_search_test.go
│ │ ├── jsapi_stress_test.go
│ │ ├── jsapi_test.go
│ │ ├── jsapi_workspace.go
│ │ ├── log.go
│ │ ├── mcp.go
│ │ ├── mcp_test.go
│ │ ├── message.go
│ │ ├── message_events_test.go
│ │ ├── message_test.go
│ │ ├── openapi.go
│ │ ├── openapi_test.go
│ │ ├── options.go
│ │ ├── output.go
│ │ ├── stack.go
│ │ ├── stack_test.go
│ │ ├── types.go
│ │ ├── types_llm.go
│ │ └── utils.go
│ ├── docs/
│ │ ├── configuration.md
│ │ ├── context-api.md
│ │ ├── hooks.md
│ │ ├── i18n.md
│ │ ├── iframe.md
│ │ ├── mcp.md
│ │ ├── models.md
│ │ ├── pages.md
│ │ ├── prompts.md
│ │ ├── search.md
│ │ └── testing.md
│ ├── i18n/
│ │ ├── builtin.go
│ │ ├── i18n.go
│ │ └── i18n_test.go
│ ├── llm/
│ │ ├── adapters/
│ │ │ ├── adapter.go
│ │ │ ├── audio.go
│ │ │ ├── reasoning.go
│ │ │ ├── toolcall.go
│ │ │ └── vision.go
│ │ ├── capabilities.go
│ │ ├── interfaces.go
│ │ ├── jsapi.go
│ │ ├── jsapi_types.go
│ │ ├── llm.go
│ │ ├── process.go
│ │ └── providers/
│ │ ├── ANTHROPIC_PROVIDER_PROPOSAL.md
│ │ ├── README.md
│ │ ├── anthropic/
│ │ │ ├── anthropic.go
│ │ │ ├── anthropic_test.go
│ │ │ └── types.go
│ │ ├── base/
│ │ │ └── base.go
│ │ ├── factory.go
│ │ └── openai/
│ │ ├── claude_test.go
│ │ ├── deepseek_r1_test.go
│ │ ├── deepseek_v3_test.go
│ │ ├── gpt5_test.go
│ │ ├── openai.go
│ │ ├── openai_test.go
│ │ ├── temperature_test.go
│ │ └── types.go
│ ├── load.go
│ ├── load_test.go
│ ├── memory/
│ │ ├── interfaces.go
│ │ ├── manager.go
│ │ ├── memory.go
│ │ ├── memory_test.go
│ │ ├── namespace.go
│ │ └── types.go
│ ├── output/
│ │ ├── BUILTIN_TYPES.md
│ │ ├── README.md
│ │ ├── adapters/
│ │ │ ├── cui/
│ │ │ │ ├── adapter.go
│ │ │ │ └── writer.go
│ │ │ └── openai/
│ │ │ ├── README.md
│ │ │ ├── adapter.go
│ │ │ ├── converter.go
│ │ │ ├── types.go
│ │ │ └── writer.go
│ │ ├── builtin.go
│ │ ├── jsapi/
│ │ │ ├── README.md
│ │ │ ├── output.go
│ │ │ └── output_test.go
│ │ ├── message/
│ │ │ ├── STREAMING.md
│ │ │ ├── interfaces.go
│ │ │ ├── types.go
│ │ │ ├── utils.go
│ │ │ └── utils_test.go
│ │ ├── output.go
│ │ ├── safe_writer.go
│ │ └── safe_writer_test.go
│ ├── robot/
│ │ ├── DESIGN-V2-REVIEW-FINDINGS.md
│ │ ├── DESIGN.md
│ │ ├── TECHNICAL.md
│ │ ├── TODO.md
│ │ ├── V2-IMPROVEMENTS.md
│ │ ├── api/
│ │ │ ├── README.md
│ │ │ ├── activities.go
│ │ │ ├── api_test.go
│ │ │ ├── e2e_clock_test.go
│ │ │ ├── e2e_concurrent_test.go
│ │ │ ├── e2e_control_test.go
│ │ │ ├── e2e_event_test.go
│ │ │ ├── e2e_human_test.go
│ │ │ ├── e2e_interact_test.go
│ │ │ ├── e2e_suspend_test.go
│ │ │ ├── execution.go
│ │ │ ├── execution_test.go
│ │ │ ├── interact.go
│ │ │ ├── interact_test.go
│ │ │ ├── lifecycle.go
│ │ │ ├── lifecycle_test.go
│ │ │ ├── results.go
│ │ │ ├── robot.go
│ │ │ ├── robot_test.go
│ │ │ ├── trigger.go
│ │ │ ├── trigger_test.go
│ │ │ └── types.go
│ │ ├── cache/
│ │ │ ├── cache.go
│ │ │ ├── cache_test.go
│ │ │ ├── load.go
│ │ │ └── refresh.go
│ │ ├── dedup/
│ │ │ └── dedup.go
│ │ ├── events/
│ │ │ ├── delivery.go
│ │ │ ├── event_push_test.go
│ │ │ ├── events.go
│ │ │ ├── events_test.go
│ │ │ ├── handlers.go
│ │ │ ├── handlers_test.go
│ │ │ ├── integrations/
│ │ │ │ ├── dingtalk/
│ │ │ │ │ ├── dedup.go
│ │ │ │ │ ├── dingtalk.go
│ │ │ │ │ ├── e2e_test.go
│ │ │ │ │ ├── message.go
│ │ │ │ │ ├── reply.go
│ │ │ │ │ └── stream.go
│ │ │ │ ├── discord/
│ │ │ │ │ ├── dedup.go
│ │ │ │ │ ├── discord.go
│ │ │ │ │ ├── e2e_test.go
│ │ │ │ │ ├── gateway.go
│ │ │ │ │ ├── message.go
│ │ │ │ │ └── reply.go
│ │ │ │ ├── dispatcher.go
│ │ │ │ ├── dispatcher_test.go
│ │ │ │ ├── feishu/
│ │ │ │ │ ├── dedup.go
│ │ │ │ │ ├── e2e_test.go
│ │ │ │ │ ├── feishu.go
│ │ │ │ │ ├── message.go
│ │ │ │ │ ├── reply.go
│ │ │ │ │ └── stream.go
│ │ │ │ └── telegram/
│ │ │ │ ├── dedup.go
│ │ │ │ ├── e2e_test.go
│ │ │ │ ├── message.go
│ │ │ │ ├── polling.go
│ │ │ │ ├── reply.go
│ │ │ │ ├── telegram.go
│ │ │ │ └── webhook.go
│ │ │ ├── log.go
│ │ │ └── message.go
│ │ ├── executor/
│ │ │ ├── README.md
│ │ │ ├── dryrun/
│ │ │ │ └── executor.go
│ │ │ ├── executor.go
│ │ │ ├── executor_test.go
│ │ │ ├── sandbox/
│ │ │ │ └── executor.go
│ │ │ ├── standard/
│ │ │ │ ├── agent.go
│ │ │ │ ├── agent_stream_test.go
│ │ │ │ ├── agent_test.go
│ │ │ │ ├── delivery.go
│ │ │ │ ├── delivery_test.go
│ │ │ │ ├── executor.go
│ │ │ │ ├── executor_test.go
│ │ │ │ ├── goals.go
│ │ │ │ ├── goals_test.go
│ │ │ │ ├── host.go
│ │ │ │ ├── host_test.go
│ │ │ │ ├── input.go
│ │ │ │ ├── input_integration_test.go
│ │ │ │ ├── input_test.go
│ │ │ │ ├── inspiration.go
│ │ │ │ ├── inspiration_test.go
│ │ │ │ ├── learning.go
│ │ │ │ ├── log.go
│ │ │ │ ├── resume_test.go
│ │ │ │ ├── run.go
│ │ │ │ ├── run_test.go
│ │ │ │ ├── runner.go
│ │ │ │ ├── runner_test.go
│ │ │ │ ├── suspend_resume_test.go
│ │ │ │ ├── suspend_test.go
│ │ │ │ ├── tasks.go
│ │ │ │ ├── tasks_test.go
│ │ │ │ ├── ui_fields_test.go
│ │ │ │ ├── validator.go
│ │ │ │ └── validator_test.go
│ │ │ └── types/
│ │ │ ├── helpers.go
│ │ │ └── types.go
│ │ ├── logger/
│ │ │ └── logger.go
│ │ ├── manager/
│ │ │ ├── integration_clock_test.go
│ │ │ ├── integration_concurrent_test.go
│ │ │ ├── integration_control_test.go
│ │ │ ├── integration_event_test.go
│ │ │ ├── integration_human_test.go
│ │ │ ├── integration_test.go
│ │ │ ├── interact.go
│ │ │ ├── interact_helpers_test.go
│ │ │ ├── interact_test.go
│ │ │ ├── manager.go
│ │ │ └── manager_test.go
│ │ ├── plan/
│ │ │ └── plan.go
│ │ ├── pool/
│ │ │ ├── goroutine_test.go
│ │ │ ├── pool.go
│ │ │ ├── pool_test.go
│ │ │ ├── queue.go
│ │ │ ├── queue_test.go
│ │ │ ├── worker.go
│ │ │ └── worker_test.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── robot.go
│ │ ├── store/
│ │ │ ├── execution.go
│ │ │ ├── execution_test.go
│ │ │ ├── robot.go
│ │ │ ├── robot_test.go
│ │ │ └── store.go
│ │ ├── trigger/
│ │ │ ├── clock.go
│ │ │ ├── clock_test.go
│ │ │ ├── control.go
│ │ │ ├── control_test.go
│ │ │ ├── trigger.go
│ │ │ └── trigger_test.go
│ │ ├── types/
│ │ │ ├── clock.go
│ │ │ ├── clock_test.go
│ │ │ ├── config.go
│ │ │ ├── config_global.go
│ │ │ ├── config_test.go
│ │ │ ├── context.go
│ │ │ ├── enums.go
│ │ │ ├── enums_test.go
│ │ │ ├── errors.go
│ │ │ ├── host.go
│ │ │ ├── host_test.go
│ │ │ ├── inspiration.go
│ │ │ ├── interfaces.go
│ │ │ ├── request.go
│ │ │ ├── robot.go
│ │ │ └── robot_test.go
│ │ └── utils/
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── id.go
│ │ ├── time.go
│ │ ├── utils_test.go
│ │ └── validate.go
│ ├── sandbox/
│ │ ├── DESIGN.md
│ │ ├── PLAN.md
│ │ ├── claude/
│ │ │ ├── attachments_test.go
│ │ │ ├── command.go
│ │ │ ├── command_test.go
│ │ │ ├── e2e_test.go
│ │ │ ├── executor.go
│ │ │ ├── executor_test.go
│ │ │ ├── real_e2e_test.go
│ │ │ └── types.go
│ │ ├── cursor/
│ │ │ └── README.md
│ │ ├── executor.go
│ │ ├── executor_test.go
│ │ ├── integration_test.go
│ │ ├── types.go
│ │ ├── types_test.go
│ │ └── v2/
│ │ ├── claude/
│ │ │ ├── attachments.go
│ │ │ ├── oscompat.go
│ │ │ ├── parse.go
│ │ │ ├── runner.go
│ │ │ ├── runner_test.go
│ │ │ └── testdata/
│ │ │ └── code.ts
│ │ ├── init.go
│ │ ├── lifecycle.go
│ │ ├── lifecycle_test.go
│ │ ├── options.go
│ │ ├── prepare.go
│ │ ├── prepare_test.go
│ │ ├── runner.go
│ │ ├── shell.go
│ │ ├── stream.go
│ │ ├── testutils/
│ │ │ └── testutils.go
│ │ ├── testutils_remote_test.go
│ │ ├── testutils_test.go
│ │ ├── testutils_wintest_test.go
│ │ ├── token.go
│ │ ├── types/
│ │ │ ├── config.go
│ │ │ ├── runner.go
│ │ │ └── token.go
│ │ └── yao/
│ │ ├── runner.go
│ │ └── runner_test.go
│ ├── search/
│ │ ├── DESIGN.md
│ │ ├── citation.go
│ │ ├── citation_test.go
│ │ ├── defaults/
│ │ │ └── defaults.go
│ │ ├── handlers/
│ │ │ ├── db/
│ │ │ │ ├── handler.go
│ │ │ │ ├── handler_integration_test.go
│ │ │ │ └── handler_test.go
│ │ │ ├── kb/
│ │ │ │ ├── handler.go
│ │ │ │ └── handler_test.go
│ │ │ └── web/
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── handler.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── serpapi.go
│ │ │ ├── serpapi_test.go
│ │ │ ├── serper.go
│ │ │ ├── serper_test.go
│ │ │ ├── tavily.go
│ │ │ └── tavily_test.go
│ │ ├── interfaces/
│ │ │ ├── handler.go
│ │ │ ├── nlp.go
│ │ │ ├── reranker.go
│ │ │ └── searcher.go
│ │ ├── jsapi.go
│ │ ├── jsapi_db_test.go
│ │ ├── jsapi_test.go
│ │ ├── nlp/
│ │ │ ├── keyword/
│ │ │ │ ├── agent.go
│ │ │ │ ├── agent_test.go
│ │ │ │ ├── extractor.go
│ │ │ │ ├── extractor_test.go
│ │ │ │ ├── mcp.go
│ │ │ │ └── mcp_test.go
│ │ │ └── querydsl/
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── generator.go
│ │ │ ├── generator_test.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ └── types.go
│ │ ├── reference.go
│ │ ├── reference_test.go
│ │ ├── registry.go
│ │ ├── registry_test.go
│ │ ├── rerank/
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── builtin.go
│ │ │ ├── builtin_test.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── reranker.go
│ │ │ └── reranker_test.go
│ │ ├── search.go
│ │ ├── search_test.go
│ │ ├── search_web_test.go
│ │ └── types/
│ │ ├── config.go
│ │ ├── graph.go
│ │ ├── reference.go
│ │ └── types.go
│ ├── store/
│ │ ├── CHAT_STORAGE_DESIGN.md
│ │ ├── README.md
│ │ ├── mongo/
│ │ │ └── mongo.go
│ │ ├── redis/
│ │ │ └── redis.go
│ │ ├── types/
│ │ │ ├── convert.go
│ │ │ ├── convert_test.go
│ │ │ ├── fields.go
│ │ │ ├── fields_test.go
│ │ │ ├── mcp_test.go
│ │ │ ├── prompt.go
│ │ │ ├── prompt_test.go
│ │ │ ├── sandbox_v2.go
│ │ │ ├── store.go
│ │ │ └── types.go
│ │ └── xun/
│ │ ├── assistant.go
│ │ ├── assistant_test.go
│ │ ├── chat.go
│ │ ├── chat_test.go
│ │ ├── message.go
│ │ ├── message_test.go
│ │ ├── resume.go
│ │ ├── resume_test.go
│ │ ├── search.go
│ │ ├── search_test.go
│ │ ├── utils.go
│ │ ├── utils_test.go
│ │ └── xun.go
│ ├── test/
│ │ ├── DESIGN.md
│ │ ├── DESIGN_V2.md
│ │ ├── README.md
│ │ ├── assert.go
│ │ ├── assert_agent_test.go
│ │ ├── assert_test.go
│ │ ├── context.go
│ │ ├── dynamic_integration_test.go
│ │ ├── dynamic_runner.go
│ │ ├── dynamic_runner_test.go
│ │ ├── dynamic_types.go
│ │ ├── extract.go
│ │ ├── input.go
│ │ ├── input_source.go
│ │ ├── input_source_test.go
│ │ ├── input_test.go
│ │ ├── interfaces.go
│ │ ├── loader.go
│ │ ├── output.go
│ │ ├── reporter.go
│ │ ├── resolver.go
│ │ ├── runner.go
│ │ ├── runner_integration_test.go
│ │ ├── script.go
│ │ ├── script_assert.go
│ │ ├── script_hooks.go
│ │ ├── script_hooks_test.go
│ │ ├── script_types.go
│ │ └── types.go
│ ├── testutils/
│ │ └── testutils.go
│ └── types/
│ ├── dsl.go
│ └── types.go
├── aigc/
│ ├── aigc.go
│ ├── aigc_test.go
│ ├── load.go
│ ├── load_test.go
│ ├── process.go
│ ├── process_test.go
│ └── types.go
├── api/
│ ├── README.md
│ ├── api.go
│ └── api_test.go
├── assert/
│ ├── asserter.go
│ ├── asserter_test.go
│ ├── helpers.go
│ └── types.go
├── attachment/
│ ├── README.md
│ ├── compresses.go
│ ├── convert.go
│ ├── example_usage.go
│ ├── fileheader.go
│ ├── gzip.go
│ ├── load.go
│ ├── load_test.go
│ ├── local/
│ │ ├── storage.go
│ │ └── storage_test.go
│ ├── manager.go
│ ├── manager_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── s3/
│ │ ├── storage.go
│ │ └── storage_test.go
│ └── types.go
├── audit/
│ └── README.md
├── bin/
│ └── yao-dev
├── cert/
│ ├── cert.go
│ └── cert_test.go
├── cmd/
│ ├── README.md
│ ├── agent/
│ │ ├── add.go
│ │ ├── agent.go
│ │ ├── extract.go
│ │ ├── fork.go
│ │ ├── push.go
│ │ ├── test.go
│ │ └── update.go
│ ├── ci-token/
│ │ └── main.go
│ ├── credential.go
│ ├── dump.go
│ ├── get/
│ │ ├── get.go
│ │ └── get_test.go
│ ├── get.go
│ ├── help.go
│ ├── init.go
│ ├── inspect.go
│ ├── login.go
│ ├── logout.go
│ ├── mcp/
│ │ ├── add.go
│ │ ├── fork.go
│ │ ├── mcp.go
│ │ ├── push.go
│ │ └── update.go
│ ├── migrate.go
│ ├── pack.go
│ ├── restore.go
│ ├── robot/
│ │ ├── add.go
│ │ └── robot.go
│ ├── root.go
│ ├── run.go
│ ├── socket.go
│ ├── start.go
│ ├── sui/
│ │ ├── build.go
│ │ ├── sui.go
│ │ ├── trans.go
│ │ ├── utils.go
│ │ └── watch.go
│ ├── tea.go
│ ├── upgrade.go
│ ├── version.go
│ └── websocket.go
├── config/
│ ├── config.go
│ ├── config_test.go
│ └── types.go
├── connector/
│ ├── connector.go
│ └── connector_test.go
├── crypto/
│ ├── aes.go
│ ├── aes_test.go
│ ├── crypto.go
│ ├── crypto_test.go
│ └── process.go
├── cui/
│ ├── setup/
│ │ └── index.html
│ ├── v0.9/
│ │ └── index.html
│ └── v1.0/
│ ├── index.html
│ ├── layouts__index.async.js
│ └── umi.js
├── data/
│ ├── bindata.go
│ ├── data.go
│ └── data_test.go
├── docker/
│ ├── build/
│ │ └── Dockerfile
│ ├── development/
│ │ └── Dockerfile
│ └── production/
│ └── Dockerfile
├── docs/
│ └── README.md
├── dsl/
│ ├── api/
│ │ └── api.go
│ ├── connector/
│ │ ├── cases_test.go
│ │ ├── connector.go
│ │ └── connector_test.go
│ ├── dsl.go
│ ├── dsl_test.go
│ ├── io/
│ │ ├── cases_test.go
│ │ ├── db.go
│ │ ├── db_test.go
│ │ ├── fs.go
│ │ ├── fs_test.go
│ │ └── utils.go
│ ├── mcp/
│ │ ├── cases_test.go
│ │ ├── client.go
│ │ ├── client_test.go
│ │ └── server.go
│ ├── model/
│ │ ├── cases_test.go
│ │ ├── model.go
│ │ └── model_test.go
│ └── types/
│ ├── interfaces.go
│ ├── types.go
│ ├── utils.go
│ └── utils_test.go
├── engine/
│ ├── load.go
│ ├── load_test.go
│ ├── machine.go
│ ├── machine_darwin.go
│ ├── machine_linux.go
│ ├── machine_test.go
│ ├── machine_windows.go
│ ├── process.go
│ └── process_test.go
├── event/
│ ├── README.md
│ ├── bench_test.go
│ ├── bus.go
│ ├── bus_test.go
│ ├── leak_test.go
│ ├── listener.go
│ ├── listener_test.go
│ ├── option.go
│ ├── queue.go
│ ├── queue_test.go
│ ├── service.go
│ ├── service_test.go
│ ├── sub.go
│ ├── sub_test.go
│ ├── types/
│ │ ├── interfaces.go
│ │ ├── types.go
│ │ └── types_test.go
│ ├── worker.go
│ └── worker_test.go
├── excel/
│ ├── README.md
│ ├── each.go
│ ├── each_test.go
│ ├── excel.go
│ ├── excel_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── sheet.go
│ ├── sheet_test.go
│ ├── write.go
│ └── write_test.go
├── flow/
│ ├── README.md
│ ├── flow.go
│ └── flow_test.go
├── fs/
│ ├── fs.go
│ └── fs_test.go
├── go.mod
├── go.sum
├── grpc/
│ ├── DESIGN.md
│ ├── IMPL.md
│ ├── TEST.md
│ ├── agent/
│ │ ├── agent.go
│ │ └── agent_test.go
│ ├── api/
│ │ ├── api.go
│ │ └── api_test.go
│ ├── auth/
│ │ ├── endpoint.go
│ │ ├── endpoint_test.go
│ │ ├── guard.go
│ │ ├── guard_test.go
│ │ └── scope.go
│ ├── client/
│ │ ├── client.go
│ │ └── token.go
│ ├── grpc.go
│ ├── health/
│ │ ├── health.go
│ │ └── health_test.go
│ ├── llm/
│ │ ├── llm.go
│ │ └── llm_test.go
│ ├── mcp/
│ │ ├── mcp.go
│ │ └── mcp_test.go
│ ├── pb/
│ │ ├── yao.pb.go
│ │ ├── yao.proto
│ │ └── yao_grpc.pb.go
│ ├── run/
│ │ ├── run.go
│ │ └── run_test.go
│ ├── sandbox/
│ │ ├── heartbeat.go
│ │ └── heartbeat_test.go
│ ├── shell/
│ │ ├── shell.go
│ │ └── shell_test.go
│ └── tests/
│ └── testutils/
│ └── testutils.go
├── helper/
│ ├── array.go
│ ├── array.process.go
│ ├── array_test.go
│ ├── captcha.go
│ ├── captcha_test.go
│ ├── case.go
│ ├── case_test.go
│ ├── condition.go
│ ├── condition_test.go
│ ├── control.process.go
│ ├── control_test.go
│ ├── env.process.go
│ ├── env_test.go
│ ├── hex.process.go
│ ├── hex_test.go
│ ├── if.go
│ ├── if_test.go
│ ├── jwt.go
│ ├── jwt_test.go
│ ├── map.go
│ ├── map.process.go
│ ├── map_test.go
│ ├── password.go
│ ├── password_test.go
│ ├── process.go
│ ├── range.go
│ ├── string.process.go
│ └── string_test.go
├── i18n/
│ ├── i18n.go
│ └── i18n_test.go
├── importer/
│ ├── column.go
│ ├── column_test.go
│ ├── csv/
│ │ └── csv.go
│ ├── from/
│ │ └── source.go
│ ├── importer.go
│ ├── importer_test.go
│ ├── option.go
│ ├── option_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── types.go
│ └── xlsx/
│ └── xlsx.go
├── integrations/
│ ├── dingtalk/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── dingtalk_test.go
│ │ ├── e2e_test.go
│ │ ├── file.go
│ │ ├── format.go
│ │ └── message.go
│ ├── discord/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── discord_test.go
│ │ ├── e2e_test.go
│ │ ├── file.go
│ │ ├── format.go
│ │ ├── message.go
│ │ └── message_test.go
│ ├── feishu/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── e2e_test.go
│ │ ├── feishu_test.go
│ │ ├── file.go
│ │ ├── format.go
│ │ └── message.go
│ ├── telegram/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── e2e_test.go
│ │ ├── file.go
│ │ ├── file_test.go
│ │ ├── format.go
│ │ ├── media_e2e_test.go
│ │ ├── message.go
│ │ ├── message_test.go
│ │ ├── polling.go
│ │ ├── telegram_test.go
│ │ ├── types.go
│ │ ├── verify.go
│ │ ├── verify_test.go
│ │ ├── webhook.go
│ │ └── webhook_e2e_test.go
│ └── testdata/
│ ├── test.docx
│ ├── test.ogg
│ └── test.pptx
├── job/
│ ├── README.md
│ ├── data.go
│ ├── data_test.go
│ ├── execution.go
│ ├── goroutine.go
│ ├── health.go
│ ├── health_test.go
│ ├── interfaces.go
│ ├── job.go
│ ├── job_test.go
│ ├── jsapi/
│ │ ├── jsapi.go
│ │ └── jsapi_test.go
│ ├── process.go
│ ├── progress.go
│ ├── types.go
│ └── worker.go
├── kb/
│ ├── README.md
│ ├── api/
│ │ ├── README.md
│ │ ├── addfile.go
│ │ ├── addfile_test.go
│ │ ├── addtext.go
│ │ ├── addtext_test.go
│ │ ├── addurl.go
│ │ ├── addurl_test.go
│ │ ├── api.go
│ │ ├── collection.go
│ │ ├── collection_test.go
│ │ ├── consts.go
│ │ ├── document.go
│ │ ├── document_test.go
│ │ ├── interfaces.go
│ │ ├── search.go
│ │ ├── search_setup_test.go
│ │ ├── search_test.go
│ │ ├── types.go
│ │ └── utils.go
│ ├── kb.go
│ ├── kb_test.go
│ ├── providers/
│ │ ├── README.md
│ │ ├── chunking.go
│ │ ├── chunking_test.go
│ │ ├── converter.go
│ │ ├── converters/
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── ocr.go
│ │ │ ├── ocr_test.go
│ │ │ ├── office.go
│ │ │ ├── office_test.go
│ │ │ ├── utf8.go
│ │ │ ├── utf8_test.go
│ │ │ ├── utils.go
│ │ │ ├── utils_test.go
│ │ │ ├── video.go
│ │ │ ├── video_test.go
│ │ │ ├── vision.go
│ │ │ ├── vision_test.go
│ │ │ ├── whisper.go
│ │ │ └── whisper_test.go
│ │ ├── embedding.go
│ │ ├── embedding_test.go
│ │ ├── extraction.go
│ │ ├── extraction_test.go
│ │ ├── factory/
│ │ │ ├── factory.go
│ │ │ ├── interfaces.go
│ │ │ └── utils.go
│ │ ├── fetcher.go
│ │ └── fetcher_test.go
│ └── types/
│ ├── collection.go
│ ├── config.go
│ ├── config_test.go
│ ├── document.go
│ ├── provider.go
│ └── types.go
├── main.go
├── mcp/
│ ├── README.md
│ ├── mcp.go
│ └── mcp_test.go
├── messenger/
│ ├── messenger.go
│ ├── messenger_onreceive_test.go
│ ├── messenger_receiver_test.go
│ ├── messenger_sendt_test.go
│ ├── messenger_test.go
│ ├── providers/
│ │ ├── mailer/
│ │ │ ├── mailer.go
│ │ │ ├── mailer_batch_test.go
│ │ │ ├── mailer_receive.go
│ │ │ ├── mailer_template_test.go
│ │ │ └── mailer_test.go
│ │ ├── mailgun/
│ │ │ ├── mailgun.go
│ │ │ ├── mailgun_batch_test.go
│ │ │ ├── mailgun_receive.go
│ │ │ ├── mailgun_receive_test.go
│ │ │ ├── mailgun_template_test.go
│ │ │ └── mailgun_test.go
│ │ └── twilio/
│ │ ├── twilio.go
│ │ ├── twilio_batch_test.go
│ │ ├── twilio_receive.go
│ │ ├── twilio_receive_test.go
│ │ ├── twilio_sms_test.go
│ │ ├── twilio_template_test.go
│ │ ├── twilio_test.go
│ │ └── twilio_whatsapp_test.go
│ ├── template/
│ │ ├── debug_test.go
│ │ ├── load_test.go
│ │ ├── render_test.go
│ │ ├── template.go
│ │ ├── template_test.go
│ │ └── walk_test.go
│ └── types/
│ ├── interfaces.go
│ ├── template.go
│ └── types.go
├── model/
│ ├── migrate.go
│ ├── migrate_test.go
│ ├── model.go
│ └── model_test.go
├── monitor/
│ ├── README.md
│ ├── logger.go
│ ├── service.go
│ ├── service_test.go
│ └── types.go
├── openai/
│ ├── openai.go
│ ├── openai_test.go
│ ├── process.go
│ ├── process_test.go
│ └── types.go
├── openapi/
│ ├── agent/
│ │ ├── agent.go
│ │ ├── assistant.go
│ │ ├── filter.go
│ │ ├── models.go
│ │ ├── robot/
│ │ │ ├── DESIGN.md
│ │ │ ├── GAPS.md
│ │ │ ├── TODO.md
│ │ │ ├── activities.go
│ │ │ ├── completions.go
│ │ │ ├── detail.go
│ │ │ ├── execute.go
│ │ │ ├── execution.go
│ │ │ ├── interact.go
│ │ │ ├── interact_test.go
│ │ │ ├── list.go
│ │ │ ├── permission.go
│ │ │ ├── results.go
│ │ │ ├── robot.go
│ │ │ ├── trigger.go
│ │ │ ├── types.go
│ │ │ ├── utils.go
│ │ │ └── verify.go
│ │ └── types.go
│ ├── app/
│ │ └── app.go
│ ├── audit/
│ │ └── audit.go
│ ├── captcha/
│ │ └── captcha.go
│ ├── chat/
│ │ ├── chat.go
│ │ ├── completions.go
│ │ ├── reference.go
│ │ ├── session.go
│ │ └── types.go
│ ├── computer/
│ │ └── computer.go
│ ├── config.go
│ ├── docs/
│ │ ├── migration-guide.md
│ │ └── oauth.md
│ ├── dsl/
│ │ ├── README.md
│ │ └── dsl.go
│ ├── file/
│ │ ├── README.md
│ │ ├── file.go
│ │ └── filter.go
│ ├── hello/
│ │ ├── README.md
│ │ └── hello.go
│ ├── integrations/
│ │ └── integrations.go
│ ├── job/
│ │ ├── categories.go
│ │ ├── executions.go
│ │ ├── filter.go
│ │ ├── job.go
│ │ ├── jobs.go
│ │ └── logs.go
│ ├── kb/
│ │ ├── addfile.go
│ │ ├── addtext.go
│ │ ├── addurl.go
│ │ ├── backup.go
│ │ ├── collection.go
│ │ ├── collection_process.go
│ │ ├── document.go
│ │ ├── document_process.go
│ │ ├── filter.go
│ │ ├── graph.go
│ │ ├── hit.go
│ │ ├── kb.go
│ │ ├── provider.go
│ │ ├── score.go
│ │ ├── search.go
│ │ ├── segment.go
│ │ ├── types.go
│ │ ├── utils.go
│ │ ├── vote.go
│ │ └── weight.go
│ ├── llm/
│ │ └── llm.go
│ ├── mcp/
│ │ └── mcp.go
│ ├── messenger/
│ │ └── messenger.go
│ ├── nodes/
│ │ └── nodes.go
│ ├── oauth/
│ │ ├── ERRORS.md
│ │ ├── TESTING_GUIDE.md
│ │ ├── acl/
│ │ │ ├── DESIGN.md
│ │ │ ├── FEATURES_CONFIGURATION.md
│ │ │ ├── README.md
│ │ │ ├── SCOPES_CONFIGURATION.md
│ │ │ ├── acl.go
│ │ │ ├── enforce.go
│ │ │ ├── errors.go
│ │ │ ├── feature.go
│ │ │ ├── feature_integration_test.go
│ │ │ ├── feature_test.go
│ │ │ ├── interfaces.go
│ │ │ ├── role/
│ │ │ │ ├── cache.go
│ │ │ │ ├── role.go
│ │ │ │ ├── types.go
│ │ │ │ └── utils.go
│ │ │ ├── scope.go
│ │ │ ├── scope_test.go
│ │ │ └── types.go
│ │ ├── apikey.go
│ │ ├── authenticate.go
│ │ ├── authorized/
│ │ │ ├── utils.go
│ │ │ └── utils_test.go
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── core.go
│ │ ├── core_test.go
│ │ ├── device.go
│ │ ├── discovery.go
│ │ ├── guard.go
│ │ ├── mcp.go
│ │ ├── oauth.go
│ │ ├── oauth_test.go
│ │ ├── providers/
│ │ │ ├── client/
│ │ │ │ ├── default.go
│ │ │ │ └── default_test.go
│ │ │ └── user/
│ │ │ ├── default.go
│ │ │ ├── exists_test.go
│ │ │ ├── invitation.go
│ │ │ ├── invitation_test.go
│ │ │ ├── member.go
│ │ │ ├── member_test.go
│ │ │ ├── oauth_account.go
│ │ │ ├── oauth_account_test.go
│ │ │ ├── role.go
│ │ │ ├── role_test.go
│ │ │ ├── team.go
│ │ │ ├── team_test.go
│ │ │ ├── type.go
│ │ │ ├── type_test.go
│ │ │ ├── user_basic.go
│ │ │ ├── user_basic_test.go
│ │ │ ├── user_list.go
│ │ │ ├── user_list_test.go
│ │ │ ├── user_mfa.go
│ │ │ ├── user_mfa_test.go
│ │ │ ├── user_role_type.go
│ │ │ ├── user_role_type_test.go
│ │ │ ├── user_test.go
│ │ │ ├── utils.go
│ │ │ └── utils_test.go
│ │ ├── security.go
│ │ ├── security_test.go
│ │ ├── signing.go
│ │ ├── token.go
│ │ ├── token_test.go
│ │ ├── types/
│ │ │ ├── authorized.go
│ │ │ ├── authorized_test.go
│ │ │ ├── errors.go
│ │ │ ├── interfaces.go
│ │ │ ├── oidc.go
│ │ │ ├── types.go
│ │ │ └── utils.go
│ │ ├── user.go
│ │ └── user_test.go
│ ├── oauth.go
│ ├── openapi.go
│ ├── otp/
│ │ ├── DESIGN.md
│ │ ├── README.md
│ │ ├── generate.go
│ │ ├── handler.go
│ │ ├── login.go
│ │ ├── otp.go
│ │ ├── process.go
│ │ ├── revoke.go
│ │ └── verify.go
│ ├── request/
│ │ └── REQUEST_DESIGN.md
│ ├── response/
│ │ └── response.go
│ ├── sandbox/
│ │ ├── manage.go
│ │ └── sandbox.go
│ ├── tai/
│ │ ├── proxy.go
│ │ ├── tai.go
│ │ ├── util.go
│ │ └── vnc.go
│ ├── team/
│ │ └── team.go
│ ├── tests/
│ │ ├── agent/
│ │ │ ├── assistant_create_test.go
│ │ │ ├── assistant_test.go
│ │ │ ├── assistant_update_test.go
│ │ │ ├── models_test.go
│ │ │ ├── robot_execution_test.go
│ │ │ ├── robot_host_test.go
│ │ │ ├── robot_interact_test.go
│ │ │ ├── robot_results_activities_test.go
│ │ │ ├── robot_test.go
│ │ │ └── robot_trigger_test.go
│ │ ├── chat/
│ │ │ ├── reference_test.go
│ │ │ └── session_test.go
│ │ ├── config_test.go
│ │ ├── dsl/
│ │ │ └── dsl_test.go
│ │ ├── file/
│ │ │ └── file_test.go
│ │ ├── hello/
│ │ │ └── hello_test.go
│ │ ├── integrations_webhook_test.go
│ │ ├── kb/
│ │ │ ├── addfile_test.go
│ │ │ ├── addtext_test.go
│ │ │ ├── addurl_test.go
│ │ │ ├── collection_process_test.go
│ │ │ ├── collection_test.go
│ │ │ ├── document_test.go
│ │ │ └── utils_test.go
│ │ ├── nodes/
│ │ │ └── nodes_test.go
│ │ ├── oauth/
│ │ │ ├── acl/
│ │ │ │ ├── acl_test.go
│ │ │ │ ├── enforce_test.go
│ │ │ │ ├── role/
│ │ │ │ │ └── role_test.go
│ │ │ │ ├── scope_atomic_test.go
│ │ │ │ └── scope_test.go
│ │ │ ├── authorized_test.go
│ │ │ ├── device_test.go
│ │ │ ├── guard_test.go
│ │ │ ├── oauth_test.go
│ │ │ └── token_test.go
│ │ ├── openapi_test.go
│ │ ├── otp/
│ │ │ └── otp_test.go
│ │ ├── sandbox/
│ │ │ └── sandbox_test.go
│ │ ├── testutils/
│ │ │ └── testutils.go
│ │ ├── trace/
│ │ │ ├── common_test.go
│ │ │ ├── events_test.go
│ │ │ ├── info_test.go
│ │ │ ├── logs_test.go
│ │ │ ├── nodes_test.go
│ │ │ └── spaces_test.go
│ │ ├── user/
│ │ │ ├── config_functions_test.go
│ │ │ ├── config_loading_test.go
│ │ │ ├── config_validation_test.go
│ │ │ ├── entry_test.go
│ │ │ ├── env_test.go
│ │ │ ├── env_var_extraction_test.go
│ │ │ ├── invitation_test.go
│ │ │ ├── login_config_test.go
│ │ │ ├── login_test.go
│ │ │ ├── member_test.go
│ │ │ ├── oauth_authorize_test.go
│ │ │ ├── oauth_callback_test.go
│ │ │ ├── profile_test.go
│ │ │ ├── team_config_robot_test.go
│ │ │ ├── team_config_test.go
│ │ │ ├── team_test.go
│ │ │ └── utils_test.go
│ │ └── workspace/
│ │ └── workspace_test.go
│ ├── trace/
│ │ ├── README.md
│ │ ├── events.go
│ │ ├── helpers.go
│ │ ├── info.go
│ │ ├── logs.go
│ │ ├── nodes.go
│ │ ├── spaces.go
│ │ └── trace.go
│ ├── types.go
│ ├── user/
│ │ ├── README.md
│ │ ├── TODO.md
│ │ ├── account.go
│ │ ├── config.go
│ │ ├── entry.go
│ │ ├── features.go
│ │ ├── login.go
│ │ ├── member.go
│ │ ├── oauth.go
│ │ ├── profile.go
│ │ ├── provider.go
│ │ ├── team.go
│ │ ├── team_invitation.go
│ │ ├── types.go
│ │ ├── user.go
│ │ └── utils.go
│ ├── utils/
│ │ ├── convert.go
│ │ └── session.go
│ ├── well-known.go
│ └── workspace/
│ └── workspace.go
├── pack/
│ └── pack.go
├── pipe/
│ ├── README.md
│ ├── context.go
│ ├── expression.go
│ ├── json.go
│ ├── node.go
│ ├── pipe.go
│ ├── pipe_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── types.go
│ ├── ui/
│ │ └── cli/
│ │ └── cli.go
│ └── utils.go
├── plugin/
│ ├── README.md
│ ├── plugin.go
│ └── plugin_test.go
├── query/
│ ├── README.md
│ ├── query.go
│ └── query_test.go
├── registry/
│ ├── README.md
│ ├── client.go
│ ├── client_test.go
│ ├── manager/
│ │ ├── agent/
│ │ │ ├── add.go
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── fork.go
│ │ │ ├── push.go
│ │ │ ├── scan.go
│ │ │ └── update.go
│ │ ├── agent_e2e_test.go
│ │ ├── common/
│ │ │ ├── deps.go
│ │ │ ├── deps_test.go
│ │ │ ├── hash.go
│ │ │ ├── hash_test.go
│ │ │ ├── lockfile.go
│ │ │ ├── lockfile_test.go
│ │ │ ├── packer.go
│ │ │ ├── packer_test.go
│ │ │ ├── path.go
│ │ │ ├── path_test.go
│ │ │ ├── prompt.go
│ │ │ ├── prompt_test.go
│ │ │ └── types.go
│ │ ├── e2e_helpers_test.go
│ │ ├── mcp/
│ │ │ ├── add.go
│ │ │ ├── fork.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── push.go
│ │ │ ├── script.go
│ │ │ └── update.go
│ │ ├── mcp_e2e_test.go
│ │ ├── robot/
│ │ │ ├── add.go
│ │ │ ├── deps.go
│ │ │ ├── robot.go
│ │ │ └── robot_test.go
│ │ └── robot_e2e_test.go
│ └── testdata/
│ └── build.go
├── rss/
│ ├── README.md
│ ├── atom.go
│ ├── atom_test.go
│ ├── build.go
│ ├── build_atom.go
│ ├── build_rss.go
│ ├── build_test.go
│ ├── convert.go
│ ├── discover.go
│ ├── discover_test.go
│ ├── fetch.go
│ ├── fetch_test.go
│ ├── parse.go
│ ├── parse_test.go
│ ├── process.go
│ ├── rss.go
│ ├── rss_test.go
│ └── types.go
├── runtime/
│ ├── runtime.go
│ └── runtime_test.go
├── sandbox/
│ ├── DESIGN-PLAYWRIGHT-VNC.md
│ ├── DESIGN.md
│ ├── PLAN.md
│ ├── README.md
│ ├── SPEC.md
│ ├── bridge/
│ │ └── main.go
│ ├── config.go
│ ├── config_test.go
│ ├── docker/
│ │ ├── base/
│ │ │ └── Dockerfile.base
│ │ ├── browser/
│ │ │ └── Dockerfile
│ │ ├── build.sh
│ │ ├── chrome/
│ │ │ ├── Dockerfile
│ │ │ ├── config/
│ │ │ │ ├── chrome-preferences.json
│ │ │ │ └── stealth-init.js
│ │ │ └── tests/
│ │ │ ├── README.md
│ │ │ ├── demo-baidu.py
│ │ │ ├── demo-duckduckgo.py
│ │ │ └── demo-llm-vision.py
│ │ ├── claude/
│ │ │ ├── Dockerfile
│ │ │ └── Dockerfile.full
│ │ ├── desktop/
│ │ │ ├── Dockerfile
│ │ │ └── config/
│ │ │ ├── panel-launcher-chromium.desktop
│ │ │ ├── setup-xfce.sh
│ │ │ └── workspace.desktop
│ │ └── vnc/
│ │ ├── entrypoint-vnc.sh
│ │ └── start-vnc.sh
│ ├── errors.go
│ ├── helpers.go
│ ├── helpers_test.go
│ ├── ipc/
│ │ ├── jsonrpc_test.go
│ │ ├── manager.go
│ │ ├── manager_test.go
│ │ ├── session.go
│ │ ├── session_test.go
│ │ └── types.go
│ ├── manager.go
│ ├── manager_test.go
│ ├── proxy/
│ │ ├── README.md
│ │ ├── cmd/
│ │ │ └── claude-proxy/
│ │ │ └── main.go
│ │ ├── convert.go
│ │ ├── main.go
│ │ └── types.go
│ ├── types.go
│ ├── v2/
│ │ ├── DESIGN.md
│ │ ├── IMPL.md
│ │ ├── Makefile
│ │ ├── TEST.md
│ │ ├── bench_test.go
│ │ ├── box.go
│ │ ├── box_attach_test.go
│ │ ├── box_image_test.go
│ │ ├── box_test.go
│ │ ├── box_workspace_test.go
│ │ ├── docs/
│ │ │ └── API.md
│ │ ├── errors.go
│ │ ├── export_test.go
│ │ ├── grpc.go
│ │ ├── grpc_test.go
│ │ ├── host.go
│ │ ├── host_test.go
│ │ ├── jsapi/
│ │ │ ├── API.md
│ │ │ ├── computer.go
│ │ │ ├── jsapi.go
│ │ │ ├── jsapi_test.go
│ │ │ └── node.go
│ │ ├── manager.go
│ │ ├── manager_lifecycle_test.go
│ │ ├── manager_test.go
│ │ ├── sandbox.go
│ │ ├── sandbox_test.go
│ │ ├── testutils_containerized_test.go
│ │ ├── testutils_k8s_test.go
│ │ ├── testutils_remote_test.go
│ │ ├── testutils_test.go
│ │ ├── testutils_wintest_test.go
│ │ ├── types.go
│ │ └── watcher.go
│ └── vncproxy/
│ ├── config.go
│ ├── proxy.go
│ └── proxy_test.go
├── schedule/
│ ├── schedule.go
│ └── schedule_test.go
├── script/
│ ├── script.go
│ └── script_test.go
├── seed/
│ ├── process.go
│ ├── process_test.go
│ ├── seed.go
│ ├── seed_reset_test.go
│ ├── seed_test.go
│ └── types.go
├── service/
│ ├── dynamic.go
│ ├── dynamic_test.go
│ ├── fs/
│ │ ├── default.go
│ │ └── utils.go
│ ├── guards.go
│ ├── gzip.go
│ ├── log/
│ │ ├── access.go
│ │ └── access_test.go
│ ├── middleware.go
│ ├── service.go
│ ├── service_test.go
│ ├── static.go
│ ├── watch.go
│ └── watch_test.go
├── setup/
│ ├── check.go
│ ├── check_test.go
│ ├── install.go
│ ├── install_test.go
│ └── setup.go
├── share/
│ ├── api.go
│ ├── api_test.go
│ ├── app.go
│ ├── columns.go
│ ├── const.go
│ ├── db.go
│ ├── filters.go
│ ├── importable.go
│ ├── importable_test.go
│ ├── session.go
│ ├── types.go
│ ├── utils.go
│ ├── watch.go
│ └── watch_test.go
├── sitemap/
│ ├── README.md
│ ├── build.go
│ ├── build_test.go
│ ├── convert.go
│ ├── convert_test.go
│ ├── discover.go
│ ├── fetch.go
│ ├── fetch_test.go
│ ├── parse.go
│ ├── parse_test.go
│ ├── process.go
│ ├── robots.go
│ ├── robots_test.go
│ └── types.go
├── store/
│ ├── store.go
│ └── store_test.go
├── sui/
│ ├── README.md
│ ├── api/
│ │ ├── api.go
│ │ ├── build_test.go
│ │ ├── guards.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── render.go
│ │ ├── render_test.go
│ │ ├── request.go
│ │ ├── request_test.go
│ │ ├── run.go
│ │ ├── sui.go
│ │ └── sui_test.go
│ ├── core/
│ │ ├── block.go
│ │ ├── build.go
│ │ ├── cache.go
│ │ ├── compile.go
│ │ ├── component.go
│ │ ├── context.go
│ │ ├── core.go
│ │ ├── data.go
│ │ ├── editor.go
│ │ ├── event.go
│ │ ├── fs.go
│ │ ├── injections.go
│ │ ├── interfaces.go
│ │ ├── jit.go
│ │ ├── json.go
│ │ ├── json_test.go
│ │ ├── locale.go
│ │ ├── locale_test.go
│ │ ├── matcher.go
│ │ ├── page.go
│ │ ├── page_test.go
│ │ ├── parser.go
│ │ ├── parser_test.go
│ │ ├── preview.go
│ │ ├── request.go
│ │ ├── script.go
│ │ ├── sui.go
│ │ ├── sui_test.go
│ │ ├── token.go
│ │ ├── token_test.go
│ │ ├── translate.go
│ │ ├── types.go
│ │ └── utils.go
│ ├── docs/
│ │ ├── agent-sui.md
│ │ ├── backend-scripts.md
│ │ ├── components.md
│ │ ├── data-binding.md
│ │ ├── event-handling.md
│ │ ├── frontend-api.md
│ │ ├── i18n.md
│ │ ├── page-config.md
│ │ ├── routing.md
│ │ └── template-syntax.md
│ ├── libsui/
│ │ ├── index.ts
│ │ ├── openapi.ts
│ │ ├── utils.ts
│ │ └── yao.ts
│ └── storages/
│ ├── agent/
│ │ ├── agent.go
│ │ ├── agent_test.go
│ │ ├── page.go
│ │ ├── template.go
│ │ └── types.go
│ ├── azure/
│ │ └── azure.go
│ └── local/
│ ├── block.go
│ ├── block_test.go
│ ├── build.go
│ ├── build_test.go
│ ├── component.go
│ ├── component_test.go
│ ├── copy.go
│ ├── local.go
│ ├── local_test.go
│ ├── page.go
│ ├── page_render_test.go
│ ├── page_test.go
│ ├── template.go
│ ├── template_test.go
│ └── types.go
├── tai/
│ ├── api/
│ │ ├── register.go
│ │ └── register_test.go
│ ├── conn.go
│ ├── dial.go
│ ├── docs/
│ │ ├── README.md
│ │ ├── api.md
│ │ ├── proxy.md
│ │ ├── registry.md
│ │ ├── sandbox.md
│ │ ├── tunnel.md
│ │ ├── vnc.md
│ │ ├── volume.md
│ │ └── workspace.md
│ ├── heartbeat.go
│ ├── hostexec/
│ │ ├── local.go
│ │ └── pb/
│ │ ├── hostexec.pb.go
│ │ ├── hostexec.proto
│ │ └── hostexec_grpc.pb.go
│ ├── proxy/
│ │ ├── connect.go
│ │ ├── proxy.go
│ │ └── proxy_test.go
│ ├── registry/
│ │ ├── registry.go
│ │ ├── registry_test.go
│ │ └── testing.go
│ ├── runtime/
│ │ ├── client_accessor.go
│ │ ├── docker.go
│ │ ├── docker_core.go
│ │ ├── image.go
│ │ ├── image_docker.go
│ │ ├── image_k8s.go
│ │ ├── k8s.go
│ │ ├── local.go
│ │ ├── runtime_test.go
│ │ └── sandbox.go
│ ├── serverinfo/
│ │ └── pb/
│ │ ├── serverinfo.pb.go
│ │ ├── serverinfo.proto
│ │ └── serverinfo_grpc.pb.go
│ ├── sysinfo.go
│ ├── tai.go
│ ├── tai_test.go
│ ├── taiid/
│ │ ├── taiid.go
│ │ └── taiid_test.go
│ ├── token.go
│ ├── tunnel/
│ │ ├── forward.go
│ │ ├── forward_test.go
│ │ ├── grpc_handler.go
│ │ ├── grpc_handler_test.go
│ │ ├── proto/
│ │ │ └── tunnel.proto
│ │ ├── server.go
│ │ ├── server_test.go
│ │ └── taipb/
│ │ ├── tunnel.pb.go
│ │ └── tunnel_grpc.pb.go
│ ├── types/
│ │ └── types.go
│ ├── vnc/
│ │ ├── vnc.go
│ │ └── vnc_test.go
│ ├── volume/
│ │ ├── local.go
│ │ ├── mock_test.go
│ │ ├── pb/
│ │ │ ├── volume.pb.go
│ │ │ ├── volume.proto
│ │ │ └── volume_grpc.pb.go
│ │ ├── remote.go
│ │ ├── volume.go
│ │ └── volume_test.go
│ ├── workspace/
│ │ ├── copy.go
│ │ ├── uri.go
│ │ ├── workspace.go
│ │ └── workspace_test.go
│ └── yao.go
├── task/
│ ├── task.go
│ └── task_test.go
├── test/
│ ├── request.go
│ └── utils.go
├── trace/
│ ├── BUGFIX.md
│ ├── KNOWN_ISSUES.md
│ ├── README.md
│ ├── event_listener.go
│ ├── handler.go
│ ├── jsapi/
│ │ ├── jsapi.go
│ │ ├── jsapi_test.go
│ │ ├── node.go
│ │ ├── space.go
│ │ └── trace.go
│ ├── local/
│ │ └── driver.go
│ ├── manager.go
│ ├── node.go
│ ├── space.go
│ ├── state.go
│ ├── store/
│ │ └── driver.go
│ ├── subscription.go
│ ├── test_helpers.go
│ ├── trace.go
│ ├── trace_archive_test.go
│ ├── trace_autocomplete_test.go
│ ├── trace_basic_test.go
│ ├── trace_bench_test.go
│ ├── trace_concurrent_test.go
│ ├── trace_lifecycle_test.go
│ ├── trace_mem_test.go
│ ├── trace_node_test.go
│ ├── trace_resource_test.go
│ ├── trace_space_test.go
│ ├── trace_subscription_leak_test.go
│ ├── trace_subscription_test.go
│ └── types/
│ ├── driver.go
│ ├── events.go
│ ├── interfaces.go
│ └── types.go
├── utils/
│ ├── README.md
│ ├── captcha/
│ │ ├── captcha.go
│ │ ├── captcha_test.go
│ │ └── process.go
│ ├── datetime/
│ │ └── now.go
│ ├── datetime_test.go
│ ├── fmt/
│ │ └── fmt.go
│ ├── json/
│ │ └── json.go
│ ├── jsonschema/
│ │ ├── jsonschema.go
│ │ └── jsonschema_test.go
│ ├── otp/
│ │ ├── otp.go
│ │ ├── otp_test.go
│ │ └── process.go
│ ├── process.go
│ ├── str/
│ │ └── str.go
│ ├── str_test.go
│ ├── throw/
│ │ └── throw.go
│ ├── throw_test.go
│ ├── tree/
│ │ └── tree.go
│ ├── tree_test.go
│ ├── url/
│ │ └── url.go
│ └── url_test.go
├── wework/
│ ├── process.go
│ ├── wework.go
│ ├── wework_test.go
│ └── xml.go
├── widget/
│ ├── driver/
│ │ ├── connector.go
│ │ └── source.go
│ ├── instance.go
│ ├── load.go
│ ├── load_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── types.go
│ ├── widget.go
│ └── widget_test.go
├── widgets/
│ ├── action/
│ │ ├── action.go
│ │ ├── action_test.go
│ │ ├── guard.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ └── types.go
│ ├── action.go
│ ├── api.go
│ ├── app/
│ │ ├── app.go
│ │ ├── app_test.go
│ │ └── types.go
│ ├── chart/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── chart.go
│ │ ├── chart_test.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── component/
│ │ ├── action.go
│ │ ├── action_test.go
│ │ ├── component.go
│ │ ├── compute.go
│ │ ├── compute_test.go
│ │ ├── handlers.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── props.go
│ │ └── types.go
│ ├── compute/
│ │ ├── compute.go
│ │ └── types.go
│ ├── dashboard/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── dashboard.go
│ │ ├── dashboard_test.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── expression/
│ │ ├── expression.go
│ │ ├── expression_test.go
│ │ └── process.go
│ ├── field/
│ │ ├── column.go
│ │ ├── column_test.go
│ │ ├── field.go
│ │ ├── field_test.go
│ │ ├── filter.go
│ │ ├── filter_test.go
│ │ ├── transform.go
│ │ ├── transform_test.go
│ │ └── types.go
│ ├── field.go
│ ├── form/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── bind.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── form.go
│ │ ├── form_test.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── hook/
│ │ ├── hook.go
│ │ └── types.go
│ ├── item.go
│ ├── list/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── bind.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── list.go
│ │ ├── list_test.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── login/
│ │ ├── login.go
│ │ ├── login_test.go
│ │ ├── process.go
│ │ └── types.go
│ ├── mapping/
│ │ └── mapping.go
│ ├── models.go
│ ├── process.go
│ ├── process_test.go
│ ├── table/
│ │ ├── README.md
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── api_test.go
│ │ ├── bind.go
│ │ ├── excel.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── fields_test.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── mapping_test.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── table.go
│ │ ├── table_test.go
│ │ ├── types.go
│ │ └── validate.go
│ ├── widgets.go
│ └── widgets_test.go
├── workspace/
│ ├── DESIGN.md
│ ├── Makefile
│ ├── TEST.md
│ ├── bench_test.go
│ ├── errors.go
│ ├── fileio_test.go
│ ├── jsapi/
│ │ ├── API.md
│ │ ├── fs.go
│ │ ├── jsapi.go
│ │ └── jsapi_test.go
│ ├── manager.go
│ ├── testutils_test.go
│ ├── workspace.go
│ └── workspace_test.go
└── yao/
├── assistants/
│ ├── entity/
│ │ ├── package.yao
│ │ └── prompts.yml
│ ├── keyword/
│ │ ├── package.yao
│ │ ├── prompts.yml
│ │ └── src/
│ │ └── index.ts
│ ├── needsearch/
│ │ ├── package.yao
│ │ ├── prompts.yml
│ │ └── src/
│ │ └── index.ts
│ ├── prompt/
│ │ ├── package.yao
│ │ └── prompts.yml
│ ├── querydsl/
│ │ ├── package.yao
│ │ ├── prompts/
│ │ │ ├── aggregation.yml
│ │ │ ├── complex.yml
│ │ │ ├── filter.yml
│ │ │ └── join.yml
│ │ ├── prompts.yml
│ │ └── src/
│ │ └── index.ts
│ ├── robot_prompt/
│ │ ├── package.yao
│ │ └── prompts.yml
│ └── title/
│ ├── package.yao
│ └── prompts.yml
├── data/
│ ├── icons/
│ │ └── icon.icns
│ ├── index.html
│ └── kb/
│ └── providers/
│ ├── chunking/
│ │ ├── semantic/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ └── structured/
│ │ ├── en.json
│ │ └── zh-cn.json
│ ├── converter/
│ │ ├── mcp/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── ocr/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── office/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── utf8/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── video/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── vision/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ └── whisper/
│ │ ├── en.json
│ │ └── zh-cn.json
│ ├── embedding/
│ │ ├── fastembed/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ └── openai/
│ │ ├── en.json
│ │ └── zh-cn.json
│ ├── extraction/
│ │ └── openai/
│ │ ├── en.json
│ │ └── zh-cn.json
│ └── fetcher/
│ ├── http/
│ │ ├── en.json
│ │ └── zh-cn.json
│ └── mcp/
│ ├── en.json
│ └── zh-cn.json
├── fields/
│ └── model.trans.json
├── langs/
│ ├── en-US.json
│ ├── zh-cn/
│ │ ├── global.yml
│ │ └── logins/
│ │ ├── admin.login.yml
│ │ └── user.login.yml
│ └── zh-hk/
│ ├── global.yml
│ └── logins/
│ ├── admin.login.yml
│ └── user.login.yml
├── models/
│ ├── agent/
│ │ ├── assistant.mod.yao
│ │ ├── chat.mod.yao
│ │ ├── execution.mod.yao
│ │ ├── message.mod.yao
│ │ ├── resume.mod.yao
│ │ └── search.mod.yao
│ ├── attachment.mod.yao
│ ├── audit.mod.yao
│ ├── config.mod.yao
│ ├── dsl.mod.yao
│ ├── invitation.mod.yao
│ ├── job/
│ │ ├── category.mod.yao
│ │ ├── execution.mod.yao
│ │ ├── job.mod.yao
│ │ └── log.mod.yao
│ ├── kb/
│ │ ├── collection.mod.yao
│ │ └── document.mod.yao
│ ├── member.mod.yao
│ ├── role.mod.yao
│ ├── team.mod.yao
│ ├── user/
│ │ ├── oauth_account.mod.yao
│ │ └── type.mod.yao
│ └── user.mod.yao
├── release/
│ └── app.yaz
├── stores/
│ ├── agent/
│ │ ├── cache.lru.yao
│ │ └── memory/
│ │ ├── chat.xun.yao
│ │ ├── context.xun.yao
│ │ ├── team.xun.yao
│ │ └── user.xun.yao
│ ├── cache.lru.yao
│ ├── kb/
│ │ ├── cache.lru.yao
│ │ └── store.xun.yao
│ ├── oauth/
│ │ ├── cache.lru.yao
│ │ ├── client.xun.yao
│ │ └── store.xun.yao
│ └── store.xun.yao
└── uploaders/
└── attachment.local.yao
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Ask a question or discuss a topic
url: https://discord.com/invite/BkMR2NUsjU
about: Ask questions and discuss with other community members
- name: Join Yao community
url: https://yaoapps.com/community
about: Join the community to get updates and news
================================================
FILE: .github/ISSUE_TEMPLATE/issue_report.md
================================================
---
name: "Report an issue"
about: "Report an issue to help us improve"
labels: ""
assignees: ""
---
## Description
## Context
- **Yao Version( yao version --all )**:
- **Platform**:
================================================
FILE: .github/actions/setup-db/Dockerfile
================================================
FROM docker:latest
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
================================================
FILE: .github/actions/setup-db/action.yml
================================================
inputs:
kind:
description: "Chose the kind of database (MySQL8.0, MySQL5.7, Postgres9.6, Postgres14.0, SQLite3)"
required: true
db:
description: "The name of database"
required: false
default: "github"
port:
description: "The port of database"
required: false
user:
description: "The user of database"
required: false
default: "github"
password:
description: "The passowrd of database"
required: false
default: "123456"
runs:
using: "docker"
image: "Dockerfile"
================================================
FILE: .github/actions/setup-yao/action.yml
================================================
name: "Setup Yao Build Environment"
description: "Checkout dependency repos, setup Go toolchain, and install build tools (v1.0.0)"
inputs:
go-version:
description: "Go version to install"
default: "1.25"
repo-kun:
description: "Kun repository (owner/repo)"
required: true
repo-xun:
description: "Xun repository (owner/repo)"
required: true
repo-gou:
description: "Gou repository (owner/repo)"
required: true
checkout-app:
description: "Checkout yao-dev-app (demo application for tests)"
default: "true"
checkout-init:
description: "Checkout yao-init (for Yao server startup in CI)"
default: "false"
apple-private-key:
description: "Apple private key content for OAuth certs (optional)"
default: ""
runs:
using: "composite"
steps:
# -- Dependency repositories --
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-kun }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-xun }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-gou }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
shell: bash
run: |
for file in $(find ./v8go -name "libv8*.zip"); do
dir=$(dirname "$file")
echo "Extracting $file to $dir"
unzip -o -d "$dir" "$file"
rm -rf "$dir/__MACOSX"
done
- name: Checkout Demo App
if: ${{ inputs.checkout-app == 'true' }}
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Checkout yao-init
if: ${{ inputs.checkout-init == 'true' }}
uses: actions/checkout@v4
with:
repository: yaoapp/yao-init
path: yao-init
# -- Move all dependencies to parent directory (Go workspace layout) --
- name: Move Dependencies
shell: bash
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
[ -d app ] && mv app ../
mv extension ../
[ -d yao-init ] && mv yao-init ../
# -- Setup Apple Private Key (if provided) --
- name: Setup Apple Private Key
if: ${{ inputs.apple-private-key != '' }}
shell: bash
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ inputs.apple-private-key }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
# -- Go toolchain --
- name: Setup Go ${{ inputs.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Setup Go Tools
shell: bash
run: make tools
================================================
FILE: .github/codesign/entitlements.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
================================================
FILE: .github/env/sandbox-v2.env
================================================
# ============================================================
# Yao CI Environment — sandbox-v2 (v1.0.0)
# Loaded via: cat .github/env/sandbox-v2.env >> $GITHUB_ENV
# ============================================================
# ========================================
# Yao Runtime (YAO_ prefix, read by Yao)
# ========================================
YAO_HOST=0.0.0.0
YAO_PORT=5099
YAO_GRPC_HOST=0.0.0.0
YAO_GRPC_PORT=9099
YAO_DB_DRIVER=sqlite3
YAO_SESSION=memory
YAO_ENV=development
# ========================================
# CI Test Parameters (YAO_CI_ prefix)
# ========================================
# -- Network --
YAO_CI_BRIDGE_IP=172.17.0.1
# -- Yao service ports (tests read these, not YAO_PORT/YAO_GRPC_PORT) --
YAO_CI_HTTP_PORT=5099
YAO_CI_GRPC_PORT=9099
YAO_CI_URL=http://127.0.0.1:5099
YAO_CI_GRPC=127.0.0.1:9099
# -- OAuth token generation (ci-token tool) --
YAO_CI_OAUTH_SUBJECT=ci-test-user
YAO_CI_OAUTH_USER_ID=ci-test-user
YAO_CI_OAUTH_TEAM_ID=ci-test-team
YAO_CI_OAUTH_SCOPE=tai:tunnel
YAO_CI_OAUTH_TTL=24h
# ========================================
# Tai Instances
#
# Connection modes:
# tai-local → DIRECT (--direct, Yao dials Tai gRPC directly)
# tai-docker → TUNNEL (default, Tai dials Yao gRPC, reverse tunnel)
# tai-k8s → TUNNEL (same as above, with K8s runtime)
# tai-hostexec → TUNNEL (same as above, no container runtime)
# ========================================
# -- tai-local (DIRECT mode, auto-detect Docker via /var/run/docker.sock) --
# Yao dials tai-local gRPC directly, so gRPC port must be reachable.
# Docker proxy on 12376 (not default 12375) to avoid conflict with tai-docker.
YAO_CI_TAI_LOCAL_HOST=127.0.0.1
YAO_CI_TAI_LOCAL_GRPC_PORT=19103
YAO_CI_TAI_LOCAL_HTTP_PORT=8102
YAO_CI_TAI_LOCAL_VNC_PORT=16083
YAO_CI_TAI_LOCAL_DOCKER_PORT=12376
YAO_CI_TAI_LOCAL_GRPC=127.0.0.1:19103
YAO_CI_TAI_LOCAL_DOCKER_API=tcp://127.0.0.1:12376
# -- tai-docker (TUNNEL mode, explicit Docker API proxy) --
# Tunnel: Tai connects to Yao gRPC. Sandbox connects to Yao, traffic forwarded via tunnel.
# gRPC port used only for Tai's own listener; Yao accesses via tunnel, not direct dial.
YAO_CI_TAI_DOCKER_HOST=127.0.0.1
YAO_CI_TAI_DOCKER_GRPC_PORT=19100
YAO_CI_TAI_DOCKER_HTTP_PORT=8099
YAO_CI_TAI_DOCKER_VNC_PORT=16080
YAO_CI_TAI_DOCKER_API_PORT=12375
YAO_CI_TAI_DOCKER_API=tcp://127.0.0.1:12375
# -- tai-k8s (TUNNEL mode, K8s API proxy via k3d) --
# K8s proxy on 16444 (not 16443) because k3d --api-port already binds 16443.
# TAI_K8S_UPSTREAM points to k3d at 127.0.0.1:16443; proxy exposes on 16444.
YAO_CI_TAI_K8S_HOST=127.0.0.1
YAO_CI_TAI_K8S_GRPC_PORT=19101
YAO_CI_TAI_K8S_HTTP_PORT=8100
YAO_CI_TAI_K8S_VNC_PORT=16081
YAO_CI_TAI_K8S_API_PORT=16444
YAO_CI_K3D_API_PORT=16443
# -- tai-hostexec (TUNNEL mode, no container runtime, HostExec only) --
YAO_CI_TAI_HOSTEXEC_HOST=127.0.0.1
YAO_CI_TAI_HOSTEXEC_GRPC_PORT=19102
YAO_CI_TAI_HOSTEXEC_HTTP_PORT=8101
YAO_CI_TAI_HOSTEXEC_VNC_PORT=16082
# ========================================
# Sandbox V2 addresses (used by test code)
# ========================================
YAO_CI_SANDBOX_LOCAL_ADDR=tai://127.0.0.1:19103
YAO_CI_SANDBOX_DOCKER_ADDR=tai://127.0.0.1:19100
YAO_CI_SANDBOX_K8S_ADDR=tai://127.0.0.1:19101
YAO_CI_SANDBOX_IMAGE=yaoapp/tai-sandbox-test:latest
# ========================================
# HostExec addresses
# ========================================
YAO_CI_HOSTEXEC_LOCAL_ADDR=127.0.0.1:19103
YAO_CI_HOSTEXEC_DOCKER_ADDR=127.0.0.1:19100
YAO_CI_HOSTEXEC_K8S_ADDR=127.0.0.1:19101
YAO_CI_HOSTEXEC_ONLY_ADDR=127.0.0.1:19102
# -- Tunnel --
YAO_CI_TUNNEL=true
# ========================================
# Database (MySQL / PostgreSQL / SQLite)
# ========================================
MYSQL_TEST_HOST=127.0.0.1
MYSQL_TEST_PORT=3308
MYSQL_TEST_USER=test
MYSQL_TEST_PASS=123456
PG_TEST_HOST=127.0.0.1
PG_TEST_PORT=5432
PG_TEST_USER=test
PG_TEST_PASS=123456
SQLITE_DB=./app/db/yao.db
# ========================================
# Legacy variable mapping (migrate later)
# ========================================
TAI_TEST_HOST=127.0.0.1
TAI_TEST_DOCKER=tcp://127.0.0.1:12375
TAI_TEST_GRPC_PORT=19100
TAI_TEST_HTTP_PORT=8099
TAI_TEST_VNC_PORT=16080
TAI_TEST_DOCKER_PORT=12375
TAI_TEST_K8S_HOST=127.0.0.1
TAI_TEST_K8S_PORT=16444
TAI_TEST_K8S_GRPC_PORT=19101
TAI_TEST_K8S_HTTP_PORT=8100
TAI_TEST_K8S_VNC_PORT=16081
TAI_TEST_HOST_IP=172.17.0.1
TAI_TEST_TUNNEL=true
TAI_TEST_YAO_URL=http://127.0.0.1:5099
TAI_TEST_YAO_GRPC=127.0.0.1:9099
SANDBOX_TEST_LOCAL_ADDR=tai://127.0.0.1:19103
SANDBOX_TEST_REMOTE_ADDR=tai://127.0.0.1:19100
SANDBOX_TEST_K8S_REMOTE_ADDR=tai://127.0.0.1:19101
SANDBOX_TEST_HOSTEXEC_ADDR=tai://127.0.0.1:19102
SANDBOX_TEST_IMAGE=yaoapp/tai-sandbox-test:latest
DOCKER_BRIDGE_IP=172.17.0.1
================================================
FILE: .github/workflows/build-docker.yml
================================================
name: Build and push docker images
on:
# push:
# branches: [main]
# paths:
# - ".github/workflows/docker.yml"
workflow_run:
workflows: ["Build Linux Artifacts"]
types:
- completed
env:
VERSION: 0.10.5
jobs:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Version
run: |
echo VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g") >> $GITHUB_ENV
- name: Check Version
run: echo $VERSION
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build Development
uses: docker/build-push-action@v6
env:
DOCKER_CONTENT_TRUST: 1
with:
context: ./docker/development
platforms: linux/amd64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=amd64
push: true
tags: yaoapp/yao:${{ env.VERSION }}-amd64-dev
- name: Build Development Arm64
uses: docker/build-push-action@v6
env:
DOCKER_CONTENT_TRUST: 1
with:
context: ./docker/development
platforms: linux/arm64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=arm64
push: true
tags: yaoapp/yao:${{ env.VERSION }}-arm64-dev
- name: Build Production
uses: docker/build-push-action@v6
env:
DOCKER_CONTENT_TRUST: 1
with:
context: ./docker/production
platforms: linux/amd64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=amd64
push: true
tags: yaoapp/yao:${{ env.VERSION }}-amd64
- name: Build Production Arm64
uses: docker/build-push-action@v6
env:
DOCKER_CONTENT_TRUST: 1
with:
context: ./docker/production
platforms: linux/arm64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=arm64
push: true
tags: yaoapp/yao:${{ env.VERSION }}-arm64
- name: Build Production Slim
uses: docker/build-push-action@v6
env:
DOCKER_CONTENT_TRUST: 1
with:
context: ./docker/production-slim
platforms: linux/amd64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=amd64
push: true
tags: yaoapp/yao:${{ env.VERSION }}-amd64-slim
- name: Build Production Slim Arm64
uses: docker/build-push-action@v6
env:
DOCKER_CONTENT_TRUST: 1
with:
context: ./docker/production-slim
platforms: linux/arm64
build-args: |
VERSION=${{ env.VERSION }}
ARCH=arm64
push: true
tags: yaoapp/yao:${{ env.VERSION }}-arm64-slim
================================================
FILE: .github/workflows/build-linux.yml
================================================
name: Build Linux Artifacts
on:
workflow_dispatch:
inputs:
tags:
description: "Version tags"
jobs:
build:
runs-on: "ubuntu-latest"
container:
image: yaoapp/yao-build:1.0.0
env:
CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
R2_BUCKET: ${{ secrets.R2_BUCKET }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
steps:
- name: Configure R2 For Cloudflare
run: |
aws configure set aws_access_key_id $CF_ACCESS_KEY_ID
aws configure set aws_secret_access_key $CF_SECRET_ACCESS_KEY
aws configure set default.region us-east-1 # Update with your R2 region if different
aws configure set default.s3.signature_version s3v4
aws configure set default.s3.endpoint_url https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
aws --version
- name: Build
run: |
export PATH=$PATH:/github/home/go/bin
/app/build.sh
ls -l /data
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: yao-linux
path: |
/data/*
- name: Push To R2 Cloudflare
run: |
for file in /data/*; do
aws s3 cp $file s3://$R2_BUCKET/archives/ --endpoint-url https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
done
================================================
FILE: .github/workflows/build-macos.yml
================================================
name: Build MacOS Artifacts
on:
workflow_dispatch:
inputs:
tags:
description: "Version tags"
env:
VERSION: 1.0.0
jobs:
build:
strategy:
matrix:
go: ["1.25"]
runs-on: "macos-latest"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Setup Cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file") # Get the directory where the ZIP file is located
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout CUI v1.0
# ** XGEN will be renamed to CUI in the feature. and move to the new repository. **
# ** new repository: https://github.com/YaoApp/cui.git **
uses: actions/checkout@v4
with:
repository: yaoapp/cui
path: cui-v1.0
- name: Checkout Yao-Init
uses: actions/checkout@v4
with:
repository: yaoapp/yao-init
path: yao-init
- name: Move Kun, Xun, Gou, UI, V8Go
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv cui-v1.0 ../
mv yao-init ../
rm -f ../cui-v1.0/packages/setup/vite.config.ts.*
ls -l .
ls -l ../
ls -l ../cui-v1.0/packages/setup/
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Setup Go Tools
run: |
make tools
- name: Get Version
run: |
echo VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g") >> $GITHUB_ENV
- name: Make Artifacts MacOS
run: |
make artifacts-macos
- name: Install Certificates
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
mkdir -p certs
echo "${{ secrets.APPLE_DEVELOPERIDG2CA }}" | base64 --decode > certs/DeveloperIDG2CA.cer
echo "${{ secrets.APPLE_DISTRIBUTION }}" | base64 --decode > certs/distribution.cer
echo "${{ secrets.APPLE_PRIVATE_KEY }}" | base64 --decode > certs/private_key.p12
security verify-cert -c certs/DeveloperIDG2CA.cer
security verify-cert -c certs/distribution.cer
- name: Import Certificates
run: |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import ./certs/DeveloperIDG2CA.cer -k $KEYCHAIN_PATH -T /usr/bin/codesign
security import ./certs/distribution.cer -k $KEYCHAIN_PATH -T /usr/bin/codesign
# import private key to keychain
security import ./certs/private_key.p12 -k $KEYCHAIN_PATH -P "${{ secrets.APPLE_PRIVATE_KEY_PASSWORD }}" -T /usr/bin/codesign
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Sign Artifacts
run: |
codesign --deep --force --verbose --timestamp --sign "Developer ID Application: ${{ secrets.APPLE_SIGN }}" dist/release/yao-$VERSION-darwin-arm64
codesign --deep --force --verbose --timestamp --sign "Developer ID Application: ${{ secrets.APPLE_SIGN }}" dist/release/yao-$VERSION-darwin-amd64
codesign --deep --force --verbose --timestamp --sign "Developer ID Application: ${{ secrets.APPLE_SIGN }}" dist/release/yao-$VERSION-darwin-arm64-prod
codesign --deep --force --verbose --timestamp --sign "Developer ID Application: ${{ secrets.APPLE_SIGN }}" dist/release/yao-$VERSION-darwin-amd64-prod
- name: Verify Signature
run: |
codesign --verify --deep --strict --verbose=2 dist/release/yao-$VERSION-darwin-arm64
codesign --verify --deep --strict --verbose=2 dist/release/yao-$VERSION-darwin-amd64
codesign --verify --deep --strict --verbose=2 dist/release/yao-$VERSION-darwin-arm64-prod
codesign --verify --deep --strict --verbose=2 dist/release/yao-$VERSION-darwin-amd64-prod
- name: Send to Apple Notary Service
run: |
zip -r dist/release/yao-$VERSION-darwin-arm64.zip dist/release/yao-$VERSION-darwin-arm64
zip -r dist/release/yao-$VERSION-darwin-amd64.zip dist/release/yao-$VERSION-darwin-amd64
zip -r dist/release/yao-$VERSION-darwin-arm64-prod.zip dist/release/yao-$VERSION-darwin-arm64-prod
zip -r dist/release/yao-$VERSION-darwin-amd64-prod.zip dist/release/yao-$VERSION-darwin-amd64-prod
xcrun notarytool submit dist/release/yao-$VERSION-darwin-arm64.zip --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.APPLE_TEAME_ID }}" --password "${{ secrets.APPLE_APP_SPEC_PASS }}" --output-format json
xcrun notarytool submit dist/release/yao-$VERSION-darwin-amd64.zip --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.APPLE_TEAME_ID }}" --password "${{ secrets.APPLE_APP_SPEC_PASS }}" --output-format json
xcrun notarytool submit dist/release/yao-$VERSION-darwin-arm64-prod.zip --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.APPLE_TEAME_ID }}" --password "${{ secrets.APPLE_APP_SPEC_PASS }}" --output-format json
xcrun notarytool submit dist/release/yao-$VERSION-darwin-amd64-prod.zip --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.APPLE_TEAME_ID }}" --password "${{ secrets.APPLE_APP_SPEC_PASS }}" --output-format json
rm -f dist/release/yao-$VERSION-darwin-arm64.zip
rm -f dist/release/yao-$VERSION-darwin-amd64.zip
rm -f dist/release/yao-$VERSION-darwin-arm64-prod.zip
rm -f dist/release/yao-$VERSION-darwin-amd64-prod.zip
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: yao-macos
path: |
dist/release/*
================================================
FILE: .github/workflows/notarize-macos.yml
================================================
name: Notarize macOS
on:
workflow_dispatch:
inputs:
run_id:
description: "Release macOS workflow run ID (to download artifacts from)"
required: true
version:
description: "Version used in the release build (e.g. 1.0.0 or 1.0.0-alpha)"
required: true
permissions:
contents: write
jobs:
# ===================================================================
# Notarize Yao binaries (arm64 + amd64)
# ===================================================================
notarize:
runs-on: macos-latest
strategy:
matrix:
arch: [arm64, amd64]
steps:
- name: Download Yao Binary
uses: actions/download-artifact@v4
with:
name: yao-darwin-${{ matrix.arch }}
path: bin
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Certificates
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
mkdir -p certs
echo "${{ secrets.APPLE_DEVELOPERIDG2CA }}" | base64 --decode > certs/DeveloperIDG2CA.cer
echo "${{ secrets.APPLE_DISTRIBUTION }}" | base64 --decode > certs/distribution.cer
echo "${{ secrets.APPLE_PRIVATE_KEY }}" | base64 --decode > certs/private_key.p12
security verify-cert -c certs/DeveloperIDG2CA.cer
security verify-cert -c certs/distribution.cer
- name: Import Certificates
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security import ./certs/DeveloperIDG2CA.cer -k $KEYCHAIN_PATH -T /usr/bin/codesign
security import ./certs/distribution.cer -k $KEYCHAIN_PATH -T /usr/bin/codesign
security import ./certs/private_key.p12 -k $KEYCHAIN_PATH -P "${{ secrets.APPLE_PRIVATE_KEY_PASSWORD }}" -T /usr/bin/codesign
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Verify Signature
run: codesign --verify --deep --strict --verbose=2 bin/yao
- name: Notarize Yao ${{ matrix.arch }}
timeout-minutes: 15
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAME_ID: ${{ secrets.APPLE_TEAME_ID }}
APPLE_APP_SPEC_PASS: ${{ secrets.APPLE_APP_SPEC_PASS }}
run: |
zip -j bin/yao.zip bin/yao
SUBMIT_OUT=$(xcrun notarytool submit bin/yao.zip \
--apple-id "$APPLE_ID" \
--team-id "$APPLE_TEAME_ID" \
--password "$APPLE_APP_SPEC_PASS" \
--wait --timeout 10m --output-format json 2>&1) || true
echo "$SUBMIT_OUT"
STATUS=$(echo "$SUBMIT_OUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('status',''))" 2>/dev/null || true)
SUB_ID=$(echo "$SUBMIT_OUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
if [ "$STATUS" != "Accepted" ]; then
echo "::error::Yao ${{ matrix.arch }} notarization failed (status: $STATUS)"
[ -n "$SUB_ID" ] && xcrun notarytool log "$SUB_ID" \
--apple-id "$APPLE_ID" \
--team-id "$APPLE_TEAME_ID" \
--password "$APPLE_APP_SPEC_PASS" || true
exit 1
fi
echo "Yao ${{ matrix.arch }} notarization accepted."
================================================
FILE: .github/workflows/pr-receive.yml
================================================
name: Receive PR
# read-only repo token
# no access to secrets
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
echo ${{ github.event.pull_request.head.sha }} > ./pr/SHA
- uses: actions/upload-artifact@v4
with:
name: pr
path: pr/
================================================
FILE: .github/workflows/pr-test.yml
================================================
name: PR Unit Test
# read-write repo token
# access to secrets
on:
workflow_run:
workflows: ["Receive PR"]
types:
- completed
env:
YAO_DEV: ${{ github.WORKSPACE }}
YAO_ENV: development
YAO_ROOT: ${{ github.WORKSPACE }}/../app
YAO_HOST: 0.0.0.0
YAO_PORT: 5099
YAO_SESSION: "memory"
YAO_LOG: "./logs/application.log"
YAO_LOG_MODE: "TEXT"
YAO_JWT_SECRET: "bLp@bi!oqo-2U+hoTRUG"
YAO_DB_AESKEY: "ZLX=T&f6refeCh-ro*r@"
OSS_TEST_ID: ${{ secrets.OSS_TEST_ID}}
OSS_TEST_SECRET: ${{ secrets.OSS_TEST_SECRET}}
ROOT_PLUGIN: ${{ github.WORKSPACE }}/../../../data/gou-unit/plugins
MYSQL_TEST_HOST: "127.0.0.1"
MYSQL_TEST_PORT: "3308"
MYSQL_TEST_USER: test
MYSQL_TEST_PASS: "123456"
SQLITE_DB: "./app/db/yao.db"
REDIS_TEST_HOST: "127.0.0.1"
REDIS_TEST_PORT: "6379"
REDIS_TEST_DB: "2"
MONGO_TEST_HOST: "127.0.0.1"
MONGO_TEST_PORT: "27017"
MONGO_TEST_USER: "root"
MONGO_TEST_PASS: "123456"
OPENAI_TEST_KEY: ${{ secrets.OPENAI_TEST_KEY }}
TEST_MOAPI_SECRET: ${{ secrets.OPENAI_TEST_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_TEST_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
TEST_MOAPI_MIRROR: https://api.openai.com
# DeepSeek API Configuration
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
DEEPSEEK_API_PROXY: ${{ secrets.DEEPSEEK_API_PROXY }}
DEEPSEEK_MODELS_R1: ${{ secrets.DEEPSEEK_MODELS_R1 }}
DEEPSEEK_MODELS_V3: ${{ secrets.DEEPSEEK_MODELS_V3 }}
DEEPSEEK_MODELS_V3_1: ${{ secrets.DEEPSEEK_MODELS_V3_1 }}
# Search API Configuration
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
SERPAPI_API_KEY: ${{ secrets.SERPAPI_API_KEY }}
SERPER_API_KEY: ${{ secrets.SERPER_API_KEY }}
# Claude API Configuration
CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
CLAUDE_PROXY: ${{ secrets.CLAUDE_PROXY }}
CLAUDE_API_HOST: ${{ secrets.CLAUDE_API_HOST }}
CLAUDE_SONNET_4: ${{ secrets.CLAUDE_SONNET_4 }}
CLAUDE_SONNET_4_THINKING: ${{ secrets.CLAUDE_SONNET_4_THINKING }}
# Moonshot / Kimi API Configuration
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
MOONSHOT_PROXY: "https://api.moonshot.cn"
KIMI_CODE_API_KEY: ${{ secrets.KIMI_CODE_API_KEY }}
KIMI_CODE_PROXY: "https://api.kimi.com/coding"
TAB_NAME: "::PET ADMIN"
PAGE_SIZE: "20"
PAGE_LINK: "https://yaoapps.com"
PAGE_ICON: "icon-trash"
DEMO_APP: ${{ github.WORKSPACE }}/../app
# Application Setting
## Path
YAO_EXTENSION_ROOT: ${{ github.WORKSPACE }}/../extension
YAO_TEST_APPLICATION: ${{ github.WORKSPACE }}/../app
YAO_SUI_TEST_APPLICATION: ${{ github.WORKSPACE }}/../yao-startup-webapp
## Runtime
YAO_RUNTIME_MIN: 3
YAO_RUNTIME_MAX: 6
YAO_RUNTIME_HEAP_LIMIT: 1500000000
YAO_RUNTIME_HEAP_RELEASE: 10000000
YAO_RUNTIME_HEAP_AVAILABLE: 550000000
YAO_RUNTIME_PRECOMPILE: true
# Neo4j
NEO4J_TEST_URL: "neo4j://localhost:7687"
NEO4J_TEST_USER: "neo4j"
NEO4J_TEST_PASS: "Yao2026Neo4j"
# Qdrant
QDRANT_TEST_HOST: "127.0.0.1"
QDRANT_TEST_PORT: "6334"
# S3
S3_API: ${{ secrets.S3_API }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_PUBLIC_URL: ${{ secrets.S3_PUBLIC_URL }}
# === Openapi Signin Configs ===
SIGNIN_CLIENT_ID: "kiCeR88kDwHBDuNHvN51cZgmpp3tmF6Z"
## Google
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
## Microsoft
MICROSOFT_CLIENT_ID: ${{ secrets.MICROSOFT_CLIENT_ID }}
MICROSOFT_CLIENT_SECRET: ${{ secrets.MICROSOFT_CLIENT_SECRET }}
## Apple
APPLE_SERVICE_ID: ${{ secrets.APPLE_SERVICE_ID }}
APPLE_PRIVATE_KEY_PATH: "apple/signin_client_secret_key.p8"
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
## Github
GITHUBUSER_CLIENT_ID: ${{ secrets.GITHUBUSER_CLIENT_ID }}
GITHUBUSER_CLIENT_SECRET: ${{ secrets.GITHUBUSER_CLIENT_SECRET }}
## Cloudflare Turnstile
CLOUDFLARE_TURNSTILE_SITEKEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SITEKEY }}
CLOUDFLARE_TURNSTILE_SECRET: ${{ secrets.CLOUDFLARE_TURNSTILE_SECRET }}
# === Messaging Services ===
## Mailgun
MAILGUN_DOMAIN: ${{ secrets.MAILGUN_DOMAIN }}
MAILGUN_API_KEY: ${{ secrets.MAILGUN_API_KEY }}
MAILGUN_FROM: "Yaobots Tests <unit-test@mailgun.yaobots.com>"
## SMTP Server( Mailgun )
SMTP_HOST: "smtp.mailgun.org"
SMTP_PORT: "465"
SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
SMTP_FROM: "Yaobots SMTP Tests <unit-test@mailgun.yaobots.com>"
## SMTP Server( Gmail )
RELIABLE_SMTP_HOST: "smtp.gmail.com"
RELIABLE_SMTP_PORT: "465"
RELIABLE_SMTP_USERNAME: ${{ secrets.RELIABLE_SMTP_USERNAME }}
RELIABLE_SMTP_PASSWORD: ${{ secrets.RELIABLE_SMTP_PASSWORD }}
RELIABLE_SMTP_FROM: "Yaobots Gmail Tests <shadow.iqka@gmail.com>"
## IMAP Server (Gmail)
RELIABLE_IMAP_HOST: "imap.gmail.com"
RELIABLE_IMAP_PORT: "993"
RELIABLE_IMAP_USERNAME: ${{ secrets.RELIABLE_SMTP_USERNAME }}
RELIABLE_IMAP_PASSWORD: ${{ secrets.RELIABLE_SMTP_PASSWORD }}
RELIABLE_IMAP_MAILBOX: "INBOX"
## Twilio
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
TWILIO_API_SID: ${{ secrets.TWILIO_API_SID }}
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }}
TWILIO_SENDGRID_API_SID: ${{ secrets.TWILIO_SENDGRID_API_SID }}
TWILIO_SENDGRID_API_KEY: ${{ secrets.TWILIO_SENDGRID_API_KEY }}
TWILIO_FROM_PHONE: "+17035701412"
TWILIO_FROM_EMAIL: "unit-test@sendgrid.yaobots.com"
TWILIO_TEST_PHONE: ${{ secrets.TWILIO_TEST_PHONE }}
jobs:
# =============================================================================
# KB Tests (kb) - Run once with SQLite (requires Qdrant, Neo4j, FastEmbed)
# =============================================================================
KBTest:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
- 6334:6334
fastembed:
image: yaoapp/fastembed:latest-amd64
env:
FASTEMBED_PASSWORD: Yao@2026
ports:
- 6001:8000
neo4j:
image: neo4j:latest
ports:
- "7687:7687"
env:
NEO4J_AUTH: neo4j/Yao2026Neo4j
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 KB Tests (kb) running with SQLite...'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Run KB Tests (kb)
run: make unit-test-kb
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Comment on PR - KB Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ KB Tests (kb) passed!'
});
# =============================================================================
# Agent Tests (agent, aigc) - Run once with SQLite
# =============================================================================
AgentTest:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
- 6334:6334
fastembed:
image: yaoapp/fastembed:latest-amd64
env:
FASTEMBED_PASSWORD: Yao@2026
ports:
- 6001:8000
neo4j:
image: neo4j:latest
ports:
- "7687:7687"
env:
NEO4J_AUTH: neo4j/Yao2026Neo4j
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 Agent Tests (agent, aigc) running with SQLite...'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Install pdftoppm, mutool, imagemagick
run: |
sudo apt update
sudo apt install -y poppler-utils mupdf-tools imagemagick
- name: Test pdftoppm, mutool, imagemagick
run: |
pdftoppm -v
mutool -v
convert -version
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Pull Sandbox Test Images
run: |
docker pull alpine:latest
docker pull yaoapp/sandbox-base:latest || true
docker pull yaoapp/sandbox-claude:latest || true
- name: Run Agent Tests (agent, aigc)
env:
YAO_SANDBOX_WORKSPACE: ${{ runner.temp }}/sandbox/workspace
YAO_SANDBOX_IPC: ${{ runner.temp }}/sandbox/ipc
run: |
export YAO_SANDBOX_CONTAINER_USER="$(id -u):$(id -g)"
make unit-test-agent
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Comment on PR - Agent Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ Agent Tests (agent, aigc) passed!'
});
# =============================================================================
# Robot Tests (all agent/robot/... packages) - Unit + E2E with real LLM calls
# =============================================================================
RobotTest:
runs-on: ubuntu-latest
services:
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 Robot Tests (Unit + E2E) running with SQLite...'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Run Robot Tests (Unit + E2E)
run: make unit-test-robot
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Comment on PR - Robot Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ Robot Tests (Unit + E2E) passed!'
});
# =============================================================================
# Sandbox Tests (requires Docker) - Run with Docker-in-Docker
# =============================================================================
SandboxTest:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 Sandbox Tests running with Docker...'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Pull Sandbox Test Images
run: |
docker pull alpine:latest
docker pull yaoapp/sandbox-base:latest || true
docker pull yaoapp/sandbox-claude:latest || true
- name: Run Sandbox Tests
env:
YAO_SANDBOX_WORKSPACE: ${{ runner.temp }}/sandbox/workspace
YAO_SANDBOX_IPC: ${{ runner.temp }}/sandbox/ipc
run: |
# Use runner's UID:GID to avoid permission issues
export YAO_SANDBOX_CONTAINER_USER="$(id -u):$(id -g)"
make unit-test-sandbox
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Comment on PR - Sandbox Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ Sandbox Tests passed!'
});
# =============================================================================
# Sandbox V2 Tests (tai SDK + workspace, Docker + K8s via k3d)
# Full sandbox/v2 integration tests are run locally.
# =============================================================================
SandboxV2Test:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 Sandbox V2 CI Tests running (tai + workspace)...'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Pull Test Images
run: |
docker pull yaoapp/tai-sandbox-test:latest || true
docker pull yaoapp/tai:latest
docker pull alpine:latest
- name: Install k3d
run: curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
- name: Create k3d cluster
run: |
k3d cluster create tai-test --no-lb --wait --api-port 16443
kubectl wait --for=condition=Ready node --all --timeout=60s
k3d image import alpine:latest -c tai-test
- name: Start Tai Docker instance
run: |
docker run -d --name tai-docker \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 19100:19100 -p 8099:8099 -p 12375:12375 -p 16080:16080 \
yaoapp/tai:latest server -direct \
-grpc 0.0.0.0:19100 -http 0.0.0.0:8099 -vnc 0.0.0.0:16080 -docker 0.0.0.0:12375
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:8099/healthz > /dev/null 2>&1; then
echo "Tai Docker HTTP ready"; break
fi
echo "Waiting for Tai Docker HTTP... ($i)"; sleep 1
done
curl -sf http://127.0.0.1:8099/healthz > /dev/null 2>&1 || {
echo "::error::Tai Docker HTTP failed"; docker logs tai-docker 2>&1; exit 1
}
for i in $(seq 1 15); do
if nc -z 127.0.0.1 19100 2>/dev/null; then
echo "Tai Docker gRPC ready"; break
fi
echo "Waiting for Tai Docker gRPC... ($i)"; sleep 1
done
nc -z 127.0.0.1 19100 2>/dev/null || {
echo "::error::Tai Docker gRPC failed"; docker logs tai-docker 2>&1; exit 1
}
- name: Generate kubeconfig for Tai K8s
run: |
K3D_IP=$(docker inspect k3d-tai-test-server-0 | jq -r '.[0].NetworkSettings.Networks["k3d-tai-test"].IPAddress')
echo "k3d server IP: ${K3D_IP}"
k3d kubeconfig get tai-test > /tmp/kubeconfig-k3d.yml
# Kubeconfig for tai-k8s container (uses k3d-internal IP)
sed "s|server: .*|server: https://${K3D_IP}:6443|" /tmp/kubeconfig-k3d.yml \
> /tmp/kubeconfig-tai-k8s.yml
echo "Container kubeconfig server:"
grep server: /tmp/kubeconfig-tai-k8s.yml
# Kubeconfig for test runner (uses localhost via port-mapped 6443)
sed 's|server: .*|server: https://127.0.0.1:6443|' /tmp/kubeconfig-k3d.yml \
> ${{ runner.temp }}/kubeconfig-tai.yml
echo "Test runner kubeconfig server:"
grep server: ${{ runner.temp }}/kubeconfig-tai.yml
- name: Start Tai K8s instance
run: |
K3D_IP=$(docker inspect k3d-tai-test-server-0 | jq -r '.[0].NetworkSettings.Networks["k3d-tai-test"].IPAddress')
echo "k3d server IP: ${K3D_IP}"
docker run -d --name tai-k8s \
--network k3d-tai-test \
-p 19101:19100 -p 8100:8099 -p 6443:16443 -p 16081:16080 \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /tmp/kubeconfig-tai-k8s.yml:/etc/tai/kubeconfig.yml:ro \
-e TAI_K8S_UPSTREAM="tcp://${K3D_IP}:6443" \
-e TAI_KUBECONFIG=/etc/tai/kubeconfig.yml \
yaoapp/tai:latest server -direct \
-grpc 0.0.0.0:19100 -http 0.0.0.0:8099 -vnc 0.0.0.0:16080 -k8s 0.0.0.0:16443
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:8100/healthz > /dev/null 2>&1; then
echo "Tai K8s HTTP ready"; break
fi
echo "Waiting for Tai K8s HTTP... ($i)"; sleep 1
done
curl -sf http://127.0.0.1:8100/healthz > /dev/null 2>&1 || {
echo "::error::Tai K8s HTTP failed"; docker logs tai-k8s 2>&1; exit 1
}
for i in $(seq 1 15); do
if nc -z 127.0.0.1 19101 2>/dev/null; then
echo "Tai K8s gRPC ready"; break
fi
echo "Waiting for Tai K8s gRPC... ($i)"; sleep 1
done
nc -z 127.0.0.1 19101 2>/dev/null || {
echo "::error::Tai K8s gRPC failed"; docker logs tai-k8s 2>&1; exit 1
}
- name: Run Sandbox V2 CI Tests (tai + workspace)
env:
TAI_TEST_HOST: "127.0.0.1"
TAI_TEST_DOCKER: "tcp://127.0.0.1:12375"
TAI_TEST_GRPC_PORT: "19100"
TAI_TEST_HTTP_PORT: "8099"
TAI_TEST_VNC_PORT: "16080"
TAI_TEST_DOCKER_PORT: "12375"
TAI_TEST_K8S_HOST: "127.0.0.1"
TAI_TEST_K8S_PORT: "6443"
TAI_TEST_K8S_GRPC_PORT: "19101"
TAI_TEST_KUBECONFIG: "${{ runner.temp }}/kubeconfig-tai.yml"
TAI_TEST_HOST_IP: "172.17.0.1"
SANDBOX_TEST_REMOTE_ADDR: "tai://127.0.0.1:19100"
SANDBOX_TEST_IMAGE: "yaoapp/tai-sandbox-test:latest"
run: make unit-test-sandbox-v2
- name: Codecov Report
if: always()
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: "Comment on PR - Sandbox V2 Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ Sandbox V2 CI Tests passed (tai + workspace)!'
});
# =============================================================================
# Benchmark & Memory Leak Tests - Run with MySQL8.0 and SQLite3
# =============================================================================
PerfTest:
runs-on: ubuntu-latest
services:
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
db: [MySQL8.0, SQLite3]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Install FFmpeg 7.x
run: |
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz
tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/
sudo chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe
- name: Test FFmpeg
run: ffmpeg -version
- name: Setup Go Tools
run: make tools
- name: Setup ${{ matrix.db }}
uses: ./.github/actions/setup-db
with:
kind: "${{ matrix.db }}"
db: "xiang"
user: "xiang"
password: ${{ secrets.UNIT_PASS }}
- name: Setup ENV
env:
PASSWORD: ${{ secrets.UNIT_PASS }}
run: |
echo "YAO_DB_DRIVER=$DB_DRIVER" >> $GITHUB_ENV
if [ "$DB_DRIVER" = "mysql" ]; then
echo "YAO_DB_PRIMARY=$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
else
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
mkdir -p ${{ github.WORKSPACE }}/../app/db
fi
- name: Run Benchmark & Memory Leak Tests
run: |
make benchmark
make memory-leak
# =============================================================================
# Core Tests - Run with DB matrix (MySQL/SQLite/Redis/Mongo combinations)
# =============================================================================
CoreTest:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333 # HTTP API
- 6334:6334 # gRPC
fastembed:
image: yaoapp/fastembed:latest-amd64
env:
FASTEMBED_PASSWORD: Yao@2026
ports:
- 6001:8000
neo4j:
image: neo4j:latest
ports:
- "7687:7687"
env:
NEO4J_AUTH: neo4j/Yao2026Neo4j
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
strategy:
matrix:
go: ["1.25"]
db: [MySQL8.0, SQLite3]
redis: [4, 5, 6]
mongo: ["6.0"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var fs = require('fs');
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: 'Thank you for the PR! The db: ${{ matrix.db }} redis: ${{ matrix.redis }} mongo: ${{ matrix.mongo }} test workflow is running, the results of the run will be commented later.'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file") # Get the directory where the ZIP file is located
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Yao Startup Webapp
uses: actions/checkout@v4
with:
repository: yaoapp/yao-startup-webapp
submodules: true
token: ${{ secrets.YAO_TEST_TOKEN }}
path: yao-startup-webapp
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Kun, Xun, Gou, V8Go
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
mv yao-startup-webapp ../
ls -l .
ls -l ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:${{ matrix.redis }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install FFmpeg 7.x
run: |
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz
tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/
sudo chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe
- name: Test FFmpeg
run: ffmpeg -version
- name: Install pdftoppm, mutool, imagemagick
run: |
sudo apt update
sudo apt install -y poppler-utils mupdf-tools imagemagick
- name: Test pdftoppm, mutool, imagemagick
run: |
pdftoppm -v
mutool -v
convert -version
- name: Start MongoDB
run: |
docker run --name mongodb --publish 27017:27017 \
-e MONGO_INITDB_DATABASE=test \
-e MONGO_INITDB_ROOT_USERNAME=root \
-e MONGO_INITDB_ROOT_PASSWORD=123456 \
--detach mongo:${{ matrix.mongo }}
# Wait for MongoDB to be ready
for i in $(seq 1 20); do
if docker exec mongodb mongosh --quiet --port 27017 --username root --password 123456 --eval "db.serverStatus()" > /dev/null 2>&1; then
echo "MongoDB is ready"
break
fi
echo "Waiting for MongoDB... ($i)"
sleep 1
done
- name: Setup MySQL8.0 (connector)
uses: ./.github/actions/setup-db
with:
kind: "MySQL8.0"
db: "test"
user: "test"
password: "123456"
port: "3308"
- name: Setup ${{ matrix.db }}
uses: ./.github/actions/setup-db
with:
kind: "${{ matrix.db }}"
db: "xiang"
user: "xiang"
password: ${{ secrets.UNIT_PASS }}
- name: Setup Go Tools
run: |
make tools
- name: Setup ENV & Host
env:
PASSWORD: ${{ secrets.UNIT_PASS }}
run: |
sudo echo "127.0.0.1 local.iqka.com" | sudo tee -a /etc/hosts
echo "YAO_DB_DRIVER=$DB_DRIVER" >> $GITHUB_ENV
echo "GITHUB_WORKSPACE:\n" && ls -l $GITHUB_WORKSPACE
if [ "$DB_DRIVER" = "mysql" ]; then
echo "YAO_DB_PRIMARY=$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
elif [ "$DB_DRIVER" = "postgres" ]; then
echo "YAO_DB_PRIMARY=postgres://$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
else
echo "YAO_DB_PRIMARY=$YAO_ROOT/$DB_HOST" >> $GITHUB_ENV
fi
echo ".:\n" && ls -l .
echo "..:\n" && ls -l ..
ping -c 1 -t 1 local.iqka.com
- name: Test Prepare
run: |
make vet
make fmt-check
make misspell-check
- name: Run Core Tests (exclude AI)
run: make unit-test-core
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var fs = require('fs');
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✨DONE✨ db: ${{ matrix.db }} redis: ${{ matrix.redis }} mongo: ${{ matrix.mongo }} passed.'
});
# =============================================================================
# Registry Client SDK Tests (requires Yao Registry Docker service)
# =============================================================================
RegistryTest:
runs-on: ubuntu-latest
services:
yao-registry:
image: yaoapp/registry:latest
ports:
- "8080:8080"
env:
REGISTRY_INIT_USER: yaoagents
REGISTRY_INIT_PASS: yaoagents
strategy:
matrix:
go: ["1.25"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 Registry Client SDK Tests running...'
});
- name: Wait for Registry
run: |
for i in $(seq 1 15); do
if curl -sf http://localhost:8080/.well-known/yao-registry > /dev/null 2>&1; then
echo "Registry is ready"
break
fi
echo "Waiting for registry... ($i)"
sleep 1
done
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Run Registry Client Tests
env:
YAO_REGISTRY_URL: http://localhost:8080
YAO_TEST_APPLICATION: ${{ github.workspace }}/../app
run: make unit-test-registry
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Comment on PR - Registry Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ Registry Client SDK Tests passed!'
});
# =============================================================================
# gRPC Tests - Run once with SQLite (transport layer, no DB matrix needed)
# =============================================================================
GRPCTest:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: "Download artifact"
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- name: "Read NR & SHA"
run: |
unzip pr.zip
cat NR
cat SHA
echo HEAD=$(cat SHA) >> $GITHUB_ENV
echo NR=$(cat NR) >> $GITHUB_ENV
- name: "Comment on PR"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '🤖 gRPC Tests running with SQLite...'
});
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout pull request HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD }}
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Run gRPC Tests
run: make unit-test-grpc
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Comment on PR - gRPC Tests Done"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { NR } = process.env
var issue_number = NR;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '✅ gRPC Tests passed!'
});
================================================
FILE: .github/workflows/release-linux.yml
================================================
name: Release Linux
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions:
contents: write
env:
IMAGE_NAME: yaoapp/yao
jobs:
# ===================================================================
# Build Linux Binaries (amd64 + arm64)
# ===================================================================
build:
runs-on: ubuntu-latest
container:
image: yaoapp/yao-build:1.0.0
env:
CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
R2_BUCKET: ${{ secrets.R2_BUCKET }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
steps:
- name: Configure R2 For Cloudflare
run: |
aws configure set aws_access_key_id $CF_ACCESS_KEY_ID
aws configure set aws_secret_access_key $CF_SECRET_ACCESS_KEY
aws configure set default.region us-east-1
aws configure set default.s3.signature_version s3v4
aws configure set default.s3.endpoint_url https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
- name: Build
run: |
export PATH=$PATH:/github/home/go/bin
# Clone dependencies
cd /app
git clone https://github.com/yaoapp/kun.git /app/kun
git clone https://github.com/yaoapp/xun.git /app/xun
git clone https://github.com/yaoapp/gou.git /app/gou
git clone https://github.com/yaoapp/v8go.git /app/v8go
git clone https://github.com/yaoapp/cui.git /app/cui-v1.0
git clone https://github.com/yaoapp/yao-init.git /app/yao-init
git clone https://github.com/yaoapp/yao.git /app/yao
# Extract libv8
files=$(find /app/v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
# Set VERSION from git tag (required)
cd /app/yao
if [[ "$GITHUB_REF" != refs/tags/v* ]]; then
echo "::error::This workflow requires a tag (refs/tags/v*). Got: $GITHUB_REF"
exit 1
fi
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
echo "Setting VERSION to $TAG_VERSION"
sed -i "s/const VERSION = \".*\"/const VERSION = \"${TAG_VERSION}\"/g" share/const.go
grep 'const VERSION' share/const.go
make tools && make artifacts-linux
mv /app/yao/dist/release/* /data/
ls -l /data
- name: Push To R2
run: |
for file in /data/*; do
aws s3 cp "$file" s3://$R2_BUCKET/archives/ \
--endpoint-url https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
done
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: yao-linux
path: /data/*
# ===================================================================
# Docker Images (multi-arch manifest: linux/amd64 + linux/arm64)
# ===================================================================
docker:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Version
id: version
run: |
if [[ "$GITHUB_REF" != refs/tags/v* ]]; then
echo "::error::This workflow requires a tag (refs/tags/v*). Got: $GITHUB_REF"
exit 1
fi
VERSION="${GITHUB_REF#refs/tags/v}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build & Push Development (multi-arch)
uses: docker/build-push-action@v6
with:
context: ./docker/development
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ steps.version.outputs.version }}
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}-dev
${{ env.IMAGE_NAME }}:dev
- name: Build & Push Production (multi-arch)
uses: docker/build-push-action@v6
with:
context: ./docker/production
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ steps.version.outputs.version }}
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}
${{ env.IMAGE_NAME }}:latest
================================================
FILE: .github/workflows/release-macos.yml
================================================
name: Release macOS
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
# ===================================================================
# Build Yao macOS binaries (arm64 + amd64) — one job, both arches
# ===================================================================
build:
runs-on: macos-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Setup Cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: yaoapp/gou
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout CUI v1.0
uses: actions/checkout@v4
with:
repository: yaoapp/cui
path: cui-v1.0
- name: Checkout Yao-Init
uses: actions/checkout@v4
with:
repository: yaoapp/yao-init
path: yao-init
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv cui-v1.0 ../
mv yao-init ../
rm -f ../cui-v1.0/packages/setup/vite.config.ts.*
- name: Checkout Yao
uses: actions/checkout@v4
- name: Set Version from Tag
run: |
if [[ "$GITHUB_REF" != refs/tags/v* ]]; then
echo "::error::This workflow requires a tag (refs/tags/v*). Got: $GITHUB_REF"
exit 1
fi
TAG="${GITHUB_REF#refs/tags/v}"
echo "Setting VERSION to $TAG"
sed -i.bak "s/const VERSION = \".*\"/const VERSION = \"${TAG}\"/g" share/const.go
rm -f share/const.go.bak
grep 'const VERSION' share/const.go
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: Setup Go Tools
run: make tools
- name: Make Artifacts macOS
run: make artifacts-macos
- name: Get Version
id: version
run: |
VERSION=$(grep 'const VERSION =' share/const.go | awk '{print $4}' | sed 's/"//g')
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: List Build Output
run: ls -lh dist/release/
- name: Install Certificates
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
mkdir -p certs
echo "${{ secrets.APPLE_DEVELOPERIDG2CA }}" | base64 --decode > certs/DeveloperIDG2CA.cer
echo "${{ secrets.APPLE_DISTRIBUTION }}" | base64 --decode > certs/distribution.cer
echo "${{ secrets.APPLE_PRIVATE_KEY }}" | base64 --decode > certs/private_key.p12
security verify-cert -c certs/DeveloperIDG2CA.cer
security verify-cert -c certs/distribution.cer
- name: Import Certificates
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security import ./certs/DeveloperIDG2CA.cer -k $KEYCHAIN_PATH -T /usr/bin/codesign
security import ./certs/distribution.cer -k $KEYCHAIN_PATH -T /usr/bin/codesign
security import ./certs/private_key.p12 -k $KEYCHAIN_PATH -P "${{ secrets.APPLE_PRIVATE_KEY_PASSWORD }}" -T /usr/bin/codesign
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Sign Yao Binaries
run: |
VERSION="${{ steps.version.outputs.version }}"
IDENTITY="Developer ID Application: ${{ secrets.APPLE_SIGN }}"
for ARCH in arm64 amd64; do
for SUFFIX in "" "-prod"; do
BIN="dist/release/yao-${VERSION}-darwin-${ARCH}${SUFFIX}"
codesign --force --verbose --timestamp --options runtime \
--entitlements .github/codesign/entitlements.plist \
--sign "$IDENTITY" "$BIN"
codesign --verify --deep --strict --verbose=2 "$BIN"
done
done
- name: Prepare Output and Checksums
run: |
VERSION="${{ steps.version.outputs.version }}"
for ARCH in arm64 amd64; do
for VARIANT in dev prod; do
if [ "$VARIANT" = "dev" ]; then
SRC="dist/release/yao-${VERSION}-darwin-${ARCH}"
else
SRC="dist/release/yao-${VERSION}-darwin-${ARCH}-prod"
fi
DIR="/tmp/yao-output-${ARCH}-${VARIANT}"
mkdir -p "$DIR"
cp "$SRC" "$DIR/yao"
chmod +x "$DIR/yao"
done
done
mkdir -p /tmp/checksums
for ARCH in arm64 amd64; do
for VARIANT in dev prod; do
shasum -a 256 "/tmp/yao-output-${ARCH}-${VARIANT}/yao" | awk '{print $1" yao"}' > "/tmp/checksums/yao-darwin-${ARCH}-${VARIANT}.sha256"
done
done
cat /tmp/checksums/*.sha256
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: yao-darwin-arm64
path: /tmp/yao-output-arm64-prod/yao
- name: Upload arm64 Dev Binary
uses: actions/upload-artifact@v4
with:
name: yao-darwin-arm64-dev
path: /tmp/yao-output-arm64-dev/yao
- name: Upload amd64 Binary
uses: actions/upload-artifact@v4
with:
name: yao-darwin-amd64
path: /tmp/yao-output-amd64-prod/yao
- name: Upload amd64 Dev Binary
uses: actions/upload-artifact@v4
with:
name: yao-darwin-amd64-dev
path: /tmp/yao-output-amd64-dev/yao
- name: Upload Checksums
uses: actions/upload-artifact@v4
with:
name: yao-darwin-checksums
path: /tmp/checksums/*.sha256
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
workflow_run:
workflows: ["Release Linux", "Release macOS"]
types:
- completed
permissions:
contents: write
jobs:
# ===================================================================
# Wait for both workflows to succeed, then create a unified release
# ===================================================================
release:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_branch, 'v')
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Version
id: version
run: |
TAG="${{ github.event.workflow_run.head_branch }}"
VERSION="${TAG#v}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo "TAG=${TAG} VERSION=${VERSION}"
- name: Wait for Both Workflows
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.version.outputs.tag }}"
echo "Waiting for both Release Linux and Release macOS to complete for $TAG..."
for i in $(seq 1 60); do
LINUX_STATUS=$(gh run list --workflow="Release Linux" --branch="$TAG" --limit=1 --json conclusion --jq '.[0].conclusion // "pending"')
MACOS_STATUS=$(gh run list --workflow="Release macOS" --branch="$TAG" --limit=1 --json conclusion --jq '.[0].conclusion // "pending"')
echo "Attempt $i: Linux=$LINUX_STATUS macOS=$MACOS_STATUS"
if [ "$LINUX_STATUS" = "success" ] && [ "$MACOS_STATUS" = "success" ]; then
echo "Both workflows completed successfully."
exit 0
fi
if [ "$LINUX_STATUS" = "failure" ] || [ "$MACOS_STATUS" = "failure" ]; then
echo "::error::One or both workflows failed (Linux=$LINUX_STATUS macOS=$MACOS_STATUS)"
exit 1
fi
sleep 60
done
echo "::error::Timed out waiting for workflows"
exit 1
- name: Download Linux Artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.version.outputs.tag }}"
LINUX_RUN_ID=$(gh run list --workflow="Release Linux" --branch="$TAG" --limit=1 --json databaseId --jq '.[0].databaseId')
mkdir -p dist/linux
gh run download "$LINUX_RUN_ID" --name yao-linux --dir dist/linux
- name: Download macOS Artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.version.outputs.tag }}"
MACOS_RUN_ID=$(gh run list --workflow="Release macOS" --branch="$TAG" --limit=1 --json databaseId --jq '.[0].databaseId')
mkdir -p dist/macos
gh run download "$MACOS_RUN_ID" --name yao-darwin-arm64 --dir dist/macos/arm64-prod
gh run download "$MACOS_RUN_ID" --name yao-darwin-arm64-dev --dir dist/macos/arm64-dev
gh run download "$MACOS_RUN_ID" --name yao-darwin-amd64 --dir dist/macos/amd64-prod
gh run download "$MACOS_RUN_ID" --name yao-darwin-amd64-dev --dir dist/macos/amd64-dev
gh run download "$MACOS_RUN_ID" --name yao-darwin-checksums --dir dist/macos/checksums
- name: Prepare Release Files
run: |
VERSION="${{ steps.version.outputs.version }}"
mkdir -p release
# Linux artifacts (already named correctly from build.sh)
cp dist/linux/* release/ 2>/dev/null || true
# macOS prod binaries
cp dist/macos/arm64-prod/yao "release/yao-${VERSION}-darwin-arm64"
cp dist/macos/amd64-prod/yao "release/yao-${VERSION}-darwin-amd64"
# macOS dev binaries
cp dist/macos/arm64-dev/yao "release/yao-${VERSION}-darwin-arm64-dev"
cp dist/macos/amd64-dev/yao "release/yao-${VERSION}-darwin-amd64-dev"
# Checksums
cp dist/macos/checksums/*.sha256 release/ 2>/dev/null || true
chmod +x release/yao-* 2>/dev/null || true
echo "=== Release files ==="
ls -lh release/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
name: Yao v${{ steps.version.outputs.version }}
files: release/*
generate_release_notes: true
================================================
FILE: .github/workflows/unit-test-v1.yml
================================================
name: Unit Test V1
on:
workflow_dispatch:
inputs:
tags:
description: "Version"
env:
CI_VERSION: "1.0.0"
REPO_KUN: ${{ github.repository_owner }}/kun
REPO_XUN: ${{ github.repository_owner }}/xun
REPO_GOU: ${{ github.repository_owner }}/gou
YAO_DEV: ${{ github.WORKSPACE }}
YAO_ENV: development
YAO_ROOT: ${{ github.WORKSPACE }}/../app
YAO_HOST: 0.0.0.0
YAO_PORT: 5099
YAO_SESSION: "memory"
YAO_LOG: "./logs/application.log"
YAO_LOG_MODE: "TEXT"
YAO_JWT_SECRET: "bLp@bi!oqo-2U+hoTRUG"
YAO_DB_AESKEY: "ZLX=T&f6refeCh-ro*r@"
YAO_EXTENSION_ROOT: ${{ github.WORKSPACE }}/../extension
YAO_TEST_APPLICATION: ${{ github.WORKSPACE }}/../app
YAO_RUNTIME_MIN: 3
YAO_RUNTIME_MAX: 6
YAO_RUNTIME_HEAP_LIMIT: 1500000000
YAO_RUNTIME_HEAP_RELEASE: 10000000
YAO_RUNTIME_HEAP_AVAILABLE: 550000000
YAO_RUNTIME_PRECOMPILE: true
MYSQL_TEST_HOST: "127.0.0.1"
MYSQL_TEST_PORT: "3308"
MYSQL_TEST_USER: "test"
MYSQL_TEST_PASS: "123456"
REDIS_TEST_HOST: "127.0.0.1"
REDIS_TEST_PORT: "6379"
REDIS_TEST_DB: "2"
MONGO_TEST_HOST: "127.0.0.1"
MONGO_TEST_PORT: "27017"
MONGO_TEST_USER: "root"
MONGO_TEST_PASS: "123456"
PG_TEST_HOST: "127.0.0.1"
PG_TEST_PORT: "5432"
PG_TEST_USER: "test"
PG_TEST_PASS: "123456"
jobs:
# =============================================================================
# Environment Setup & Verification
# Build Yao, start services, connect Tai via gRPC tunnel, verify everything.
# No tests are run — this job validates the CI environment is healthy.
# =============================================================================
setup-and-verify:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
postgres:
image: postgres:14
ports:
- 5432:5432
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: 123456
POSTGRES_DB: test
options: >-
--health-cmd="pg_isready -U test"
--health-interval=10s
--health-timeout=5s
--health-retries=5
strategy:
matrix:
go: ["1.25"]
steps:
# ==== Phase 1: Checkout & Setup ====
- name: Checkout Yao
uses: actions/checkout@v4
- name: Setup Build Environment
uses: ./.github/actions/setup-yao
with:
repo-kun: ${{ env.REPO_KUN }}
repo-xun: ${{ env.REPO_XUN }}
repo-gou: ${{ env.REPO_GOU }}
checkout-init: "true"
apple-private-key: ${{ secrets.APPLE_PRIVATE_KEY_USER }}
- name: Load sandbox-v2 env
run: grep -vE '^\s*#|^\s*$' .github/env/sandbox-v2.env >> $GITHUB_ENV
- name: Setup SQLite
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Start MySQL 8.0
run: |
docker run -d --name mysql \
-e MYSQL_RANDOM_ROOT_PASSWORD=true \
-e MYSQL_USER=${MYSQL_TEST_USER} \
-e MYSQL_PASSWORD=${MYSQL_TEST_PASS} \
-e MYSQL_DATABASE=test \
-p ${MYSQL_TEST_PORT}:3306 \
mysql:8.0 --port=3306 --sql-mode='' \
--character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
for i in $(seq 1 30); do
if docker exec mysql mysqladmin ping -h 127.0.0.1 -u ${MYSQL_TEST_USER} -p${MYSQL_TEST_PASS} > /dev/null 2>&1; then
echo "MySQL ready"
break
fi
echo "Waiting for MySQL... ($i/30)"
sleep 2
done
- name: Start Redis
run: docker run --name redis -d -p 6379:6379 redis:6
# ==== Phase 2: Code Quality & Build ====
- name: Code Quality Check
run: |
make vet
make fmt-check
- name: Build Yao
run: go build -v -o $RUNNER_TEMP/yao .
- name: Build ci-token
run: go build -tags ci -v -o $RUNNER_TEMP/ci-token ./cmd/ci-token
- name: Extract tai binary from image
run: |
CID=$(docker create yaoapp/tai:latest)
docker cp "$CID":/usr/local/bin/tai $RUNNER_TEMP/tai
docker rm "$CID"
chmod +x $RUNNER_TEMP/tai
$RUNNER_TEMP/tai version || echo "tai binary extracted"
# ==== Phase 3: Prepare & Start Yao ====
- name: Prepare test app directory
run: |
cp -r ${{ github.WORKSPACE }}/../yao-init $RUNNER_TEMP/yao-test-app
mkdir -p $RUNNER_TEMP/yao-test-app/db
- name: Start Yao server
run: |
cd $RUNNER_TEMP/yao-test-app
YAO_ROOT=$(pwd) \
YAO_HOST=0.0.0.0 \
YAO_PORT=5099 \
YAO_GRPC_HOST=0.0.0.0 \
YAO_GRPC_PORT=9099 \
YAO_DB_DRIVER=sqlite3 \
YAO_DB_PRIMARY=$(pwd)/db/yao.db \
YAO_SESSION=memory \
YAO_ENV=development \
YAO_JWT_SECRET="${{ env.YAO_JWT_SECRET }}" \
YAO_DB_AESKEY="${{ env.YAO_DB_AESKEY }}" \
$RUNNER_TEMP/yao start &
# Wait for Yao HTTP to be ready (up to 120s)
for i in $(seq 1 60); do
if curl -sf http://127.0.0.1:5099/.well-known/yao > /dev/null 2>&1; then
echo "Yao HTTP ready"
curl -s http://127.0.0.1:5099/.well-known/yao | jq .
break
fi
echo "Waiting for Yao... ($i/60)"
sleep 2
done
curl -sf http://127.0.0.1:5099/.well-known/yao > /dev/null 2>&1 || {
echo "::error::Yao HTTP failed to start"
exit 1
}
# ==== Phase 4: Generate Tai credentials ====
- name: Generate Tai credentials
run: |
gen_cred() {
local CID=$1 TID=$2 OUT=$3
local TOKEN
TOKEN=$($RUNNER_TEMP/ci-token \
--app $RUNNER_TEMP/yao-test-app \
--client-id "$CID" \
--subject "${YAO_CI_OAUTH_SUBJECT:-ci-tai}" \
--user-id "${YAO_CI_OAUTH_USER_ID}" \
--team-id "${YAO_CI_OAUTH_TEAM_ID}" \
--scope "${YAO_CI_OAUTH_SCOPE:-tai:tunnel}" \
--ttl "${YAO_CI_OAUTH_TTL:-24h}" 2>/dev/null | tail -1 | tr -d '[:space:]')
local JSON="{\"client_id\":\"$CID\",\"tai_id\":\"$TID\",\"machine_id\":\"ci-runner\",\"server\":\"http://127.0.0.1:${YAO_CI_HTTP_PORT}\",\"yao_grpc_addr\":\"127.0.0.1:${YAO_CI_GRPC_PORT}\",\"access_token\":\"$TOKEN\",\"scope\":\"${YAO_CI_OAUTH_SCOPE}\",\"expires_at\":\"2099-01-01T00:00:00Z\",\"registered\":true}"
echo -n "$JSON" | base64 -w0 > "$OUT"
echo ""
echo "Credentials JSON (debug): $JSON" | head -c 200
echo "..."
echo "Generated credentials for $CID → $OUT"
}
gen_cred tai-ci-local tai-local-001 $RUNNER_TEMP/tai-local-credentials
gen_cred tai-ci-docker tai-docker-001 $RUNNER_TEMP/tai-docker-credentials
gen_cred tai-ci-k8s tai-k8s-001 $RUNNER_TEMP/tai-k8s-credentials
gen_cred tai-ci-hostexec tai-hostexec-001 $RUNNER_TEMP/tai-hostexec-credentials
# ==== Phase 5: Pull images & Setup K8s ====
- name: Pull test images
run: |
docker pull yaoapp/tai-sandbox-test:latest || true
docker pull yaoapp/tai:latest
docker pull alpine:latest
- name: Install k3d & create cluster
run: |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d cluster create tai-test --no-lb --wait --api-port ${YAO_CI_K3D_API_PORT}
kubectl wait --for=condition=Ready node --all --timeout=60s
k3d image import alpine:latest -c tai-test
- name: Generate kubeconfig
run: |
K3D_IP=$(docker inspect k3d-tai-test-server-0 | jq -r '.[0].NetworkSettings.Networks["k3d-tai-test"].IPAddress')
echo "k3d server IP: ${K3D_IP}"
k3d kubeconfig get tai-test > /tmp/kubeconfig-k3d.yml
# For tai-k8s container (uses k3d internal IP)
sed "s|server: .*|server: https://${K3D_IP}:6443|" /tmp/kubeconfig-k3d.yml \
> /tmp/kubeconfig-tai-k8s.yml
echo "Container kubeconfig server:"
grep server: /tmp/kubeconfig-tai-k8s.yml
# For test runner (uses localhost via k3d port-mapped API)
sed "s|server: .*|server: https://127.0.0.1:${YAO_CI_K3D_API_PORT}|" /tmp/kubeconfig-k3d.yml \
> $RUNNER_TEMP/kubeconfig-tai.yml
echo "Test runner kubeconfig server:"
grep server: $RUNNER_TEMP/kubeconfig-tai.yml
# Export for later steps
echo "TAI_TEST_KUBECONFIG=$RUNNER_TEMP/kubeconfig-tai.yml" >> $GITHUB_ENV
echo "YAO_CI_TAI_KUBECONFIG=$RUNNER_TEMP/kubeconfig-tai.yml" >> $GITHUB_ENV
# ==== Phase 6: Start Tai instances (host processes) ====
- name: Start tai-local (DIRECT mode, auto-detect Docker)
run: |
mkdir -p $RUNNER_TEMP/tai-local-data
TAI_CREDENTIALS=$RUNNER_TEMP/tai-local-credentials \
TAI_YAO_SERVER=http://127.0.0.1:${YAO_CI_HTTP_PORT} \
TAI_DATA_DIR=$RUNNER_TEMP/tai-local-data \
$RUNNER_TEMP/tai server \
--grpc 127.0.0.1:${YAO_CI_TAI_LOCAL_GRPC_PORT} \
--http 127.0.0.1:${YAO_CI_TAI_LOCAL_HTTP_PORT} \
--vnc 127.0.0.1:${YAO_CI_TAI_LOCAL_VNC_PORT} \
--docker 127.0.0.1:${YAO_CI_TAI_LOCAL_DOCKER_PORT} \
--direct \
--host-exec --host-exec-full-access \
--log-level debug &
echo $! > $RUNNER_TEMP/tai-local.pid
echo "tai-local PID: $(cat $RUNNER_TEMP/tai-local.pid)"
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:${YAO_CI_TAI_LOCAL_HTTP_PORT}/healthz > /dev/null 2>&1; then
echo "tai-local HTTP ready"
break
fi
echo "Waiting for tai-local HTTP... ($i/30)"
sleep 1
done
- name: Start tai-docker (TUNNEL mode, Docker API proxy)
run: |
mkdir -p $RUNNER_TEMP/tai-docker-data
TAI_CREDENTIALS=$RUNNER_TEMP/tai-docker-credentials \
TAI_YAO_SERVER=http://127.0.0.1:${YAO_CI_HTTP_PORT} \
TAI_DATA_DIR=$RUNNER_TEMP/tai-docker-data \
$RUNNER_TEMP/tai server \
--grpc 127.0.0.1:${YAO_CI_TAI_DOCKER_GRPC_PORT} \
--http 127.0.0.1:${YAO_CI_TAI_DOCKER_HTTP_PORT} \
--vnc 127.0.0.1:${YAO_CI_TAI_DOCKER_VNC_PORT} \
--docker 127.0.0.1:${YAO_CI_TAI_DOCKER_API_PORT} \
--host-exec --host-exec-full-access \
--log-level debug &
echo $! > $RUNNER_TEMP/tai-docker.pid
echo "tai-docker PID: $(cat $RUNNER_TEMP/tai-docker.pid)"
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:${YAO_CI_TAI_DOCKER_HTTP_PORT}/healthz > /dev/null 2>&1; then
echo "tai-docker HTTP ready"
break
fi
echo "Waiting for tai-docker HTTP... ($i/30)"
sleep 1
done
- name: Start tai-k8s (TUNNEL mode, K8s API proxy)
run: |
mkdir -p $RUNNER_TEMP/tai-k8s-data
TAI_CREDENTIALS=$RUNNER_TEMP/tai-k8s-credentials \
TAI_YAO_SERVER=http://127.0.0.1:${YAO_CI_HTTP_PORT} \
TAI_DATA_DIR=$RUNNER_TEMP/tai-k8s-data \
TAI_K8S_UPSTREAM="tcp://127.0.0.1:${YAO_CI_K3D_API_PORT}" \
TAI_KUBECONFIG=$RUNNER_TEMP/kubeconfig-tai.yml \
$RUNNER_TEMP/tai server \
--grpc 127.0.0.1:${YAO_CI_TAI_K8S_GRPC_PORT} \
--http 127.0.0.1:${YAO_CI_TAI_K8S_HTTP_PORT} \
--vnc 127.0.0.1:${YAO_CI_TAI_K8S_VNC_PORT} \
--k8s 127.0.0.1:${YAO_CI_TAI_K8S_API_PORT} \
--docker="" \
--host-exec --host-exec-full-access \
--log-level debug &
echo $! > $RUNNER_TEMP/tai-k8s.pid
echo "tai-k8s PID: $(cat $RUNNER_TEMP/tai-k8s.pid)"
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:${YAO_CI_TAI_K8S_HTTP_PORT}/healthz > /dev/null 2>&1; then
echo "tai-k8s HTTP ready"
break
fi
echo "Waiting for tai-k8s HTTP... ($i/30)"
sleep 1
done
- name: Start tai-hostexec (TUNNEL mode, HostExec only, no runtime)
run: |
mkdir -p $RUNNER_TEMP/tai-hostexec-data
TAI_CREDENTIALS=$RUNNER_TEMP/tai-hostexec-credentials \
TAI_YAO_SERVER=http://127.0.0.1:${YAO_CI_HTTP_PORT} \
TAI_DATA_DIR=$RUNNER_TEMP/tai-hostexec-data \
$RUNNER_TEMP/tai server \
--grpc 127.0.0.1:${YAO_CI_TAI_HOSTEXEC_GRPC_PORT} \
--http 127.0.0.1:${YAO_CI_TAI_HOSTEXEC_HTTP_PORT} \
--vnc 127.0.0.1:${YAO_CI_TAI_HOSTEXEC_VNC_PORT} \
--docker="" \
--host-exec --host-exec-full-access \
--log-level debug &
echo $! > $RUNNER_TEMP/tai-hostexec.pid
echo "tai-hostexec PID: $(cat $RUNNER_TEMP/tai-hostexec.pid)"
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:${YAO_CI_TAI_HOSTEXEC_HTTP_PORT}/healthz > /dev/null 2>&1; then
echo "tai-hostexec HTTP ready"
break
fi
echo "Waiting for tai-hostexec HTTP... ($i/30)"
sleep 1
done
# ==== Phase 7: Environment Verification (fail fast) ====
- name: Verify Environment
run: |
echo "CI Environment v${CI_VERSION}"
echo ""
FAILED=0
check() {
local name=$1; shift
if "$@" > /dev/null 2>&1; then
echo " [PASS] $name"
else
echo " [FAIL] $name"
FAILED=$((FAILED + 1))
fi
}
echo "=== Environment Verification ==="
# ── 1. Service Health ──
echo ""
echo "--- 1. Service Health ---"
echo "[Yao]"
check "Yao HTTP (/.well-known/yao)" curl -sf http://127.0.0.1:5099/.well-known/yao
check "Yao gRPC port" nc -z 127.0.0.1 9099
echo "[tai-local (DIRECT)]"
check "tai-local process alive" kill -0 $(cat $RUNNER_TEMP/tai-local.pid 2>/dev/null || echo 0)
check "tai-local HTTP (/healthz)" curl -sf http://127.0.0.1:${YAO_CI_TAI_LOCAL_HTTP_PORT}/healthz
check "tai-local gRPC reachable (direct)" nc -z 127.0.0.1 ${YAO_CI_TAI_LOCAL_GRPC_PORT}
echo "[tai-docker (TUNNEL)]"
check "tai-docker process alive" kill -0 $(cat $RUNNER_TEMP/tai-docker.pid 2>/dev/null || echo 0)
check "tai-docker HTTP (/healthz)" curl -sf http://127.0.0.1:${YAO_CI_TAI_DOCKER_HTTP_PORT}/healthz
check "tai-docker gRPC listener" nc -z 127.0.0.1 ${YAO_CI_TAI_DOCKER_GRPC_PORT}
echo "[tai-k8s (TUNNEL)]"
check "tai-k8s process alive" kill -0 $(cat $RUNNER_TEMP/tai-k8s.pid 2>/dev/null || echo 0)
check "tai-k8s HTTP (/healthz)" curl -sf http://127.0.0.1:${YAO_CI_TAI_K8S_HTTP_PORT}/healthz
check "tai-k8s gRPC listener" nc -z 127.0.0.1 ${YAO_CI_TAI_K8S_GRPC_PORT}
echo "[tai-hostexec (TUNNEL)]"
check "tai-hostexec process alive" kill -0 $(cat $RUNNER_TEMP/tai-hostexec.pid 2>/dev/null || echo 0)
check "tai-hostexec HTTP (/healthz)" curl -sf http://127.0.0.1:${YAO_CI_TAI_HOSTEXEC_HTTP_PORT}/healthz
check "tai-hostexec gRPC listener" nc -z 127.0.0.1 ${YAO_CI_TAI_HOSTEXEC_GRPC_PORT}
echo "[K8s (k3d via direct API)]"
check "kubectl get nodes (k3d direct)" kubectl --kubeconfig=$RUNNER_TEMP/kubeconfig-tai.yml get nodes
echo "[Data Stores]"
MONGO_CID=$(docker ps -qf "ancestor=mongo:6.0" | head -1)
check "MongoDB ping" docker exec "$MONGO_CID" mongosh --quiet \
-u ${MONGO_TEST_USER} -p ${MONGO_TEST_PASS} --authenticationDatabase admin \
--eval "db.runCommand({ping:1})"
check "MySQL ping" docker exec mysql mysqladmin ping -h 127.0.0.1 \
-u ${MYSQL_TEST_USER} -p${MYSQL_TEST_PASS}
PG_CID=$(docker ps -qf "ancestor=postgres:14" | head -1)
check "PostgreSQL ping" docker exec "$PG_CID" pg_isready -U ${PG_TEST_USER}
check "Redis ping" docker exec redis redis-cli ping
# ── 2. Network Topology ──
echo ""
echo "--- 2. Network Topology ---"
BRIDGE_IP=${YAO_CI_BRIDGE_IP}
echo "[Host network basics]"
check "docker0 bridge exists" ip addr show docker0
check "Bridge IP reachable (${BRIDGE_IP})" ping -c1 -W2 ${BRIDGE_IP}
check "Docker socket accessible" test -S /var/run/docker.sock
check "tai binary on runner" test -x $RUNNER_TEMP/tai
echo "[Yao endpoints (all Tai instances need these)]"
check "Yao HTTP :${YAO_CI_HTTP_PORT}" curl -sf http://127.0.0.1:${YAO_CI_HTTP_PORT}/.well-known/yao
check "Yao gRPC :${YAO_CI_GRPC_PORT}" nc -z 127.0.0.1 ${YAO_CI_GRPC_PORT}
echo "[DIRECT path: Yao → tai-local]"
check "Yao→tai-local gRPC :${YAO_CI_TAI_LOCAL_GRPC_PORT}" nc -z 127.0.0.1 ${YAO_CI_TAI_LOCAL_GRPC_PORT}
check "Yao→tai-local HTTP :${YAO_CI_TAI_LOCAL_HTTP_PORT}" curl -sf http://127.0.0.1:${YAO_CI_TAI_LOCAL_HTTP_PORT}/healthz
check "tai-local Docker API proxy :${YAO_CI_TAI_LOCAL_DOCKER_PORT}" nc -z 127.0.0.1 ${YAO_CI_TAI_LOCAL_DOCKER_PORT}
echo "[TUNNEL path: tai-docker → Yao gRPC (reverse tunnel)]"
check "tai-docker→Yao gRPC :${YAO_CI_GRPC_PORT}" nc -z 127.0.0.1 ${YAO_CI_GRPC_PORT}
check "tai-docker Docker API proxy :${YAO_CI_TAI_DOCKER_API_PORT}" nc -z 127.0.0.1 ${YAO_CI_TAI_DOCKER_API_PORT}
check "Docker API via proxy" bash -c "curl -sf http://127.0.0.1:${YAO_CI_TAI_DOCKER_API_PORT}/version | jq -r .ApiVersion"
echo "[TUNNEL path: tai-k8s → Yao gRPC (reverse tunnel)]"
check "tai-k8s→Yao gRPC :${YAO_CI_GRPC_PORT}" nc -z 127.0.0.1 ${YAO_CI_GRPC_PORT}
check "tai-k8s K8s API proxy :${YAO_CI_TAI_K8S_API_PORT}" nc -z 127.0.0.1 ${YAO_CI_TAI_K8S_API_PORT}
sed "s|server: .*|server: https://127.0.0.1:${YAO_CI_TAI_K8S_API_PORT}|" $RUNNER_TEMP/kubeconfig-tai.yml \
> $RUNNER_TEMP/kubeconfig-tai-proxy.yml
check "K8s API via tai-k8s proxy (kubectl)" kubectl --kubeconfig=$RUNNER_TEMP/kubeconfig-tai-proxy.yml --insecure-skip-tls-verify get nodes
echo "[TUNNEL path: tai-hostexec → Yao gRPC (reverse tunnel)]"
check "tai-hostexec→Yao gRPC :${YAO_CI_GRPC_PORT}" nc -z 127.0.0.1 ${YAO_CI_GRPC_PORT}
echo "[Data Store connectivity from runner]"
check "MongoDB :27017" nc -z 127.0.0.1 27017
check "Redis :6379" nc -z 127.0.0.1 6379
check "MySQL :${MYSQL_TEST_PORT}" nc -z 127.0.0.1 ${MYSQL_TEST_PORT}
check "PostgreSQL :${PG_TEST_PORT}" nc -z 127.0.0.1 ${PG_TEST_PORT}
# ── 3. Connection Mode Verification ──
echo ""
echo "--- 3. Connection Modes ---"
sleep 5
echo "[Credentials (4 tokens)]"
check "tai-local credentials exist" test -f $RUNNER_TEMP/tai-local-credentials
check "tai-docker credentials exist" test -f $RUNNER_TEMP/tai-docker-credentials
check "tai-k8s credentials exist" test -f $RUNNER_TEMP/tai-k8s-credentials
check "tai-hostexec credentials exist" test -f $RUNNER_TEMP/tai-hostexec-credentials
echo "[DIRECT: tai-local → Yao HTTP register → Yao dials tai-local gRPC]"
echo " tai-local registers via POST /tai-nodes/register"
echo " Yao dials back tai-local gRPC at 127.0.0.1:${YAO_CI_TAI_LOCAL_GRPC_PORT}"
echo "[TUNNEL: tai-docker → Yao gRPC :${YAO_CI_GRPC_PORT} (Register + Forward)]"
echo " Sandbox connects Yao gRPC → Forward stream → tai-docker :${YAO_CI_TAI_DOCKER_GRPC_PORT}"
echo "[TUNNEL: tai-k8s → Yao gRPC :${YAO_CI_GRPC_PORT} (Register + Forward)]"
echo " Sandbox connects Yao gRPC → Forward stream → tai-k8s :${YAO_CI_TAI_K8S_GRPC_PORT}"
echo "[TUNNEL: tai-hostexec → Yao gRPC :${YAO_CI_GRPC_PORT} (Register + Forward)]"
echo " HostExec only, no container runtime"
WELL_KNOWN=$(curl -sf http://127.0.0.1:5099/.well-known/yao 2>/dev/null || echo "{}")
echo ""
echo " Yao .well-known/yao:"
echo "$WELL_KNOWN" | jq . 2>/dev/null || echo " $WELL_KNOWN"
# ── 4. HostExec Readiness ──
echo ""
echo "--- 4. HostExec ---"
echo "[HostExec gRPC ports (all 4 instances)]"
check "HostExec tai-local (direct, auto-Docker)" nc -z 127.0.0.1 ${YAO_CI_TAI_LOCAL_GRPC_PORT}
check "HostExec tai-docker (tunnel, Docker proxy)" nc -z 127.0.0.1 ${YAO_CI_TAI_DOCKER_GRPC_PORT}
check "HostExec tai-k8s (tunnel, K8s proxy)" nc -z 127.0.0.1 ${YAO_CI_TAI_K8S_GRPC_PORT}
check "HostExec tai-hostexec (tunnel, no runtime)" nc -z 127.0.0.1 ${YAO_CI_TAI_HOSTEXEC_GRPC_PORT}
echo ""
echo "=========================================="
if [ $FAILED -gt 0 ]; then
echo "::error::$FAILED verification check(s) FAILED"
echo ""
echo "=== Diagnostic Info ==="
echo "--- Docker containers ---"
docker ps -a
echo ""
echo "--- Processes (yao + tai) ---"
ps aux | grep -E "yao|tai" | grep -v grep || true
echo ""
echo "--- Listening ports ---"
ss -tlnp | grep -E "5099|9099|19100|19101|19102|19103|8099|8100|8101|8102|12375|12376|16443|16444" || true
exit 1
else
echo "All verification checks PASSED"
fi
================================================
FILE: .github/workflows/unit-test.yml
================================================
name: Unit Test
on:
workflow_dispatch:
inputs:
tags:
description: "Version"
push:
branches: [main]
env:
YAO_DEV: ${{ github.WORKSPACE }}
YAO_ENV: development
YAO_ROOT: ${{ github.WORKSPACE }}/../app
YAO_HOST: 0.0.0.0
YAO_PORT: 5099
YAO_SESSION: "memory"
YAO_LOG: "./logs/application.log"
YAO_LOG_MODE: "TEXT"
YAO_JWT_SECRET: "bLp@bi!oqo-2U+hoTRUG"
YAO_DB_AESKEY: "ZLX=T&f6refeCh-ro*r@"
OSS_TEST_ID: ${{ secrets.OSS_TEST_ID}}
OSS_TEST_SECRET: ${{ secrets.OSS_TEST_SECRET}}
ROOT_PLUGIN: ${{ github.WORKSPACE }}/../../../data/gou-unit/plugins
REPO_KUN: ${{ github.repository_owner }}/kun
REPO_XUN: ${{ github.repository_owner }}/xun
REPO_GOU: ${{ github.repository_owner }}/gou
MYSQL_TEST_HOST: "127.0.0.1"
MYSQL_TEST_PORT: "3308"
MYSQL_TEST_USER: test
MYSQL_TEST_PASS: "123456"
SQLITE_DB: "./app/db/yao.db"
REDIS_TEST_HOST: "127.0.0.1"
REDIS_TEST_PORT: "6379"
REDIS_TEST_DB: "2"
MONGO_TEST_HOST: "127.0.0.1"
MONGO_TEST_PORT: "27017"
MONGO_TEST_USER: "root"
MONGO_TEST_PASS: "123456"
OPENAI_TEST_KEY: ${{ secrets.OPENAI_TEST_KEY }}
TEST_MOAPI_SECRET: ${{ secrets.OPENAI_TEST_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_TEST_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
TEST_MOAPI_MIRROR: https://api.openai.com
# DeepSeek API Configuration
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
DEEPSEEK_API_PROXY: ${{ secrets.DEEPSEEK_API_PROXY }}
DEEPSEEK_MODELS_R1: ${{ secrets.DEEPSEEK_MODELS_R1 }}
DEEPSEEK_MODELS_V3: ${{ secrets.DEEPSEEK_MODELS_V3 }}
DEEPSEEK_MODELS_V3_1: ${{ secrets.DEEPSEEK_MODELS_V3_1 }}
# Search API Configuration
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
SERPAPI_API_KEY: ${{ secrets.SERPAPI_API_KEY }}
SERPER_API_KEY: ${{ secrets.SERPER_API_KEY }}
# Claude API Configuration
CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
CLAUDE_PROXY: ${{ secrets.CLAUDE_PROXY }}
CLAUDE_API_HOST: ${{ secrets.CLAUDE_API_HOST }}
CLAUDE_SONNET_4: ${{ secrets.CLAUDE_SONNET_4 }}
CLAUDE_SONNET_4_THINKING: ${{ secrets.CLAUDE_SONNET_4_THINKING }}
# Moonshot / Kimi API Configuration
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
MOONSHOT_PROXY: "https://api.moonshot.cn"
KIMI_CODE_API_KEY: ${{ secrets.KIMI_CODE_API_KEY }}
KIMI_CODE_PROXY: "https://api.kimi.com/coding"
TAB_NAME: "::PET ADMIN"
PAGE_SIZE: "20"
PAGE_LINK: "https://yaoapps.com"
PAGE_ICON: "icon-trash"
DEMO_APP: ${{ github.WORKSPACE }}/../app
# Application Setting
## Path
YAO_EXTENSION_ROOT: ${{ github.WORKSPACE }}/../extension
YAO_TEST_APPLICATION: ${{ github.WORKSPACE }}/../app
YAO_SUI_TEST_APPLICATION: ${{ github.WORKSPACE }}/../yao-startup-webapp
## Runtime
YAO_RUNTIME_MIN: 3
YAO_RUNTIME_MAX: 6
YAO_RUNTIME_HEAP_LIMIT: 1500000000
YAO_RUNTIME_HEAP_RELEASE: 10000000
YAO_RUNTIME_HEAP_AVAILABLE: 550000000
YAO_RUNTIME_PRECOMPILE: true
# Neo4j
NEO4J_TEST_URL: "neo4j://localhost:7687"
NEO4J_TEST_USER: "neo4j"
NEO4J_TEST_PASS: "Yao2026Neo4j"
# Qdrant
QDRANT_TEST_HOST: "127.0.0.1"
QDRANT_TEST_PORT: "6334"
# S3
S3_API: ${{ secrets.S3_API }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_PUBLIC_URL: ${{ secrets.S3_PUBLIC_URL }}
# === Openapi Signin Configs ===
SIGNIN_CLIENT_ID: "kiCeR88kDwHBDuNHvN51cZgmpp3tmF6Z"
## Google
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
## Microsoft
MICROSOFT_CLIENT_ID: ${{ secrets.MICROSOFT_CLIENT_ID }}
MICROSOFT_CLIENT_SECRET: ${{ secrets.MICROSOFT_CLIENT_SECRET }}
## Apple
APPLE_SERVICE_ID: ${{ secrets.APPLE_SERVICE_ID }}
APPLE_PRIVATE_KEY_PATH: "apple/signin_client_secret_key.p8"
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
## Github
GITHUBUSER_CLIENT_ID: ${{ secrets.GITHUBUSER_CLIENT_ID }}
GITHUBUSER_CLIENT_SECRET: ${{ secrets.GITHUBUSER_CLIENT_SECRET }}
## Cloudflare Turnstile
CLOUDFLARE_TURNSTILE_SITEKEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SITEKEY }}
CLOUDFLARE_TURNSTILE_SECRET: ${{ secrets.CLOUDFLARE_TURNSTILE_SECRET }}
# === Messaging Services ===
## Mailgun
MAILGUN_DOMAIN: ${{ secrets.MAILGUN_DOMAIN }}
MAILGUN_API_KEY: ${{ secrets.MAILGUN_API_KEY }}
MAILGUN_FROM: "Yaobots Tests <unit-test@mailgun.yaobots.com>"
## SMTP Server( Mailgun )
SMTP_HOST: "smtp.mailgun.org"
SMTP_PORT: "465"
SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
SMTP_FROM: "Yaobots SMTP Tests <unit-test@mailgun.yaobots.com>"
## SMTP Server( Gmail )
RELIABLE_SMTP_HOST: "smtp.gmail.com"
RELIABLE_SMTP_PORT: "465"
RELIABLE_SMTP_USERNAME: ${{ secrets.RELIABLE_SMTP_USERNAME }}
RELIABLE_SMTP_PASSWORD: ${{ secrets.RELIABLE_SMTP_PASSWORD }}
RELIABLE_SMTP_FROM: "Yaobots Gmail Tests <shadow.iqka@gmail.com>"
## IMAP Server (Gmail)
RELIABLE_IMAP_HOST: "imap.gmail.com"
RELIABLE_IMAP_PORT: "993"
RELIABLE_IMAP_USERNAME: ${{ secrets.RELIABLE_SMTP_USERNAME }}
RELIABLE_IMAP_PASSWORD: ${{ secrets.RELIABLE_SMTP_PASSWORD }}
RELIABLE_IMAP_MAILBOX: "INBOX"
## Twilio
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
TWILIO_API_SID: ${{ secrets.TWILIO_API_SID }}
TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }}
TWILIO_SENDGRID_API_SID: ${{ secrets.TWILIO_SENDGRID_API_SID }}
TWILIO_SENDGRID_API_KEY: ${{ secrets.TWILIO_SENDGRID_API_KEY }}
TWILIO_FROM_PHONE: "+17035701412"
TWILIO_FROM_EMAIL: "unit-test@sendgrid.yaobots.com"
TWILIO_TEST_PHONE: ${{ secrets.TWILIO_TEST_PHONE }}
jobs:
# =============================================================================
# KB Tests (kb) - Run once with SQLite (requires Qdrant, Neo4j, FastEmbed)
# =============================================================================
kb-test:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
- 6334:6334
fastembed:
image: yaoapp/fastembed:latest-amd64
env:
FASTEMBED_PASSWORD: Yao@2026
ports:
- 6001:8000
neo4j:
image: neo4j:latest
ports:
- "7687:7687"
env:
NEO4J_AUTH: neo4j/Yao2026Neo4j
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Run KB Tests (kb)
run: make unit-test-kb
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# =============================================================================
# Agent Tests (agent, aigc) - Run once with SQLite
# =============================================================================
agent-test:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
- 6334:6334
fastembed:
image: yaoapp/fastembed:latest-amd64
env:
FASTEMBED_PASSWORD: Yao@2026
ports:
- 6001:8000
neo4j:
image: neo4j:latest
ports:
- "7687:7687"
env:
NEO4J_AUTH: neo4j/Yao2026Neo4j
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Install pdftoppm, mutool, imagemagick
run: |
sudo apt update
sudo apt install -y poppler-utils mupdf-tools imagemagick
- name: Test pdftoppm, mutool, imagemagick
run: |
pdftoppm -v
mutool -v
convert -version
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Pull Sandbox Test Images
run: |
docker pull alpine:latest
docker pull yaoapp/sandbox-base:latest || true
docker pull yaoapp/sandbox-claude:latest || true
- name: Run Agent Tests (agent, aigc)
env:
YAO_SANDBOX_WORKSPACE: ${{ runner.temp }}/sandbox/workspace
YAO_SANDBOX_IPC: ${{ runner.temp }}/sandbox/ipc
run: |
export YAO_SANDBOX_CONTAINER_USER="$(id -u):$(id -g)"
make unit-test-agent
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# =============================================================================
# Robot Tests (all agent/robot/... packages) - Unit + E2E with real LLM calls
# =============================================================================
robot-test:
runs-on: ubuntu-latest
services:
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Run Robot Tests (Unit + E2E)
run: make unit-test-robot
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# =============================================================================
# Sandbox Tests (requires Docker) - Run with Docker-in-Docker
# =============================================================================
sandbox-test:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Pull Sandbox Test Images
run: |
docker pull alpine:latest
docker pull yaoapp/sandbox-base:latest || true
docker pull yaoapp/sandbox-claude:latest || true
- name: Run Sandbox Tests
env:
YAO_SANDBOX_WORKSPACE: ${{ runner.temp }}/sandbox/workspace
YAO_SANDBOX_IPC: ${{ runner.temp }}/sandbox/ipc
run: |
# Use runner's UID:GID to match host permissions
export YAO_SANDBOX_CONTAINER_USER="$(id -u):$(id -g)"
make unit-test-sandbox
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# =============================================================================
# Sandbox V2 Tests (tai SDK + workspace, Docker + K8s via k3d)
# Full sandbox/v2 integration tests are run locally.
# =============================================================================
sandbox-v2-test:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Pull Test Images
run: |
docker pull yaoapp/tai-sandbox-test:latest || true
docker pull yaoapp/tai:latest
docker pull alpine:latest
- name: Install k3d
run: curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
- name: Create k3d cluster
run: |
k3d cluster create tai-test --no-lb --wait --api-port 16443
kubectl wait --for=condition=Ready node --all --timeout=60s
k3d image import alpine:latest -c tai-test
- name: Start Tai Docker instance
run: |
docker run -d --name tai-docker \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 19100:19100 -p 8099:8099 -p 12375:12375 -p 16080:16080 \
yaoapp/tai:latest server -direct \
-grpc 0.0.0.0:19100 -http 0.0.0.0:8099 -vnc 0.0.0.0:16080 -docker 0.0.0.0:12375
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:8099/healthz > /dev/null 2>&1; then
echo "Tai Docker HTTP ready"; break
fi
echo "Waiting for Tai Docker HTTP... ($i)"; sleep 1
done
curl -sf http://127.0.0.1:8099/healthz > /dev/null 2>&1 || {
echo "::error::Tai Docker HTTP failed"; docker logs tai-docker 2>&1; exit 1
}
for i in $(seq 1 15); do
if nc -z 127.0.0.1 19100 2>/dev/null; then
echo "Tai Docker gRPC ready"; break
fi
echo "Waiting for Tai Docker gRPC... ($i)"; sleep 1
done
nc -z 127.0.0.1 19100 2>/dev/null || {
echo "::error::Tai Docker gRPC failed"; docker logs tai-docker 2>&1; exit 1
}
- name: Generate kubeconfig for Tai K8s
run: |
K3D_IP=$(docker inspect k3d-tai-test-server-0 | jq -r '.[0].NetworkSettings.Networks["k3d-tai-test"].IPAddress')
echo "k3d server IP: ${K3D_IP}"
k3d kubeconfig get tai-test > /tmp/kubeconfig-k3d.yml
# Kubeconfig for tai-k8s container (uses k3d-internal IP)
sed "s|server: .*|server: https://${K3D_IP}:6443|" /tmp/kubeconfig-k3d.yml \
> /tmp/kubeconfig-tai-k8s.yml
echo "Container kubeconfig server:"
grep server: /tmp/kubeconfig-tai-k8s.yml
# Kubeconfig for test runner (uses localhost via port-mapped 6443)
sed 's|server: .*|server: https://127.0.0.1:6443|' /tmp/kubeconfig-k3d.yml \
> ${{ runner.temp }}/kubeconfig-tai.yml
echo "Test runner kubeconfig server:"
grep server: ${{ runner.temp }}/kubeconfig-tai.yml
- name: Start Tai K8s instance
run: |
K3D_IP=$(docker inspect k3d-tai-test-server-0 | jq -r '.[0].NetworkSettings.Networks["k3d-tai-test"].IPAddress')
echo "k3d server IP: ${K3D_IP}"
docker run -d --name tai-k8s \
--network k3d-tai-test \
-p 19101:19100 -p 8100:8099 -p 6443:16443 -p 16081:16080 \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /tmp/kubeconfig-tai-k8s.yml:/etc/tai/kubeconfig.yml:ro \
-e TAI_K8S_UPSTREAM="tcp://${K3D_IP}:6443" \
-e TAI_KUBECONFIG=/etc/tai/kubeconfig.yml \
yaoapp/tai:latest server -direct \
-grpc 0.0.0.0:19100 -http 0.0.0.0:8099 -vnc 0.0.0.0:16080 -k8s 0.0.0.0:16443
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:8100/healthz > /dev/null 2>&1; then
echo "Tai K8s HTTP ready"; break
fi
echo "Waiting for Tai K8s HTTP... ($i)"; sleep 1
done
curl -sf http://127.0.0.1:8100/healthz > /dev/null 2>&1 || {
echo "::error::Tai K8s HTTP failed"; docker logs tai-k8s 2>&1; exit 1
}
for i in $(seq 1 15); do
if nc -z 127.0.0.1 19101 2>/dev/null; then
echo "Tai K8s gRPC ready"; break
fi
echo "Waiting for Tai K8s gRPC... ($i)"; sleep 1
done
nc -z 127.0.0.1 19101 2>/dev/null || {
echo "::error::Tai K8s gRPC failed"; docker logs tai-k8s 2>&1; exit 1
}
- name: Run Sandbox V2 CI Tests (tai + workspace)
env:
TAI_TEST_HOST: "127.0.0.1"
TAI_TEST_DOCKER: "tcp://127.0.0.1:12375"
TAI_TEST_GRPC_PORT: "19100"
TAI_TEST_HTTP_PORT: "8099"
TAI_TEST_VNC_PORT: "16080"
TAI_TEST_DOCKER_PORT: "12375"
TAI_TEST_K8S_HOST: "127.0.0.1"
TAI_TEST_K8S_PORT: "6443"
TAI_TEST_K8S_GRPC_PORT: "19101"
TAI_TEST_KUBECONFIG: "${{ runner.temp }}/kubeconfig-tai.yml"
TAI_TEST_HOST_IP: "172.17.0.1"
SANDBOX_TEST_REMOTE_ADDR: "tai://127.0.0.1:19100"
SANDBOX_TEST_IMAGE: "yaoapp/tai-sandbox-test:latest"
run: make unit-test-sandbox-v2
- name: Codecov Report
if: always()
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
# =============================================================================
# Benchmark & Memory Leak Tests - Run with MySQL8.0 and SQLite3
# =============================================================================
perf-test:
runs-on: ubuntu-latest
services:
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
db: [MySQL8.0, SQLite3]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Install FFmpeg 7.x
run: |
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz
tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/
sudo chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe
- name: Test FFmpeg
run: ffmpeg -version
- name: Setup Go Tools
run: make tools
- name: Setup ${{ matrix.db }}
uses: ./.github/actions/setup-db
with:
kind: "${{ matrix.db }}"
db: "xiang"
user: "xiang"
password: ${{ secrets.UNIT_PASS }}
- name: Setup ENV
env:
PASSWORD: ${{ secrets.UNIT_PASS }}
run: |
echo "YAO_DB_DRIVER=$DB_DRIVER" >> $GITHUB_ENV
if [ "$DB_DRIVER" = "mysql" ]; then
echo "YAO_DB_PRIMARY=$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
else
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
mkdir -p ${{ github.WORKSPACE }}/../app/db
fi
- name: Run Benchmark & Memory Leak Tests
run: |
make benchmark
make memory-leak
# =============================================================================
# Core Tests - Run with DB matrix (MySQL/SQLite/Redis/Mongo combinations)
# =============================================================================
core-test:
runs-on: ubuntu-latest
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333 # HTTP API
- 6334:6334 # gRPC
fastembed:
image: yaoapp/fastembed:latest-amd64
env:
FASTEMBED_PASSWORD: Yao@2026
ports:
- 6001:8000
neo4j:
image: neo4j:latest
ports:
- "7687:7687"
env:
NEO4J_AUTH: neo4j/Yao2026Neo4j
mcp-everything:
image: yaoapp/mcp-everything:latest
ports:
- "3021:3021"
- "3022:3022"
strategy:
matrix:
go: ["1.25"]
db: [MySQL8.0, SQLite3]
redis: [4, 5, 6]
mongo: ["6.0"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file") # Get the directory where the ZIP file is located
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Yao Startup Webapp
uses: actions/checkout@v4
with:
repository: yaoapp/yao-startup-webapp
submodules: true
token: ${{ secrets.YAO_TEST_TOKEN }}
path: yao-startup-webapp
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Kun, Xun, Gou, V8Go, Extension
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
mv yao-startup-webapp ../
ls -l .
ls -l ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install FFmpeg 7.x
run: |
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz
tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/
sudo cp ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/
sudo chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe
- name: Test FFmpeg
run: ffmpeg -version
- name: Install pdftoppm, mutool, imagemagick
run: |
sudo apt update
sudo apt install -y poppler-utils mupdf-tools imagemagick
- name: Test pdftoppm, mutool, imagemagick
run: |
pdftoppm -v
mutool -v
convert -version
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:${{ matrix.redis }}
- name: Start MongoDB
run: |
docker run --name mongodb --publish 27017:27017 \
-e MONGO_INITDB_DATABASE=test \
-e MONGO_INITDB_ROOT_USERNAME=root \
-e MONGO_INITDB_ROOT_PASSWORD=123456 \
--detach mongo:${{ matrix.mongo }}
# Wait for MongoDB to be ready
for i in $(seq 1 20); do
if docker exec mongodb mongosh --quiet --port 27017 --username root --password 123456 --eval "db.serverStatus()" > /dev/null 2>&1; then
echo "MongoDB is ready"
break
fi
echo "Waiting for MongoDB... ($i)"
sleep 1
done
- name: Setup MySQL8.0 (connector)
uses: ./.github/actions/setup-db
with:
kind: "MySQL8.0"
db: "test"
user: "test"
password: "123456"
port: "3308"
- name: Setup ${{ matrix.db }}
uses: ./.github/actions/setup-db
with:
kind: "${{ matrix.db }}"
db: "xiang"
user: "xiang"
password: ${{ secrets.UNIT_PASS }}
- name: Setup Go Tools
run: |
make tools
- name: Setup ENV & Host
env:
PASSWORD: ${{ secrets.UNIT_PASS }}
run: |
sudo echo "127.0.0.1 local.iqka.com" | sudo tee -a /etc/hosts
echo "YAO_DB_DRIVER=$DB_DRIVER" >> $GITHUB_ENV
echo "GITHUB_WORKSPACE:\n" && ls -l $GITHUB_WORKSPACE
if [ "$DB_DRIVER" = "mysql" ]; then
echo "YAO_DB_PRIMARY=$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
elif [ "$DB_DRIVER" = "postgres" ]; then
echo "YAO_DB_PRIMARY=postgres://$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
else
echo "YAO_DB_PRIMARY=$YAO_ROOT/$DB_HOST" >> $GITHUB_ENV
fi
echo ".:\n" && ls -l .
echo "..:\n" && ls -l ..
echo "../app:\n" && ls -l ../app
ping -c 1 -t 1 local.iqka.com
- name: Test Prepare
run: |
make vet
make fmt-check
make misspell-check
- name: Inspect
run: |
go run . run utils.env.Get MONGO_TEST_HOST
go run . run utils.env.Get REDIS_TEST_HOST
go run . inspect
- name: Run Core Tests (exclude AI)
run: make unit-test-core
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# =============================================================================
# Registry Client SDK Tests (requires Yao Registry Docker service)
# =============================================================================
registry-test:
runs-on: ubuntu-latest
services:
yao-registry:
image: yaoapp/registry:latest
ports:
- "8080:8080"
env:
REGISTRY_INIT_USER: yaoagents
REGISTRY_INIT_PASS: yaoagents
strategy:
matrix:
go: ["1.25"]
steps:
- name: Wait for Registry
run: |
for i in $(seq 1 15); do
if curl -sf http://localhost:8080/.well-known/yao-registry > /dev/null 2>&1; then
echo "Registry is ready"
break
fi
echo "Waiting for registry... ($i)"
sleep 1
done
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Run Registry Client Tests
env:
YAO_REGISTRY_URL: http://localhost:8080
YAO_TEST_APPLICATION: ${{ github.workspace }}/../app
run: make unit-test-registry
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# =============================================================================
# gRPC Tests - Run once with SQLite (transport layer, no DB matrix needed)
# =============================================================================
grpc-test:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: ["1.25"]
steps:
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_KUN }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_XUN }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_GOU }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
run: |
files=$(find ./v8go -name "libv8*.zip")
for file in $files; do
dir=$(dirname "$file")
echo "Extracting $file to directory $dir"
unzip -o -d $dir $file
rm -rf $dir/__MACOSX
done
- name: Checkout Demo App
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Move Dependencies
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
mv app ../
mv extension ../
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Apple Private Key
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ secrets.APPLE_PRIVATE_KEY_USER }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Start Redis
run: docker run --name redis --publish 6379:6379 --detach redis:6
- name: Setup Go Tools
run: make tools
- name: Setup ENV (SQLite)
run: |
mkdir -p ${{ github.WORKSPACE }}/../app/db
echo "YAO_DB_DRIVER=sqlite3" >> $GITHUB_ENV
echo "YAO_DB_PRIMARY=${{ github.WORKSPACE }}/../app/db/yao.db" >> $GITHUB_ENV
- name: Run gRPC Tests
run: make unit-test-grpc
- name: Codecov Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
================================================
FILE: .gitignore
================================================
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
*.log
# Dependency directories (remove the comment below to include it)
# vendor/
.DS_Store
.env*
.tmp
dist
ui
^ui/index.html
tests/data/*
!tests/data/assets
debug.log
yao-test
dev.sh
logs
logs/application.log
yao-arm64
tests/db/yao.db
env.*.sh
xgen/v0.9/*
xgen/v1.0/*
!xgen/v0.9/index.html
!xgen/v1.0/index.html
!xgen/v1.0/umi.js
!xgen/v1.0/layouts__index.async.js
!pipe/ui
*-unit-test
docker/build/test
db
!agent/search/handlers/db
*.sh
data/bindata.go.bak
share/const.go.bak
share/const.goe
.cursor
openapi/*.md
coverage.html
agent/assistant/hook/*.test.md
agent/search/TODO.md
agent/search/job-logs.txt
agent/test/MULTI_TURN_DESIGN.md
agent/test/UPGRADE_PLAN.md
introduction/*
!sandbox/docker/build.sh
!sandbox/docker/vnc/*.sh
!sandbox/docker/desktop/config/*.sh
sandbox/docker/yao-bridge-*
sandbox/docker/claude-proxy-*
sandbox/docker/claude/claude-proxy-*
sandbox/proxy/claude-proxy-linux-*
release/*
sandbox/TODO-VNC.md
sandbox/docker/chrome/PLAN.md
sandbox/DESIGN-REMOTE.md
event/DESIGN.md
event/TODO.md
agent/robot/DESIGN-V2.md
tg-session.json
tg-login
tg-send
registry/data/
registry/manager/DESIGN*.md
tai/testdata/
agent/sandbox/docs/*.md
tai/docs/refactor-registration.md
================================================
FILE: COMMERCIAL_LICENSE.md
================================================
> **DEPRECATED**: This license is no longer in effect. Please refer to the [LICENSE](LICENSE) file for current licensing terms.
# Commercial License for Yao
This document outlines the terms for the commercial license of the **Yao** project. While the Yao project is primarily licensed under the **Apache License, Version 2.0**, certain commercial use cases require a separate commercial license.
## 1. Commercial License Requirements
The following use cases require a commercial license:
1. **Application Hosting Services**
If you use Yao, or any derivative product (such as a forked or modified version of Yao), to provide Yao-based application hosting services (e.g., Software-as-a-Service (SaaS) or Platform-as-a-Service (PaaS)) to users, you must obtain a commercial license. This restriction applies regardless of whether the original Yao code or a modified version is used to host and manage applications on behalf of third-party users for commercial purposes.
**In addition**, if you provide hosting services for applications that are built using Yao (even if they are customized or modified versions of Yao), a commercial license is required.
### Definition: Application Hosting Services
"Application Hosting Services" refers to any service that involves hosting Yao-based applications or web applications created with Yao (including modified versions of Yao) for third-party users. This includes, but is not limited to:
- **Hosting platforms** providing software or services built on top of Yao for third-party users.
- **SaaS or PaaS offerings** where you manage and host applications that are based on or utilize Yao, either in their original or modified form.
- **Managed hosting services** where Yao is used as the underlying technology for applications deployed for external clients.
In these cases, a commercial license is required, whether you are using the original Yao code or a fork/modified version.
2. **AI Web Application Generation Services**
If you provide services that generate AI-driven web applications using Yao, or any derivative product (such as a fork or modified version of Yao), to third-party users, you are required to purchase a commercial license.
### Definition: AI Web Application Generation Services
"AI Web Application Generation Services" refers to any service or functionality that utilizes Yao (or any forked or modified version of Yao) to automate the creation of web applications with AI capabilities. This includes, but is not limited to, providing third-party users with:
- **Automated web application development** driven by AI, where the service generates complete or partial web applications.
- **Customizable web solutions** that are powered by AI and built using Yao as the core technology.
- **On-demand application generation** for specific client needs, using Yao to dynamically build, configure, or deploy applications for users.
In these cases, whether Yao is directly used, forked, or modified, a commercial license is required to operate legally.
## 2. Use Under Apache License 2.0
For all other uses, the **Apache License, Version 2.0** applies. You are free to use, modify, and distribute the Yao project under the terms of Apache 2.0 as long as your usage does not fall within the restricted scenarios outlined above.
## 3. Obtaining a Commercial License
To inquire about or obtain a commercial license, please contact us at:
- **Email**: [friends@iqka.com]
- **Website**: [https://moapi.ai/contact]
Pricing and terms for commercial licenses vary based on usage scenarios, user scale, and other factors.
## 4. Compliance and Auditing
If you have any questions about whether your use case requires a commercial license, please contact us for clarification. We reserve the right to audit usage for compliance and enforce commercial licensing terms where necessary.
## 5. Disclaimer
Failure to comply with these licensing terms may result in a violation of the Yao licensing agreement and could lead to legal action.
---
**Note:** This commercial license is supplementary to the Apache 2.0 license and only applies in specific commercial scenarios outlined above.
================================================
FILE: COMMERCIAL_LICENSE.zh-CN.md
================================================
> **已废弃**: 本许可证已不再生效。请参考 [LICENSE](LICENSE) 文件获取当前的许可条款。
# Yao 商业许可证
本文件概述了 **Yao** 项目的商业许可证条款。虽然 Yao 项目主要使用 **Apache 许可证 2.0 版** 授权,但某些商业使用场景需要单独的商业许可证。
## 1. 商业许可证要求
以下使用场景需要商业许可证:
1. **应用托管服务**
如果您使用 Yao 或其衍生产品(如 Yao 的分支版本或修改版本)为用户提供基于 Yao 的应用托管服务(例如,软件即服务(SaaS)或平台即服务(PaaS)),您必须获得商业许可证。此限制适用于无论是否使用原始 Yao 代码或修改版 Yao 代码,托管和管理应用程序的行为只要是为第三方用户提供的商业目的。
**此外**,如果您提供的托管服务是为使用 Yao 构建的应用程序提供托管服务(即使它们是定制或修改版的 Yao),也需要获得商业许可证。
### 定义:应用托管服务
"应用托管服务"指任何涉及托管基于 Yao 的应用程序或使用 Yao 创建的 WEB 应用程序(包括 Yao 的修改版本)的服务,服务对象为第三方用户。包括但不限于:
- **托管平台** 提供基于 Yao 的软件或服务给第三方用户。
- **SaaS 或 PaaS 服务**,在这些服务中,您管理并托管基于或利用 Yao 的应用程序,可能是原版或修改版。
- **托管服务**,其中 Yao 被用作为客户外部部署应用程序的基础技术。
在这些情况下,无论是使用原始 Yao 代码还是修改版 Yao,都需要获得商业许可证。
2. **AI WEB 应用生成服务**
如果您提供利用 Yao 或其衍生产品(如 Yao 的分支版本或修改版本)为第三方用户生成 AI 驱动的 WEB 应用程序的服务,您需要购买商业许可证。
### 定义:AI WEB 应用生成服务
"AI WEB 应用生成服务"指任何利用 Yao(或任何分支版本或修改版本的 Yao)自动化创建具有 AI 功能的 WEB 应用程序的服务或功能。包括但不限于,为第三方用户提供以下服务:
- **AI 驱动的自动化 WEB 应用开发**,该服务生成完整或部分 WEB 应用程序。
- **可定制的 WEB 解决方案**,这些解决方案由 AI 提供支持,并以 Yao 作为核心技术构建。
- **按需应用生成**,根据特定客户需求,使用 Yao 动态构建、配置或部署应用程序。
在这些情况下,无论是直接使用 Yao,还是使用其分支或修改版,均需要获得商业许可证。
## 2. 使用 Apache 许可证 2.0
对于所有其他用途,**Apache 许可证 2.0 版** 适用。只要您的使用不属于上述限制的商业场景,您可以自由地根据 Apache 2.0 许可证使用、修改和分发 Yao 项目。
## 3. 获取商业许可证
如需咨询或获取商业许可证,请通过以下方式联系我们:
- **电子邮件**:[friends@iqka.com]
- **网站**:[https://moapi.ai/contact](https://moapi.ai/contact)
商业许可证的定价和条款会根据使用场景、用户规模及其他因素有所不同。
## 4. 合规与审计
如果您对您的使用场景是否需要商业许可证有任何疑问,请联系我们以获取澄清。我们保留审核使用情况以确保合规,并在必要时执行商业许可条款的权利。
## 5. 免责声明
未遵守这些许可条款可能会导致违反 Yao 许可证协议,并可能导致法律诉讼。
---
**注意:** 此商业许可证是 Apache 2.0 许可证的补充,仅适用于上述特定的商业场景。
================================================
FILE: LICENSE
================================================
# Open Source License
Yao App Engine is licensed under a modified version of the Apache License 2.0, with the following additional conditions:
1. Commercial Usage Terms:
Yao App Engine may be utilized commercially, A commercial license from the producer is required if:
a. Trademark and Branding Requirements
- The Yao App Engine console/application logo and copyright information must not be removed or modified
- Logo and copyright information can only be changed with an authorization certificate issued through Yao Developer Certificate
b. Authorization Verification Requirements
- The Yao certificate verification logic, processes, and related pages (marked in code comments) must be preserved
- The complete Yao certificate verification system must be maintained regardless of usage purpose
2. Contributor Agreement:
- The producer reserves the right to modify the open-source agreement terms
- Contributed code may be used for commercial purposes, including cloud business operations
All other rights and restrictions follow the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0).
© 2025 Infinite Wisdom Software.
================================================
FILE: Makefile
================================================
GO ?= go
GIT ?= git
GOFMT ?= gofmt "-s"
PACKAGES ?= $(shell $(GO) list ./...)
VETPACKAGES ?= $(shell $(GO) list ./... | grep -v /examples/)
GOFILES := $(shell find . -name "*.go")
VERSION := $(shell grep 'const VERSION =' share/const.go |awk '{print $$4}' |sed 's/\"//g')
COMMIT := $(shell git log | head -n 1 | awk '{print substr($$2, 0, 12)}')
NOW := $(shell date +"%FT%T%z")
OS := $(shell uname)
# ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TESTFOLDER := $(shell $(GO) list ./... | grep -vE 'examples|openai|aigc|neo|twilio|share*|registry|agent/sandbox/v2' | awk '!/\/tests\// || /openapi\/tests/' | grep -vE 'openapi/tests/(nodes|sandbox|workspace)')
# Core tests (exclude AI-related: agent, aigc, openai, KB, sandbox, registry, grpc, and integrations which require external services)
TESTFOLDER_CORE := $(shell $(GO) list ./... | grep -vE 'examples|openai|aigc|neo|twilio|share*|agent|kb|sandbox|integrations|registry|tai|grpc' | awk '!/\/tests\// || /openapi\/tests/' | grep -vE 'openapi/tests/(nodes|sandbox|workspace)')
# Agent tests (agent, aigc) - exclude agent/search/handlers/web (requires external API keys), robot packages (tested in robot job), and agent/sandbox/v2 (WIP, has its own job)
TESTFOLDER_AGENT := $(shell $(GO) list ./agent/... ./aigc/... | grep -vE 'agent/search/handlers/web|agent/robot/|agent/sandbox/v2')
# KB tests (kb)
TESTFOLDER_KB := $(shell $(GO) list ./kb/...)
# Robot tests (agent/robot/... packages, excluding events/integrations which require Telegram etc.)
TESTFOLDER_ROBOT := $(shell $(GO) list ./agent/robot/... | grep -vE 'agent/robot/events')
# Sandbox tests (requires Docker) — excludes sandbox/v2 (has its own job)
TESTFOLDER_SANDBOX := $(shell $(GO) list ./sandbox/... | grep -v 'sandbox/v2')
# Tai SDK tests (requires Tai container with Docker socket)
TESTFOLDER_TAI := $(shell $(GO) list ./tai/...)
# Workspace tests (requires Tai for remote mode)
TESTFOLDER_WORKSPACE := $(shell $(GO) list ./workspace/...)
# gRPC tests
TESTFOLDER_GRPC := $(shell $(GO) list ./grpc/...)
TESTTAGS ?= ""
# TESTWIDGETS := $(shell $(GO) list ./widgets/...)
# Unit Test (all tests)
.PHONY: unit-test
unit-test:
echo "mode: count" > coverage.out
for d in $(TESTFOLDER); do \
$(GO) test -tags $(TESTTAGS) -v -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") -skip='TestMemoryLeak|TestIsolateDisposal|TestLeak_|TestScenario_' $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
# Core Unit Test (exclude AI-related tests)
.PHONY: unit-test-core
unit-test-core:
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_CORE); do \
$(GO) test -tags $(TESTTAGS) -v -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") -skip='TestMemoryLeak|TestIsolateDisposal|TestLeak_|TestScenario_' $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
# Agent Unit Test (agent, aigc) - excludes robot packages (tested in unit-test-robot) and TestE2E*
.PHONY: unit-test-agent
unit-test-agent:
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_AGENT); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=50m -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") -skip='TestMemoryLeak|TestIsolateDisposal|TestE2E' $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
# KB Unit Test (kb)
.PHONY: unit-test-kb
unit-test-kb:
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_KB); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=20m -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") -skip='TestMemoryLeak|TestIsolateDisposal|TestSearchCleanup' $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
# Robot Test (all agent/robot/... packages) - runs ALL tests (unit + E2E) with real LLM calls
# These tests require: LLM API keys, database, and longer timeout
.PHONY: unit-test-robot
unit-test-robot:
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_ROBOT); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=50m -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") -skip='TestMemoryLeak|TestIsolateDisposal' $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
# Registry Client Test (requires Yao Registry service)
.PHONY: unit-test-registry
unit-test-registry:
echo "mode: count" > coverage.out
$(GO) test -v -p 1 -timeout=5m -covermode=count -coverprofile=profile.out ./registry/... > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi
# ---------------------------------------------------------------------------
# Sandbox V2 CI Test (tai SDK + workspace only)
# Full sandbox/v2 integration tests (multi-pool, K8s, etc.) are run locally.
# ---------------------------------------------------------------------------
.PHONY: unit-test-sandbox-v2
unit-test-sandbox-v2: unit-test-tai unit-test-workspace
@echo ""
@echo "============================================="
@echo "All Sandbox V2 CI tests passed (tai + workspace)"
@echo "============================================="
# Workspace Unit Test (requires Tai for remote mode)
.PHONY: unit-test-workspace
unit-test-workspace:
@echo ""
@echo "============================================="
@echo "Running Workspace Tests..."
@echo "============================================="
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_WORKSPACE); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=10m -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
@echo ""
@echo "============================================="
@echo "All workspace tests passed"
@echo "============================================="
# Sandbox Unit Test (requires Docker)
.PHONY: unit-test-sandbox
unit-test-sandbox:
@echo ""
@echo "============================================="
@echo "Running Sandbox Tests (requires Docker)..."
@echo "============================================="
@echo "Pulling sandbox test images..."
docker pull alpine:latest || true
docker pull yaoapp/sandbox-base:latest || true
docker pull yaoapp/sandbox-claude:latest || true
@echo ""
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_SANDBOX); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=10m -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") -skip='TestMemoryLeak|TestIsolateDisposal' $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
@echo ""
@echo "============================================="
@echo "✅ All sandbox tests passed"
@echo "============================================="
# Tai SDK Test (requires Tai container with Docker socket)
.PHONY: unit-test-tai
unit-test-tai:
@echo ""
@echo "============================================="
@echo "Running Tai SDK Tests (requires Tai container)..."
@echo "============================================="
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_TAI); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=5m -covermode=count -coverprofile=profile.out -coverpkg=$$(echo $$d | sed "s/\/test$$//g") $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "^panic:" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
@echo ""
@echo "============================================="
@echo "All Tai SDK tests passed"
@echo "============================================="
# Proto codegen
.PHONY: proto
proto:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
grpc/pb/yao.proto
# gRPC Unit Test
.PHONY: unit-test-grpc
unit-test-grpc:
echo "mode: count" > coverage.out
for d in $(TESTFOLDER_GRPC); do \
$(GO) test -tags $(TESTTAGS) -v -timeout=10m \
-covermode=count -coverprofile=profile.out \
-coverpkg=$$(echo $$d | sed "s/\/test$$//g") \
-skip='TestMemoryLeak|TestIsolateDisposal|TestLeak_|TestScenario_' \
$$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "runtime error" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \
done
# Benchmark Test
.PHONY: benchmark
benchmark:
@echo ""
@echo "============================================="
@echo "Running Benchmark Tests (agent, trace, event)..."
@echo "============================================="
@for d in $$($(GO) list ./agent/... ./trace/... ./event/...); do \
if $(GO) test -list=Benchmark $$d 2>/dev/null | grep -q "^Benchmark"; then \
echo ""; \
echo "📊 Benchmarking: $$d"; \
echo "---------------------------------------------"; \
$(GO) test -bench=. -benchmem -benchtime=100x -run='^$$' $$d || true; \
fi; \
done
@echo ""
@echo "============================================="
@echo "✅ All benchmarks completed"
@echo "============================================="
# Memory Leak Detection Test
.PHONY: memory-leak
memory-leak:
@echo ""
@echo "============================================="
@echo "Running Memory Leak Detection (agent, trace, event)..."
@echo "============================================="
@for d in $$($(GO) list ./agent/... ./trace/... ./event/...); do \
if $(GO) test -list='TestMemoryLeak|TestIsolateDisposal|TestGoroutineLeak|TestLeak_|TestScenario_' $$d 2>/dev/null | grep -qE "^Test(MemoryLeak|IsolateDisposal|GoroutineLeak|Leak_|Scenario_)"; then \
echo ""; \
echo "🔍 Memory Leak Detection: $$d"; \
echo "---------------------------------------------"; \
$(GO) test -run='TestMemoryLeak|TestIsolateDisposal|TestGoroutineLeak|TestLeak_|TestScenario_' -v -timeout=5m $$d || exit 1; \
fi; \
done
@echo ""
@echo "============================================="
@echo "✅ All memory leak tests passed"
@echo "============================================="
# Run all tests (unit + benchmark + memory leak)
.PHONY: test
test: unit-test benchmark memory-leak
.PHONY: fmt
fmt:
$(GOFMT) -w $(GOFILES)
.PHONY: fmt-check
fmt-check:
@diff=$$($(GOFMT) -d $(GOFILES)); \
if [ -n "$$diff" ]; then \
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
vet:
$(GO) vet $(VETPACKAGES)
.PHONY: lint
lint:
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u golang.org/x/lint/golint; \
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
.PHONY: misspell-check
misspell-check:
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -error $(GOFILES)
.PHONY: misspell
misspell:
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -w $(GOFILES)
.PHONY: tools
tools:
go install golang.org/x/lint/golint@latest; \
go install github.com/client9/misspell/cmd/misspell@latest; \
go install github.com/go-bindata/go-bindata/...@latest;
# make plugin
.PHONY: plugin
plugin:
rm -rf $(HOME)/data/gou-unit/plugins
rm -rf $(HOME)/data/gou-unit/logs
mkdir -p $(HOME)/data/gou-unit/plugins
mkdir -p $(HOME)/data/gou-unit/logs
GOOS=linux GOARCH=amd64 go build -o $(HOME)/data/gou-unit/plugins/user.so ./tests/plugins/user
chmod +x $(HOME)/data/gou-unit/plugins/user.so
ls -l $(HOME)/data/gou-unit/plugins
ls -l $(HOME)/data/gou-unit/logs
$(HOME)/data/gou-unit/plugins/user.so 2>&1 || true
# make plugin-mac
.PHONY: plugin-mac
plugin-mac:
rm -rf ./tests/plugins/user/dist
rm -rf ./tests/plugins/user.so
go build -o ./tests/plugins/user.so ./tests/plugins/user
chmod +x ./tests/plugins/user.so
# make pack
.PHONY: pack
pack: bindata fmt
.PHONY: bindata
bindata:
# Setup Workdir
rm -rf .tmp/data
rm -rf .tmp/yao-init
mkdir -p .tmp/data
# Checkout init
git clone https://github.com/YaoApp/yao-init.git .tmp/yao-init
rm -rf .tmp/yao-init/.git
rm -rf .tmp/yao-init/.gitignore
rm -rf .tmp/yao-init/LICENSE
# rm -rf .tmp/yao-init/README.md
# Copy Files
cp -r .tmp/yao-init .tmp/data/init
cp -r ui .tmp/data/
cp -r ui .tmp/data/public
cp -r cui .tmp/data/
cp -r yao .tmp/data/
cp -r sui/libsui .tmp/data/
find .tmp/data -name ".DS_Store" -type f -delete
go-bindata -fs -pkg data -o data/bindata.go -prefix ".tmp/data/" .tmp/data/...
rm -rf .tmp/data
rm -rf .tmp/yao-init
# make artifacts-linux
.PHONY: artifacts-linux
artifacts-linux: clean
mkdir -p dist/release
# Building CUI v1.0
export NODE_ENV=production
# rm -f ../cui-v1.0/pnpm-lock.yaml
echo "BASE=__yao_admin_root" > ../cui-v1.0/packages/cui/.env
cd ../cui-v1.0 && pnpm install --no-frozen-lockfile && pnpm run build
# Init Application
cd ../yao-init && rm -rf .git
cd ../yao-init && rm -rf .gitignore
cd ../yao-init && rm -rf LICENSE
# cd ../yao-init rm -rf README.md
# Switch .env login URLs from dev mode (__yao_admin_root) to release mode (dashboard)
sed -i.bak 's|AFTER_LOGIN_SUCCESS_URL="/__yao_admin_root/|# AFTER_LOGIN_SUCCESS_URL="/__yao_admin_root/|g' ../yao-init/.env
sed -i.bak 's|AFTER_LOGIN_FAILURE_URL="/__yao_admin_root/|# AFTER_LOGIN_FAILURE_URL="/__yao_admin_root/|g' ../yao-init/.env
sed -i.bak 's|# AFTER_LOGIN_SUCCESS_URL="/dashboard/|AFTER_LOGIN_SUCCESS_URL="/dashboard/|g' ../yao-init/.env
sed -i.bak 's|# AFTER_LOGIN_FAILURE_URL="/dashboard/|AFTER_LOGIN_FAILURE_URL="/dashboard/|g' ../yao-init/.env
rm -f ../yao-init/.env.bak
# Yao Builder
# Remove Yao Builder - DUI PageBuilder component will provide online design for pure HTML pages or SUI pages in the future.
# mkdir -p .tmp/data/builder
# curl -o .tmp/yao-builder-latest.tar.gz https://release-sv.yaoapps.com/archives/yao-builder-latest.tar.gz
# tar -zxvf .tmp/yao-builder-latest.tar.gz -C .tmp/data/builder
# rm -rf .tmp/yao-builder-latest.tar.gz
# Packing
# ** CUI will be renamed to CUI in the feature. and move to the new repository. **
# ** new repository: https://github.com/YaoApp/cui.git **
mkdir -p .tmp/data/cui
cp -r ./ui .tmp/data/ui
cp -r ../cui-v1.0/packages/cui/dist .tmp/data/cui/v1.0
cp -r ../yao-init .tmp/data/init
cp -r yao .tmp/data/
cp -r sui/libsui .tmp/data/
go-bindata -fs -pkg data -o data/bindata.go -prefix ".tmp/data/" .tmp/data/...
rm -rf .tmp/data
# Replace PRVERSION
sed -ie "s/const PRVERSION = \"DEV\"/const PRVERSION = \"${COMMIT}-${NOW}\"/g" share/const.go
@CUI_COMMIT=$$(cd ../cui-v1.0 && git log | head -n 1 | awk '{print substr($$2, 0, 12)}') && \
sed -ie "s/const PRCUI = \"DEV\"/const PRCUI = \"$$CUI_COMMIT-${NOW}\"/g" share/const.go
# Making artifacts - dev builds (full debug symbols, ~158M)
mkdir -p dist
CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=amd64 go build -v -o dist/yao-${VERSION}-linux-amd64
CGO_ENABLED=1 CGO_LDFLAGS="-static" LD_LIBRARY_PATH=/usr/lib/gcc-cross/aarch64-linux-gnu/13 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc-13 CXX=aarch64-linux-gnu-g++-13 go build -v -o dist/yao-${VERSION}-linux-arm64
# Making artifacts - prod builds (stripped, ~111M)
sed -i.tmp 's/const BUILDOPTIONS = ""/const BUILDOPTIONS = "-s -w (production, stripped)"/g' share/const.go && rm -f share/const.go.tmp
CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=amd64 go build -v -ldflags="-s -w" -o dist/yao-${VERSION}-linux-amd64-prod
CGO_ENABLED=1 CGO_LDFLAGS="-static" LD_LIBRARY_PATH=/usr/lib/gcc-cross/aarch64-linux-gnu/13 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc-13 CXX=aarch64-linux-gnu-g++-13 go build -v -ldflags="-s -w" -o dist/yao-${VERSION}-linux-arm64-prod
mkdir -p dist/release
mv dist/yao-*-* dist/release/
chmod +x dist/release/yao-*-*
ls -l dist/release/
dist/release/yao-${VERSION}-linux-amd64 version
# Reset const
# cp -f share/const.goe share/const.go
# rm -f share/const.goe
# make artifacts-macos
.PHONY: artifacts-macos
artifacts-macos: clean
mkdir -p dist/release
# Building CUI v1.0
export NODE_ENV=production
# rm -f ../cui-v1.0/pnpm-lock.yaml
echo "BASE=__yao_admin_root" > ../cui-v1.0/packages/cui/.env
cd ../cui-v1.0 && pnpm install --no-frozen-lockfile && pnpm run build
# Init Application
cd ../yao-init && rm -rf .git
cd ../yao-init && rm -rf .gitignore
cd ../yao-init && rm -rf LICENSE
# cd ../yao-init && rm -rf README.md
# Switch .env login URLs from dev mode (__yao_admin_root) to release mode (dashboard)
sed -i.bak 's|AFTER_LOGIN_SUCCESS_URL="/__yao_admin_root/|# AFTER_LOGIN_SUCCESS_URL="/__yao_admin_root/|g' ../yao-init/.env
sed -i.bak 's|AFTER_LOGIN_FAILURE_URL="/__yao_admin_root/|# AFTER_LOGIN_FAIL
gitextract_ug5_rm40/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── issue_report.md
│ ├── actions/
│ │ ├── setup-db/
│ │ │ ├── Dockerfile
│ │ │ └── action.yml
│ │ └── setup-yao/
│ │ └── action.yml
│ ├── codesign/
│ │ └── entitlements.plist
│ ├── env/
│ │ └── sandbox-v2.env
│ └── workflows/
│ ├── build-docker.yml
│ ├── build-linux.yml
│ ├── build-macos.yml
│ ├── notarize-macos.yml
│ ├── pr-receive.yml
│ ├── pr-test.yml
│ ├── release-linux.yml
│ ├── release-macos.yml
│ ├── release.yml
│ ├── unit-test-v1.yml
│ └── unit-test.yml
├── .gitignore
├── COMMERCIAL_LICENSE.md
├── COMMERCIAL_LICENSE.zh-CN.md
├── LICENSE
├── Makefile
├── README.md
├── README.zh-CN.md
├── agent/
│ ├── README.md
│ ├── agent_test.go
│ ├── assistant/
│ │ ├── agent.go
│ │ ├── agent_interrupt_test.go
│ │ ├── agent_next_test.go
│ │ ├── assistant.go
│ │ ├── build.go
│ │ ├── build_content.go
│ │ ├── build_mcp_test.go
│ │ ├── build_prompts_test.go
│ │ ├── build_test.go
│ │ ├── cache.go
│ │ ├── cache_test.go
│ │ ├── chat.go
│ │ ├── chat_test.go
│ │ ├── handlers/
│ │ │ └── stream.go
│ │ ├── history.go
│ │ ├── history_test.go
│ │ ├── hook/
│ │ │ ├── REALWORLD_PERFORMANCE_REPORT.md
│ │ │ ├── create.go
│ │ │ ├── create_bench_test.go
│ │ │ ├── create_mem_test.go
│ │ │ ├── create_nested_test.go
│ │ │ ├── create_test.go
│ │ │ ├── goroutine_leak_test.go
│ │ │ ├── hook.go
│ │ │ ├── next.go
│ │ │ ├── next_test.go
│ │ │ ├── realworld_next_test.go
│ │ │ ├── realworld_stress_test.go
│ │ │ ├── script.go
│ │ │ └── types.go
│ │ ├── llm.go
│ │ ├── load.go
│ │ ├── load_merge_test.go
│ │ ├── load_process_test.go
│ │ ├── load_store_test.go
│ │ ├── load_system.go
│ │ ├── load_test.go
│ │ ├── mcp.go
│ │ ├── mcp_test.go
│ │ ├── next.go
│ │ ├── permission.go
│ │ ├── sandbox.go
│ │ ├── sandbox_debug_test.go
│ │ ├── sandbox_e2e_test.go
│ │ ├── sandbox_integration_test.go
│ │ ├── sandbox_test.go
│ │ ├── sandbox_v2.go
│ │ ├── scripts.go
│ │ ├── scripts_process_test.go
│ │ ├── scripts_test.go
│ │ ├── search.go
│ │ ├── search_auth_db.go
│ │ ├── search_auth_integration_test.go
│ │ ├── search_auth_kb.go
│ │ ├── search_auto_disabled_test.go
│ │ ├── search_auto_full_test.go
│ │ ├── search_auto_hook_disable_test.go
│ │ ├── search_auto_keyword_test.go
│ │ ├── search_auto_web_test.go
│ │ ├── source.go
│ │ ├── trace.go
│ │ ├── types.go
│ │ └── utils.go
│ ├── caller/
│ │ ├── caller.go
│ │ ├── context.go
│ │ ├── integration_test.go
│ │ ├── jsapi.go
│ │ ├── jsapi_test.go
│ │ ├── orchestrator.go
│ │ ├── orchestrator_test.go
│ │ ├── process.go
│ │ ├── process_e2e_test.go
│ │ ├── process_test.go
│ │ ├── sandbox_integration_test.go
│ │ ├── types.go
│ │ └── types_test.go
│ ├── content/
│ │ ├── content.go
│ │ ├── docx/
│ │ │ ├── docx.go
│ │ │ └── docx_test.go
│ │ ├── image/
│ │ │ ├── image.go
│ │ │ └── image_test.go
│ │ ├── link/
│ │ │ └── link.go
│ │ ├── pdf/
│ │ │ ├── pdf.go
│ │ │ └── pdf_test.go
│ │ ├── pptx/
│ │ │ ├── pptx.go
│ │ │ └── pptx_test.go
│ │ ├── text/
│ │ │ ├── text.go
│ │ │ └── text_test.go
│ │ ├── tools/
│ │ │ └── tools.go
│ │ └── types/
│ │ └── types.go
│ ├── context/
│ │ ├── JSAPI.md
│ │ ├── RESOURCE_MANAGEMENT.md
│ │ ├── authorized_test.go
│ │ ├── buffer.go
│ │ ├── buffer_test.go
│ │ ├── chat.go
│ │ ├── chat_test.go
│ │ ├── context.go
│ │ ├── context_test.go
│ │ ├── grpc.go
│ │ ├── interfaces.go
│ │ ├── interrupt.go
│ │ ├── interrupt_test.go
│ │ ├── jsapi.go
│ │ ├── jsapi_agent.go
│ │ ├── jsapi_agent_test.go
│ │ ├── jsapi_agent_v8_test.go
│ │ ├── jsapi_computer.go
│ │ ├── jsapi_helpers.go
│ │ ├── jsapi_llm.go
│ │ ├── jsapi_llm_v8_test.go
│ │ ├── jsapi_mcp.go
│ │ ├── jsapi_mcp_test.go
│ │ ├── jsapi_mcp_v8_test.go
│ │ ├── jsapi_memory_test.go
│ │ ├── jsapi_output_test.go
│ │ ├── jsapi_release_test.go
│ │ ├── jsapi_sandbox.go
│ │ ├── jsapi_sandbox_test.go
│ │ ├── jsapi_search.go
│ │ ├── jsapi_search_test.go
│ │ ├── jsapi_stress_test.go
│ │ ├── jsapi_test.go
│ │ ├── jsapi_workspace.go
│ │ ├── log.go
│ │ ├── mcp.go
│ │ ├── mcp_test.go
│ │ ├── message.go
│ │ ├── message_events_test.go
│ │ ├── message_test.go
│ │ ├── openapi.go
│ │ ├── openapi_test.go
│ │ ├── options.go
│ │ ├── output.go
│ │ ├── stack.go
│ │ ├── stack_test.go
│ │ ├── types.go
│ │ ├── types_llm.go
│ │ └── utils.go
│ ├── docs/
│ │ ├── configuration.md
│ │ ├── context-api.md
│ │ ├── hooks.md
│ │ ├── i18n.md
│ │ ├── iframe.md
│ │ ├── mcp.md
│ │ ├── models.md
│ │ ├── pages.md
│ │ ├── prompts.md
│ │ ├── search.md
│ │ └── testing.md
│ ├── i18n/
│ │ ├── builtin.go
│ │ ├── i18n.go
│ │ └── i18n_test.go
│ ├── llm/
│ │ ├── adapters/
│ │ │ ├── adapter.go
│ │ │ ├── audio.go
│ │ │ ├── reasoning.go
│ │ │ ├── toolcall.go
│ │ │ └── vision.go
│ │ ├── capabilities.go
│ │ ├── interfaces.go
│ │ ├── jsapi.go
│ │ ├── jsapi_types.go
│ │ ├── llm.go
│ │ ├── process.go
│ │ └── providers/
│ │ ├── ANTHROPIC_PROVIDER_PROPOSAL.md
│ │ ├── README.md
│ │ ├── anthropic/
│ │ │ ├── anthropic.go
│ │ │ ├── anthropic_test.go
│ │ │ └── types.go
│ │ ├── base/
│ │ │ └── base.go
│ │ ├── factory.go
│ │ └── openai/
│ │ ├── claude_test.go
│ │ ├── deepseek_r1_test.go
│ │ ├── deepseek_v3_test.go
│ │ ├── gpt5_test.go
│ │ ├── openai.go
│ │ ├── openai_test.go
│ │ ├── temperature_test.go
│ │ └── types.go
│ ├── load.go
│ ├── load_test.go
│ ├── memory/
│ │ ├── interfaces.go
│ │ ├── manager.go
│ │ ├── memory.go
│ │ ├── memory_test.go
│ │ ├── namespace.go
│ │ └── types.go
│ ├── output/
│ │ ├── BUILTIN_TYPES.md
│ │ ├── README.md
│ │ ├── adapters/
│ │ │ ├── cui/
│ │ │ │ ├── adapter.go
│ │ │ │ └── writer.go
│ │ │ └── openai/
│ │ │ ├── README.md
│ │ │ ├── adapter.go
│ │ │ ├── converter.go
│ │ │ ├── types.go
│ │ │ └── writer.go
│ │ ├── builtin.go
│ │ ├── jsapi/
│ │ │ ├── README.md
│ │ │ ├── output.go
│ │ │ └── output_test.go
│ │ ├── message/
│ │ │ ├── STREAMING.md
│ │ │ ├── interfaces.go
│ │ │ ├── types.go
│ │ │ ├── utils.go
│ │ │ └── utils_test.go
│ │ ├── output.go
│ │ ├── safe_writer.go
│ │ └── safe_writer_test.go
│ ├── robot/
│ │ ├── DESIGN-V2-REVIEW-FINDINGS.md
│ │ ├── DESIGN.md
│ │ ├── TECHNICAL.md
│ │ ├── TODO.md
│ │ ├── V2-IMPROVEMENTS.md
│ │ ├── api/
│ │ │ ├── README.md
│ │ │ ├── activities.go
│ │ │ ├── api_test.go
│ │ │ ├── e2e_clock_test.go
│ │ │ ├── e2e_concurrent_test.go
│ │ │ ├── e2e_control_test.go
│ │ │ ├── e2e_event_test.go
│ │ │ ├── e2e_human_test.go
│ │ │ ├── e2e_interact_test.go
│ │ │ ├── e2e_suspend_test.go
│ │ │ ├── execution.go
│ │ │ ├── execution_test.go
│ │ │ ├── interact.go
│ │ │ ├── interact_test.go
│ │ │ ├── lifecycle.go
│ │ │ ├── lifecycle_test.go
│ │ │ ├── results.go
│ │ │ ├── robot.go
│ │ │ ├── robot_test.go
│ │ │ ├── trigger.go
│ │ │ ├── trigger_test.go
│ │ │ └── types.go
│ │ ├── cache/
│ │ │ ├── cache.go
│ │ │ ├── cache_test.go
│ │ │ ├── load.go
│ │ │ └── refresh.go
│ │ ├── dedup/
│ │ │ └── dedup.go
│ │ ├── events/
│ │ │ ├── delivery.go
│ │ │ ├── event_push_test.go
│ │ │ ├── events.go
│ │ │ ├── events_test.go
│ │ │ ├── handlers.go
│ │ │ ├── handlers_test.go
│ │ │ ├── integrations/
│ │ │ │ ├── dingtalk/
│ │ │ │ │ ├── dedup.go
│ │ │ │ │ ├── dingtalk.go
│ │ │ │ │ ├── e2e_test.go
│ │ │ │ │ ├── message.go
│ │ │ │ │ ├── reply.go
│ │ │ │ │ └── stream.go
│ │ │ │ ├── discord/
│ │ │ │ │ ├── dedup.go
│ │ │ │ │ ├── discord.go
│ │ │ │ │ ├── e2e_test.go
│ │ │ │ │ ├── gateway.go
│ │ │ │ │ ├── message.go
│ │ │ │ │ └── reply.go
│ │ │ │ ├── dispatcher.go
│ │ │ │ ├── dispatcher_test.go
│ │ │ │ ├── feishu/
│ │ │ │ │ ├── dedup.go
│ │ │ │ │ ├── e2e_test.go
│ │ │ │ │ ├── feishu.go
│ │ │ │ │ ├── message.go
│ │ │ │ │ ├── reply.go
│ │ │ │ │ └── stream.go
│ │ │ │ └── telegram/
│ │ │ │ ├── dedup.go
│ │ │ │ ├── e2e_test.go
│ │ │ │ ├── message.go
│ │ │ │ ├── polling.go
│ │ │ │ ├── reply.go
│ │ │ │ ├── telegram.go
│ │ │ │ └── webhook.go
│ │ │ ├── log.go
│ │ │ └── message.go
│ │ ├── executor/
│ │ │ ├── README.md
│ │ │ ├── dryrun/
│ │ │ │ └── executor.go
│ │ │ ├── executor.go
│ │ │ ├── executor_test.go
│ │ │ ├── sandbox/
│ │ │ │ └── executor.go
│ │ │ ├── standard/
│ │ │ │ ├── agent.go
│ │ │ │ ├── agent_stream_test.go
│ │ │ │ ├── agent_test.go
│ │ │ │ ├── delivery.go
│ │ │ │ ├── delivery_test.go
│ │ │ │ ├── executor.go
│ │ │ │ ├── executor_test.go
│ │ │ │ ├── goals.go
│ │ │ │ ├── goals_test.go
│ │ │ │ ├── host.go
│ │ │ │ ├── host_test.go
│ │ │ │ ├── input.go
│ │ │ │ ├── input_integration_test.go
│ │ │ │ ├── input_test.go
│ │ │ │ ├── inspiration.go
│ │ │ │ ├── inspiration_test.go
│ │ │ │ ├── learning.go
│ │ │ │ ├── log.go
│ │ │ │ ├── resume_test.go
│ │ │ │ ├── run.go
│ │ │ │ ├── run_test.go
│ │ │ │ ├── runner.go
│ │ │ │ ├── runner_test.go
│ │ │ │ ├── suspend_resume_test.go
│ │ │ │ ├── suspend_test.go
│ │ │ │ ├── tasks.go
│ │ │ │ ├── tasks_test.go
│ │ │ │ ├── ui_fields_test.go
│ │ │ │ ├── validator.go
│ │ │ │ └── validator_test.go
│ │ │ └── types/
│ │ │ ├── helpers.go
│ │ │ └── types.go
│ │ ├── logger/
│ │ │ └── logger.go
│ │ ├── manager/
│ │ │ ├── integration_clock_test.go
│ │ │ ├── integration_concurrent_test.go
│ │ │ ├── integration_control_test.go
│ │ │ ├── integration_event_test.go
│ │ │ ├── integration_human_test.go
│ │ │ ├── integration_test.go
│ │ │ ├── interact.go
│ │ │ ├── interact_helpers_test.go
│ │ │ ├── interact_test.go
│ │ │ ├── manager.go
│ │ │ └── manager_test.go
│ │ ├── plan/
│ │ │ └── plan.go
│ │ ├── pool/
│ │ │ ├── goroutine_test.go
│ │ │ ├── pool.go
│ │ │ ├── pool_test.go
│ │ │ ├── queue.go
│ │ │ ├── queue_test.go
│ │ │ ├── worker.go
│ │ │ └── worker_test.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── robot.go
│ │ ├── store/
│ │ │ ├── execution.go
│ │ │ ├── execution_test.go
│ │ │ ├── robot.go
│ │ │ ├── robot_test.go
│ │ │ └── store.go
│ │ ├── trigger/
│ │ │ ├── clock.go
│ │ │ ├── clock_test.go
│ │ │ ├── control.go
│ │ │ ├── control_test.go
│ │ │ ├── trigger.go
│ │ │ └── trigger_test.go
│ │ ├── types/
│ │ │ ├── clock.go
│ │ │ ├── clock_test.go
│ │ │ ├── config.go
│ │ │ ├── config_global.go
│ │ │ ├── config_test.go
│ │ │ ├── context.go
│ │ │ ├── enums.go
│ │ │ ├── enums_test.go
│ │ │ ├── errors.go
│ │ │ ├── host.go
│ │ │ ├── host_test.go
│ │ │ ├── inspiration.go
│ │ │ ├── interfaces.go
│ │ │ ├── request.go
│ │ │ ├── robot.go
│ │ │ └── robot_test.go
│ │ └── utils/
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── id.go
│ │ ├── time.go
│ │ ├── utils_test.go
│ │ └── validate.go
│ ├── sandbox/
│ │ ├── DESIGN.md
│ │ ├── PLAN.md
│ │ ├── claude/
│ │ │ ├── attachments_test.go
│ │ │ ├── command.go
│ │ │ ├── command_test.go
│ │ │ ├── e2e_test.go
│ │ │ ├── executor.go
│ │ │ ├── executor_test.go
│ │ │ ├── real_e2e_test.go
│ │ │ └── types.go
│ │ ├── cursor/
│ │ │ └── README.md
│ │ ├── executor.go
│ │ ├── executor_test.go
│ │ ├── integration_test.go
│ │ ├── types.go
│ │ ├── types_test.go
│ │ └── v2/
│ │ ├── claude/
│ │ │ ├── attachments.go
│ │ │ ├── oscompat.go
│ │ │ ├── parse.go
│ │ │ ├── runner.go
│ │ │ ├── runner_test.go
│ │ │ └── testdata/
│ │ │ └── code.ts
│ │ ├── init.go
│ │ ├── lifecycle.go
│ │ ├── lifecycle_test.go
│ │ ├── options.go
│ │ ├── prepare.go
│ │ ├── prepare_test.go
│ │ ├── runner.go
│ │ ├── shell.go
│ │ ├── stream.go
│ │ ├── testutils/
│ │ │ └── testutils.go
│ │ ├── testutils_remote_test.go
│ │ ├── testutils_test.go
│ │ ├── testutils_wintest_test.go
│ │ ├── token.go
│ │ ├── types/
│ │ │ ├── config.go
│ │ │ ├── runner.go
│ │ │ └── token.go
│ │ └── yao/
│ │ ├── runner.go
│ │ └── runner_test.go
│ ├── search/
│ │ ├── DESIGN.md
│ │ ├── citation.go
│ │ ├── citation_test.go
│ │ ├── defaults/
│ │ │ └── defaults.go
│ │ ├── handlers/
│ │ │ ├── db/
│ │ │ │ ├── handler.go
│ │ │ │ ├── handler_integration_test.go
│ │ │ │ └── handler_test.go
│ │ │ ├── kb/
│ │ │ │ ├── handler.go
│ │ │ │ └── handler_test.go
│ │ │ └── web/
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── handler.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── serpapi.go
│ │ │ ├── serpapi_test.go
│ │ │ ├── serper.go
│ │ │ ├── serper_test.go
│ │ │ ├── tavily.go
│ │ │ └── tavily_test.go
│ │ ├── interfaces/
│ │ │ ├── handler.go
│ │ │ ├── nlp.go
│ │ │ ├── reranker.go
│ │ │ └── searcher.go
│ │ ├── jsapi.go
│ │ ├── jsapi_db_test.go
│ │ ├── jsapi_test.go
│ │ ├── nlp/
│ │ │ ├── keyword/
│ │ │ │ ├── agent.go
│ │ │ │ ├── agent_test.go
│ │ │ │ ├── extractor.go
│ │ │ │ ├── extractor_test.go
│ │ │ │ ├── mcp.go
│ │ │ │ └── mcp_test.go
│ │ │ └── querydsl/
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── generator.go
│ │ │ ├── generator_test.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ └── types.go
│ │ ├── reference.go
│ │ ├── reference_test.go
│ │ ├── registry.go
│ │ ├── registry_test.go
│ │ ├── rerank/
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── builtin.go
│ │ │ ├── builtin_test.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── reranker.go
│ │ │ └── reranker_test.go
│ │ ├── search.go
│ │ ├── search_test.go
│ │ ├── search_web_test.go
│ │ └── types/
│ │ ├── config.go
│ │ ├── graph.go
│ │ ├── reference.go
│ │ └── types.go
│ ├── store/
│ │ ├── CHAT_STORAGE_DESIGN.md
│ │ ├── README.md
│ │ ├── mongo/
│ │ │ └── mongo.go
│ │ ├── redis/
│ │ │ └── redis.go
│ │ ├── types/
│ │ │ ├── convert.go
│ │ │ ├── convert_test.go
│ │ │ ├── fields.go
│ │ │ ├── fields_test.go
│ │ │ ├── mcp_test.go
│ │ │ ├── prompt.go
│ │ │ ├── prompt_test.go
│ │ │ ├── sandbox_v2.go
│ │ │ ├── store.go
│ │ │ └── types.go
│ │ └── xun/
│ │ ├── assistant.go
│ │ ├── assistant_test.go
│ │ ├── chat.go
│ │ ├── chat_test.go
│ │ ├── message.go
│ │ ├── message_test.go
│ │ ├── resume.go
│ │ ├── resume_test.go
│ │ ├── search.go
│ │ ├── search_test.go
│ │ ├── utils.go
│ │ ├── utils_test.go
│ │ └── xun.go
│ ├── test/
│ │ ├── DESIGN.md
│ │ ├── DESIGN_V2.md
│ │ ├── README.md
│ │ ├── assert.go
│ │ ├── assert_agent_test.go
│ │ ├── assert_test.go
│ │ ├── context.go
│ │ ├── dynamic_integration_test.go
│ │ ├── dynamic_runner.go
│ │ ├── dynamic_runner_test.go
│ │ ├── dynamic_types.go
│ │ ├── extract.go
│ │ ├── input.go
│ │ ├── input_source.go
│ │ ├── input_source_test.go
│ │ ├── input_test.go
│ │ ├── interfaces.go
│ │ ├── loader.go
│ │ ├── output.go
│ │ ├── reporter.go
│ │ ├── resolver.go
│ │ ├── runner.go
│ │ ├── runner_integration_test.go
│ │ ├── script.go
│ │ ├── script_assert.go
│ │ ├── script_hooks.go
│ │ ├── script_hooks_test.go
│ │ ├── script_types.go
│ │ └── types.go
│ ├── testutils/
│ │ └── testutils.go
│ └── types/
│ ├── dsl.go
│ └── types.go
├── aigc/
│ ├── aigc.go
│ ├── aigc_test.go
│ ├── load.go
│ ├── load_test.go
│ ├── process.go
│ ├── process_test.go
│ └── types.go
├── api/
│ ├── README.md
│ ├── api.go
│ └── api_test.go
├── assert/
│ ├── asserter.go
│ ├── asserter_test.go
│ ├── helpers.go
│ └── types.go
├── attachment/
│ ├── README.md
│ ├── compresses.go
│ ├── convert.go
│ ├── example_usage.go
│ ├── fileheader.go
│ ├── gzip.go
│ ├── load.go
│ ├── load_test.go
│ ├── local/
│ │ ├── storage.go
│ │ └── storage_test.go
│ ├── manager.go
│ ├── manager_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── s3/
│ │ ├── storage.go
│ │ └── storage_test.go
│ └── types.go
├── audit/
│ └── README.md
├── bin/
│ └── yao-dev
├── cert/
│ ├── cert.go
│ └── cert_test.go
├── cmd/
│ ├── README.md
│ ├── agent/
│ │ ├── add.go
│ │ ├── agent.go
│ │ ├── extract.go
│ │ ├── fork.go
│ │ ├── push.go
│ │ ├── test.go
│ │ └── update.go
│ ├── ci-token/
│ │ └── main.go
│ ├── credential.go
│ ├── dump.go
│ ├── get/
│ │ ├── get.go
│ │ └── get_test.go
│ ├── get.go
│ ├── help.go
│ ├── init.go
│ ├── inspect.go
│ ├── login.go
│ ├── logout.go
│ ├── mcp/
│ │ ├── add.go
│ │ ├── fork.go
│ │ ├── mcp.go
│ │ ├── push.go
│ │ └── update.go
│ ├── migrate.go
│ ├── pack.go
│ ├── restore.go
│ ├── robot/
│ │ ├── add.go
│ │ └── robot.go
│ ├── root.go
│ ├── run.go
│ ├── socket.go
│ ├── start.go
│ ├── sui/
│ │ ├── build.go
│ │ ├── sui.go
│ │ ├── trans.go
│ │ ├── utils.go
│ │ └── watch.go
│ ├── tea.go
│ ├── upgrade.go
│ ├── version.go
│ └── websocket.go
├── config/
│ ├── config.go
│ ├── config_test.go
│ └── types.go
├── connector/
│ ├── connector.go
│ └── connector_test.go
├── crypto/
│ ├── aes.go
│ ├── aes_test.go
│ ├── crypto.go
│ ├── crypto_test.go
│ └── process.go
├── cui/
│ ├── setup/
│ │ └── index.html
│ ├── v0.9/
│ │ └── index.html
│ └── v1.0/
│ ├── index.html
│ ├── layouts__index.async.js
│ └── umi.js
├── data/
│ ├── bindata.go
│ ├── data.go
│ └── data_test.go
├── docker/
│ ├── build/
│ │ └── Dockerfile
│ ├── development/
│ │ └── Dockerfile
│ └── production/
│ └── Dockerfile
├── docs/
│ └── README.md
├── dsl/
│ ├── api/
│ │ └── api.go
│ ├── connector/
│ │ ├── cases_test.go
│ │ ├── connector.go
│ │ └── connector_test.go
│ ├── dsl.go
│ ├── dsl_test.go
│ ├── io/
│ │ ├── cases_test.go
│ │ ├── db.go
│ │ ├── db_test.go
│ │ ├── fs.go
│ │ ├── fs_test.go
│ │ └── utils.go
│ ├── mcp/
│ │ ├── cases_test.go
│ │ ├── client.go
│ │ ├── client_test.go
│ │ └── server.go
│ ├── model/
│ │ ├── cases_test.go
│ │ ├── model.go
│ │ └── model_test.go
│ └── types/
│ ├── interfaces.go
│ ├── types.go
│ ├── utils.go
│ └── utils_test.go
├── engine/
│ ├── load.go
│ ├── load_test.go
│ ├── machine.go
│ ├── machine_darwin.go
│ ├── machine_linux.go
│ ├── machine_test.go
│ ├── machine_windows.go
│ ├── process.go
│ └── process_test.go
├── event/
│ ├── README.md
│ ├── bench_test.go
│ ├── bus.go
│ ├── bus_test.go
│ ├── leak_test.go
│ ├── listener.go
│ ├── listener_test.go
│ ├── option.go
│ ├── queue.go
│ ├── queue_test.go
│ ├── service.go
│ ├── service_test.go
│ ├── sub.go
│ ├── sub_test.go
│ ├── types/
│ │ ├── interfaces.go
│ │ ├── types.go
│ │ └── types_test.go
│ ├── worker.go
│ └── worker_test.go
├── excel/
│ ├── README.md
│ ├── each.go
│ ├── each_test.go
│ ├── excel.go
│ ├── excel_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── sheet.go
│ ├── sheet_test.go
│ ├── write.go
│ └── write_test.go
├── flow/
│ ├── README.md
│ ├── flow.go
│ └── flow_test.go
├── fs/
│ ├── fs.go
│ └── fs_test.go
├── go.mod
├── go.sum
├── grpc/
│ ├── DESIGN.md
│ ├── IMPL.md
│ ├── TEST.md
│ ├── agent/
│ │ ├── agent.go
│ │ └── agent_test.go
│ ├── api/
│ │ ├── api.go
│ │ └── api_test.go
│ ├── auth/
│ │ ├── endpoint.go
│ │ ├── endpoint_test.go
│ │ ├── guard.go
│ │ ├── guard_test.go
│ │ └── scope.go
│ ├── client/
│ │ ├── client.go
│ │ └── token.go
│ ├── grpc.go
│ ├── health/
│ │ ├── health.go
│ │ └── health_test.go
│ ├── llm/
│ │ ├── llm.go
│ │ └── llm_test.go
│ ├── mcp/
│ │ ├── mcp.go
│ │ └── mcp_test.go
│ ├── pb/
│ │ ├── yao.pb.go
│ │ ├── yao.proto
│ │ └── yao_grpc.pb.go
│ ├── run/
│ │ ├── run.go
│ │ └── run_test.go
│ ├── sandbox/
│ │ ├── heartbeat.go
│ │ └── heartbeat_test.go
│ ├── shell/
│ │ ├── shell.go
│ │ └── shell_test.go
│ └── tests/
│ └── testutils/
│ └── testutils.go
├── helper/
│ ├── array.go
│ ├── array.process.go
│ ├── array_test.go
│ ├── captcha.go
│ ├── captcha_test.go
│ ├── case.go
│ ├── case_test.go
│ ├── condition.go
│ ├── condition_test.go
│ ├── control.process.go
│ ├── control_test.go
│ ├── env.process.go
│ ├── env_test.go
│ ├── hex.process.go
│ ├── hex_test.go
│ ├── if.go
│ ├── if_test.go
│ ├── jwt.go
│ ├── jwt_test.go
│ ├── map.go
│ ├── map.process.go
│ ├── map_test.go
│ ├── password.go
│ ├── password_test.go
│ ├── process.go
│ ├── range.go
│ ├── string.process.go
│ └── string_test.go
├── i18n/
│ ├── i18n.go
│ └── i18n_test.go
├── importer/
│ ├── column.go
│ ├── column_test.go
│ ├── csv/
│ │ └── csv.go
│ ├── from/
│ │ └── source.go
│ ├── importer.go
│ ├── importer_test.go
│ ├── option.go
│ ├── option_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── types.go
│ └── xlsx/
│ └── xlsx.go
├── integrations/
│ ├── dingtalk/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── dingtalk_test.go
│ │ ├── e2e_test.go
│ │ ├── file.go
│ │ ├── format.go
│ │ └── message.go
│ ├── discord/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── discord_test.go
│ │ ├── e2e_test.go
│ │ ├── file.go
│ │ ├── format.go
│ │ ├── message.go
│ │ └── message_test.go
│ ├── feishu/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── convert_test.go
│ │ ├── e2e_test.go
│ │ ├── feishu_test.go
│ │ ├── file.go
│ │ ├── format.go
│ │ └── message.go
│ ├── telegram/
│ │ ├── bot.go
│ │ ├── bot_test.go
│ │ ├── convert.go
│ │ ├── e2e_test.go
│ │ ├── file.go
│ │ ├── file_test.go
│ │ ├── format.go
│ │ ├── media_e2e_test.go
│ │ ├── message.go
│ │ ├── message_test.go
│ │ ├── polling.go
│ │ ├── telegram_test.go
│ │ ├── types.go
│ │ ├── verify.go
│ │ ├── verify_test.go
│ │ ├── webhook.go
│ │ └── webhook_e2e_test.go
│ └── testdata/
│ ├── test.docx
│ ├── test.ogg
│ └── test.pptx
├── job/
│ ├── README.md
│ ├── data.go
│ ├── data_test.go
│ ├── execution.go
│ ├── goroutine.go
│ ├── health.go
│ ├── health_test.go
│ ├── interfaces.go
│ ├── job.go
│ ├── job_test.go
│ ├── jsapi/
│ │ ├── jsapi.go
│ │ └── jsapi_test.go
│ ├── process.go
│ ├── progress.go
│ ├── types.go
│ └── worker.go
├── kb/
│ ├── README.md
│ ├── api/
│ │ ├── README.md
│ │ ├── addfile.go
│ │ ├── addfile_test.go
│ │ ├── addtext.go
│ │ ├── addtext_test.go
│ │ ├── addurl.go
│ │ ├── addurl_test.go
│ │ ├── api.go
│ │ ├── collection.go
│ │ ├── collection_test.go
│ │ ├── consts.go
│ │ ├── document.go
│ │ ├── document_test.go
│ │ ├── interfaces.go
│ │ ├── search.go
│ │ ├── search_setup_test.go
│ │ ├── search_test.go
│ │ ├── types.go
│ │ └── utils.go
│ ├── kb.go
│ ├── kb_test.go
│ ├── providers/
│ │ ├── README.md
│ │ ├── chunking.go
│ │ ├── chunking_test.go
│ │ ├── converter.go
│ │ ├── converters/
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── ocr.go
│ │ │ ├── ocr_test.go
│ │ │ ├── office.go
│ │ │ ├── office_test.go
│ │ │ ├── utf8.go
│ │ │ ├── utf8_test.go
│ │ │ ├── utils.go
│ │ │ ├── utils_test.go
│ │ │ ├── video.go
│ │ │ ├── video_test.go
│ │ │ ├── vision.go
│ │ │ ├── vision_test.go
│ │ │ ├── whisper.go
│ │ │ └── whisper_test.go
│ │ ├── embedding.go
│ │ ├── embedding_test.go
│ │ ├── extraction.go
│ │ ├── extraction_test.go
│ │ ├── factory/
│ │ │ ├── factory.go
│ │ │ ├── interfaces.go
│ │ │ └── utils.go
│ │ ├── fetcher.go
│ │ └── fetcher_test.go
│ └── types/
│ ├── collection.go
│ ├── config.go
│ ├── config_test.go
│ ├── document.go
│ ├── provider.go
│ └── types.go
├── main.go
├── mcp/
│ ├── README.md
│ ├── mcp.go
│ └── mcp_test.go
├── messenger/
│ ├── messenger.go
│ ├── messenger_onreceive_test.go
│ ├── messenger_receiver_test.go
│ ├── messenger_sendt_test.go
│ ├── messenger_test.go
│ ├── providers/
│ │ ├── mailer/
│ │ │ ├── mailer.go
│ │ │ ├── mailer_batch_test.go
│ │ │ ├── mailer_receive.go
│ │ │ ├── mailer_template_test.go
│ │ │ └── mailer_test.go
│ │ ├── mailgun/
│ │ │ ├── mailgun.go
│ │ │ ├── mailgun_batch_test.go
│ │ │ ├── mailgun_receive.go
│ │ │ ├── mailgun_receive_test.go
│ │ │ ├── mailgun_template_test.go
│ │ │ └── mailgun_test.go
│ │ └── twilio/
│ │ ├── twilio.go
│ │ ├── twilio_batch_test.go
│ │ ├── twilio_receive.go
│ │ ├── twilio_receive_test.go
│ │ ├── twilio_sms_test.go
│ │ ├── twilio_template_test.go
│ │ ├── twilio_test.go
│ │ └── twilio_whatsapp_test.go
│ ├── template/
│ │ ├── debug_test.go
│ │ ├── load_test.go
│ │ ├── render_test.go
│ │ ├── template.go
│ │ ├── template_test.go
│ │ └── walk_test.go
│ └── types/
│ ├── interfaces.go
│ ├── template.go
│ └── types.go
├── model/
│ ├── migrate.go
│ ├── migrate_test.go
│ ├── model.go
│ └── model_test.go
├── monitor/
│ ├── README.md
│ ├── logger.go
│ ├── service.go
│ ├── service_test.go
│ └── types.go
├── openai/
│ ├── openai.go
│ ├── openai_test.go
│ ├── process.go
│ ├── process_test.go
│ └── types.go
├── openapi/
│ ├── agent/
│ │ ├── agent.go
│ │ ├── assistant.go
│ │ ├── filter.go
│ │ ├── models.go
│ │ ├── robot/
│ │ │ ├── DESIGN.md
│ │ │ ├── GAPS.md
│ │ │ ├── TODO.md
│ │ │ ├── activities.go
│ │ │ ├── completions.go
│ │ │ ├── detail.go
│ │ │ ├── execute.go
│ │ │ ├── execution.go
│ │ │ ├── interact.go
│ │ │ ├── interact_test.go
│ │ │ ├── list.go
│ │ │ ├── permission.go
│ │ │ ├── results.go
│ │ │ ├── robot.go
│ │ │ ├── trigger.go
│ │ │ ├── types.go
│ │ │ ├── utils.go
│ │ │ └── verify.go
│ │ └── types.go
│ ├── app/
│ │ └── app.go
│ ├── audit/
│ │ └── audit.go
│ ├── captcha/
│ │ └── captcha.go
│ ├── chat/
│ │ ├── chat.go
│ │ ├── completions.go
│ │ ├── reference.go
│ │ ├── session.go
│ │ └── types.go
│ ├── computer/
│ │ └── computer.go
│ ├── config.go
│ ├── docs/
│ │ ├── migration-guide.md
│ │ └── oauth.md
│ ├── dsl/
│ │ ├── README.md
│ │ └── dsl.go
│ ├── file/
│ │ ├── README.md
│ │ ├── file.go
│ │ └── filter.go
│ ├── hello/
│ │ ├── README.md
│ │ └── hello.go
│ ├── integrations/
│ │ └── integrations.go
│ ├── job/
│ │ ├── categories.go
│ │ ├── executions.go
│ │ ├── filter.go
│ │ ├── job.go
│ │ ├── jobs.go
│ │ └── logs.go
│ ├── kb/
│ │ ├── addfile.go
│ │ ├── addtext.go
│ │ ├── addurl.go
│ │ ├── backup.go
│ │ ├── collection.go
│ │ ├── collection_process.go
│ │ ├── document.go
│ │ ├── document_process.go
│ │ ├── filter.go
│ │ ├── graph.go
│ │ ├── hit.go
│ │ ├── kb.go
│ │ ├── provider.go
│ │ ├── score.go
│ │ ├── search.go
│ │ ├── segment.go
│ │ ├── types.go
│ │ ├── utils.go
│ │ ├── vote.go
│ │ └── weight.go
│ ├── llm/
│ │ └── llm.go
│ ├── mcp/
│ │ └── mcp.go
│ ├── messenger/
│ │ └── messenger.go
│ ├── nodes/
│ │ └── nodes.go
│ ├── oauth/
│ │ ├── ERRORS.md
│ │ ├── TESTING_GUIDE.md
│ │ ├── acl/
│ │ │ ├── DESIGN.md
│ │ │ ├── FEATURES_CONFIGURATION.md
│ │ │ ├── README.md
│ │ │ ├── SCOPES_CONFIGURATION.md
│ │ │ ├── acl.go
│ │ │ ├── enforce.go
│ │ │ ├── errors.go
│ │ │ ├── feature.go
│ │ │ ├── feature_integration_test.go
│ │ │ ├── feature_test.go
│ │ │ ├── interfaces.go
│ │ │ ├── role/
│ │ │ │ ├── cache.go
│ │ │ │ ├── role.go
│ │ │ │ ├── types.go
│ │ │ │ └── utils.go
│ │ │ ├── scope.go
│ │ │ ├── scope_test.go
│ │ │ └── types.go
│ │ ├── apikey.go
│ │ ├── authenticate.go
│ │ ├── authorized/
│ │ │ ├── utils.go
│ │ │ └── utils_test.go
│ │ ├── client.go
│ │ ├── client_test.go
│ │ ├── core.go
│ │ ├── core_test.go
│ │ ├── device.go
│ │ ├── discovery.go
│ │ ├── guard.go
│ │ ├── mcp.go
│ │ ├── oauth.go
│ │ ├── oauth_test.go
│ │ ├── providers/
│ │ │ ├── client/
│ │ │ │ ├── default.go
│ │ │ │ └── default_test.go
│ │ │ └── user/
│ │ │ ├── default.go
│ │ │ ├── exists_test.go
│ │ │ ├── invitation.go
│ │ │ ├── invitation_test.go
│ │ │ ├── member.go
│ │ │ ├── member_test.go
│ │ │ ├── oauth_account.go
│ │ │ ├── oauth_account_test.go
│ │ │ ├── role.go
│ │ │ ├── role_test.go
│ │ │ ├── team.go
│ │ │ ├── team_test.go
│ │ │ ├── type.go
│ │ │ ├── type_test.go
│ │ │ ├── user_basic.go
│ │ │ ├── user_basic_test.go
│ │ │ ├── user_list.go
│ │ │ ├── user_list_test.go
│ │ │ ├── user_mfa.go
│ │ │ ├── user_mfa_test.go
│ │ │ ├── user_role_type.go
│ │ │ ├── user_role_type_test.go
│ │ │ ├── user_test.go
│ │ │ ├── utils.go
│ │ │ └── utils_test.go
│ │ ├── security.go
│ │ ├── security_test.go
│ │ ├── signing.go
│ │ ├── token.go
│ │ ├── token_test.go
│ │ ├── types/
│ │ │ ├── authorized.go
│ │ │ ├── authorized_test.go
│ │ │ ├── errors.go
│ │ │ ├── interfaces.go
│ │ │ ├── oidc.go
│ │ │ ├── types.go
│ │ │ └── utils.go
│ │ ├── user.go
│ │ └── user_test.go
│ ├── oauth.go
│ ├── openapi.go
│ ├── otp/
│ │ ├── DESIGN.md
│ │ ├── README.md
│ │ ├── generate.go
│ │ ├── handler.go
│ │ ├── login.go
│ │ ├── otp.go
│ │ ├── process.go
│ │ ├── revoke.go
│ │ └── verify.go
│ ├── request/
│ │ └── REQUEST_DESIGN.md
│ ├── response/
│ │ └── response.go
│ ├── sandbox/
│ │ ├── manage.go
│ │ └── sandbox.go
│ ├── tai/
│ │ ├── proxy.go
│ │ ├── tai.go
│ │ ├── util.go
│ │ └── vnc.go
│ ├── team/
│ │ └── team.go
│ ├── tests/
│ │ ├── agent/
│ │ │ ├── assistant_create_test.go
│ │ │ ├── assistant_test.go
│ │ │ ├── assistant_update_test.go
│ │ │ ├── models_test.go
│ │ │ ├── robot_execution_test.go
│ │ │ ├── robot_host_test.go
│ │ │ ├── robot_interact_test.go
│ │ │ ├── robot_results_activities_test.go
│ │ │ ├── robot_test.go
│ │ │ └── robot_trigger_test.go
│ │ ├── chat/
│ │ │ ├── reference_test.go
│ │ │ └── session_test.go
│ │ ├── config_test.go
│ │ ├── dsl/
│ │ │ └── dsl_test.go
│ │ ├── file/
│ │ │ └── file_test.go
│ │ ├── hello/
│ │ │ └── hello_test.go
│ │ ├── integrations_webhook_test.go
│ │ ├── kb/
│ │ │ ├── addfile_test.go
│ │ │ ├── addtext_test.go
│ │ │ ├── addurl_test.go
│ │ │ ├── collection_process_test.go
│ │ │ ├── collection_test.go
│ │ │ ├── document_test.go
│ │ │ └── utils_test.go
│ │ ├── nodes/
│ │ │ └── nodes_test.go
│ │ ├── oauth/
│ │ │ ├── acl/
│ │ │ │ ├── acl_test.go
│ │ │ │ ├── enforce_test.go
│ │ │ │ ├── role/
│ │ │ │ │ └── role_test.go
│ │ │ │ ├── scope_atomic_test.go
│ │ │ │ └── scope_test.go
│ │ │ ├── authorized_test.go
│ │ │ ├── device_test.go
│ │ │ ├── guard_test.go
│ │ │ ├── oauth_test.go
│ │ │ └── token_test.go
│ │ ├── openapi_test.go
│ │ ├── otp/
│ │ │ └── otp_test.go
│ │ ├── sandbox/
│ │ │ └── sandbox_test.go
│ │ ├── testutils/
│ │ │ └── testutils.go
│ │ ├── trace/
│ │ │ ├── common_test.go
│ │ │ ├── events_test.go
│ │ │ ├── info_test.go
│ │ │ ├── logs_test.go
│ │ │ ├── nodes_test.go
│ │ │ └── spaces_test.go
│ │ ├── user/
│ │ │ ├── config_functions_test.go
│ │ │ ├── config_loading_test.go
│ │ │ ├── config_validation_test.go
│ │ │ ├── entry_test.go
│ │ │ ├── env_test.go
│ │ │ ├── env_var_extraction_test.go
│ │ │ ├── invitation_test.go
│ │ │ ├── login_config_test.go
│ │ │ ├── login_test.go
│ │ │ ├── member_test.go
│ │ │ ├── oauth_authorize_test.go
│ │ │ ├── oauth_callback_test.go
│ │ │ ├── profile_test.go
│ │ │ ├── team_config_robot_test.go
│ │ │ ├── team_config_test.go
│ │ │ ├── team_test.go
│ │ │ └── utils_test.go
│ │ └── workspace/
│ │ └── workspace_test.go
│ ├── trace/
│ │ ├── README.md
│ │ ├── events.go
│ │ ├── helpers.go
│ │ ├── info.go
│ │ ├── logs.go
│ │ ├── nodes.go
│ │ ├── spaces.go
│ │ └── trace.go
│ ├── types.go
│ ├── user/
│ │ ├── README.md
│ │ ├── TODO.md
│ │ ├── account.go
│ │ ├── config.go
│ │ ├── entry.go
│ │ ├── features.go
│ │ ├── login.go
│ │ ├── member.go
│ │ ├── oauth.go
│ │ ├── profile.go
│ │ ├── provider.go
│ │ ├── team.go
│ │ ├── team_invitation.go
│ │ ├── types.go
│ │ ├── user.go
│ │ └── utils.go
│ ├── utils/
│ │ ├── convert.go
│ │ └── session.go
│ ├── well-known.go
│ └── workspace/
│ └── workspace.go
├── pack/
│ └── pack.go
├── pipe/
│ ├── README.md
│ ├── context.go
│ ├── expression.go
│ ├── json.go
│ ├── node.go
│ ├── pipe.go
│ ├── pipe_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── types.go
│ ├── ui/
│ │ └── cli/
│ │ └── cli.go
│ └── utils.go
├── plugin/
│ ├── README.md
│ ├── plugin.go
│ └── plugin_test.go
├── query/
│ ├── README.md
│ ├── query.go
│ └── query_test.go
├── registry/
│ ├── README.md
│ ├── client.go
│ ├── client_test.go
│ ├── manager/
│ │ ├── agent/
│ │ │ ├── add.go
│ │ │ ├── agent.go
│ │ │ ├── agent_test.go
│ │ │ ├── fork.go
│ │ │ ├── push.go
│ │ │ ├── scan.go
│ │ │ └── update.go
│ │ ├── agent_e2e_test.go
│ │ ├── common/
│ │ │ ├── deps.go
│ │ │ ├── deps_test.go
│ │ │ ├── hash.go
│ │ │ ├── hash_test.go
│ │ │ ├── lockfile.go
│ │ │ ├── lockfile_test.go
│ │ │ ├── packer.go
│ │ │ ├── packer_test.go
│ │ │ ├── path.go
│ │ │ ├── path_test.go
│ │ │ ├── prompt.go
│ │ │ ├── prompt_test.go
│ │ │ └── types.go
│ │ ├── e2e_helpers_test.go
│ │ ├── mcp/
│ │ │ ├── add.go
│ │ │ ├── fork.go
│ │ │ ├── mcp.go
│ │ │ ├── mcp_test.go
│ │ │ ├── push.go
│ │ │ ├── script.go
│ │ │ └── update.go
│ │ ├── mcp_e2e_test.go
│ │ ├── robot/
│ │ │ ├── add.go
│ │ │ ├── deps.go
│ │ │ ├── robot.go
│ │ │ └── robot_test.go
│ │ └── robot_e2e_test.go
│ └── testdata/
│ └── build.go
├── rss/
│ ├── README.md
│ ├── atom.go
│ ├── atom_test.go
│ ├── build.go
│ ├── build_atom.go
│ ├── build_rss.go
│ ├── build_test.go
│ ├── convert.go
│ ├── discover.go
│ ├── discover_test.go
│ ├── fetch.go
│ ├── fetch_test.go
│ ├── parse.go
│ ├── parse_test.go
│ ├── process.go
│ ├── rss.go
│ ├── rss_test.go
│ └── types.go
├── runtime/
│ ├── runtime.go
│ └── runtime_test.go
├── sandbox/
│ ├── DESIGN-PLAYWRIGHT-VNC.md
│ ├── DESIGN.md
│ ├── PLAN.md
│ ├── README.md
│ ├── SPEC.md
│ ├── bridge/
│ │ └── main.go
│ ├── config.go
│ ├── config_test.go
│ ├── docker/
│ │ ├── base/
│ │ │ └── Dockerfile.base
│ │ ├── browser/
│ │ │ └── Dockerfile
│ │ ├── build.sh
│ │ ├── chrome/
│ │ │ ├── Dockerfile
│ │ │ ├── config/
│ │ │ │ ├── chrome-preferences.json
│ │ │ │ └── stealth-init.js
│ │ │ └── tests/
│ │ │ ├── README.md
│ │ │ ├── demo-baidu.py
│ │ │ ├── demo-duckduckgo.py
│ │ │ └── demo-llm-vision.py
│ │ ├── claude/
│ │ │ ├── Dockerfile
│ │ │ └── Dockerfile.full
│ │ ├── desktop/
│ │ │ ├── Dockerfile
│ │ │ └── config/
│ │ │ ├── panel-launcher-chromium.desktop
│ │ │ ├── setup-xfce.sh
│ │ │ └── workspace.desktop
│ │ └── vnc/
│ │ ├── entrypoint-vnc.sh
│ │ └── start-vnc.sh
│ ├── errors.go
│ ├── helpers.go
│ ├── helpers_test.go
│ ├── ipc/
│ │ ├── jsonrpc_test.go
│ │ ├── manager.go
│ │ ├── manager_test.go
│ │ ├── session.go
│ │ ├── session_test.go
│ │ └── types.go
│ ├── manager.go
│ ├── manager_test.go
│ ├── proxy/
│ │ ├── README.md
│ │ ├── cmd/
│ │ │ └── claude-proxy/
│ │ │ └── main.go
│ │ ├── convert.go
│ │ ├── main.go
│ │ └── types.go
│ ├── types.go
│ ├── v2/
│ │ ├── DESIGN.md
│ │ ├── IMPL.md
│ │ ├── Makefile
│ │ ├── TEST.md
│ │ ├── bench_test.go
│ │ ├── box.go
│ │ ├── box_attach_test.go
│ │ ├── box_image_test.go
│ │ ├── box_test.go
│ │ ├── box_workspace_test.go
│ │ ├── docs/
│ │ │ └── API.md
│ │ ├── errors.go
│ │ ├── export_test.go
│ │ ├── grpc.go
│ │ ├── grpc_test.go
│ │ ├── host.go
│ │ ├── host_test.go
│ │ ├── jsapi/
│ │ │ ├── API.md
│ │ │ ├── computer.go
│ │ │ ├── jsapi.go
│ │ │ ├── jsapi_test.go
│ │ │ └── node.go
│ │ ├── manager.go
│ │ ├── manager_lifecycle_test.go
│ │ ├── manager_test.go
│ │ ├── sandbox.go
│ │ ├── sandbox_test.go
│ │ ├── testutils_containerized_test.go
│ │ ├── testutils_k8s_test.go
│ │ ├── testutils_remote_test.go
│ │ ├── testutils_test.go
│ │ ├── testutils_wintest_test.go
│ │ ├── types.go
│ │ └── watcher.go
│ └── vncproxy/
│ ├── config.go
│ ├── proxy.go
│ └── proxy_test.go
├── schedule/
│ ├── schedule.go
│ └── schedule_test.go
├── script/
│ ├── script.go
│ └── script_test.go
├── seed/
│ ├── process.go
│ ├── process_test.go
│ ├── seed.go
│ ├── seed_reset_test.go
│ ├── seed_test.go
│ └── types.go
├── service/
│ ├── dynamic.go
│ ├── dynamic_test.go
│ ├── fs/
│ │ ├── default.go
│ │ └── utils.go
│ ├── guards.go
│ ├── gzip.go
│ ├── log/
│ │ ├── access.go
│ │ └── access_test.go
│ ├── middleware.go
│ ├── service.go
│ ├── service_test.go
│ ├── static.go
│ ├── watch.go
│ └── watch_test.go
├── setup/
│ ├── check.go
│ ├── check_test.go
│ ├── install.go
│ ├── install_test.go
│ └── setup.go
├── share/
│ ├── api.go
│ ├── api_test.go
│ ├── app.go
│ ├── columns.go
│ ├── const.go
│ ├── db.go
│ ├── filters.go
│ ├── importable.go
│ ├── importable_test.go
│ ├── session.go
│ ├── types.go
│ ├── utils.go
│ ├── watch.go
│ └── watch_test.go
├── sitemap/
│ ├── README.md
│ ├── build.go
│ ├── build_test.go
│ ├── convert.go
│ ├── convert_test.go
│ ├── discover.go
│ ├── fetch.go
│ ├── fetch_test.go
│ ├── parse.go
│ ├── parse_test.go
│ ├── process.go
│ ├── robots.go
│ ├── robots_test.go
│ └── types.go
├── store/
│ ├── store.go
│ └── store_test.go
├── sui/
│ ├── README.md
│ ├── api/
│ │ ├── api.go
│ │ ├── build_test.go
│ │ ├── guards.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── render.go
│ │ ├── render_test.go
│ │ ├── request.go
│ │ ├── request_test.go
│ │ ├── run.go
│ │ ├── sui.go
│ │ └── sui_test.go
│ ├── core/
│ │ ├── block.go
│ │ ├── build.go
│ │ ├── cache.go
│ │ ├── compile.go
│ │ ├── component.go
│ │ ├── context.go
│ │ ├── core.go
│ │ ├── data.go
│ │ ├── editor.go
│ │ ├── event.go
│ │ ├── fs.go
│ │ ├── injections.go
│ │ ├── interfaces.go
│ │ ├── jit.go
│ │ ├── json.go
│ │ ├── json_test.go
│ │ ├── locale.go
│ │ ├── locale_test.go
│ │ ├── matcher.go
│ │ ├── page.go
│ │ ├── page_test.go
│ │ ├── parser.go
│ │ ├── parser_test.go
│ │ ├── preview.go
│ │ ├── request.go
│ │ ├── script.go
│ │ ├── sui.go
│ │ ├── sui_test.go
│ │ ├── token.go
│ │ ├── token_test.go
│ │ ├── translate.go
│ │ ├── types.go
│ │ └── utils.go
│ ├── docs/
│ │ ├── agent-sui.md
│ │ ├── backend-scripts.md
│ │ ├── components.md
│ │ ├── data-binding.md
│ │ ├── event-handling.md
│ │ ├── frontend-api.md
│ │ ├── i18n.md
│ │ ├── page-config.md
│ │ ├── routing.md
│ │ └── template-syntax.md
│ ├── libsui/
│ │ ├── index.ts
│ │ ├── openapi.ts
│ │ ├── utils.ts
│ │ └── yao.ts
│ └── storages/
│ ├── agent/
│ │ ├── agent.go
│ │ ├── agent_test.go
│ │ ├── page.go
│ │ ├── template.go
│ │ └── types.go
│ ├── azure/
│ │ └── azure.go
│ └── local/
│ ├── block.go
│ ├── block_test.go
│ ├── build.go
│ ├── build_test.go
│ ├── component.go
│ ├── component_test.go
│ ├── copy.go
│ ├── local.go
│ ├── local_test.go
│ ├── page.go
│ ├── page_render_test.go
│ ├── page_test.go
│ ├── template.go
│ ├── template_test.go
│ └── types.go
├── tai/
│ ├── api/
│ │ ├── register.go
│ │ └── register_test.go
│ ├── conn.go
│ ├── dial.go
│ ├── docs/
│ │ ├── README.md
│ │ ├── api.md
│ │ ├── proxy.md
│ │ ├── registry.md
│ │ ├── sandbox.md
│ │ ├── tunnel.md
│ │ ├── vnc.md
│ │ ├── volume.md
│ │ └── workspace.md
│ ├── heartbeat.go
│ ├── hostexec/
│ │ ├── local.go
│ │ └── pb/
│ │ ├── hostexec.pb.go
│ │ ├── hostexec.proto
│ │ └── hostexec_grpc.pb.go
│ ├── proxy/
│ │ ├── connect.go
│ │ ├── proxy.go
│ │ └── proxy_test.go
│ ├── registry/
│ │ ├── registry.go
│ │ ├── registry_test.go
│ │ └── testing.go
│ ├── runtime/
│ │ ├── client_accessor.go
│ │ ├── docker.go
│ │ ├── docker_core.go
│ │ ├── image.go
│ │ ├── image_docker.go
│ │ ├── image_k8s.go
│ │ ├── k8s.go
│ │ ├── local.go
│ │ ├── runtime_test.go
│ │ └── sandbox.go
│ ├── serverinfo/
│ │ └── pb/
│ │ ├── serverinfo.pb.go
│ │ ├── serverinfo.proto
│ │ └── serverinfo_grpc.pb.go
│ ├── sysinfo.go
│ ├── tai.go
│ ├── tai_test.go
│ ├── taiid/
│ │ ├── taiid.go
│ │ └── taiid_test.go
│ ├── token.go
│ ├── tunnel/
│ │ ├── forward.go
│ │ ├── forward_test.go
│ │ ├── grpc_handler.go
│ │ ├── grpc_handler_test.go
│ │ ├── proto/
│ │ │ └── tunnel.proto
│ │ ├── server.go
│ │ ├── server_test.go
│ │ └── taipb/
│ │ ├── tunnel.pb.go
│ │ └── tunnel_grpc.pb.go
│ ├── types/
│ │ └── types.go
│ ├── vnc/
│ │ ├── vnc.go
│ │ └── vnc_test.go
│ ├── volume/
│ │ ├── local.go
│ │ ├── mock_test.go
│ │ ├── pb/
│ │ │ ├── volume.pb.go
│ │ │ ├── volume.proto
│ │ │ └── volume_grpc.pb.go
│ │ ├── remote.go
│ │ ├── volume.go
│ │ └── volume_test.go
│ ├── workspace/
│ │ ├── copy.go
│ │ ├── uri.go
│ │ ├── workspace.go
│ │ └── workspace_test.go
│ └── yao.go
├── task/
│ ├── task.go
│ └── task_test.go
├── test/
│ ├── request.go
│ └── utils.go
├── trace/
│ ├── BUGFIX.md
│ ├── KNOWN_ISSUES.md
│ ├── README.md
│ ├── event_listener.go
│ ├── handler.go
│ ├── jsapi/
│ │ ├── jsapi.go
│ │ ├── jsapi_test.go
│ │ ├── node.go
│ │ ├── space.go
│ │ └── trace.go
│ ├── local/
│ │ └── driver.go
│ ├── manager.go
│ ├── node.go
│ ├── space.go
│ ├── state.go
│ ├── store/
│ │ └── driver.go
│ ├── subscription.go
│ ├── test_helpers.go
│ ├── trace.go
│ ├── trace_archive_test.go
│ ├── trace_autocomplete_test.go
│ ├── trace_basic_test.go
│ ├── trace_bench_test.go
│ ├── trace_concurrent_test.go
│ ├── trace_lifecycle_test.go
│ ├── trace_mem_test.go
│ ├── trace_node_test.go
│ ├── trace_resource_test.go
│ ├── trace_space_test.go
│ ├── trace_subscription_leak_test.go
│ ├── trace_subscription_test.go
│ └── types/
│ ├── driver.go
│ ├── events.go
│ ├── interfaces.go
│ └── types.go
├── utils/
│ ├── README.md
│ ├── captcha/
│ │ ├── captcha.go
│ │ ├── captcha_test.go
│ │ └── process.go
│ ├── datetime/
│ │ └── now.go
│ ├── datetime_test.go
│ ├── fmt/
│ │ └── fmt.go
│ ├── json/
│ │ └── json.go
│ ├── jsonschema/
│ │ ├── jsonschema.go
│ │ └── jsonschema_test.go
│ ├── otp/
│ │ ├── otp.go
│ │ ├── otp_test.go
│ │ └── process.go
│ ├── process.go
│ ├── str/
│ │ └── str.go
│ ├── str_test.go
│ ├── throw/
│ │ └── throw.go
│ ├── throw_test.go
│ ├── tree/
│ │ └── tree.go
│ ├── tree_test.go
│ ├── url/
│ │ └── url.go
│ └── url_test.go
├── wework/
│ ├── process.go
│ ├── wework.go
│ ├── wework_test.go
│ └── xml.go
├── widget/
│ ├── driver/
│ │ ├── connector.go
│ │ └── source.go
│ ├── instance.go
│ ├── load.go
│ ├── load_test.go
│ ├── process.go
│ ├── process_test.go
│ ├── types.go
│ ├── widget.go
│ └── widget_test.go
├── widgets/
│ ├── action/
│ │ ├── action.go
│ │ ├── action_test.go
│ │ ├── guard.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ └── types.go
│ ├── action.go
│ ├── api.go
│ ├── app/
│ │ ├── app.go
│ │ ├── app_test.go
│ │ └── types.go
│ ├── chart/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── chart.go
│ │ ├── chart_test.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── component/
│ │ ├── action.go
│ │ ├── action_test.go
│ │ ├── component.go
│ │ ├── compute.go
│ │ ├── compute_test.go
│ │ ├── handlers.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── props.go
│ │ └── types.go
│ ├── compute/
│ │ ├── compute.go
│ │ └── types.go
│ ├── dashboard/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── dashboard.go
│ │ ├── dashboard_test.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── expression/
│ │ ├── expression.go
│ │ ├── expression_test.go
│ │ └── process.go
│ ├── field/
│ │ ├── column.go
│ │ ├── column_test.go
│ │ ├── field.go
│ │ ├── field_test.go
│ │ ├── filter.go
│ │ ├── filter_test.go
│ │ ├── transform.go
│ │ ├── transform_test.go
│ │ └── types.go
│ ├── field.go
│ ├── form/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── bind.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── form.go
│ │ ├── form_test.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── hook/
│ │ ├── hook.go
│ │ └── types.go
│ ├── item.go
│ ├── list/
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── bind.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── list.go
│ │ ├── list_test.go
│ │ ├── mapping.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── types.go
│ │ └── vaildate.go
│ ├── login/
│ │ ├── login.go
│ │ ├── login_test.go
│ │ ├── process.go
│ │ └── types.go
│ ├── mapping/
│ │ └── mapping.go
│ ├── models.go
│ ├── process.go
│ ├── process_test.go
│ ├── table/
│ │ ├── README.md
│ │ ├── action.go
│ │ ├── api.go
│ │ ├── api_test.go
│ │ ├── bind.go
│ │ ├── excel.go
│ │ ├── export.go
│ │ ├── fields.go
│ │ ├── fields_test.go
│ │ ├── handler.go
│ │ ├── layout.go
│ │ ├── mapping.go
│ │ ├── mapping_test.go
│ │ ├── process.go
│ │ ├── process_test.go
│ │ ├── table.go
│ │ ├── table_test.go
│ │ ├── types.go
│ │ └── validate.go
│ ├── widgets.go
│ └── widgets_test.go
├── workspace/
│ ├── DESIGN.md
│ ├── Makefile
│ ├── TEST.md
│ ├── bench_test.go
│ ├── errors.go
│ ├── fileio_test.go
│ ├── jsapi/
│ │ ├── API.md
│ │ ├── fs.go
│ │ ├── jsapi.go
│ │ └── jsapi_test.go
│ ├── manager.go
│ ├── testutils_test.go
│ ├── workspace.go
│ └── workspace_test.go
└── yao/
├── assistants/
│ ├── entity/
│ │ ├── package.yao
│ │ └── prompts.yml
│ ├── keyword/
│ │ ├── package.yao
│ │ ├── prompts.yml
│ │ └── src/
│ │ └── index.ts
│ ├── needsearch/
│ │ ├── package.yao
│ │ ├── prompts.yml
│ │ └── src/
│ │ └── index.ts
│ ├── prompt/
│ │ ├── package.yao
│ │ └── prompts.yml
│ ├── querydsl/
│ │ ├── package.yao
│ │ ├── prompts/
│ │ │ ├── aggregation.yml
│ │ │ ├── complex.yml
│ │ │ ├── filter.yml
│ │ │ └── join.yml
│ │ ├── prompts.yml
│ │ └── src/
│ │ └── index.ts
│ ├── robot_prompt/
│ │ ├── package.yao
│ │ └── prompts.yml
│ └── title/
│ ├── package.yao
│ └── prompts.yml
├── data/
│ ├── icons/
│ │ └── icon.icns
│ ├── index.html
│ └── kb/
│ └── providers/
│ ├── chunking/
│ │ ├── semantic/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ └── structured/
│ │ ├── en.json
│ │ └── zh-cn.json
│ ├── converter/
│ │ ├── mcp/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── ocr/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── office/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── utf8/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── video/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ ├── vision/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ └── whisper/
│ │ ├── en.json
│ │ └── zh-cn.json
│ ├── embedding/
│ │ ├── fastembed/
│ │ │ ├── en.json
│ │ │ └── zh-cn.json
│ │ └── openai/
│ │ ├── en.json
│ │ └── zh-cn.json
│ ├── extraction/
│ │ └── openai/
│ │ ├── en.json
│ │ └── zh-cn.json
│ └── fetcher/
│ ├── http/
│ │ ├── en.json
│ │ └── zh-cn.json
│ └── mcp/
│ ├── en.json
│ └── zh-cn.json
├── fields/
│ └── model.trans.json
├── langs/
│ ├── en-US.json
│ ├── zh-cn/
│ │ ├── global.yml
│ │ └── logins/
│ │ ├── admin.login.yml
│ │ └── user.login.yml
│ └── zh-hk/
│ ├── global.yml
│ └── logins/
│ ├── admin.login.yml
│ └── user.login.yml
├── models/
│ ├── agent/
│ │ ├── assistant.mod.yao
│ │ ├── chat.mod.yao
│ │ ├── execution.mod.yao
│ │ ├── message.mod.yao
│ │ ├── resume.mod.yao
│ │ └── search.mod.yao
│ ├── attachment.mod.yao
│ ├── audit.mod.yao
│ ├── config.mod.yao
│ ├── dsl.mod.yao
│ ├── invitation.mod.yao
│ ├── job/
│ │ ├── category.mod.yao
│ │ ├── execution.mod.yao
│ │ ├── job.mod.yao
│ │ └── log.mod.yao
│ ├── kb/
│ │ ├── collection.mod.yao
│ │ └── document.mod.yao
│ ├── member.mod.yao
│ ├── role.mod.yao
│ ├── team.mod.yao
│ ├── user/
│ │ ├── oauth_account.mod.yao
│ │ └── type.mod.yao
│ └── user.mod.yao
├── release/
│ └── app.yaz
├── stores/
│ ├── agent/
│ │ ├── cache.lru.yao
│ │ └── memory/
│ │ ├── chat.xun.yao
│ │ ├── context.xun.yao
│ │ ├── team.xun.yao
│ │ └── user.xun.yao
│ ├── cache.lru.yao
│ ├── kb/
│ │ ├── cache.lru.yao
│ │ └── store.xun.yao
│ ├── oauth/
│ │ ├── cache.lru.yao
│ │ ├── client.xun.yao
│ │ └── store.xun.yao
│ └── store.xun.yao
└── uploaders/
└── attachment.local.yao
Showing preview only (1,391K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (15148 symbols across 1598 files)
FILE: agent/assistant/agent.go
method Stream (line 23) | func (ast *Assistant) Stream(ctx *context.Context, inputMessages []conte...
method GetConnector (line 613) | func (ast *Assistant) GetConnector(ctx *context.Context, opts ...*contex...
method Info (line 641) | func (ast *Assistant) Info(locale ...string) *message.AssistantInfo {
method getStreamHandler (line 656) | func (ast *Assistant) getStreamHandler(ctx *context.Context, opts ...*co...
method sendAgentStreamStart (line 666) | func (ast *Assistant) sendAgentStreamStart(ctx *context.Context, handler...
method sendAgentStreamEnd (line 688) | func (ast *Assistant) sendAgentStreamEnd(ctx *context.Context, handler m...
method sendStreamEndOnError (line 723) | func (ast *Assistant) sendStreamEndOnError(ctx *context.Context, handler...
method handleInterrupt (line 729) | func (ast *Assistant) handleInterrupt(ctx *context.Context, signal *cont...
method initializeCapabilities (line 755) | func (ast *Assistant) initializeCapabilities(ctx *context.Context, opts ...
method buildToolRetryMessages (line 778) | func (ast *Assistant) buildToolRetryMessages(
FILE: agent/assistant/agent_interrupt_test.go
function newTestContextWithInterrupt (line 18) | func newTestContextWithInterrupt(chatID, assistantID string) (*context.C...
function TestAgentInterruptGraceful (line 64) | func TestAgentInterruptGraceful(t *testing.T) {
function TestAgentInterruptForce (line 154) | func TestAgentInterruptForce(t *testing.T) {
function TestAgentMultipleInterrupts (line 247) | func TestAgentMultipleInterrupts(t *testing.T) {
function TestAgentInterruptWithoutStream (line 331) | func TestAgentInterruptWithoutStream(t *testing.T) {
function TestAgentInterruptContextCleanup (line 372) | func TestAgentInterruptContextCleanup(t *testing.T) {
FILE: agent/assistant/agent_next_test.go
function newAgentNextTestContext (line 16) | func newAgentNextTestContext(chatID, assistantID string) *context.Context {
function TestAgentNextStandard (line 39) | func TestAgentNextStandard(t *testing.T) {
function TestAgentNextCustomData (line 76) | func TestAgentNextCustomData(t *testing.T) {
function TestAgentNextDelegate (line 118) | func TestAgentNextDelegate(t *testing.T) {
function TestAgentNextConditional (line 154) | func TestAgentNextConditional(t *testing.T) {
function TestAgentWithoutNextHook (line 202) | func TestAgentWithoutNextHook(t *testing.T) {
FILE: agent/assistant/assistant.go
function init (line 18) | func init() {
type agentCallerWrapper (line 57) | type agentCallerWrapper struct
method Stream (line 61) | func (w *agentCallerWrapper) Stream(ctx *agentContext.Context, message...
function Get (line 66) | func Get(id string) (*Assistant, error) {
method GetPlaceholder (line 71) | func (ast *Assistant) GetPlaceholder(locale string) *store.Placeholder {
method GetName (line 87) | func (ast *Assistant) GetName(locale string) string {
method GetDescription (line 92) | func (ast *Assistant) GetDescription(locale string) string {
method Save (line 97) | func (ast *Assistant) Save() error {
method Map (line 111) | func (ast *Assistant) Map() map[string]interface{} {
method Validate (line 156) | func (ast *Assistant) Validate() error {
method Assets (line 170) | func (ast *Assistant) Assets(name string, data sui.Data) (string, error) {
method Clone (line 192) | func (ast *Assistant) Clone() *Assistant {
method GetInfo (line 471) | func (ast *Assistant) GetInfo(locale ...string) *store.AssistantInfo {
function GetInfoByIDs (line 505) | func GetInfoByIDs(ids []string, locale ...string) map[string]*store.Assi...
method Update (line 524) | func (ast *Assistant) Update(data map[string]interface{}) error {
method GetMergedSearchConfig (line 681) | func (ast *Assistant) GetMergedSearchConfig() *searchTypes.Config {
FILE: agent/assistant/build.go
method BuildRequest (line 13) | func (ast *Assistant) BuildRequest(ctx *context.Context, messages []cont...
method buildMessages (line 32) | func (ast *Assistant) buildMessages(ctx *context.Context, messages []con...
method buildSystemPrompts (line 75) | func (ast *Assistant) buildSystemPrompts(ctx *context.Context, createRes...
method shouldDisableGlobalPrompts (line 124) | func (ast *Assistant) shouldDisableGlobalPrompts(ctx *context.Context, c...
method getAssistantPrompts (line 143) | func (ast *Assistant) getAssistantPrompts(ctx *context.Context, createRe...
method getPromptPresetKey (line 160) | func (ast *Assistant) getPromptPresetKey(ctx *context.Context, createRes...
method buildContextVariables (line 178) | func (ast *Assistant) buildContextVariables(ctx *context.Context) map[st...
method buildCompletionOptions (line 268) | func (ast *Assistant) buildCompletionOptions(ctx *context.Context, creat...
method applyAssistantOptions (line 296) | func (ast *Assistant) applyAssistantOptions(options *context.CompletionO...
method applyContextOptions (line 454) | func (ast *Assistant) applyContextOptions(options *context.CompletionOpt...
method applyCreateResponseOptions (line 466) | func (ast *Assistant) applyCreateResponseOptions(options *context.Comple...
method getUses (line 537) | func (ast *Assistant) getUses() *context.Uses {
method applyMCPTools (line 543) | func (ast *Assistant) applyMCPTools(ctx *context.Context, options *conte...
method buildAndApplyMCPTools (line 560) | func (ast *Assistant) buildAndApplyMCPTools(ctx *context.Context, option...
FILE: agent/assistant/build_content.go
method BuildContent (line 16) | func (ast *Assistant) BuildContent(ctx *context.Context, messages []cont...
function convertFilesToText (line 58) | func convertFilesToText(ctx *context.Context, messages []context.Message...
function convertInterfaceToParts (line 116) | func convertInterfaceToParts(items []interface{}) []context.ContentPart {
FILE: agent/assistant/build_mcp_test.go
function TestBuildRequest_MCP (line 12) | func TestBuildRequest_MCP(t *testing.T) {
function contains (line 288) | func contains(s, substr string) bool {
function findSubstring (line 297) | func findSubstring(s, substr string) bool {
FILE: agent/assistant/build_prompts_test.go
function containsString (line 18) | func containsString(content interface{}, substr string) bool {
function newPromptTestContext (line 28) | func newPromptTestContext(chatID, assistantID string) *context.Context {
function newMinimalTestContext (line 55) | func newMinimalTestContext() *context.Context {
function TestBuildSystemPromptsIntegration (line 59) | func TestBuildSystemPromptsIntegration(t *testing.T) {
function TestPromptPresetAssistant (line 615) | func TestPromptPresetAssistant(t *testing.T) {
FILE: agent/assistant/build_test.go
function newTestContext (line 14) | func newTestContext(chatID, assistantID string) *context.Context {
function TestBuildRequest (line 43) | func TestBuildRequest(t *testing.T) {
FILE: agent/assistant/cache.go
type Cache (line 9) | type Cache struct
method Get (line 32) | func (c *Cache) Get(id string) (*Assistant, bool) {
method Put (line 44) | func (c *Cache) Put(assistant *Assistant) {
method Remove (line 73) | func (c *Cache) Remove(id string) {
method Len (line 91) | func (c *Cache) Len() int {
method All (line 98) | func (c *Cache) All() []*Assistant {
method Clear (line 111) | func (c *Cache) Clear() {
method ClearExcept (line 129) | func (c *Cache) ClearExcept(keep func(id string) bool) {
method removeOldest (line 157) | func (c *Cache) removeOldest() {
type cacheItem (line 17) | type cacheItem struct
function NewCache (line 23) | func NewCache(capacity int) *Cache {
FILE: agent/assistant/cache_test.go
function TestCacheBasic (line 13) | func TestCacheBasic(t *testing.T) {
function TestCacheLRU (line 45) | func TestCacheLRU(t *testing.T) {
function TestCacheRemove (line 77) | func TestCacheRemove(t *testing.T) {
function TestCacheClear (line 103) | func TestCacheClear(t *testing.T) {
function TestCacheLRUEviction (line 132) | func TestCacheLRUEviction(t *testing.T) {
function TestCacheConcurrent (line 164) | func TestCacheConcurrent(t *testing.T) {
function TestCacheNilInput (line 214) | func TestCacheNilInput(t *testing.T) {
function TestCacheAll (line 227) | func TestCacheAll(t *testing.T) {
FILE: agent/assistant/chat.go
method InitializeConversation (line 16) | func (ast *Assistant) InitializeConversation(ctx *agentcontext.Context, ...
method InitializeConversationAsync (line 22) | func (ast *Assistant) InitializeConversationAsync(ctx *agentcontext.Cont...
function GetChatKBID (line 29) | func GetChatKBID(teamID, userID string) string {
function sanitizeCollectionID (line 42) | func sanitizeCollectionID(id string) string {
function mergeChatMetadata (line 61) | func mergeChatMetadata(defaultMetadata map[string]interface{}, ctx *agen...
method InitBuffer (line 98) | func (ast *Assistant) InitBuffer(ctx *agentcontext.Context) {
method BufferUserInput (line 135) | func (ast *Assistant) BufferUserInput(ctx *agentcontext.Context, inputMe...
method UpdateSpaceSnapshot (line 163) | func (ast *Assistant) UpdateSpaceSnapshot(ctx *agentcontext.Context) {
method BeginStep (line 174) | func (ast *Assistant) BeginStep(ctx *agentcontext.Context, stepType stri...
method CompleteStep (line 186) | func (ast *Assistant) CompleteStep(ctx *agentcontext.Context, output map...
method FlushBuffer (line 195) | func (ast *Assistant) FlushBuffer(ctx *agentcontext.Context, finalStatus...
method convertBufferedMessages (line 264) | func (ast *Assistant) convertBufferedMessages(buffered []*agentcontext.B...
method convertBufferedSteps (line 293) | func (ast *Assistant) convertBufferedSteps(buffered []*agentcontext.Buff...
method EnsureChat (line 324) | func (ast *Assistant) EnsureChat(ctx *agentcontext.Context) error {
function GetChatStore (line 375) | func GetChatStore() storetypes.ChatStore {
function GetStore (line 384) | func GetStore() storetypes.Store {
method saveChat (line 395) | func (ast *Assistant) saveChat(ctx *agentcontext.Context, input []agentc...
FILE: agent/assistant/chat_test.go
function TestGetChatKBID (line 20) | func TestGetChatKBID(t *testing.T) {
function TestPrepareKBCollection (line 83) | func TestPrepareKBCollection(t *testing.T) {
function TestInitializeConversation (line 187) | func TestInitializeConversation(t *testing.T) {
function TestBufferInitialization (line 238) | func TestBufferInitialization(t *testing.T) {
function TestBufferUserInput (line 302) | func TestBufferUserInput(t *testing.T) {
function TestBufferStepTracking (line 376) | func TestBufferStepTracking(t *testing.T) {
function TestFlushBuffer (line 475) | func TestFlushBuffer(t *testing.T) {
function TestEnsureChat (line 687) | func TestEnsureChat(t *testing.T) {
function TestEnsureChatMetadata (line 821) | func TestEnsureChatMetadata(t *testing.T) {
function TestConvertBufferedTypes (line 929) | func TestConvertBufferedTypes(t *testing.T) {
FILE: agent/assistant/handlers/stream.go
function DefaultStreamHandler (line 16) | func DefaultStreamHandler(ctx *context.Context) message.StreamFunc {
type streamState (line 69) | type streamState struct
method handleStreamStart (line 81) | func (s *streamState) handleStreamStart(data []byte) int {
method handleMessageStart (line 95) | func (s *streamState) handleMessageStart(data []byte) int {
method handleText (line 131) | func (s *streamState) handleText(data []byte) int {
method handleThinking (line 166) | func (s *streamState) handleThinking(data []byte) int {
method handleToolCall (line 200) | func (s *streamState) handleToolCall(data []byte) int {
method handleMetadata (line 294) | func (s *streamState) handleMetadata(data []byte) int {
method handleError (line 301) | func (s *streamState) handleError(data []byte) int {
method handleMessageEnd (line 310) | func (s *streamState) handleMessageEnd(data []byte) int {
method handleStreamEnd (line 411) | func (s *streamState) handleStreamEnd(data []byte) int {
FILE: agent/assistant/history.go
type HistoryResult (line 18) | type HistoryResult struct
function getHistorySize (line 24) | func getHistorySize(opts *agentcontext.Options) int {
method WithHistory (line 39) | func (ast *Assistant) WithHistory(ctx *agentcontext.Context, input []age...
method loadHistory (line 116) | func (ast *Assistant) loadHistory(ctx *agentcontext.Context, maxSize int...
method convertStoreMessageToContext (line 162) | func (ast *Assistant) convertStoreMessageToContext(msg *storetypes.Messa...
method extractContentFromProps (line 203) | func (ast *Assistant) extractContentFromProps(props map[string]interface...
method convertToolCallToContext (line 241) | func (ast *Assistant) convertToolCallToContext(msg *storetypes.Message) ...
function parseToolCallRawChunks (line 282) | func parseToolCallRawChunks(raw string) (name, args string) {
function splitJSONArrays (line 312) | func splitJSONArrays(s string) []string {
method convertActionToContext (line 336) | func (ast *Assistant) convertActionToContext(msg *storetypes.Message) *a...
method findOverlapIndex (line 368) | func (ast *Assistant) findOverlapIndex(history, input []agentcontext.Mes...
method messagesMatch (line 403) | func (ast *Assistant) messagesMatch(a, b agentcontext.Message) bool {
method contentMatches (line 414) | func (ast *Assistant) contentMatches(a, b interface{}) bool {
FILE: agent/assistant/history_test.go
function newHistoryTestContext (line 25) | func newHistoryTestContext(chatID string) *agentcontext.Context {
function TestWithHistory (line 51) | func TestWithHistory(t *testing.T) {
function TestHistoryLoading (line 385) | func TestHistoryLoading(t *testing.T) {
function TestHistoryEdgeCases (line 758) | func TestHistoryEdgeCases(t *testing.T) {
FILE: agent/assistant/hook/create.go
method Create (line 13) | func (s *Script) Create(ctx *context.Context, messages []context.Message...
method applyContextAdjustments (line 44) | func (s *Script) applyContextAdjustments(ctx *context.Context, response ...
method applyOptionsAdjustments (line 75) | func (s *Script) applyOptionsAdjustments(opts *context.Options, response...
method getHookCreateResponse (line 83) | func (s *Script) getHookCreateResponse(res interface{}) (*context.HookCr...
FILE: agent/assistant/hook/create_bench_test.go
function BenchmarkSimpleStandardMode (line 20) | func BenchmarkSimpleStandardMode(b *testing.B) {
function BenchmarkSimplePerformanceMode (line 47) | func BenchmarkSimplePerformanceMode(b *testing.B) {
function BenchmarkBusinessStandardMode (line 78) | func BenchmarkBusinessStandardMode(b *testing.B) {
function BenchmarkBusinessPerformanceMode (line 108) | func BenchmarkBusinessPerformanceMode(b *testing.B) {
function BenchmarkConcurrentSimpleStandardMode (line 143) | func BenchmarkConcurrentSimpleStandardMode(b *testing.B) {
function BenchmarkConcurrentSimplePerformanceMode (line 175) | func BenchmarkConcurrentSimplePerformanceMode(b *testing.B) {
function BenchmarkConcurrentBusinessStandardMode (line 207) | func BenchmarkConcurrentBusinessStandardMode(b *testing.B) {
function BenchmarkConcurrentBusinessPerformanceMode (line 242) | func BenchmarkConcurrentBusinessPerformanceMode(b *testing.B) {
function getBusinessScenarios (line 279) | func getBusinessScenarios() []struct {
function newBenchContext (line 297) | func newBenchContext(chatID, assistantID string) *context.Context {
FILE: agent/assistant/hook/create_mem_test.go
function TestMemoryLeakStandardMode (line 22) | func TestMemoryLeakStandardMode(t *testing.T) {
function TestMemoryLeakPerformanceMode (line 110) | func TestMemoryLeakPerformanceMode(t *testing.T) {
function TestMemoryLeakBusinessScenarios (line 195) | func TestMemoryLeakBusinessScenarios(t *testing.T) {
function TestMemoryLeakConcurrent (line 286) | func TestMemoryLeakConcurrent(t *testing.T) {
function TestMemoryLeakNestedCalls (line 371) | func TestMemoryLeakNestedCalls(t *testing.T) {
function TestMemoryLeakNestedConcurrent (line 447) | func TestMemoryLeakNestedConcurrent(t *testing.T) {
function TestIsolateDisposal (line 533) | func TestIsolateDisposal(t *testing.T) {
function newMemTestContext (line 613) | func newMemTestContext(chatID, assistantID string) *context.Context {
FILE: agent/assistant/hook/create_nested_test.go
function TestNestedScriptCall (line 14) | func TestNestedScriptCall(t *testing.T) {
function TestNestedScriptCallConcurrent (line 58) | func TestNestedScriptCallConcurrent(t *testing.T) {
FILE: agent/assistant/hook/create_test.go
function newTestContext (line 15) | func newTestContext(chatID, assistantID string) *context.Context {
function TestCreate (line 55) | func TestCreate(t *testing.T) {
FILE: agent/assistant/hook/goroutine_leak_test.go
function TestGoroutineLeakDetailed (line 20) | func TestGoroutineLeakDetailed(t *testing.T) {
function TestGoroutineLeakByComponent (line 92) | func TestGoroutineLeakByComponent(t *testing.T) {
function TestGoroutineLeakWithoutRelease (line 170) | func TestGoroutineLeakWithoutRelease(t *testing.T) {
function saveGoroutineProfile (line 224) | func saveGoroutineProfile(filename string) {
function analyzeGoroutineProfiles (line 234) | func analyzeGoroutineProfiles(t *testing.T, dir string) {
function countGoroutinesByFunction (line 269) | func countGoroutinesByFunction(profile string) map[string]int {
function truncate (line 288) | func truncate(s string, max int) string {
function newLeakTestContext (line 295) | func newLeakTestContext(chatID, assistantID string) *context.Context {
FILE: agent/assistant/hook/next.go
method Next (line 13) | func (s *Script) Next(ctx *context.Context, payload *context.NextHookPay...
method getNextHookResponse (line 46) | func (s *Script) getNextHookResponse(res interface{}) (*context.NextHook...
FILE: agent/assistant/hook/next_test.go
function newTestContextForNext (line 16) | func newTestContextForNext(chatID, assistantID string) *context.Context {
function TestNext (line 56) | func TestNext(t *testing.T) {
FILE: agent/assistant/hook/realworld_next_test.go
function newRealWorldNextContext (line 15) | func newRealWorldNextContext(chatID, assistantID string) *context.Context {
function TestRealWorldNextStandard (line 43) | func TestRealWorldNextStandard(t *testing.T) {
function TestRealWorldNextCustomData (line 86) | func TestRealWorldNextCustomData(t *testing.T) {
function TestRealWorldNextDelegate (line 134) | func TestRealWorldNextDelegate(t *testing.T) {
function TestRealWorldNextProcessTools (line 178) | func TestRealWorldNextProcessTools(t *testing.T) {
function TestRealWorldNextErrorRecovery (line 249) | func TestRealWorldNextErrorRecovery(t *testing.T) {
function TestRealWorldNextConditional (line 297) | func TestRealWorldNextConditional(t *testing.T) {
function TestRealWorldNextDefault (line 375) | func TestRealWorldNextDefault(t *testing.T) {
FILE: agent/assistant/hook/realworld_stress_test.go
function TestRealWorldSimpleScenario (line 24) | func TestRealWorldSimpleScenario(t *testing.T) {
function TestRealWorldMCPScenarios (line 55) | func TestRealWorldMCPScenarios(t *testing.T) {
function TestRealWorldTraceIntensive (line 225) | func TestRealWorldTraceIntensive(t *testing.T) {
function TestRealWorldStressSimple (line 258) | func TestRealWorldStressSimple(t *testing.T) {
function TestRealWorldStressMCP (line 318) | func TestRealWorldStressMCP(t *testing.T) {
function TestRealWorldStressFullWorkflow (line 408) | func TestRealWorldStressFullWorkflow(t *testing.T) {
function TestRealWorldStressConcurrent (line 488) | func TestRealWorldStressConcurrent(t *testing.T) {
function TestRealWorldStressResourceHeavy (line 639) | func TestRealWorldStressResourceHeavy(t *testing.T) {
function newRealWorldContext (line 722) | func newRealWorldContext(chatID, assistantID string) *context.Context {
function getMemStats (line 762) | func getMemStats() uint64 {
FILE: agent/assistant/hook/script.go
method Execute (line 10) | func (s *Script) Execute(ctx *context.Context, method string, args ...in...
FILE: agent/assistant/hook/types.go
type Script (line 8) | type Script struct
FILE: agent/assistant/llm.go
method executeLLMStream (line 12) | func (ast *Assistant) executeLLMStream(
method executeLLMForToolRetry (line 80) | func (ast *Assistant) executeLLMForToolRetry(
FILE: agent/assistant/load.go
function LoadBuiltIn (line 33) | func LoadBuiltIn() error {
function SetStorage (line 134) | func SetStorage(s store.Store) {
function GetStorage (line 139) | func GetStorage() store.Store {
function SetConnector (line 144) | func SetConnector(c string) {
function SetGlobalUses (line 149) | func SetGlobalUses(uses *context.Uses) {
function SetGlobalPrompts (line 154) | func SetGlobalPrompts(prompts []store.Prompt) {
function SetStoreSetting (line 159) | func SetStoreSetting(setting *store.Setting) {
function GetStoreSetting (line 164) | func GetStoreSetting() *store.Setting {
function GetGlobalPrompts (line 170) | func GetGlobalPrompts(ctx map[string]string) []store.Prompt {
function SetGlobalKBSetting (line 178) | func SetGlobalKBSetting(kbSetting *store.KBSetting) {
function GetGlobalKBSetting (line 183) | func GetGlobalKBSetting() *store.KBSetting {
function SetGlobalSearchConfig (line 188) | func SetGlobalSearchConfig(config *searchTypes.Config) {
function GetGlobalSearchConfig (line 193) | func GetGlobalSearchConfig() *searchTypes.Config {
function SetCache (line 198) | func SetCache(capacity int) {
function ClearCache (line 204) | func ClearCache() {
function GetCache (line 212) | func GetCache() *Cache {
function LoadStore (line 217) | func LoadStore(id string) (*Assistant, error) {
function loadPackage (line 271) | func loadPackage(path string) (map[string]interface{}, error) {
function LoadPath (line 307) | func LoadPath(path string) (*Assistant, error) {
function loadMap (line 430) | func loadMap(data map[string]interface{}) (*Assistant, error) {
method initialize (line 882) | func (ast *Assistant) initialize() error {
function mergeUses (line 901) | func mergeUses(base, override *context.Uses) *context.Uses {
function mergeSearchConfig (line 941) | func mergeSearchConfig(base, override *searchTypes.Config) *searchTypes....
function extractSandboxVersion (line 1102) | func extractSandboxVersion(v any) string {
FILE: agent/assistant/load_merge_test.go
function TestLoadPathMerge (line 14) | func TestLoadPathMerge(t *testing.T) {
function TestLoadPathMergeOverride (line 110) | func TestLoadPathMergeOverride(t *testing.T) {
function TestLoadPathMergeEmpty (line 184) | func TestLoadPathMergeEmpty(t *testing.T) {
function TestLoadPathUsesAndSearchMerge (line 250) | func TestLoadPathUsesAndSearchMerge(t *testing.T) {
function TestLoadPathSearchAssistant (line 300) | func TestLoadPathSearchAssistant(t *testing.T) {
FILE: agent/assistant/load_process_test.go
function TestLoadProcessIntegration (line 11) | func TestLoadProcessIntegration(t *testing.T) {
function TestLoadProcessMultipleAssistants (line 91) | func TestLoadProcessMultipleAssistants(t *testing.T) {
FILE: agent/assistant/load_store_test.go
function TestLoadStoreWithSource (line 19) | func TestLoadStoreWithSource(t *testing.T) {
function TestLoadStoreWithoutSource (line 103) | func TestLoadStoreWithoutSource(t *testing.T) {
function newStoreTestContext (line 179) | func newStoreTestContext(chatID, assistantID string) *context.Context {
function TestLoadStoreWithSourceExecuteHook (line 207) | func TestLoadStoreWithSourceExecuteHook(t *testing.T) {
function TestLoadStoreWithPromptPresets (line 286) | func TestLoadStoreWithPromptPresets(t *testing.T) {
function TestLoadStoreWithDisableGlobalPrompts (line 356) | func TestLoadStoreWithDisableGlobalPrompts(t *testing.T) {
function TestLoadStoreCaching (line 399) | func TestLoadStoreCaching(t *testing.T) {
function TestLoadStoreNotFound (line 445) | func TestLoadStoreNotFound(t *testing.T) {
function TestLoadStoreWithAllFields (line 456) | func TestLoadStoreWithAllFields(t *testing.T) {
function TestLoadStoreHookWithTypeScript (line 602) | func TestLoadStoreHookWithTypeScript(t *testing.T) {
function TestLoadStoreHookReturnNull (line 726) | func TestLoadStoreHookReturnNull(t *testing.T) {
function TestLoadStoreHookWithPromptPreset (line 777) | func TestLoadStoreHookWithPromptPreset(t *testing.T) {
function TestLoadStoreHookDisableGlobalPrompts (line 873) | func TestLoadStoreHookDisableGlobalPrompts(t *testing.T) {
function TestLoadStoreWithSearchConfig (line 949) | func TestLoadStoreWithSearchConfig(t *testing.T) {
function TestLoadStoreWithPartialSearchConfig (line 1091) | func TestLoadStoreWithPartialSearchConfig(t *testing.T) {
function TestLoadStoreWithoutSearchConfig (line 1151) | func TestLoadStoreWithoutSearchConfig(t *testing.T) {
FILE: agent/assistant/load_system.go
type SystemConfig (line 34) | type SystemConfig struct
function SetSystemConfig (line 49) | func SetSystemConfig(config *SystemConfig) {
function GetSystemConfig (line 54) | func GetSystemConfig() *SystemConfig {
function LoadSystemAgents (line 62) | func LoadSystemAgents() error {
function loadSystemAgent (line 137) | func loadSystemAgent(id, pathPrefix string) (*Assistant, error) {
function resolveSystemConnector (line 208) | func resolveSystemConnector(agentID string) string {
function findCapableConnector (line 258) | func findCapableConnector() string {
function loadSystemPromptPresets (line 275) | func loadSystemPromptPresets(pathPrefix string) map[string][]store.Prompt {
function loadSystemScripts (line 301) | func loadSystemScripts(pathPrefix string) (string, map[string]string) {
function loadSystemLocales (line 334) | func loadSystemLocales(pathPrefix string) (i18n.Map, error) {
FILE: agent/assistant/load_test.go
function prepare (line 15) | func prepare(t *testing.T) {
function prepareAgent (line 19) | func prepareAgent(t *testing.T) {
function TestLoadPath (line 26) | func TestLoadPath(t *testing.T) {
function TestLoadPathMCPTest (line 215) | func TestLoadPathMCPTest(t *testing.T) {
function TestLoadPathBuildRequest (line 239) | func TestLoadPathBuildRequest(t *testing.T) {
function TestCache (line 259) | func TestCache(t *testing.T) {
function TestClone (line 316) | func TestClone(t *testing.T) {
function TestUpdate (line 364) | func TestUpdate(t *testing.T) {
function TestMap (line 449) | func TestMap(t *testing.T) {
function TestLoadSystemAgents (line 483) | func TestLoadSystemAgents(t *testing.T) {
function TestLoadPathSandboxV2 (line 598) | func TestLoadPathSandboxV2(t *testing.T) {
function TestValidate (line 754) | func TestValidate(t *testing.T) {
FILE: agent/assistant/mcp.go
constant MaxMCPTools (line 19) | MaxMCPTools = 20
function MCPToolName (line 31) | func MCPToolName(serverID, toolName string) string {
function ParseMCPToolName (line 48) | func ParseMCPToolName(formattedName string) (string, string, bool) {
method buildMCPTools (line 75) | func (ast *Assistant) buildMCPTools(ctx *agentContext.Context, createRes...
method executeToolCalls (line 223) | func (ast *Assistant) executeToolCalls(ctx *agentContext.Context, toolCa...
method executeSingleToolCall (line 240) | func (ast *Assistant) executeSingleToolCall(ctx *agentContext.Context, t...
method executeMultipleToolCallsParallel (line 411) | func (ast *Assistant) executeMultipleToolCallsParallel(ctx *agentContext...
function isRetryableToolError (line 477) | func isRetryableToolError(err error) bool {
method shouldRetrySequential (line 531) | func (ast *Assistant) shouldRetrySequential(results []ToolCallResult) bo...
method executeServerToolsParallelWithTrace (line 544) | func (ast *Assistant) executeServerToolsParallelWithTrace(mcpCtx context...
method executeServerToolsSequentialWithTrace (line 676) | func (ast *Assistant) executeServerToolsSequentialWithTrace(mcpCtx conte...
FILE: agent/assistant/mcp_test.go
function TestMCPToolName (line 17) | func TestMCPToolName(t *testing.T) {
function TestParseMCPToolName (line 75) | func TestParseMCPToolName(t *testing.T) {
function TestMCPToolName_RoundTrip (line 181) | func TestMCPToolName_RoundTrip(t *testing.T) {
function TestMCPToolContextPassing (line 246) | func TestMCPToolContextPassing(t *testing.T) {
function TestMCPToolContextPassingParallel (line 326) | func TestMCPToolContextPassingParallel(t *testing.T) {
FILE: agent/assistant/next.go
method processNextResponse (line 11) | func (ast *Assistant) processNextResponse(npc *NextProcessContext) (*age...
method handleDelegation (line 43) | func (ast *Assistant) handleDelegation(
method buildStandardResponse (line 70) | func (ast *Assistant) buildStandardResponse(npc *NextProcessContext) *ag...
FILE: agent/assistant/permission.go
method checkPermissions (line 9) | func (ast *Assistant) checkPermissions(ctx *context.Context) error {
FILE: agent/assistant/sandbox.go
function GetSandboxManager (line 33) | func GetSandboxManager() (*infraSandbox.Manager, error) {
method HasSandbox (line 52) | func (ast *Assistant) HasSandbox() bool {
method initSandbox (line 60) | func (ast *Assistant) initSandbox(ctx *context.Context, opts *context.Op...
method executeSandboxStream (line 141) | func (ast *Assistant) executeSandboxStream(
method buildSandboxOptions (line 202) | func (ast *Assistant) buildSandboxOptions(ctx *context.Context, opts *co...
method loadMCPToolsForIPC (line 341) | func (ast *Assistant) loadMCPToolsForIPC(ctx *context.Context) (map[stri...
method BuildMCPConfigForSandbox (line 427) | func (ast *Assistant) BuildMCPConfigForSandbox(ctx *context.Context) ([]...
function resolveEnvValue (line 457) | func resolveEnvValue(value string) string {
FILE: agent/assistant/sandbox_debug_test.go
function TestSandboxDebugHasSandbox (line 13) | func TestSandboxDebugHasSandbox(t *testing.T) {
function TestSandboxDebugPrompts (line 57) | func TestSandboxDebugPrompts(t *testing.T) {
FILE: agent/assistant/sandbox_e2e_test.go
function newSandboxE2EContext (line 20) | func newSandboxE2EContext(chatIDPrefix, assistantID string) *context.Con...
function TestSandboxBasicE2E (line 55) | func TestSandboxBasicE2E(t *testing.T) {
function truncateString (line 115) | func truncateString(s string, maxLen int) string {
function TestSandboxHooksE2E (line 123) | func TestSandboxHooksE2E(t *testing.T) {
function TestSandboxFullE2E (line 168) | func TestSandboxFullE2E(t *testing.T) {
function TestSandboxContextAccess (line 220) | func TestSandboxContextAccess(t *testing.T) {
function TestSandboxMCPToolCall (line 268) | func TestSandboxMCPToolCall(t *testing.T) {
function TestSandboxMCPEchoTool (line 357) | func TestSandboxMCPEchoTool(t *testing.T) {
function TestSandboxLoadConfiguration (line 419) | func TestSandboxLoadConfiguration(t *testing.T) {
FILE: agent/assistant/sandbox_integration_test.go
function TestSandboxOptionsBuilding (line 18) | func TestSandboxOptionsBuilding(t *testing.T) {
function TestClaudeCommandBuilding (line 52) | func TestClaudeCommandBuilding(t *testing.T) {
function TestClaudeProxyConfigBuilding (line 109) | func TestClaudeProxyConfigBuilding(t *testing.T) {
function TestDefaultImageSelection (line 136) | func TestDefaultImageSelection(t *testing.T) {
function TestSandboxCommandValidation (line 155) | func TestSandboxCommandValidation(t *testing.T) {
function TestHasSandboxMethod (line 175) | func TestHasSandboxMethod(t *testing.T) {
FILE: agent/assistant/sandbox_test.go
function TestLoadSandboxBasicAssistant (line 20) | func TestLoadSandboxBasicAssistant(t *testing.T) {
function TestLoadSandboxHooksAssistant (line 43) | func TestLoadSandboxHooksAssistant(t *testing.T) {
function TestLoadSandboxFullAssistant (line 65) | func TestLoadSandboxFullAssistant(t *testing.T) {
function TestSandboxConfigValidation (line 105) | func TestSandboxConfigValidation(t *testing.T) {
function TestSkillsDirectoryResolution (line 148) | func TestSkillsDirectoryResolution(t *testing.T) {
function TestMCPConfiguration (line 204) | func TestMCPConfiguration(t *testing.T) {
function TestBuildMCPConfigForSandbox (line 231) | func TestBuildMCPConfigForSandbox(t *testing.T) {
function TestSandboxMCPAndSkillsOptions (line 280) | func TestSandboxMCPAndSkillsOptions(t *testing.T) {
FILE: agent/assistant/sandbox_v2.go
method HasSandboxV2 (line 21) | func (ast *Assistant) HasSandboxV2() bool {
method initSandboxV2 (line 28) | func (ast *Assistant) initSandboxV2(ctx *context.Context, opts *context....
method executeSandboxV2Stream (line 152) | func (ast *Assistant) executeSandboxV2Stream(
method initStandaloneWorkspace (line 213) | func (ast *Assistant) initStandaloneWorkspace(ctx *context.Context) {
function buildBoxDisplayName (line 233) | func buildBoxDisplayName(ctx *context.Context, assistantID, rawName stri...
function updateLoadingV2 (line 259) | func updateLoadingV2(ctx *context.Context, loadingMsgID, msgKey string) {
function closeLoadingV2 (line 275) | func closeLoadingV2(ctx *context.Context, loadingMsgID, msgKey string) {
FILE: agent/assistant/scripts.go
method Execute (line 22) | func (s *Script) Execute(ctx context.Context, method string, args ...int...
method ExecuteWithAuthorized (line 27) | func (s *Script) ExecuteWithAuthorized(ctx context.Context, method strin...
function LoadScripts (line 53) | func LoadScripts(srcDir string) (*hook.Script, map[string]*Script, error) {
function generateScriptID (line 128) | func generateScriptID(filePath string, srcDir string) string {
function loadScriptFile (line 147) | func loadScriptFile(file string) (*hook.Script, error) {
function loadScriptFromSource (line 159) | func loadScriptFromSource(source string, file string) (*v8.Script, error) {
function loadScriptV8 (line 168) | func loadScriptV8(file string) (*v8.Script, error) {
function makeScriptID (line 180) | func makeScriptID(file string, root string) string {
function LoadScriptsFromData (line 199) | func LoadScriptsFromData(data map[string]interface{}, assistantID string...
function loadScriptsField (line 280) | func loadScriptsField(scriptsData interface{}) (map[string]*Script, erro...
method RegisterScripts (line 332) | func (ast *Assistant) RegisterScripts() error {
method UnregisterScripts (line 353) | func (ast *Assistant) UnregisterScripts() error {
function makeScriptHandler (line 369) | func makeScriptHandler(script *Script) process.Handler {
FILE: agent/assistant/scripts_process_test.go
function TestScriptsProcessFlow (line 13) | func TestScriptsProcessFlow(t *testing.T) {
function TestScriptsProcessUsing (line 116) | func TestScriptsProcessUsing(t *testing.T) {
function TestScriptsProcessError (line 187) | func TestScriptsProcessError(t *testing.T) {
FILE: agent/assistant/scripts_test.go
function TestLoadScriptsFromData (line 18) | func TestLoadScriptsFromData(t *testing.T) {
function TestGenerateScriptID (line 115) | func TestGenerateScriptID(t *testing.T) {
function TestExecuteWithAuthorized (line 161) | func TestExecuteWithAuthorized(t *testing.T) {
FILE: agent/assistant/search.go
method shouldAutoSearch (line 27) | func (ast *Assistant) shouldAutoSearch(ctx *context.Context, messages []...
function parseSearchField (line 83) | func parseSearchField(search any) *SearchIntent {
method checkSearchIntent (line 150) | func (ast *Assistant) checkSearchIntent(ctx *context.Context, messages [...
function parseSearchIntent (line 236) | func parseSearchIntent(intentData map[string]interface{}) *SearchIntent {
function parseSearchIntentFromContent (line 280) | func parseSearchIntentFromContent(content string) *SearchIntent {
method sendIntentLoading (line 317) | func (ast *Assistant) sendIntentLoading(ctx *context.Context) string {
method sendIntentDone (line 340) | func (ast *Assistant) sendIntentDone(ctx *context.Context, loadingID str...
method getMergedSearchUses (line 370) | func (ast *Assistant) getMergedSearchUses(createResponse *context.HookCr...
method executeAutoSearch (line 438) | func (ast *Assistant) executeAutoSearch(ctx *context.Context, messages [...
method sendSearchLoading (line 581) | func (ast *Assistant) sendSearchLoading(ctx *context.Context) string {
method sendKeywordLoading (line 603) | func (ast *Assistant) sendKeywordLoading(ctx *context.Context) string {
method sendKeywordDone (line 624) | func (ast *Assistant) sendKeywordDone(ctx *context.Context, loadingID st...
method sendSearchResult (line 648) | func (ast *Assistant) sendSearchResult(ctx *context.Context, loadingID s...
method sendSearchDone (line 678) | func (ast *Assistant) sendSearchDone(ctx *context.Context, loadingID str...
method createSearchTrace (line 715) | func (ast *Assistant) createSearchTrace(ctx *context.Context, query stri...
method completeSearchTrace (line 754) | func (ast *Assistant) completeSearchTrace(node traceTypes.Node, resultCo...
type buildSearchRequestsOptions (line 777) | type buildSearchRequestsOptions struct
method buildSearchRequests (line 785) | func (ast *Assistant) buildSearchRequests(ctx *context.Context, query st...
method injectSearchContext (line 894) | func (ast *Assistant) injectSearchContext(messages []context.Message, re...
function extractTextContent (line 945) | func extractTextContent(msg context.Message) string {
function buildContextMessage (line 986) | func buildContextMessage(messages []context.Message) []context.Message {
function extractQueryFromMessages (line 1043) | func extractQueryFromMessages(messages []context.Message) string {
function truncateString (line 1070) | func truncateString(s string, maxLen int) string {
type SearchExecutionResult (line 1082) | type SearchExecutionResult struct
function keywordsToQuery (line 1095) | func keywordsToQuery(keywords []searchTypes.Keyword) string {
function keywordsToStrings (line 1120) | func keywordsToStrings(keywords []searchTypes.Keyword) []string {
function containsSearchType (line 1132) | func containsSearchType(types []string, searchType string) bool {
method saveSearch (line 1143) | func (ast *Assistant) saveSearch(ctx *context.Context, execResult *Searc...
function convertToStoreReferences (line 1196) | func convertToStoreReferences(refs []*searchTypes.Reference) []storeType...
method configToMap (line 1234) | func (ast *Assistant) configToMap(config *searchTypes.Config) map[string...
method getSearchProviderInfo (line 1273) | func (ast *Assistant) getSearchProviderInfo(config *searchTypes.Config, ...
FILE: agent/assistant/search_auth_db.go
function BuildDBAuthWheres (line 11) | func BuildDBAuthWheres(ctx *context.Context) []gou.Where {
FILE: agent/assistant/search_auth_integration_test.go
constant TestUserA (line 25) | TestUserA = "user_a"
constant TestUserB (line 26) | TestUserB = "user_b"
constant TestTeam1 (line 27) | TestTeam1 = "team_1"
constant TestTeam2 (line 28) | TestTeam2 = "team_2"
type authTestCollections (line 32) | type authTestCollections struct
method cleanup (line 49) | func (c *authTestCollections) cleanup(ctx context.Context, t *testing....
function newAuthTestCollections (line 39) | func newAuthTestCollections() *authTestCollections {
function TestKBCollectionAuthFilter (line 64) | func TestKBCollectionAuthFilter(t *testing.T) {
function TestDBAuthWheresFilter (line 157) | func TestDBAuthWheresFilter(t *testing.T) {
function TestKBSearchIntegration (line 275) | func TestKBSearchIntegration(t *testing.T) {
function createAuthContext (line 421) | func createAuthContext(userID, teamID string, teamOnly, ownerOnly bool) ...
function createAuthCollection (line 433) | func createAuthCollection(ctx context.Context, t *testing.T, id, userID,...
function addAuthDocument (line 461) | func addAuthDocument(ctx context.Context, t *testing.T, collectionID, ti...
function sanitizeForID (line 487) | func sanitizeForID(s string) string {
function executeKBSearchOnCollections (line 499) | func executeKBSearchOnCollections(t *testing.T, collections []string, qu...
FILE: agent/assistant/search_auth_kb.go
function FilterKBCollectionsByAuth (line 14) | func FilterKBCollectionsByAuth(ctx *agentContext.Context, collections []...
function hasCollectionAccess (line 50) | func hasCollectionAccess(authInfo *oauthtypes.AuthorizedInfo, collection...
function isPublicValue (line 109) | func isPublicValue(v interface{}) bool {
FILE: agent/assistant/search_auto_disabled_test.go
function newSearchAutoDisabledTestContext (line 17) | func newSearchAutoDisabledTestContext(chatID, assistantID string) *conte...
function TestSearchAutoDisabled (line 39) | func TestSearchAutoDisabled(t *testing.T) {
FILE: agent/assistant/search_auto_full_test.go
function newSearchAutoFullTestContext (line 18) | func newSearchAutoFullTestContext(chatID, assistantID string) *context.C...
function TestSearchAutoFull (line 40) | func TestSearchAutoFull(t *testing.T) {
FILE: agent/assistant/search_auto_hook_disable_test.go
function newSearchAutoHookDisableTestContext (line 17) | func newSearchAutoHookDisableTestContext(chatID, assistantID string) *co...
function TestSearchAutoHookDisable (line 39) | func TestSearchAutoHookDisable(t *testing.T) {
FILE: agent/assistant/search_auto_keyword_test.go
function newKeywordTestContext (line 18) | func newKeywordTestContext(chatID, assistantID string) *context.Context {
function TestSearchAutoKeyword (line 40) | func TestSearchAutoKeyword(t *testing.T) {
function TestSearchAutoKeywordNotConfigured (line 134) | func TestSearchAutoKeywordNotConfigured(t *testing.T) {
FILE: agent/assistant/search_auto_web_test.go
function newSearchAutoTestContext (line 18) | func newSearchAutoTestContext(chatID, assistantID string) *context.Conte...
function TestSearchAutoWeb (line 40) | func TestSearchAutoWeb(t *testing.T) {
FILE: agent/assistant/source.go
function loadSource (line 16) | func loadSource(source string, assistantID string) (*hook.Script, error) {
FILE: agent/assistant/trace.go
method initAgentTraceNode (line 14) | func (ast *Assistant) initAgentTraceNode(ctx *context.Context, inputMess...
method traceAgentHistory (line 31) | func (ast *Assistant) traceAgentHistory(ctx *context.Context, agentNode ...
method traceCreateHook (line 43) | func (ast *Assistant) traceCreateHook(agentNode types.Node, createRespon...
method traceConnectorCapabilities (line 52) | func (ast *Assistant) traceConnectorCapabilities(agentNode types.Node, c...
method traceLLMRequest (line 61) | func (ast *Assistant) traceLLMRequest(ctx *context.Context, connID strin...
method traceLLMComplete (line 79) | func (ast *Assistant) traceLLMComplete(ctx *context.Context, completionR...
method traceLLMFail (line 89) | func (ast *Assistant) traceLLMFail(ctx *context.Context, err error) {
method traceAgentCompletion (line 99) | func (ast *Assistant) traceAgentCompletion(ctx *context.Context, createR...
method traceAgentOutput (line 135) | func (ast *Assistant) traceAgentOutput(agentNode types.Node, createRespo...
method traceAgentFail (line 150) | func (ast *Assistant) traceAgentFail(agentNode types.Node, err error) {
method traceLLMRetryRequest (line 159) | func (ast *Assistant) traceLLMRetryRequest(ctx *context.Context, connID ...
FILE: agent/assistant/types.go
constant HookErrorMethodNotFound (line 15) | HookErrorMethodNotFound = "method not found"
type API (line 19) | type API interface
type Script (line 24) | type Script struct
type Assistant (line 29) | type Assistant struct
type MCPTool (line 42) | type MCPTool struct
type ToolCallResult (line 50) | type ToolCallResult struct
method Server (line 62) | func (r *ToolCallResult) Server() string {
method Tool (line 69) | func (r *ToolCallResult) Tool() string {
method ParsedContent (line 97) | func (r *ToolCallResult) ParsedContent() (interface{}, error) {
type NextProcessContext (line 76) | type NextProcessContext struct
FILE: agent/assistant/utils.go
function getTimestamp (line 14) | func getTimestamp(v interface{}) (int64, error) {
function getBool (line 47) | func getBool(data map[string]interface{}, key string) bool {
function stringHash (line 66) | func stringHash(v string) string {
function ParseJSON (line 73) | func ParseJSON(jsonStr string, v interface{}) error {
FILE: agent/caller/caller.go
type AgentCaller (line 11) | type AgentCaller interface
FILE: agent/caller/context.go
function NewHeadlessContext (line 20) | func NewHeadlessContext(parent context.Context, authInfo *types.Authoriz...
FILE: agent/caller/integration_test.go
function TestIntegration_Call_RealAgent (line 16) | func TestIntegration_Call_RealAgent(t *testing.T) {
function TestIntegration_All_RealAgents (line 73) | func TestIntegration_All_RealAgents(t *testing.T) {
function TestIntegration_Any_RealAgents (line 138) | func TestIntegration_Any_RealAgents(t *testing.T) {
function TestIntegration_Race_RealAgents (line 209) | func TestIntegration_Race_RealAgents(t *testing.T) {
FILE: agent/caller/jsapi.go
type JSAPI (line 11) | type JSAPI struct
method Call (line 33) | func (api *JSAPI) Call(agentID string, messages []interface{}, opts ma...
method All (line 46) | func (api *JSAPI) All(requests []interface{}) []interface{} {
method Any (line 57) | func (api *JSAPI) Any(requests []interface{}) []interface{} {
method Race (line 68) | func (api *JSAPI) Race(requests []interface{}) []interface{} {
method CallWithHandler (line 82) | func (api *JSAPI) CallWithHandler(agentID string, messages []interface...
method AllWithHandler (line 92) | func (api *JSAPI) AllWithHandler(requests []interface{}, globalHandler...
method AnyWithHandler (line 99) | func (api *JSAPI) AnyWithHandler(requests []interface{}, globalHandler...
method RaceWithHandler (line 106) | func (api *JSAPI) RaceWithHandler(requests []interface{}, globalHandle...
method forceSkipForSubAgent (line 117) | func (api *JSAPI) forceSkipForSubAgent(req *Request) {
method parseRequestsWithHandlers (line 141) | func (api *JSAPI) parseRequestsWithHandlers(requests []interface{}, gl...
method buildRequest (line 192) | func (api *JSAPI) buildRequest(agentID string, messages []interface{},...
method parseMessages (line 206) | func (api *JSAPI) parseMessages(messages []interface{}) []agentContext...
method parseToolCalls (line 250) | func (api *JSAPI) parseToolCalls(toolCalls []interface{}) []agentConte...
method parseCallOptions (line 281) | func (api *JSAPI) parseCallOptions(opts map[string]interface{}) *CallO...
method parseRequests (line 321) | func (api *JSAPI) parseRequests(requests []interface{}) []*Request {
method convertResults (line 326) | func (api *JSAPI) convertResults(results []*Result) []interface{} {
function NewJSAPI (line 20) | func NewJSAPI(ctx *agentContext.Context) *JSAPI {
function SetJSAPIFactory (line 336) | func SetJSAPIFactory() {
FILE: agent/caller/jsapi_test.go
function TestNewJSAPI (line 13) | func TestNewJSAPI(t *testing.T) {
function TestJSAPI_Call_NoAgentGetter (line 19) | func TestJSAPI_Call_NoAgentGetter(t *testing.T) {
function TestJSAPI_All_Empty (line 44) | func TestJSAPI_All_Empty(t *testing.T) {
function TestJSAPI_Any_Empty (line 51) | func TestJSAPI_Any_Empty(t *testing.T) {
function TestJSAPI_Race_Empty (line 58) | func TestJSAPI_Race_Empty(t *testing.T) {
function TestJSAPI_All_InvalidRequests (line 65) | func TestJSAPI_All_InvalidRequests(t *testing.T) {
function TestJSAPI_Call_WithOptions (line 85) | func TestJSAPI_Call_WithOptions(t *testing.T) {
function TestSetJSAPIFactory (line 123) | func TestSetJSAPIFactory(t *testing.T) {
function TestJSAPI_ImplementsAgentAPI (line 141) | func TestJSAPI_ImplementsAgentAPI(t *testing.T) {
FILE: agent/caller/orchestrator.go
type Orchestrator (line 13) | type Orchestrator struct
method All (line 31) | func (o *Orchestrator) All(reqs []*Request) []*Result {
method Any (line 71) | func (o *Orchestrator) Any(reqs []*Request) []*Result {
method Race (line 142) | func (o *Orchestrator) Race(reqs []*Request) []*Result {
method callAgent (line 210) | func (o *Orchestrator) callAgent(req *Request) *Result {
method callAgentWithForkedContext (line 217) | func (o *Orchestrator) callAgentWithForkedContext(req *Request) *Result {
method callAgentWithContext (line 225) | func (o *Orchestrator) callAgentWithContext(ctx *agentContext.Context,...
function NewOrchestrator (line 18) | func NewOrchestrator(ctx *agentContext.Context) *Orchestrator {
type callResult (line 23) | type callResult struct
function extractContentFromCompletion (line 299) | func extractContentFromCompletion(completion *agentContext.CompletionRes...
FILE: agent/caller/orchestrator_test.go
function TestNewOrchestrator (line 13) | func TestNewOrchestrator(t *testing.T) {
function TestOrchestrator_All_Empty (line 19) | func TestOrchestrator_All_Empty(t *testing.T) {
function TestOrchestrator_Any_Empty (line 27) | func TestOrchestrator_Any_Empty(t *testing.T) {
function TestOrchestrator_Race_Empty (line 35) | func TestOrchestrator_Race_Empty(t *testing.T) {
function TestOrchestrator_All_NoGetter (line 43) | func TestOrchestrator_All_NoGetter(t *testing.T) {
function TestOrchestrator_Any_NoGetter (line 73) | func TestOrchestrator_Any_NoGetter(t *testing.T) {
function TestOrchestrator_Race_NoGetter (line 107) | func TestOrchestrator_Race_NoGetter(t *testing.T) {
function TestOrchestrator_All_NilRequest (line 140) | func TestOrchestrator_All_NilRequest(t *testing.T) {
FILE: agent/caller/process.go
function init (line 15) | func init() {
function processAgentCall (line 24) | func processAgentCall(p *process.Process) interface{} {
function ParseMessages (line 92) | func ParseMessages(raw []map[string]interface{}) []agentContext.Message {
function parseToolCalls (line 131) | func parseToolCalls(toolCalls []interface{}) []agentContext.ToolCall {
FILE: agent/caller/process_e2e_test.go
function newLLMProcess (line 18) | func newLLMProcess(t *testing.T, name string, args ...interface{}) *proc...
function TestProcessCall_LLM_Basic (line 28) | func TestProcessCall_LLM_Basic(t *testing.T) {
function TestProcessCall_LLM_MultipleMessages (line 58) | func TestProcessCall_LLM_MultipleMessages(t *testing.T) {
function TestProcessCall_LLM_WithMetadata (line 83) | func TestProcessCall_LLM_WithMetadata(t *testing.T) {
function TestProcessCall_LLM_SkipOutputForced (line 111) | func TestProcessCall_LLM_SkipOutputForced(t *testing.T) {
function TestProcessCall_CreateHook_Default (line 144) | func TestProcessCall_CreateHook_Default(t *testing.T) {
function TestProcessCall_CreateHook_ReturnFull (line 170) | func TestProcessCall_CreateHook_ReturnFull(t *testing.T) {
function TestProcessCall_NextHook_Standard (line 201) | func TestProcessCall_NextHook_Standard(t *testing.T) {
function TestProcessCall_NextHook_CustomData (line 227) | func TestProcessCall_NextHook_CustomData(t *testing.T) {
function TestProcessCall_Timeout_Short (line 269) | func TestProcessCall_Timeout_Short(t *testing.T) {
function TestProcessCall_Error_MissingAssistantID (line 308) | func TestProcessCall_Error_MissingAssistantID(t *testing.T) {
function TestProcessCall_Error_EmptyMessages (line 324) | func TestProcessCall_Error_EmptyMessages(t *testing.T) {
function TestProcessCall_Error_InvalidArgument (line 339) | func TestProcessCall_Error_InvalidArgument(t *testing.T) {
function TestProcessCall_Error_NoArgument (line 351) | func TestProcessCall_Error_NoArgument(t *testing.T) {
function TestProcessCall_Error_NonexistentAgent (line 362) | func TestProcessCall_Error_NonexistentAgent(t *testing.T) {
FILE: agent/caller/process_test.go
function TestNewHeadlessContext_Basic (line 17) | func TestNewHeadlessContext_Basic(t *testing.T) {
function TestNewHeadlessContext_WithModel (line 45) | func TestNewHeadlessContext_WithModel(t *testing.T) {
function TestNewHeadlessContext_WithChatID (line 58) | func TestNewHeadlessContext_WithChatID(t *testing.T) {
function TestNewHeadlessContext_ForceSkipOverridesUserSkip (line 71) | func TestNewHeadlessContext_ForceSkipOverridesUserSkip(t *testing.T) {
function TestNewHeadlessContext_WithMetadata (line 87) | func TestNewHeadlessContext_WithMetadata(t *testing.T) {
function TestNewHeadlessContext_WithTimeout (line 102) | func TestNewHeadlessContext_WithTimeout(t *testing.T) {
function TestProcessCallRequest_DefaultTimeout (line 118) | func TestProcessCallRequest_DefaultTimeout(t *testing.T) {
function TestParseMessages_Basic (line 131) | func TestParseMessages_Basic(t *testing.T) {
function TestParseMessages_WithOptionalFields (line 146) | func TestParseMessages_WithOptionalFields(t *testing.T) {
function TestParseMessages_Empty (line 168) | func TestParseMessages_Empty(t *testing.T) {
function TestNewResult_Success (line 175) | func TestNewResult_Success(t *testing.T) {
function TestNewResult_WithError (line 190) | func TestNewResult_WithError(t *testing.T) {
function TestNewResult_NilResponse (line 199) | func TestNewResult_NilResponse(t *testing.T) {
function TestNewResult_NilCompletion (line 208) | func TestNewResult_NilCompletion(t *testing.T) {
FILE: agent/caller/sandbox_integration_test.go
function TestSandboxE2E_ClaudeCLIExecution (line 24) | func TestSandboxE2E_ClaudeCLIExecution(t *testing.T) {
function TestSandboxE2E_FileCreation (line 111) | func TestSandboxE2E_FileCreation(t *testing.T) {
function TestSandboxE2E_HookOnlyMode (line 187) | func TestSandboxE2E_HookOnlyMode(t *testing.T) {
function TestSandboxE2E_StreamingResponse (line 255) | func TestSandboxE2E_StreamingResponse(t *testing.T) {
function truncateStr (line 329) | func truncateStr(s string, maxLen int) string {
FILE: agent/caller/types.go
constant DefaultProcessTimeout (line 10) | DefaultProcessTimeout = 600
type Request (line 13) | type Request struct
type CallOptions (line 21) | type CallOptions struct
method ToContextOptions (line 68) | func (o *CallOptions) ToContextOptions() *agentContext.Options {
type Result (line 29) | type Result struct
type ProcessCallRequest (line 39) | type ProcessCallRequest struct
function NewResult (line 54) | func NewResult(agentID string, resp *agentContext.Response, err error) *...
FILE: agent/caller/types_test.go
function TestCallOptions_ToContextOptions_Nil (line 12) | func TestCallOptions_ToContextOptions_Nil(t *testing.T) {
function TestCallOptions_ToContextOptions_Empty (line 18) | func TestCallOptions_ToContextOptions_Empty(t *testing.T) {
function TestCallOptions_ToContextOptions_Full (line 28) | func TestCallOptions_ToContextOptions_Full(t *testing.T) {
function TestRequest_Basic (line 53) | func TestRequest_Basic(t *testing.T) {
function TestResult_Basic (line 66) | func TestResult_Basic(t *testing.T) {
function TestResult_WithError (line 77) | func TestResult_WithError(t *testing.T) {
FILE: agent/content/content.go
function ParseUserInput (line 19) | func ParseUserInput(ctx *agentContext.Context, messages []agentContext.M...
function parseUserInputMessage (line 51) | func parseUserInputMessage(ctx *agentContext.Context, message agentConte...
function parseContentParts (line 74) | func parseContentParts(ctx *agentContext.Context, message agentContext.M...
function parseContentPart (line 95) | func parseContentPart(ctx *agentContext.Context, content agentContext.Co...
function parseFileContent (line 118) | func parseFileContent(ctx *agentContext.Context, content agentContext.Co...
function convertToContentParts (line 148) | func convertToContentParts(content []interface{}) ([]agentContext.Conten...
FILE: agent/content/docx/docx.go
type Docx (line 16) | type Docx struct
method Parse (line 26) | func (h *Docx) Parse(ctx *agentContext.Context, content agentContext.C...
method readFile (line 73) | func (h *Docx) readFile(ctx *agentContext.Context, url string) ([]byte...
method readFromUploader (line 91) | func (h *Docx) readFromUploader(ctx *agentContext.Context, wrapper str...
method readFromCache (line 111) | func (h *Docx) readFromCache(ctx *agentContext.Context, url string) (s...
method saveToCache (line 131) | func (h *Docx) saveToCache(ctx *agentContext.Context, url string, text...
function New (line 21) | func New(options *types.Options) *Docx {
FILE: agent/content/docx/docx_test.go
constant testFilesDir (line 19) | testFilesDir = "assistants/tests/vision-helper/tests"
function newTestContext (line 21) | func newTestContext() *agentContext.Context {
function newTestOptions (line 34) | func newTestOptions() *contentTypes.Options {
function getTestFilePath (line 40) | func getTestFilePath(filename string) string {
function TestParseWithMissingURL (line 49) | func TestParseWithMissingURL(t *testing.T) {
function TestParseWithLocalDocx (line 73) | func TestParseWithLocalDocx(t *testing.T) {
function TestParseWithNonExistentFile (line 108) | func TestParseWithNonExistentFile(t *testing.T) {
FILE: agent/content/image/image.go
type Image (line 18) | type Image struct
method Parse (line 33) | func (h *Image) Parse(ctx *agentContext.Context, content agentContext....
method base64 (line 89) | func (h *Image) base64(ctx *agentContext.Context, content agentContext...
method read (line 116) | func (h *Image) read(ctx *agentContext.Context, url string) ([]byte, s...
method readFromDataURI (line 138) | func (h *Image) readFromDataURI(dataURI string) ([]byte, string, error) {
method readFromUploader (line 175) | func (h *Image) readFromUploader(ctx *agentContext.Context, wrapper st...
method readFromCache (line 204) | func (h *Image) readFromCache(ctx *agentContext.Context, url string) (...
method saveToCache (line 228) | func (h *Image) saveToCache(ctx *agentContext.Context, url string, tex...
method agent (line 246) | func (h *Image) agent(ctx *agentContext.Context, content agentContext....
method callVisionAgent (line 296) | func (h *Image) callVisionAgent(ctx *agentContext.Context, agentID str...
method callMCPVisionTool (line 336) | func (h *Image) callMCPVisionTool(ctx *agentContext.Context, serverID ...
method sendLoading (line 365) | func (h *Image) sendLoading(ctx *agentContext.Context, msg string) str...
method sendLoadingDone (line 386) | func (h *Image) sendLoadingDone(ctx *agentContext.Context, loadingID s...
function New (line 23) | func New(options *types.Options) *Image {
function EncodeToBase64DataURI (line 405) | func EncodeToBase64DataURI(data []byte, contentType string) string {
FILE: agent/content/image/image_test.go
function newTestContext (line 20) | func newTestContext(capabilities *openai.Capabilities) *agentContext.Con...
function newTestOptions (line 48) | func newTestOptions(capabilities *openai.Capabilities, completionOptions...
function TestParseWithVisionSupport (line 56) | func TestParseWithVisionSupport(t *testing.T) {
function TestParseWithoutVisionSupport (line 93) | func TestParseWithoutVisionSupport(t *testing.T) {
function TestParseWithEmptyURL (line 128) | func TestParseWithEmptyURL(t *testing.T) {
function TestParseWithNilImageURL (line 159) | func TestParseWithNilImageURL(t *testing.T) {
function TestEncodeToBase64DataURI (line 188) | func TestEncodeToBase64DataURI(t *testing.T) {
function TestParseDataURIPassthrough (line 234) | func TestParseDataURIPassthrough(t *testing.T) {
function TestParseWithVisionAgent (line 271) | func TestParseWithVisionAgent(t *testing.T) {
function TestParseWithForceUsesVisionAgent (line 316) | func TestParseWithForceUsesVisionAgent(t *testing.T) {
function createTestPNG (line 362) | func createTestPNG() []byte {
FILE: agent/content/pdf/pdf.go
type PDF (line 22) | type PDF struct
method Parse (line 33) | func (h *PDF) Parse(ctx *agentContext.Context, content agentContext.Co...
method ParseMulti (line 55) | func (h *PDF) ParseMulti(ctx *agentContext.Context, content agentConte...
method asImages (line 78) | func (h *PDF) asImages(ctx *agentContext.Context, content agentContext...
method asImagesMulti (line 133) | func (h *PDF) asImagesMulti(ctx *agentContext.Context, content agentCo...
method readPDF (line 242) | func (h *PDF) readPDF(ctx *agentContext.Context, url string) ([]byte, ...
method readFromUploader (line 261) | func (h *PDF) readFromUploader(ctx *agentContext.Context, wrapper stri...
method readFromCache (line 281) | func (h *PDF) readFromCache(ctx *agentContext.Context, url string) (st...
method saveToCache (line 301) | func (h *PDF) saveToCache(ctx *agentContext.Context, url string, text ...
method getPDFProcessor (line 316) | func (h *PDF) getPDFProcessor() (*goupdf.PDF, error) {
method sendLoading (line 344) | func (h *PDF) sendLoading(ctx *agentContext.Context, msg string) string {
method sendLoadingDone (line 360) | func (h *PDF) sendLoadingDone(ctx *agentContext.Context, loadingID str...
function New (line 27) | func New(options *types.Options) *PDF {
FILE: agent/content/pdf/pdf_test.go
constant testFilesDir (line 20) | testFilesDir = "assistants/tests/vision-helper/tests"
function newTestContext (line 23) | func newTestContext(capabilities *openai.Capabilities) *agentContext.Con...
function newTestOptions (line 51) | func newTestOptions(capabilities *openai.Capabilities, completionOptions...
function getTestFilePath (line 59) | func getTestFilePath(filename string) string {
function TestParseWithMissingURL (line 68) | func TestParseWithMissingURL(t *testing.T) {
function TestParseWithEmptyURL (line 97) | func TestParseWithEmptyURL(t *testing.T) {
function TestParseWithLocalPDFAndVisionSupport (line 129) | func TestParseWithLocalPDFAndVisionSupport(t *testing.T) {
function TestParseWithLocalPDFAndVisionAgent (line 176) | func TestParseWithLocalPDFAndVisionAgent(t *testing.T) {
function TestParseMultiWithLocalPDF (line 226) | func TestParseMultiWithLocalPDF(t *testing.T) {
function TestParseWithUnsupportedSource (line 275) | func TestParseWithUnsupportedSource(t *testing.T) {
function TestParseWithNonExistentFile (line 307) | func TestParseWithNonExistentFile(t *testing.T) {
function TestSilentLoadingOption (line 339) | func TestSilentLoadingOption(t *testing.T) {
FILE: agent/content/pptx/pptx.go
type Pptx (line 16) | type Pptx struct
method Parse (line 26) | func (h *Pptx) Parse(ctx *agentContext.Context, content agentContext.C...
method readFile (line 73) | func (h *Pptx) readFile(ctx *agentContext.Context, url string) ([]byte...
method readFromUploader (line 91) | func (h *Pptx) readFromUploader(ctx *agentContext.Context, wrapper str...
method readFromCache (line 111) | func (h *Pptx) readFromCache(ctx *agentContext.Context, url string) (s...
method saveToCache (line 131) | func (h *Pptx) saveToCache(ctx *agentContext.Context, url string, text...
function New (line 21) | func New(options *types.Options) *Pptx {
FILE: agent/content/pptx/pptx_test.go
constant testFilesDir (line 19) | testFilesDir = "assistants/tests/vision-helper/tests"
function newTestContext (line 21) | func newTestContext() *agentContext.Context {
function newTestOptions (line 34) | func newTestOptions() *contentTypes.Options {
function getTestFilePath (line 40) | func getTestFilePath(filename string) string {
function TestParseWithMissingURL (line 49) | func TestParseWithMissingURL(t *testing.T) {
function TestParseWithLocalPptx (line 73) | func TestParseWithLocalPptx(t *testing.T) {
function TestParseWithNonExistentFile (line 108) | func TestParseWithNonExistentFile(t *testing.T) {
FILE: agent/content/text/text.go
type Text (line 96) | type Text struct
method Parse (line 112) | func (h *Text) Parse(ctx *agentContext.Context, content agentContext.C...
method ParseRaw (line 160) | func (h *Text) ParseRaw(ctx *agentContext.Context, content agentContex...
method readFile (line 204) | func (h *Text) readFile(ctx *agentContext.Context, url string) ([]byte...
method readFromUploader (line 222) | func (h *Text) readFromUploader(ctx *agentContext.Context, wrapper str...
method readFromCache (line 242) | func (h *Text) readFromCache(ctx *agentContext.Context, url string) (s...
method saveToCache (line 262) | func (h *Text) saveToCache(ctx *agentContext.Context, url string, text...
function New (line 101) | func New(options *types.Options) *Text {
function IsSupportedExtension (line 106) | func IsSupportedExtension(filename string) bool {
function isCodeFile (line 277) | func isCodeFile(ext string) bool {
function getLanguageFromExt (line 291) | func getLanguageFromExt(ext string) string {
FILE: agent/content/text/text_test.go
constant testFilesDir (line 20) | testFilesDir = "assistants/tests/vision-helper/tests"
function newTestContext (line 22) | func newTestContext() *agentContext.Context {
function newTestOptions (line 35) | func newTestOptions() *contentTypes.Options {
function getTestFilePath (line 41) | func getTestFilePath(filename string) string {
function TestIsSupportedExtension (line 50) | func TestIsSupportedExtension(t *testing.T) {
function TestParseWithMissingURL (line 77) | func TestParseWithMissingURL(t *testing.T) {
function TestParseWithLocalTextFile (line 101) | func TestParseWithLocalTextFile(t *testing.T) {
function TestParseWithLocalMarkdownFile (line 136) | func TestParseWithLocalMarkdownFile(t *testing.T) {
function TestParseWithLocalCodeFile (line 171) | func TestParseWithLocalCodeFile(t *testing.T) {
function TestParseWithLocalYaoFile (line 209) | func TestParseWithLocalYaoFile(t *testing.T) {
function TestParseWithLocalJsonFile (line 244) | func TestParseWithLocalJsonFile(t *testing.T) {
function TestParseWithNonExistentFile (line 279) | func TestParseWithNonExistentFile(t *testing.T) {
function TestParseRawWithLocalFile (line 306) | func TestParseRawWithLocalFile(t *testing.T) {
FILE: agent/content/tools/tools.go
function CallAgent (line 15) | func CallAgent(ctx *agentContext.Context, agentID string, message agentC...
function ExtractTextFromResponse (line 41) | func ExtractTextFromResponse(response *agentContext.Response) (string, e...
function CallMCPTool (line 87) | func CallMCPTool(ctx *agentContext.Context, serverID string, toolName st...
FILE: agent/content/types/types.go
type Options (line 10) | type Options struct
FILE: agent/context/authorized_test.go
function TestContextNew_PreservesAuthorizedInfo (line 15) | func TestContextNew_PreservesAuthorizedInfo(t *testing.T) {
function TestContextTrace_SavesAuthorizedInfo (line 39) | func TestContextTrace_SavesAuthorizedInfo(t *testing.T) {
function TestContextNew_NilAuthorized (line 82) | func TestContextNew_NilAuthorized(t *testing.T) {
FILE: agent/context/buffer.go
type ChatBuffer (line 16) | type ChatBuffer struct
method AddMessage (line 119) | func (b *ChatBuffer) AddMessage(msg *BufferedMessage) {
method AddUserInput (line 154) | func (b *ChatBuffer) AddUserInput(content interface{}, name string) {
method AddAssistantMessage (line 172) | func (b *ChatBuffer) AddAssistantMessage(messageID, msgType string, pr...
method AddStreamingMessage (line 194) | func (b *ChatBuffer) AddStreamingMessage(messageID, msgType string, pr...
method AppendMessageContent (line 222) | func (b *ChatBuffer) AppendMessageContent(messageID string, content st...
method CompleteStreamingMessage (line 247) | func (b *ChatBuffer) CompleteStreamingMessage(messageID string) (strin...
method GetStreamingMessage (line 266) | func (b *ChatBuffer) GetStreamingMessage(messageID string) *BufferedMe...
method GetMessages (line 279) | func (b *ChatBuffer) GetMessages() []*BufferedMessage {
method GetMessageCount (line 289) | func (b *ChatBuffer) GetMessageCount() int {
method BeginStep (line 301) | func (b *ChatBuffer) BeginStep(stepType string, input map[string]inter...
method CompleteStep (line 338) | func (b *ChatBuffer) CompleteStep(output map[string]interface{}) {
method FailCurrentStep (line 350) | func (b *ChatBuffer) FailCurrentStep(status string, err error) {
method GetCurrentStep (line 363) | func (b *ChatBuffer) GetCurrentStep() *BufferedStep {
method GetStepsForResume (line 371) | func (b *ChatBuffer) GetStepsForResume(finalStatus string) []*Buffered...
method GetAllSteps (line 392) | func (b *ChatBuffer) GetAllSteps() []*BufferedStep {
method SetSpaceSnapshot (line 407) | func (b *ChatBuffer) SetSpaceSnapshot(snapshot map[string]interface{}) {
method GetSpaceSnapshot (line 414) | func (b *ChatBuffer) GetSpaceSnapshot() map[string]interface{} {
method ChatID (line 425) | func (b *ChatBuffer) ChatID() string {
method RequestID (line 430) | func (b *ChatBuffer) RequestID() string {
method AssistantID (line 435) | func (b *ChatBuffer) AssistantID() string {
method SetAssistantID (line 440) | func (b *ChatBuffer) SetAssistantID(assistantID string) {
method Connector (line 447) | func (b *ChatBuffer) Connector() string {
method SetConnector (line 452) | func (b *ChatBuffer) SetConnector(connector string) {
method Mode (line 459) | func (b *ChatBuffer) Mode() string {
method SetMode (line 464) | func (b *ChatBuffer) SetMode(mode string) {
type BufferedMessage (line 40) | type BufferedMessage struct
type BufferedStep (line 60) | type BufferedStep struct
constant StepStatusRunning (line 81) | StepStatusRunning = "running"
constant StepStatusCompleted (line 82) | StepStatusCompleted = "completed"
constant StepTypeInput (line 87) | StepTypeInput = "input"
constant StepTypeHookCreate (line 88) | StepTypeHookCreate = "hook_create"
constant StepTypeLLM (line 89) | StepTypeLLM = "llm"
constant StepTypeTool (line 90) | StepTypeTool = "tool"
constant StepTypeHookNext (line 91) | StepTypeHookNext = "hook_next"
constant StepTypeDelegate (line 92) | StepTypeDelegate = "delegate"
constant ResumeStatusFailed (line 97) | ResumeStatusFailed = "failed"
constant ResumeStatusInterrupted (line 98) | ResumeStatusInterrupted = "interrupted"
function NewChatBuffer (line 102) | func NewChatBuffer(chatID, requestID, assistantID, connector, mode strin...
function copyMap (line 475) | func copyMap(src map[string]interface{}) map[string]interface{} {
FILE: agent/context/buffer_test.go
function TestBufferNewChatBuffer (line 18) | func TestBufferNewChatBuffer(t *testing.T) {
function TestBufferAddMessage (line 45) | func TestBufferAddMessage(t *testing.T) {
function TestBufferAddUserInput (line 126) | func TestBufferAddUserInput(t *testing.T) {
function TestBufferAddAssistantMessage (line 164) | func TestBufferAddAssistantMessage(t *testing.T) {
function TestBufferGetMessages (line 256) | func TestBufferGetMessages(t *testing.T) {
function TestBufferGetMessageCount (line 279) | func TestBufferGetMessageCount(t *testing.T) {
function TestBufferBeginStep (line 294) | func TestBufferBeginStep(t *testing.T) {
function TestBufferCompleteStep (line 364) | func TestBufferCompleteStep(t *testing.T) {
function TestBufferFailCurrentStep (line 406) | func TestBufferFailCurrentStep(t *testing.T) {
function TestBufferGetCurrentStep (line 453) | func TestBufferGetCurrentStep(t *testing.T) {
function TestBufferGetStepsForResume (line 477) | func TestBufferGetStepsForResume(t *testing.T) {
function TestBufferGetAllSteps (line 524) | func TestBufferGetAllSteps(t *testing.T) {
function TestBufferSpaceSnapshot (line 550) | func TestBufferSpaceSnapshot(t *testing.T) {
function TestBufferIdentityMethods (line 613) | func TestBufferIdentityMethods(t *testing.T) {
function TestBufferConnectorInMessages (line 653) | func TestBufferConnectorInMessages(t *testing.T) {
function TestBufferConcurrentMessageOperations (line 739) | func TestBufferConcurrentMessageOperations(t *testing.T) {
function TestBufferConcurrentStepOperations (line 772) | func TestBufferConcurrentStepOperations(t *testing.T) {
function TestBufferConcurrentReadWrite (line 796) | func TestBufferConcurrentReadWrite(t *testing.T) {
function TestBufferStepTypeConstants (line 845) | func TestBufferStepTypeConstants(t *testing.T) {
function TestBufferResumeStatusConstants (line 855) | func TestBufferResumeStatusConstants(t *testing.T) {
function TestBufferStepStatusConstants (line 860) | func TestBufferStepStatusConstants(t *testing.T) {
function TestBufferEdgeCases (line 869) | func TestBufferEdgeCases(t *testing.T) {
function TestBufferCompleteWorkflow (line 950) | func TestBufferCompleteWorkflow(t *testing.T) {
function TestBufferMessageSequence (line 1106) | func TestBufferMessageSequence(t *testing.T) {
function TestBufferStepSequence (line 1143) | func TestBufferStepSequence(t *testing.T) {
function TestBufferMultipleRequests (line 1163) | func TestBufferMultipleRequests(t *testing.T) {
function TestBufferStreamingMessage (line 1188) | func TestBufferStreamingMessage(t *testing.T) {
FILE: agent/context/chat.go
constant chatCachePrefix (line 15) | chatCachePrefix = "chat:messages:"
constant chatCacheTTL (line 16) | chatCacheTTL = time.Hour * 24 * 7
function filterNonAssistantMessages (line 20) | func filterNonAssistantMessages(messages []Message) []Message {
function countUserMessages (line 31) | func countUserMessages(messages []Message) int {
function GetChatIDByMessages (line 48) | func GetChatIDByMessages(cache store.Store, messages []Message) (string,...
function CacheChatID (line 97) | func CacheChatID(cache store.Store, messages []Message, chatID string) e...
function GenChatID (line 131) | func GenChatID(safe ...bool) string {
function getKey (line 149) | func getKey(messageHash string) string {
function hashMessage (line 154) | func hashMessage(msg Message) (string, error) {
function hashMessages (line 165) | func hashMessages(messages []Message) (string, error) {
FILE: agent/context/chat_test.go
function getTestCache (line 12) | func getTestCache(t *testing.T) store.Store {
function TestGetChatIDByMessages_NewConversation (line 21) | func TestGetChatIDByMessages_NewConversation(t *testing.T) {
function TestGetChatIDByMessages_ContinuousConversation (line 61) | func TestGetChatIDByMessages_ContinuousConversation(t *testing.T) {
function TestGetChatIDByMessages_DifferentConversations (line 133) | func TestGetChatIDByMessages_DifferentConversations(t *testing.T) {
function TestGetChatIDByMessages_MultiModalContent (line 175) | func TestGetChatIDByMessages_MultiModalContent(t *testing.T) {
function TestGetChatIDByMessages_WithToolCalls (line 223) | func TestGetChatIDByMessages_WithToolCalls(t *testing.T) {
function TestCacheChatID_EmptyMessages (line 279) | func TestCacheChatID_EmptyMessages(t *testing.T) {
function TestCacheChatID_EmptyChatID (line 291) | func TestCacheChatID_EmptyChatID(t *testing.T) {
function TestGetChatIDByMessages_EmptyMessages (line 310) | func TestGetChatIDByMessages_EmptyMessages(t *testing.T) {
function TestGenChatID (line 322) | func TestGenChatID(t *testing.T) {
FILE: agent/context/context.go
function New (line 23) | func New(parent context.Context, authorized *types.AuthorizedInfo, chatI...
method Release (line 55) | func (ctx *Context) Release() {
method GetAuthorizedMap (line 134) | func (ctx *Context) GetAuthorizedMap() map[string]interface{} {
method Fork (line 155) | func (ctx *Context) Fork() *Context {
method Trace (line 243) | func (ctx *Context) Trace() (traceTypes.Manager, error) {
method Map (line 314) | func (ctx *Context) Map() map[string]interface{} {
function Register (line 366) | func Register(ctx *Context) error {
function Unregister (line 380) | func Unregister(contextID string) {
function Get (line 385) | func Get(contextID string) (*Context, error) {
function SendInterrupt (line 401) | func SendInterrupt(contextID string, signal *InterruptSignal) error {
function generateContextID (line 415) | func generateContextID() string {
method RequestID (line 420) | func (ctx *Context) RequestID() string {
method TraceID (line 425) | func (ctx *Context) TraceID() string {
method getMessageMetadata (line 434) | func (ctx *Context) getMessageMetadata(messageID string) *MessageMetadata {
method GetMessageMetadata (line 442) | func (ctx *Context) GetMessageMetadata(messageID string) *MessageMetadata {
method InitBuffer (line 452) | func (ctx *Context) InitBuffer(assistantID, connector, mode string) *Cha...
method HasBuffer (line 458) | func (ctx *Context) HasBuffer() bool {
method BufferUserInput (line 464) | func (ctx *Context) BufferUserInput(messages []Message) {
method BufferAssistantMessage (line 483) | func (ctx *Context) BufferAssistantMessage(messageID, msgType string, pr...
method BeginStep (line 493) | func (ctx *Context) BeginStep(stepType string, input map[string]interfac...
method CompleteStep (line 507) | func (ctx *Context) CompleteStep(output map[string]interface{}) {
method FailCurrentStep (line 515) | func (ctx *Context) FailCurrentStep(status string, err error) {
method shouldSkipHistory (line 524) | func (ctx *Context) shouldSkipHistory() bool {
method IsA2ACall (line 535) | func (ctx *Context) IsA2ACall() bool {
method IsForkedA2ACall (line 543) | func (ctx *Context) IsForkedA2ACall() bool {
method MergeMetadata (line 551) | func (ctx *Context) MergeMetadata(metadata map[string]interface{}) {
FILE: agent/context/context_test.go
function TestGetCompletionRequest (line 19) | func TestGetCompletionRequest(t *testing.T) {
function TestContextNew_WithAuthorized (line 220) | func TestContextNew_WithAuthorized(t *testing.T) {
function floatPtr (line 235) | func floatPtr(f float64) *float64 {
function boolPtr (line 239) | func boolPtr(b bool) *bool {
FILE: agent/context/grpc.go
type GRPCAgentInput (line 15) | type GRPCAgentInput struct
function GetGRPCAgentRequest (line 28) | func GetGRPCAgentRequest(parent context.Context, input GRPCAgentInput) (...
function parseGRPCMessages (line 80) | func parseGRPCMessages(raw []byte) ([]Message, error) {
function getChatIDFromOpts (line 94) | func getChatIDFromOpts(opts map[string]interface{}) string {
function getStringOpt (line 103) | func getStringOpt(opts map[string]interface{}, key string) string {
function getRefererOpt (line 111) | func getRefererOpt(opts map[string]interface{}) string {
function getAcceptOpt (line 119) | func getAcceptOpt(opts map[string]interface{}) Accept {
function getMapOpt (line 127) | func getMapOpt(opts map[string]interface{}, key string) map[string]inter...
function getSkipOpt (line 135) | func getSkipOpt(opts map[string]interface{}) *Skip {
FILE: agent/context/interfaces.go
type StreamChunkType (line 10) | type StreamChunkType
constant ChunkText (line 15) | ChunkText StreamChunkType = "text"
constant ChunkThinking (line 16) | ChunkThinking StreamChunkType = "thinking"
constant ChunkToolCall (line 17) | ChunkToolCall StreamChunkType = "tool_call"
constant ChunkRefusal (line 18) | ChunkRefusal StreamChunkType = "refusal"
constant ChunkMetadata (line 19) | ChunkMetadata StreamChunkType = "metadata"
constant ChunkError (line 20) | ChunkError StreamChunkType = "error"
constant ChunkUnknown (line 21) | ChunkUnknown StreamChunkType = "unknown"
constant ChunkStreamStart (line 24) | ChunkStreamStart StreamChunkType = "stream_start"
constant ChunkStreamEnd (line 25) | ChunkStreamEnd StreamChunkType = "stream_end"
constant ChunkMessageStart (line 26) | ChunkMessageStart StreamChunkType = "message_start"
constant ChunkMessageEnd (line 27) | ChunkMessageEnd StreamChunkType = "message_end"
type Agent (line 35) | type Agent interface
FILE: agent/context/interrupt.go
function NewInterruptController (line 12) | func NewInterruptController() *InterruptController {
method Start (line 22) | func (ic *InterruptController) Start(contextID string) {
method SetHandler (line 36) | func (ic *InterruptController) SetHandler(handler InterruptHandler) {
method listen (line 44) | func (ic *InterruptController) listen() {
method handleSignal (line 59) | func (ic *InterruptController) handleSignal(signal *InterruptSignal) {
method Check (line 108) | func (ic *InterruptController) Check() *InterruptSignal {
method CheckWithMerge (line 136) | func (ic *InterruptController) CheckWithMerge() *InterruptSignal {
method Peek (line 182) | func (ic *InterruptController) Peek() *InterruptSignal {
method IsInterrupted (line 194) | func (ic *InterruptController) IsInterrupted() bool {
method Context (line 209) | func (ic *InterruptController) Context() context.Context {
method GetPendingCount (line 217) | func (ic *InterruptController) GetPendingCount() int {
method Clear (line 233) | func (ic *InterruptController) Clear() {
method Stop (line 246) | func (ic *InterruptController) Stop() {
method SendSignal (line 267) | func (ic *InterruptController) SendSignal(signal *InterruptSignal) error {
FILE: agent/context/interrupt_test.go
function newTestContextWithInterrupt (line 14) | func newTestContextWithInterrupt(chatID, assistantID string) *context.Co...
function TestInterruptBasic (line 54) | func TestInterruptBasic(t *testing.T) {
function TestInterruptHandler (line 186) | func TestInterruptHandler(t *testing.T) {
function TestInterruptContextLifecycle (line 280) | func TestInterruptContextLifecycle(t *testing.T) {
function TestInterruptCheckMethods (line 322) | func TestInterruptCheckMethods(t *testing.T) {
function TestInterruptContext (line 485) | func TestInterruptContext(t *testing.T) {
function TestInterruptSendSignalDirectly (line 579) | func TestInterruptSendSignalDirectly(t *testing.T) {
FILE: agent/context/jsapi.go
method JsValue (line 15) | func (ctx *Context) JsValue(v8ctx *v8go.Context) (*v8go.Value, error) {
method NewObject (line 20) | func (ctx *Context) NewObject(v8ctx *v8go.Context) (*v8go.Value, error) {
method objectRelease (line 188) | func (ctx *Context) objectRelease(iso *v8go.Isolate, goValueID string) *...
method createTraceObject (line 229) | func (ctx *Context) createTraceObject(v8ctx *v8go.Context) *v8go.Value {
method sendMethod (line 261) | func (ctx *Context) sendMethod(iso *v8go.Isolate) *v8go.FunctionTemplate {
method sendStreamMethod (line 316) | func (ctx *Context) sendStreamMethod(iso *v8go.Isolate) *v8go.FunctionTe...
method endMethod (line 361) | func (ctx *Context) endMethod(iso *v8go.Isolate) *v8go.FunctionTemplate {
method replaceMethod (line 412) | func (ctx *Context) replaceMethod(iso *v8go.Isolate) *v8go.FunctionTempl...
method appendMethod (line 469) | func (ctx *Context) appendMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method mergeMethod (line 531) | func (ctx *Context) mergeMethod(iso *v8go.Isolate) *v8go.FunctionTemplate {
method setMethod (line 592) | func (ctx *Context) setMethod(iso *v8go.Isolate) *v8go.FunctionTemplate {
method messageIDMethod (line 655) | func (ctx *Context) messageIDMethod(iso *v8go.Isolate) *v8go.FunctionTem...
method blockIDMethod (line 679) | func (ctx *Context) blockIDMethod(iso *v8go.Isolate) *v8go.FunctionTempl...
method threadIDMethod (line 703) | func (ctx *Context) threadIDMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method endBlockMethod (line 727) | func (ctx *Context) endBlockMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method createMemoryObject (line 760) | func (ctx *Context) createMemoryObject(v8ctx *v8go.Context) *v8go.Value {
method createNamespaceObject (line 794) | func (ctx *Context) createNamespaceObject(v8ctx *v8go.Context, ns *memor...
FILE: agent/context/jsapi_agent.go
type AgentAPI (line 12) | type AgentAPI interface
type AgentAPIWithCallback (line 28) | type AgentAPIWithCallback interface
type BatchOnMessageFunc (line 49) | type BatchOnMessageFunc
method Agent (line 57) | func (ctx *Context) Agent() AgentAPI {
method newAgentObject (line 66) | func (ctx *Context) newAgentObject(iso *v8go.Isolate) *v8go.ObjectTempla...
method agentCallMethod (line 83) | func (ctx *Context) agentCallMethod(iso *v8go.Isolate) *v8go.FunctionTem...
function createJSStreamHandler (line 170) | func createJSStreamHandler(v8ctx *v8go.Context, callback *v8go.Function)...
method agentAllMethod (line 209) | func (ctx *Context) agentAllMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method agentAnyMethod (line 250) | func (ctx *Context) agentAnyMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method agentRaceMethod (line 291) | func (ctx *Context) agentRaceMethod(iso *v8go.Isolate) *v8go.FunctionTem...
type batchMessage (line 324) | type batchMessage struct
method parseRequestsForBatch (line 332) | func (ctx *Context) parseRequestsForBatch(args []*v8go.Value, v8ctx *v8g...
type BatchMethod (line 394) | type BatchMethod
constant BatchMethodAll (line 397) | BatchMethodAll BatchMethod = iota
constant BatchMethodAny (line 398) | BatchMethodAny
constant BatchMethodRace (line 399) | BatchMethodRace
method executeBatchWithCallback (line 404) | func (ctx *Context) executeBatchWithCallback(
function callJSBatchCallback (line 483) | func callJSBatchCallback(v8ctx *v8go.Context, callback *v8go.Function, a...
FILE: agent/context/jsapi_agent_test.go
function TestContext_Agent_NilFactory (line 12) | func TestContext_Agent_NilFactory(t *testing.T) {
function TestContext_Agent_WithFactory (line 21) | func TestContext_Agent_WithFactory(t *testing.T) {
type mockAgentAPI (line 38) | type mockAgentAPI struct
method Call (line 40) | func (m *mockAgentAPI) Call(agentID string, messages []interface{}, op...
method All (line 47) | func (m *mockAgentAPI) All(requests []interface{}) []interface{} {
method Any (line 51) | func (m *mockAgentAPI) Any(requests []interface{}) []interface{} {
method Race (line 55) | func (m *mockAgentAPI) Race(requests []interface{}) []interface{} {
FILE: agent/context/jsapi_agent_v8_test.go
function TestAgent_Call_V8 (line 20) | func TestAgent_Call_V8(t *testing.T) {
function TestAgent_Call_WithOptions_V8 (line 81) | func TestAgent_Call_WithOptions_V8(t *testing.T) {
function TestAgent_All_V8 (line 136) | func TestAgent_All_V8(t *testing.T) {
function TestAgent_Any_V8 (line 200) | func TestAgent_Any_V8(t *testing.T) {
function TestAgent_Race_V8 (line 263) | func TestAgent_Race_V8(t *testing.T) {
function TestAgent_ErrorHandling_V8 (line 326) | func TestAgent_ErrorHandling_V8(t *testing.T) {
function TestAgent_EmptyRequests_V8 (line 372) | func TestAgent_EmptyRequests_V8(t *testing.T) {
function TestAgent_InvalidArguments_V8 (line 411) | func TestAgent_InvalidArguments_V8(t *testing.T) {
function TestAgent_Call_WithCallback_V8 (line 452) | func TestAgent_Call_WithCallback_V8(t *testing.T) {
function TestAgent_Call_WithCallback_Stop_V8 (line 531) | func TestAgent_Call_WithCallback_Stop_V8(t *testing.T) {
function TestAgent_All_WithGlobalCallback_V8 (line 595) | func TestAgent_All_WithGlobalCallback_V8(t *testing.T) {
FILE: agent/context/jsapi_computer.go
method SetComputer (line 16) | func (ctx *Context) SetComputer(computer infraV2.Computer) {
method SetWorkspace (line 25) | func (ctx *Context) SetWorkspace(ws workspace.FS) {
method GetComputer (line 30) | func (ctx *Context) GetComputer() infraV2.Computer {
method GetWorkspace (line 35) | func (ctx *Context) GetWorkspace() workspace.FS {
method HasComputer (line 40) | func (ctx *Context) HasComputer() bool {
method HasWorkspace (line 45) | func (ctx *Context) HasWorkspace() bool {
method createComputerInstance (line 50) | func (ctx *Context) createComputerInstance(v8ctx *v8go.Context) *v8go.Va...
method computerExecMethod (line 80) | func (ctx *Context) computerExecMethod(iso *v8go.Isolate) *v8go.Function...
method computerVNCMethod (line 117) | func (ctx *Context) computerVNCMethod(iso *v8go.Isolate) *v8go.FunctionT...
method computerProxyMethod (line 140) | func (ctx *Context) computerProxyMethod(iso *v8go.Isolate) *v8go.Functio...
method computerInfoMethod (line 173) | func (ctx *Context) computerInfoMethod(iso *v8go.Isolate) *v8go.Function...
function parseCommandArg (line 211) | func parseCommandArg(v8ctx *v8go.Context, val *v8go.Value) ([]string, er...
FILE: agent/context/jsapi_helpers.go
function parseMessage (line 12) | func parseMessage(v8ctx *v8go.Context, jsValue *v8go.Value) (*message.Me...
function parseGroup (line 101) | func parseGroup(v8ctx *v8go.Context, jsValue *v8go.Value) (*message.Grou...
FILE: agent/context/jsapi_llm.go
type LlmAPI (line 12) | type LlmAPI interface
type LlmAPIWithCallback (line 28) | type LlmAPIWithCallback interface
type LlmBatchOnMessageFunc (line 48) | type LlmBatchOnMessageFunc
method Llm (line 56) | func (ctx *Context) Llm() LlmAPI {
method newLlmObject (line 65) | func (ctx *Context) newLlmObject(iso *v8go.Isolate) *v8go.ObjectTemplate {
method llmStreamMethod (line 82) | func (ctx *Context) llmStreamMethod(iso *v8go.Isolate) *v8go.FunctionTem...
method llmAllMethod (line 174) | func (ctx *Context) llmAllMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method llmAnyMethod (line 182) | func (ctx *Context) llmAnyMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method llmRaceMethod (line 190) | func (ctx *Context) llmRaceMethod(iso *v8go.Isolate) *v8go.FunctionTempl...
type LlmBatchMethod (line 197) | type LlmBatchMethod
constant LlmBatchMethodAll (line 200) | LlmBatchMethodAll LlmBatchMethod = iota
constant LlmBatchMethodAny (line 201) | LlmBatchMethodAny
constant LlmBatchMethodRace (line 202) | LlmBatchMethodRace
method executeLlmBatchMethod (line 206) | func (ctx *Context) executeLlmBatchMethod(info *v8go.FunctionCallbackInf...
method executeLlmBatchWithoutCallback (line 268) | func (ctx *Context) executeLlmBatchWithoutCallback(method LlmBatchMethod...
type llmBatchMessage (line 282) | type llmBatchMessage struct
method executeLlmBatchWithCallback (line 290) | func (ctx *Context) executeLlmBatchWithCallback(method LlmBatchMethod, r...
function callJSLlmBatchCallback (line 334) | func callJSLlmBatchCallback(v8ctx *v8go.Context, callback *v8go.Function...
FILE: agent/context/jsapi_llm_v8_test.go
function TestLlm_Stream_V8 (line 19) | func TestLlm_Stream_V8(t *testing.T) {
function TestLlm_Stream_WithCallback_V8 (line 84) | func TestLlm_Stream_WithCallback_V8(t *testing.T) {
function TestLlm_All_V8 (line 154) | func TestLlm_All_V8(t *testing.T) {
function TestLlm_All_WithCallback_V8 (line 233) | func TestLlm_All_WithCallback_V8(t *testing.T) {
function TestLlm_Any_V8 (line 311) | func TestLlm_Any_V8(t *testing.T) {
function TestLlm_Race_V8 (line 382) | func TestLlm_Race_V8(t *testing.T) {
function TestLlm_Stream_InvalidConnector_V8 (line 454) | func TestLlm_Stream_InvalidConnector_V8(t *testing.T) {
FILE: agent/context/jsapi_mcp.go
method mcpListResourcesMethod (line 19) | func (ctx *Context) mcpListResourcesMethod(iso *v8go.Isolate) *v8go.Func...
method mcpReadResourceMethod (line 50) | func (ctx *Context) mcpReadResourceMethod(iso *v8go.Isolate) *v8go.Funct...
method mcpListToolsMethod (line 78) | func (ctx *Context) mcpListToolsMethod(iso *v8go.Isolate) *v8go.Function...
method mcpCallToolMethod (line 110) | func (ctx *Context) mcpCallToolMethod(iso *v8go.Isolate) *v8go.FunctionT...
method mcpCallToolsMethod (line 154) | func (ctx *Context) mcpCallToolsMethod(iso *v8go.Isolate) *v8go.Function...
method mcpCallToolsParallelMethod (line 225) | func (ctx *Context) mcpCallToolsParallelMethod(iso *v8go.Isolate) *v8go....
method mcpListPromptsMethod (line 295) | func (ctx *Context) mcpListPromptsMethod(iso *v8go.Isolate) *v8go.Functi...
method mcpGetPromptMethod (line 326) | func (ctx *Context) mcpGetPromptMethod(iso *v8go.Isolate) *v8go.Function...
method mcpListSamplesMethod (line 366) | func (ctx *Context) mcpListSamplesMethod(iso *v8go.Isolate) *v8go.Functi...
method mcpGetSampleMethod (line 395) | func (ctx *Context) mcpGetSampleMethod(iso *v8go.Isolate) *v8go.Function...
method mcpAllMethod (line 445) | func (ctx *Context) mcpAllMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method mcpAnyMethod (line 476) | func (ctx *Context) mcpAnyMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method mcpRaceMethod (line 507) | func (ctx *Context) mcpRaceMethod(iso *v8go.Isolate) *v8go.FunctionTempl...
method parseMCPToolRequests (line 536) | func (ctx *Context) parseMCPToolRequests(arg *v8go.Value, v8ctx *v8go.Co...
method newMCPObject (line 583) | func (ctx *Context) newMCPObject(iso *v8go.Isolate) *v8go.ObjectTemplate {
FILE: agent/context/jsapi_mcp_test.go
function newMCPTestContext (line 15) | func newMCPTestContext() *context.Context {
function TestMCPListResources (line 26) | func TestMCPListResources(t *testing.T) {
function TestMCPReadResource (line 63) | func TestMCPReadResource(t *testing.T) {
function TestMCPListTools (line 98) | func TestMCPListTools(t *testing.T) {
function TestMCPCallTool (line 137) | func TestMCPCallTool(t *testing.T) {
function TestMCPCallTools (line 172) | func TestMCPCallTools(t *testing.T) {
function TestMCPCallToolsParallel (line 214) | func TestMCPCallToolsParallel(t *testing.T) {
function TestMCPListPrompts (line 256) | func TestMCPListPrompts(t *testing.T) {
function TestMCPGetPrompt (line 293) | func TestMCPGetPrompt(t *testing.T) {
function TestMCPListSamples (line 328) | func TestMCPListSamples(t *testing.T) {
function TestMCPGetSample (line 363) | func TestMCPGetSample(t *testing.T) {
function TestMCPJsApiWithTrace (line 400) | func TestMCPJsApiWithTrace(t *testing.T) {
FILE: agent/context/jsapi_mcp_v8_test.go
function TestMCP_All_V8 (line 16) | func TestMCP_All_V8(t *testing.T) {
function TestMCP_All_WithError_V8 (line 102) | func TestMCP_All_WithError_V8(t *testing.T) {
function TestMCP_Any_V8 (line 188) | func TestMCP_Any_V8(t *testing.T) {
function TestMCP_Any_AllFail_V8 (line 242) | func TestMCP_Any_AllFail_V8(t *testing.T) {
function TestMCP_Race_V8 (line 296) | func TestMCP_Race_V8(t *testing.T) {
function TestMCP_All_ResultContent_V8 (line 350) | func TestMCP_All_ResultContent_V8(t *testing.T) {
function TestMCP_All_MultipleTools_V8 (line 432) | func TestMCP_All_MultipleTools_V8(t *testing.T) {
function TestMCP_CallTool_ParsedResult_V8 (line 493) | func TestMCP_CallTool_ParsedResult_V8(t *testing.T) {
function TestMCP_CallToolsParallel_ParsedResult_V8 (line 563) | func TestMCP_CallToolsParallel_ParsedResult_V8(t *testing.T) {
FILE: agent/context/jsapi_memory_test.go
function TestMemoryUserNamespace (line 17) | func TestMemoryUserNamespace(t *testing.T) {
function TestMemoryTeamNamespace (line 69) | func TestMemoryTeamNamespace(t *testing.T) {
function TestMemoryChatNamespace (line 110) | func TestMemoryChatNamespace(t *testing.T) {
function TestMemoryContextNamespace (line 155) | func TestMemoryContextNamespace(t *testing.T) {
function TestMemoryHasAndDel (line 196) | func TestMemoryHasAndDel(t *testing.T) {
function TestMemoryIncrDecr (line 245) | func TestMemoryIncrDecr(t *testing.T) {
function TestMemoryKeysAndLen (line 294) | func TestMemoryKeysAndLen(t *testing.T) {
function TestMemoryClear (line 344) | func TestMemoryClear(t *testing.T) {
function TestMemoryGetDel (line 388) | func TestMemoryGetDel(t *testing.T) {
function TestMemoryIsolation (line 434) | func TestMemoryIsolation(t *testing.T) {
function TestMemoryNoMemory (line 484) | func TestMemoryNoMemory(t *testing.T) {
function TestMemoryWithAuthorizedInfo (line 513) | func TestMemoryWithAuthorizedInfo(t *testing.T) {
FILE: agent/context/jsapi_output_test.go
type testMockResponseWriter (line 17) | type testMockResponseWriter struct
method Header (line 31) | func (m *testMockResponseWriter) Header() http.Header {
method Write (line 35) | func (m *testMockResponseWriter) Write(b []byte) (int, error) {
method WriteHeader (line 39) | func (m *testMockResponseWriter) WriteHeader(statusCode int) {
function newTestMockResponseWriter (line 23) | func newTestMockResponseWriter() *testMockResponseWriter {
function TestJsValueSend (line 44) | func TestJsValueSend(t *testing.T) {
function TestJsValueSendDeltaUpdates (line 110) | func TestJsValueSendDeltaUpdates(t *testing.T) {
function TestJsValueSendMultipleTypes (line 161) | func TestJsValueSendMultipleTypes(t *testing.T) {
function TestJsValueSendErrorHandling (line 240) | func TestJsValueSendErrorHandling(t *testing.T) {
function TestJsValueSendWithCUIAccept (line 275) | func TestJsValueSendWithCUIAccept(t *testing.T) {
function TestJsValueSendChainedCalls (line 317) | func TestJsValueSendChainedCalls(t *testing.T) {
function TestJsValueIDGenerators (line 354) | func TestJsValueIDGenerators(t *testing.T) {
function TestJsValueSendWithBlockID (line 427) | func TestJsValueSendWithBlockID(t *testing.T) {
function TestJsValueReplace (line 480) | func TestJsValueReplace(t *testing.T) {
function TestJsValueAppend (line 523) | func TestJsValueAppend(t *testing.T) {
function TestJsValueMerge (line 569) | func TestJsValueMerge(t *testing.T) {
function TestJsValueSet (line 623) | func TestJsValueSet(t *testing.T) {
function TestJsValueBlockIDInheritance (line 677) | func TestJsValueBlockIDInheritance(t *testing.T) {
function TestJsValueEndBlock (line 727) | func TestJsValueEndBlock(t *testing.T) {
function TestJsValueSendStream (line 783) | func TestJsValueSendStream(t *testing.T) {
function TestJsValueSendStreamWithBlockID (line 841) | func TestJsValueSendStreamWithBlockID(t *testing.T) {
function TestJsValueEnd (line 891) | func TestJsValueEnd(t *testing.T) {
function TestJsValueEndWithFinalContent (line 943) | func TestJsValueEndWithFinalContent(t *testing.T) {
function TestJsValueStreamingWorkflow (line 995) | func TestJsValueStreamingWorkflow(t *testing.T) {
function TestJsValueSendStreamStringShorthand (line 1058) | func TestJsValueSendStreamStringShorthand(t *testing.T) {
function TestJsValueEndErrorHandling (line 1100) | func TestJsValueEndErrorHandling(t *testing.T) {
function TestJsValueEndWithInvalidMessageID (line 1136) | func TestJsValueEndWithInvalidMessageID(t *testing.T) {
function TestJsValueSendStreamErrorHandling (line 1172) | func TestJsValueSendStreamErrorHandling(t *testing.T) {
function TestJsValueMultipleStreams (line 1208) | func TestJsValueMultipleStreams(t *testing.T) {
function TestJsValueSendVsSendStream (line 1261) | func TestJsValueSendVsSendStream(t *testing.T) {
FILE: agent/context/jsapi_release_test.go
function newReleaseTestContext (line 15) | func newReleaseTestContext() *context.Context {
function TestContextRelease (line 25) | func TestContextRelease(t *testing.T) {
function TestTraceRelease (line 69) | func TestTraceRelease(t *testing.T) {
function TestContextReleaseWithTrace (line 122) | func TestContextReleaseWithTrace(t *testing.T) {
function TestTryFinallyPattern (line 161) | func TestTryFinallyPattern(t *testing.T) {
function TestNoOpTraceRelease (line 204) | func TestNoOpTraceRelease(t *testing.T) {
function TestTryFinallyPatternWithError (line 250) | func TestTryFinallyPatternWithError(t *testing.T) {
FILE: agent/context/jsapi_sandbox.go
type SandboxExecutor (line 15) | type SandboxExecutor interface
method SetSandboxExecutor (line 36) | func (ctx *Context) SetSandboxExecutor(executor SandboxExecutor) {
method GetSandboxExecutor (line 41) | func (ctx *Context) GetSandboxExecutor() SandboxExecutor {
method HasSandbox (line 46) | func (ctx *Context) HasSandbox() bool {
method newSandboxObject (line 52) | func (ctx *Context) newSandboxObject(iso *v8go.Isolate) *v8go.ObjectTemp...
method createSandboxInstance (line 71) | func (ctx *Context) createSandboxInstance(v8ctx *v8go.Context) *v8go.Val...
method sandboxReadFileMethod (line 106) | func (ctx *Context) sandboxReadFileMethod(iso *v8go.Isolate) *v8go.Funct...
method sandboxWriteFileMethod (line 137) | func (ctx *Context) sandboxWriteFileMethod(iso *v8go.Isolate) *v8go.Func...
method sandboxListDirMethod (line 164) | func (ctx *Context) sandboxListDirMethod(iso *v8go.Isolate) *v8go.Functi...
method sandboxExecMethod (line 204) | func (ctx *Context) sandboxExecMethod(iso *v8go.Isolate) *v8go.FunctionT...
method sandboxGetVNCUrlMethod (line 260) | func (ctx *Context) sandboxGetVNCUrlMethod(iso *v8go.Isolate) *v8go.Func...
method sandboxGetSandboxIDMethod (line 285) | func (ctx *Context) sandboxGetSandboxIDMethod(iso *v8go.Isolate) *v8go.F...
FILE: agent/context/jsapi_sandbox_test.go
function createTestSandboxManager (line 18) | func createTestSandboxManager(t *testing.T) *infraSandbox.Manager {
function createTestContainer (line 39) | func createTestContainer(t *testing.T, manager *infraSandbox.Manager, us...
type realSandboxExecutor (line 56) | type realSandboxExecutor struct
method ReadFile (line 62) | func (e *realSandboxExecutor) ReadFile(ctx stdContext.Context, path st...
method WriteFile (line 67) | func (e *realSandboxExecutor) WriteFile(ctx stdContext.Context, path s...
method ListDir (line 72) | func (e *realSandboxExecutor) ListDir(ctx stdContext.Context, path str...
method Exec (line 77) | func (e *realSandboxExecutor) Exec(ctx stdContext.Context, cmd []strin...
method GetWorkDir (line 87) | func (e *realSandboxExecutor) GetWorkDir() string {
method GetSandboxID (line 91) | func (e *realSandboxExecutor) GetSandboxID() string {
method GetVNCUrl (line 97) | func (e *realSandboxExecutor) GetVNCUrl() string {
function TestJsSandboxNotAvailable (line 103) | func TestJsSandboxNotAvailable(t *testing.T) {
function TestJsSandboxWriteFile (line 131) | func TestJsSandboxWriteFile(t *testing.T) {
function TestJsSandboxReadFile (line 185) | func TestJsSandboxReadFile(t *testing.T) {
function TestJsSandboxListDir (line 239) | func TestJsSandboxListDir(t *testing.T) {
function TestJsSandboxExec (line 307) | func TestJsSandboxExec(t *testing.T) {
function TestJsSandboxWorkdir (line 359) | func TestJsSandboxWorkdir(t *testing.T) {
function TestJsSandboxCompleteWorkflow (line 409) | func TestJsSandboxCompleteWorkflow(t *testing.T) {
FILE: agent/context/jsapi_search.go
type SearchAPI (line 11) | type SearchAPI interface
method Search (line 39) | func (ctx *Context) Search() SearchAPI {
method newSearchObject (line 48) | func (ctx *Context) newSearchObject(iso *v8go.Isolate) *v8go.ObjectTempl...
method searchWebMethod (line 70) | func (ctx *Context) searchWebMethod(iso *v8go.Isolate) *v8go.FunctionTem...
method searchKBMethod (line 124) | func (ctx *Context) searchKBMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method searchDBMethod (line 179) | func (ctx *Context) searchDBMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method searchAllMethod (line 232) | func (ctx *Context) searchAllMethod(iso *v8go.Isolate) *v8go.FunctionTem...
method searchAnyMethod (line 278) | func (ctx *Context) searchAnyMethod(iso *v8go.Isolate) *v8go.FunctionTem...
method searchRaceMethod (line 324) | func (ctx *Context) searchRaceMethod(iso *v8go.Isolate) *v8go.FunctionTe...
FILE: agent/context/jsapi_search_test.go
function newSearchTestContext (line 22) | func newSearchTestContext(chatID, assistantID string) *context.Context {
function getResponseContent (line 41) | func getResponseContent(res *context.HookCreateResponse) string {
function TestSearchJSAPI_Web (line 57) | func TestSearchJSAPI_Web(t *testing.T) {
function TestSearchJSAPI_WebWithSites (line 99) | func TestSearchJSAPI_WebWithSites(t *testing.T) {
function TestSearchJSAPI_KB (line 142) | func TestSearchJSAPI_KB(t *testing.T) {
function TestSearchJSAPI_DB (line 169) | func TestSearchJSAPI_DB(t *testing.T) {
function TestSearchJSAPI_All (line 197) | func TestSearchJSAPI_All(t *testing.T) {
function TestSearchJSAPI_Any (line 240) | func TestSearchJSAPI_Any(t *testing.T) {
function TestSearchJSAPI_Race (line 279) | func TestSearchJSAPI_Race(t *testing.T) {
function TestSearchJSAPI_InvalidCommand (line 317) | func TestSearchJSAPI_InvalidCommand(t *testing.T) {
function TestSearchJSAPI_UnknownMethod (line 336) | func TestSearchJSAPI_UnknownMethod(t *testing.T) {
FILE: agent/context/jsapi_stress_test.go
function newStressTestContext (line 20) | func newStressTestContext(chatID string) *context.Context {
function TestStressContextCreationAndRelease (line 30) | func TestStressContextCreationAndRelease(t *testing.T) {
function TestStressTraceOperations (line 94) | func TestStressTraceOperations(t *testing.T) {
function TestStressMCPOperations (line 167) | func TestStressMCPOperations(t *testing.T) {
function TestStressConcurrentContexts (line 230) | func TestStressConcurrentContexts(t *testing.T) {
function TestStressNoOpTracePerformance (line 308) | func TestStressNoOpTracePerformance(t *testing.T) {
function TestStressReleasePatterns (line 376) | func TestStressReleasePatterns(t *testing.T) {
function TestStressLongRunningTrace (line 481) | func TestStressLongRunningTrace(t *testing.T) {
function getMemStats (line 553) | func getMemStats() uint64 {
FILE: agent/context/jsapi_test.go
function TestJsValue (line 20) | func TestJsValue(t *testing.T) {
function testContextJsvalueEmbed (line 40) | func testContextJsvalueEmbed(iso *v8go.Isolate) *v8go.FunctionTemplate {
function testContextJsvalueFunction (line 44) | func testContextJsvalueFunction(info *v8go.FunctionCallbackInfo) *v8go.V...
function TestJsValueConcurrent (line 64) | func TestJsValueConcurrent(t *testing.T) {
function TestJsValueRegistrationAndCleanup (line 134) | func TestJsValueRegistrationAndCleanup(t *testing.T) {
function testContextRegistrationEmbed (line 161) | func testContextRegistrationEmbed(iso *v8go.Isolate) *v8go.FunctionTempl...
function testContextRegistrationFunction (line 165) | func testContextRegistrationFunction(info *v8go.FunctionCallbackInfo) *v...
function TestJsValueAllFields (line 204) | func TestJsValueAllFields(t *testing.T) {
function testAllFieldsEmbed (line 309) | func testAllFieldsEmbed(iso *v8go.Isolate) *v8go.FunctionTemplate {
function testAllFieldsFunction (line 313) | func testAllFieldsFunction(info *v8go.FunctionCallbackInfo) *v8go.Value {
function TestJsValueTrace (line 387) | func TestJsValueTrace(t *testing.T) {
function TestJsValueAuthorizedAndMetadata (line 449) | func TestJsValueAuthorizedAndMetadata(t *testing.T) {
function testAuthorizedMetadataEmbed (line 496) | func testAuthorizedMetadataEmbed(iso *v8go.Isolate) *v8go.FunctionTempla...
function testAuthorizedMetadataFunction (line 500) | func testAuthorizedMetadataFunction(info *v8go.FunctionCallbackInfo) *v8...
function TestJsValueAuthorizedNil (line 548) | func TestJsValueAuthorizedNil(t *testing.T) {
FILE: agent/context/jsapi_workspace.go
method createWorkspaceInstance (line 12) | func (ctx *Context) createWorkspaceInstance(v8ctx *v8go.Context) *v8go.V...
method wsReadFileMethod (line 39) | func (ctx *Context) wsReadFileMethod(iso *v8go.Isolate) *v8go.FunctionTe...
method wsWriteFileMethod (line 65) | func (ctx *Context) wsWriteFileMethod(iso *v8go.Isolate) *v8go.FunctionT...
method wsReadDirMethod (line 88) | func (ctx *Context) wsReadDirMethod(iso *v8go.Isolate) *v8go.FunctionTem...
method wsMkdirAllMethod (line 129) | func (ctx *Context) wsMkdirAllMethod(iso *v8go.Isolate) *v8go.FunctionTe...
method wsRemoveMethod (line 149) | func (ctx *Context) wsRemoveMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method wsRemoveAllMethod (line 169) | func (ctx *Context) wsRemoveAllMethod(iso *v8go.Isolate) *v8go.FunctionT...
method wsRenameMethod (line 189) | func (ctx *Context) wsRenameMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
method wsCopyMethod (line 209) | func (ctx *Context) wsCopyMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method wsStatMethod (line 229) | func (ctx *Context) wsStatMethod(iso *v8go.Isolate) *v8go.FunctionTempla...
method wsExistsMethod (line 262) | func (ctx *Context) wsExistsMethod(iso *v8go.Isolate) *v8go.FunctionTemp...
function isNotExist (line 282) | func isNotExist(err error) bool {
FILE: agent/context/log.go
constant colorReset (line 18) | colorReset = "\033[0m"
constant colorRed (line 19) | colorRed = "\033[31m"
constant colorGreen (line 20) | colorGreen = "\033[32m"
constant colorYellow (line 21) | colorYellow = "\033[33m"
constant colorBlue (line 22) | colorBlue = "\033[34m"
constant colorMagenta (line 23) | colorMagenta = "\033[35m"
constant colorCyan (line 24) | colorCyan = "\033[36m"
constant colorWhite (line 25) | colorWhite = "\033[37m"
constant colorGray (line 26) | colorGray = "\033[90m"
constant colorBoldRed (line 28) | colorBoldRed = "\033[1;31m"
constant colorBoldGreen (line 29) | colorBoldGreen = "\033[1;32m"
constant colorBoldYellow (line 30) | colorBoldYellow = "\033[1;33m"
constant colorBoldBlue (line 31) | colorBoldBlue = "\033[1;34m"
constant colorBoldMagenta (line 32) | colorBoldMagenta = "\033[1;35m"
constant colorBoldCyan (line 33) | colorBoldCyan = "\033[1;36m"
type LogLevel (line 41) | type LogLevel
constant LogLevelTrace (line 45) | LogLevelTrace LogLevel = iota
constant LogLevelDebug (line 47) | LogLevelDebug
constant LogLevelInfo (line 49) | LogLevelInfo
constant LogLevelWarn (line 51) | LogLevelWarn
constant LogLevelError (line 53) | LogLevelError
type LogEntry (line 61) | type LogEntry struct
type RequestLogger (line 74) | type RequestLogger struct
method SetAssistantID (line 132) | func (l *RequestLogger) SetAssistantID(id string) {
method RestoreAssistantID (line 143) | func (l *RequestLogger) RestoreAssistantID() {
method currentAssistantID (line 154) | func (l *RequestLogger) currentAssistantID() string {
method Close (line 162) | func (l *RequestLogger) Close() {
method consume (line 177) | func (l *RequestLogger) consume() {
method processEntry (line 186) | func (l *RequestLogger) processEntry(entry LogEntry) {
method printDev (line 196) | func (l *RequestLogger) printDev(entry LogEntry) {
method writeLog (line 212) | func (l *RequestLogger) writeLog(entry LogEntry, devMode bool) {
method send (line 233) | func (l *RequestLogger) send(entry LogEntry) {
method Trace (line 259) | func (l *RequestLogger) Trace(format string, args ...interface{}) {
method Debug (line 267) | func (l *RequestLogger) Debug(format string, args ...interface{}) {
method Info (line 275) | func (l *RequestLogger) Info(format string, args ...interface{}) {
method Warn (line 283) | func (l *RequestLogger) Warn(format string, args ...interface{}) {
method Error (line 291) | func (l *RequestLogger) Error(format string, args ...interface{}) {
method Start (line 303) | func (l *RequestLogger) Start() {
method End (line 327) | func (l *RequestLogger) End(success bool, err error) {
method Phase (line 362) | func (l *RequestLogger) Phase(name string) {
method PhaseComplete (line 378) | func (l *RequestLogger) PhaseComplete(name string) {
method PhaseSkip (line 394) | func (l *RequestLogger) PhaseSkip(name, reason string) {
method LLMStart (line 407) | func (l *RequestLogger) LLMStart(connector, model string, messageCount...
method LLMComplete (line 428) | func (l *RequestLogger) LLMComplete(tokens int, hasToolCalls bool) {
method ToolStart (line 453) | func (l *RequestLogger) ToolStart(toolName string) {
method ToolComplete (line 468) | func (l *RequestLogger) ToolComplete(toolName string, success bool) {
method HookStart (line 491) | func (l *RequestLogger) HookStart(hookName string) {
method HookComplete (line 507) | func (l *RequestLogger) HookComplete(hookName string) {
method Cleanup (line 522) | func (l *RequestLogger) Cleanup(resource string) {
method HistoryLoad (line 536) | func (l *RequestLogger) HistoryLoad(count, maxSize int) {
method HistoryOverlap (line 550) | func (l *RequestLogger) HistoryOverlap(overlapCount int) {
method Release (line 566) | func (l *RequestLogger) Release() {
type LoggerOption (line 91) | type LoggerOption
function WithParentID (line 94) | func WithParentID(parentID string) LoggerOption {
function NewRequestLogger (line 104) | func NewRequestLogger(assistantID, chatID, requestID string, opts ...Log...
function Noop (line 126) | func Noop() *RequestLogger {
function shortID (line 585) | func shortID(id string) string {
FILE: agent/context/mcp.go
method ListResources (line 20) | func (ctx *Context) ListResources(mcpID string, cursor string) (*types.L...
method ReadResource (line 75) | func (ctx *Context) ReadResource(mcpID string, uri string) (*types.ReadR...
method ListTools (line 132) | func (ctx *Context) ListTools(mcpID string, cursor string) (*types.ListT...
method CallTool (line 187) | func (ctx *Context) CallTool(mcpID string, name string, arguments interf...
method CallTools (line 242) | func (ctx *Context) CallTools(mcpID string, tools []types.ToolCall) (*ty...
method CallToolsParallel (line 297) | func (ctx *Context) CallToolsParallel(mcpID string, tools []types.ToolCa...
method ListPrompts (line 355) | func (ctx *Context) ListPrompts(mcpID string, cursor string) (*types.Lis...
method GetPrompt (line 410) | func (ctx *Context) GetPrompt(mcpID string, name string, arguments map[s...
method ListSamples (line 468) | func (ctx *Context) ListSamples(mcpID string, itemType types.SampleItemT...
method GetSample (line 523) | func (ctx *Context) GetSample(mcpID string, itemType types.SampleItemTyp...
function parseCallToolResponse (line 579) | func parseCallToolResponse(response *types.CallToolResponse) interface{} {
function parseCallToolsResponse (line 587) | func parseCallToolsResponse(response *types.CallToolsResponse) []interfa...
type MCPToolRequest (line 602) | type MCPToolRequest struct
type MCPToolResult (line 610) | type MCPToolResult struct
type callToolResult (line 618) | type callToolResult struct
method CallToolAll (line 625) | func (ctx *Context) CallToolAll(requests []*MCPToolRequest) []*MCPToolRe...
method CallToolAny (line 662) | func (ctx *Context) CallToolAny(requests []*MCPToolRequest) []*MCPToolRe...
method CallToolRace (line 717) | func (ctx *Context) CallToolRace(requests []*MCPToolRequest) []*MCPToolR...
method callToolSingle (line 764) | func (ctx *Context) callToolSingle(req *MCPToolRequest) *MCPToolResult {
function parseToolResponseContent (line 788) | func parseToolResponseContent(response *types.CallToolResponse) interfac...
FILE: agent/context/mcp_test.go
function newTestMCPContext (line 14) | func newTestMCPContext() *context.Context {
function TestListResources (line 29) | func TestListResources(t *testing.T) {
function TestReadResource (line 66) | func TestReadResource(t *testing.T) {
function TestListTools (line 108) | func TestListTools(t *testing.T) {
function TestCallTool (line 147) | func TestCallTool(t *testing.T) {
function TestCallTools (line 214) | func TestCallTools(t *testing.T) {
function TestCallToolsParallel (line 258) | func TestCallToolsParallel(t *testing.T) {
function TestListPrompts (line 296) | func TestListPrompts(t *testing.T) {
function TestGetPrompt (line 332) | func TestGetPrompt(t *testing.T) {
function TestListSamples (line 379) | func TestListSamples(t *testing.T) {
function TestGetSample (line 421) | func TestGetSample(t *testing.T) {
function TestMCPWithTrace (line 463) | func TestMCPWithTrace(t *testing.T) {
FILE: agent/context/message.go
type messageMetadataStore (line 10) | type messageMetadataStore struct
method setMessage (line 25) | func (s *messageMetadataStore) setMessage(messageID string, metadata *...
method getMessage (line 32) | func (s *messageMetadataStore) getMessage(messageID string) *MessageMe...
method setBlock (line 39) | func (s *messageMetadataStore) setBlock(blockID string, metadata *Bloc...
method getBlock (line 46) | func (s *messageMetadataStore) getBlock(blockID string) *BlockMetadata {
method updateBlock (line 53) | func (s *messageMetadataStore) updateBlock(blockID string, update func...
function newMessageMetadataStore (line 17) | func newMessageMetadataStore() *messageMetadataStore {
method UnmarshalJSON (line 62) | func (m *Message) UnmarshalJSON(data []byte) error {
method MarshalJSON (line 100) | func (m *Message) MarshalJSON() ([]byte, error) {
function NewTextMessage (line 110) | func NewTextMessage(role MessageRole, text string) *Message {
function NewMultipartMessage (line 118) | func NewMultipartMessage(role MessageRole, parts []ContentPart) *Message {
method GetContentAsString (line 126) | func (m *Message) GetContentAsString() (string, bool) {
method GetContentAsParts (line 134) | func (m *Message) GetContentAsParts() ([]ContentPart, bool) {
method HasToolCalls (line 142) | func (m *Message) HasToolCalls() bool {
method IsRefusal (line 147) | func (m *Message) IsRefusal() bool {
FILE: agent/context/message_events_test.go
function TestMessageLifecycleEvents (line 15) | func TestMessageLifecycleEvents(t *testing.T) {
type mockResponseWriter (line 105) | type mockResponseWriter struct
method Header (line 111) | func (m *mockResponseWriter) Header() http.Header {
method Write (line 115) | func (m *mockResponseWriter) Write(data []byte) (int, error) {
method WriteHeader (line 119) | func (m *mockResponseWriter) WriteHeader(statusCode int) {
FILE: agent/context/message_test.go
function TestMessage_UnmarshalJSON_StringContent (line 10) | func TestMessage_UnmarshalJSON_StringContent(t *testing.T) {
function TestMessage_UnmarshalJSON_ArrayContent (line 36) | func TestMessage_UnmarshalJSON_ArrayContent(t *testing.T) {
function TestMessage_UnmarshalJSON_NullContent (line 96) | func TestMessage_UnmarshalJSON_NullContent(t *testing.T) {
function TestMessage_UnmarshalJSON_WithRefusal (line 139) | func TestMessage_UnmarshalJSON_WithRefusal(t *testing.T) {
function TestMessage_UnmarshalJSON_AudioContent (line 166) | func TestMessage_UnmarshalJSON_AudioContent(t *testing.T) {
function TestMessage_MarshalJSON_StringContent (line 214) | func TestMessage_MarshalJSON_StringContent(t *testing.T) {
function TestMessage_MarshalJSON_ArrayContent (line 237) | func TestMessage_MarshalJSON_ArrayContent(t *testing.T) {
function TestMessage_MarshalJSON_WithToolCalls (line 276) | func TestMessage_MarshalJSON_WithToolCalls(t *testing.T) {
function TestMessage_ToolMessage (line 317) | func TestMessage_ToolMessage(t *testing.T) {
function TestNewTextMessage (line 353) | func TestNewTextMessage(t *testing.T) {
function TestNewMultipartMessage (line 370) | func TestNewMultipartMessage(t *testing.T) {
FILE: agent/context/openapi.go
function GetCompletionRequest (line 19) | func GetCompletionRequest(c *gin.Context, cache store.Store) (*Completio...
function getClientType (line 105) | func getClientType(userAgent string) string {
function GetAssistantID (line 137) | func GetAssistantID(c *gin.Context, req *CompletionRequest) (string, err...
function GetMessages (line 177) | func GetMessages(c *gin.Context, req *CompletionRequest) ([]Message, err...
function GetLocale (line 198) | func GetLocale(c *gin.Context, req *CompletionRequest) string {
function GetTheme (line 232) | func GetTheme(c *gin.Context, req *CompletionRequest) string {
function GetReferer (line 260) | func GetReferer(c *gin.Context, req *CompletionRequest) string {
function GetAccept (line 289) | func GetAccept(c *gin.Context, req *CompletionRequest) Accept {
function GetChatID (line 324) | func GetChatID(c *gin.Context, cache store.Store, req *CompletionRequest...
function GetRoute (line 362) | func GetRoute(c *gin.Context, req *CompletionRequest) string {
function GetMode (line 385) | func GetMode(c *gin.Context, req *CompletionRequest) string {
function GetSkip (line 411) | func GetSkip(c *gin.Context, req *CompletionRequest) *Skip {
function GetMetadata (line 436) | func GetMetadata(c *gin.Context, req *CompletionRequest) map[string]inte...
function parseCompletionRequestData (line 473) | func parseCompletionRequestData(c *gin.Context) (*CompletionRequest, err...
FILE: agent/context/openapi_test.go
function parseCompletionRequestData (line 18) | func parseCompletionRequestData(c *gin.Context) (*context.CompletionRequ...
function TestGetMessages_FromBody (line 39) | func TestGetMessages_FromBody(t *testing.T) {
function TestGetMessages_FromQuery (line 86) | func TestGetMessages_FromQuery(t *testing.T) {
function TestGetMessages_EmptyMessages (line 120) | func TestGetMessages_EmptyMessages(t *testing.T) {
function TestGetChatID_FromQuery (line 147) | func TestGetChatID_FromQuery(t *testing.T) {
function TestGetChatID_FromHeader (line 175) | func TestGetChatID_FromHeader(t *testing.T) {
function TestGetChatID_FromMetadata (line 204) | func TestGetChatID_FromMetadata(t *testing.T) {
function TestGetChatID_FromMessages (line 247) | func TestGetChatID_FromMessages(t *testing.T) {
function TestGetChatID_Priority (line 329) | func TestGetChatID_Priority(t *testing.T) {
function TestGetLocale_FromQuery (line 381) | func TestGetLocale_FromQuery(t *testing.T) {
function TestGetLocale_FromHeader (line 395) | func TestGetLocale_FromHeader(t *testing.T) {
function TestGetLocale_FromMetadata (line 410) | func TestGetLocale_FromMetadata(t *testing.T) {
function TestGetLocale_Priority (line 430) | func TestGetLocale_Priority(t *testing.T) {
function TestGetTheme_FromQuery (line 451) | func TestGetTheme_FromQuery(t *testing.T) {
function TestGetTheme_FromHeader (line 465) | func TestGetTheme_FromHeader(t *testing.T) {
function TestGetTheme_FromMetadata (line 480) | func TestGetTheme_FromMetadata(t *testing.T) {
function TestGetReferer_FromMetadata (line 500) | func TestGetReferer_FromMetadata(t *testing.T) {
function TestGetAccept_FromQuery (line 520) | func TestGetAccept_FromQuery(t *testing.T) {
function TestGetAccept_FromHeader (line 534) | func TestGetAccept_FromHeader(t *testing.T) {
function TestGetAccept_FromMetadata (line 549) | func TestGetAccept_FromMetadata(t *testing.T) {
function TestGetAccept_Default (line 569) | func TestGetAccept_Default(t *testing.T) {
function TestGetAccept_Priority (line 583) | func TestGetAccept_Priority(t *testing.T) {
function TestGetAssistantID_FromModel (line 604) | func TestGetAssistantID_FromModel(t *testing.T) {
function TestGetAssistantID_Priority (line 626) | func TestGetAssistantID_Priority(t *testing.T) {
function TestGetRoute_FromQuery (line 649) | func TestGetRoute_FromQuery(t *testing.T) {
function TestGetRoute_FromHeader (line 663) | func TestGetRoute_FromHeader(t *testing.T) {
function TestGetRoute_FromPayload (line 678) | func TestGetRoute_FromPayload(t *testing.T) {
function TestGetRoute_Priority (line 696) | func TestGetRoute_Priority(t *testing.T) {
function TestGetMetadata_FromQuery (line 715) | func TestGetMetadata_FromQuery(t *testing.T) {
function TestGetMetadata_FromHeader_Base64 (line 743) | func TestGetMetadata_FromHeader_Base64(t *testing.T) {
function TestGetMetadata_FromPayload (line 768) | func TestGetMetadata_FromPayload(t *testing.T) {
function TestGetMetadata_Priority (line 799) | func TestGetMetadata_Priority(t *testing.T) {
function TestGetMetadata_EmptyData (line 833) | func TestGetMetadata_EmptyData(t *testing.T) {
function TestGetCompletionRequest_WriterInitialized (line 847) | func TestGetCompletionRequest_WriterInitialized(t *testing.T) {
function TestGetCompletionRequest_ChatIDFallback (line 914) | func TestGetCompletionRequest_ChatIDFallback(t *testing.T) {
function TestGetSkip_FromBody (line 968) | func TestGetSkip_FromBody(t *testing.T) {
function TestGetSkip_FromQueryParams (line 997) | func TestGetSkip_FromQueryParams(t *testing.T) {
function TestGetSkip_FromQueryParams_ShortForm (line 1019) | func TestGetSkip_FromQueryParams_ShortForm(t *testing.T) {
function TestGetSkip_Priority (line 1041) | func TestGetSkip_Priority(t *testing.T) {
function TestGetSkip_Nil (line 1072) | func TestGetSkip_Nil(t *testing.T) {
function TestGetSkip_OnlyHistorySet (line 1086) | func TestGetSkip_OnlyHistorySet(t *testing.T) {
function TestGetSkip_FromBodyViaParseRequest (line 1108) | func TestGetSkip_FromBodyViaParseRequest(t *testing.T) {
function TestGetMode_FromQuery (line 1173) | func TestGetMode_FromQuery(t *testing.T) {
function TestGetMode_FromHeader (line 1190) | func TestGetMode_FromHeader(t *testing.T) {
function TestGetMode_FromMetadata (line 1208) | func TestGetMode_FromMetadata(t *testing.T) {
function TestGetMode_Priority (line 1231) | func TestGetMode_Priority(t *testing.T) {
function TestGetMode_Empty (line 1256) | func TestGetMode_Empty(t *testing.T) {
FILE: agent/context/options.go
method ToMap (line 4) | func (opts *Options) ToMap() map[string]interface{} {
function OptionsFromMap (line 39) | func OptionsFromMap(m map[string]interface{}) *Options {
FILE: agent/context/output.go
method Send (line 17) | func (ctx *Context) Send(msg *message.Message) error {
method SendStream (line 229) | func (ctx *Context) SendStream(msg *message.Message) (string, error) {
method End (line 342) | func (ctx *Context) End(messageID string, finalContent ...string) error {
method EndMessage (line 413) | func (ctx *Context) EndMessage(messageID string, content interface{}) er...
method EndBlock (line 451) | func (ctx *Context) EndBlock(blockID string) error {
method SendGroup (line 481) | func (ctx *Context) SendGroup(group *message.Group) error {
method Flush (line 490) | func (ctx *Context) Flush() error {
method CloseOutput (line 499) | func (ctx *Context) CloseOutput() error {
method sendRaw (line 509) | func (ctx *Context) sendRaw(msg *message.Message) error {
method getWriter (line 521) | func (ctx *Context) getWriter() Writer {
method getOutput (line 536) | func (ctx *Context) getOutput() (*output.Output, error) {
method CloseSafeWriter (line 595) | func (ctx *Context) CloseSafeWriter() {
FILE: agent/context/stack.go
function NewStack (line 12) | func NewStack(traceID, assistantID, referer string, opts *Options) *Stack {
method NewChildStack (line 35) | func (s *Stack) NewChildStack(assistantID, referer string, opts *Options...
function NewChildStackFromForkParent (line 61) | func NewChildStackFromForkParent(parent *ForkParentInfo, assistantID, re...
method Complete (line 85) | func (s *Stack) Complete() {
method Fail (line 94) | func (s *Stack) Fail(err error) {
method Timeout (line 106) | func (s *Stack) Timeout() {
method IsRoot (line 115) | func (s *Stack) IsRoot() bool {
method IsCompleted (line 120) | func (s *Stack) IsCompleted() bool {
method IsRunning (line 127) | func (s *Stack) IsRunning() bool {
method GetPathString (line 132) | func (s *Stack) GetPathString() string {
method String (line 145) | func (s *Stack) String() string {
method Clone (line 156) | func (s *Stack) Clone() *Stack {
function EnterStack (line 200) | func EnterStack(ctx *Context, assistantID string, opts *Options) (*Stack...
method GetAllStacks (line 263) | func (ctx *Context) GetAllStacks() []*Stack {
method GetStackByID (line 277) | func (ctx *Context) GetStackByID(id string) *Stack {
method GetStacksByTraceID (line 286) | func (ctx *Context) GetStacksByTraceID(traceID string) []*Stack {
method GetRootStack (line 301) | func (ctx *Context) GetRootStack() *Stack {
FILE: agent/context/stack_test.go
function TestNewStack (line 13) | func TestNewStack(t *testing.T) {
function TestNewStack_GenerateTraceID (line 57) | func TestNewStack_GenerateTraceID(t *testing.T) {
function TestNewChildStack (line 74) | func TestNewChildStack(t *testing.T) {
function TestStackComplete (line 122) | func TestStackComplete(t *testing.T) {
function TestStackFail (line 158) | func TestStackFail(t *testing.T) {
function TestStackTimeout (line 181) | func TestStackTimeout(t *testing.T) {
function TestEnterStack_RootCreation (line 198) | func TestEnterStack_RootCreation(t *testing.T) {
function TestEnterStack_ChildCreation (line 242) | func TestEnterStack_ChildCreation(t *testing.T) {
function TestEnterStack_DoneCallback (line 286) | func TestEnterStack_DoneCallback(t *testing.T) {
function TestContextGetAllStacks (line 326) | func TestContextGetAllStacks(t *testing.T) {
function TestContextGetStackByID (line 351) | func TestContextGetStackByID(t *testing.T) {
function TestContextGetStacksByTraceID (line 379) | func TestContextGetStacksByTraceID(t *testing.T) {
function TestContextGetRootStack (line 408) | func TestContextGetRootStack(t *testing.T) {
function TestStackClone (line 439) | func TestStackClone(t *testing.T) {
FILE: agent/context/types.go
type Accept (line 20) | type Accept
type Referer (line 23) | type Referer
type Client (line 26) | type Client struct
constant AcceptStandard (line 34) | AcceptStandard = "standard"
constant AcceptWebCUI (line 37) | AcceptWebCUI = "cui-web"
constant AccepNativeCUI (line 40) | AccepNativeCUI = "cui-native"
constant AcceptDesktopCUI (line 43) | AcceptDesktopCUI = "cui-desktop"
constant RefererAPI (line 56) | RefererAPI = "api"
constant RefererProcess (line 59) | RefererProcess = "process"
constant RefererMCP (line 62) | RefererMCP = "mcp"
constant RefererJSSDK (line 65) | RefererJSSDK = "jssdk"
constant RefererAgent (line 68) | RefererAgent = "agent"
constant RefererAgentFork (line 71) | RefererAgentFork = "agent_fork"
constant RefererTool (line 74) | RefererTool = "tool"
constant RefererHook (line 77) | RefererHook = "hook"
constant RefererSchedule (line 80) | RefererSchedule = "schedule"
constant RefererScript (line 83) | RefererScript = "script"
constant RefererInternal (line 86) | RefererInternal = "internal"
constant StackStatusPending (line 106) | StackStatusPending = "pending"
constant StackStatusRunning (line 109) | StackStatusRunning = "running"
constant StackStatusCompleted (line 112) | StackStatusCompleted = "completed"
constant StackStatusFailed (line 115) | StackStatusFailed = "failed"
constant StackStatusTimeout (line 118) | StackStatusTimeout = "timeout"
type InterruptType (line 134) | type InterruptType
constant InterruptGraceful (line 138) | InterruptGraceful InterruptType = "graceful"
constant InterruptForce (line 141) | InterruptForce InterruptType = "force"
type InterruptAction (line 145) | type InterruptAction
constant InterruptActionContinue (line 149) | InterruptActionContinue InterruptAction = "continue"
constant InterruptActionRestart (line 152) | InterruptActionRestart InterruptAction = "restart"
constant InterruptActionAbort (line 155) | InterruptActionAbort InterruptAction = "abort"
type InterruptSignal (line 159) | type InterruptSignal struct
type InterruptHandler (line 174) | type InterruptHandler
type InterruptController (line 178) | type InterruptController struct
type AssistantInfo (line 191) | type AssistantInfo struct
type Skip (line 200) | type Skip struct
type MessageMetadata (line 211) | type MessageMetadata struct
type BlockMetadata (line 221) | type BlockMetadata struct
type Context (line 229) | type Context struct
type SearchIntent (line 286) | type SearchIntent struct
type Options (line 294) | type Options struct
method ForceA2A (line 342) | func (opts *Options) ForceA2A() {
type OnMessageFunc (line 353) | type OnMessageFunc
type ForkParentInfo (line 358) | type ForkParentInfo struct
type Stack (line 367) | type Stack struct
type Response (line 399) | type Response struct
type HookCreateResponse (line 412) | type HookCreateResponse struct
type NextHookPayload (line 457) | type NextHookPayload struct
type ToolCallResponse (line 465) | type ToolCallResponse struct
type NextHookResponse (line 475) | type NextHookResponse struct
method Action (line 506) | func (n *NextHookResponse) Action() NextAction {
type DelegateConfig (line 488) | type DelegateConfig struct
type NextAction (line 495) | type NextAction
constant NextActionReturn (line 499) | NextActionReturn NextAction = "return"
constant NextActionDelegate (line 502) | NextActionDelegate NextAction = "delegate"
type ResponseHookNext (line 514) | type ResponseHookNext interface
type ResponseHookMCP (line 517) | type ResponseHookMCP struct
type ResponseHookFailback (line 520) | type ResponseHookFailback struct
type HookInterruptedResponse (line 523) | type HookInterruptedResponse struct
type MessageRole (line 546) | type MessageRole
constant RoleDeveloper (line 550) | RoleDeveloper MessageRole = "developer"
constant RoleSystem (line 551) | RoleSystem MessageRole = "system"
constant RoleUser (line 552) | RoleUser MessageRole = "user"
constant RoleAssistant (line 553) | RoleAssistant MessageRole = "assistant"
constant RoleTool (line 554) | RoleTool MessageRole = "tool"
type Message (line 559) | type Message struct
type ContentPartType (line 574) | type ContentPartType
constant ContentText (line 578) | ContentText ContentPartType = "text"
constant ContentImageURL (line 579) | ContentImageURL ContentPartType = "image_url"
constant ContentInputAudio (line 580) | ContentInputAudio ContentPartType = "input_audio"
constant ContentFile (line 581) | ContentFile ContentPartType = "file"
constant ContentData (line 582) | ContentData ContentPartType = "data"
type ContentPart (line 587) | type ContentPart struct
type ImageDetailLevel (line 597) | type ImageDetailLevel
constant DetailAuto (line 601) | DetailAuto ImageDetailLevel = "auto"
constant DetailLow (line 602) | DetailLow ImageDetailLevel = "low"
constant DetailHigh (line 603) | DetailHigh ImageDetailLevel = "high"
type ImageURL (line 607) | type ImageURL struct
type InputAudio (line 613) | type InputAudio struct
type FileAttachment (line 620) | type FileAttachment struct
type DataSourceType (line 626) | type DataSourceType
constant DataSourceModel (line 630) | DataSourceModel DataSourceType = "model"
constant DataSourceKBCollection (line 631) | DataSourceKBCollection DataSourceType = "kb_collection"
constant DataSourceKBDocument (line 632) | DataSourceKBDocument DataSourceType = "kb_document"
constant DataSourceTable (line 633) | DataSourceTable DataSourceType = "table"
constant DataSourceAPI (line 634) | DataSourceAPI DataSourceType = "api"
constant DataSourceMCPResource (line 635) | DataSourceMCPResource DataSourceType = "mcp_resource"
type DataSource (line 639) | type DataSource struct
type DataContent (line 649) | type DataContent struct
type ToolCallType (line 654) | type ToolCallType
constant ToolTypeFunction (line 658) | ToolTypeFunction ToolCallType = "function"
type ToolCall (line 662) | type ToolCall struct
type Function (line 669) | type Function struct
type CompletionRequest (line 678) | type CompletionRequest struct
type AudioConfig (line 702) | type AudioConfig struct
type StreamOptions (line 708) | type StreamOptions struct
type MCPServerConfig (line 714) | type MCPServerConfig struct
FILE: agent/context/types_llm.go
type Uses (line 10) | type Uses struct
type VisionFormat (line 24) | type VisionFormat
constant VisionFormatNone (line 29) | VisionFormatNone VisionFormat = ""
constant VisionFormatOpenAI (line 31) | VisionFormatOpenAI VisionFormat = "openai"
constant VisionFormatClaude (line 33) | VisionFormatClaude VisionFormat = "claude"
constant VisionFormatBase64 (line 35) | VisionFormatBase64 VisionFormat = "base64"
constant VisionFormatDefault (line 37) | VisionFormatDefault VisionFormat = "default"
function GetVisionSupport (line 41) | func GetVisionSupport(cap *llm.Capabilities) (bool, VisionFormat) {
type CompletionOptions (line 70) | type CompletionOptions struct
type CompletionResponse (line 123) | type CompletionResponse struct
constant FinishReasonStop (line 159) | FinishReasonStop = "stop"
constant FinishReasonLength (line 160) | FinishReasonLength = "length"
constant FinishReasonToolCalls (line 161) | FinishReasonToolCalls = "tool_calls"
constant FinishReasonContentFilter (line 162) | FinishReasonContentFilter = "content_filter"
constant FinishReasonFunctionCall (line 163) | FinishReasonFunctionCall = "function_call"
type ResponseFormat (line 168) | type ResponseFormat struct
type ResponseFormatType (line 174) | type ResponseFormatType
constant ResponseFormatText (line 178) | ResponseFormatText ResponseFormatType = "text"
constant ResponseFormatJSON (line 179) | ResponseFormatJSON ResponseFormatType = "json_object"
constant ResponseFormatJSONSchema (line 180) | ResponseFormatJSONSchema ResponseFormatType = "json_schema"
type JSONSchema (line 185) | type JSONSchema struct
FILE: agent/context/utils.go
function getValidatedValue (line 4) | func getValidatedValue(queryValue, headerValue, defaultValue string, val...
function getValidatedAccept (line 15) | func getValidatedAccept(queryValue, headerValue, clientType string) Acce...
function validateReferer (line 26) | func validateReferer(referer string) string {
function validateAccept (line 34) | func validateAccept(accept string) Accept {
function parseAccept (line 42) | func parseAccept(clientType string) Accept {
FILE: agent/i18n/builtin.go
function init (line 4) | func init() {
FILE: agent/i18n/i18n.go
type I18n (line 17) | type I18n struct
method Parse (line 26) | func (i18n I18n) Parse(input any) any {
method parseString (line 69) | func (i18n I18n) parseString(in string) string {
type Map (line 23) | type Map
method Flatten (line 163) | func (m Map) Flatten() Map {
method FlattenWithGlobal (line 228) | func (m Map) FlattenWithGlobal() Map {
function GetLocales (line 128) | func GetLocales(path string) (Map, error) {
function Translate (line 234) | func Translate(assistantID string, locale string, input any) any {
function TranslateGlobal (line 327) | func TranslateGlobal(locale string, input any) any {
function T (line 369) | func T(locale string, key string) string {
function Tr (line 380) | func Tr(assistantID string, locale string, key string) string {
FILE: agent/i18n/i18n_test.go
function TestParseString (line 11) | func TestParseString(t *testing.T) {
function TestParseStringNonStringValue (line 111) | func TestParseStringNonStringValue(t *testing.T) {
function TestParse (line 153) | func TestParse(t *testing.T) {
function TestParseSliceStringWithNilAndNonString (line 273) | func TestParseSliceStringWithNilAndNonString(t *testing.T) {
function TestMapFlatten (line 341) | func TestMapFlatten(t *testing.T) {
function TestMapFlattenWithGlobal (line 391) | func TestMapFlattenWithGlobal(t *testing.T) {
function TestMapFlattenWithGlobalNoGlobal (line 442) | func TestMapFlattenWithGlobalNoGlobal(t *testing.T) {
function TestMapFlattenWithGlobalKeyConflict (line 473) | func TestMapFlattenWithGlobalKeyConflict(t *testing.T) {
function TestTranslate (line 535) | func TestTranslate(t *testing.T) {
function TestTranslateGlobal (line 633) | func TestTranslateGlobal(t *testing.T) {
function TestGetLocalesIntegration (line 781) | func TestGetLocalesIntegration(t *testing.T) {
function TestEdgeCases (line 894) | func TestEdgeCases(t *testing.T) {
function TestBuiltinMessages (line 950) | func TestBuiltinMessages(t *testing.T) {
function TestTr (line 1080) | func TestTr(t *testing.T) {
function TestTAlias (line 1227) | func TestTAlias(t *testing.T) {
FILE: agent/llm/adapters/adapter.go
type CapabilityAdapter (line 9) | type CapabilityAdapter interface
type BaseAdapter (line 32) | type BaseAdapter struct
method Name (line 42) | func (a *BaseAdapter) Name() string {
method PreprocessMessages (line 47) | func (a *BaseAdapter) PreprocessMessages(messages []context.Message) (...
method PreprocessOptions (line 52) | func (a *BaseAdapter) PreprocessOptions(options *context.CompletionOpt...
method PostprocessResponse (line 57) | func (a *BaseAdapter) PostprocessResponse(response *context.Completion...
method ProcessStreamChunk (line 62) | func (a *BaseAdapter) ProcessStreamChunk(chunkType context.StreamChunk...
function NewBaseAdapter (line 37) | func NewBaseAdapter(name string) *BaseAdapter {
FILE: agent/llm/adapters/audio.go
type AudioAdapter (line 9) | type AudioAdapter struct
method PreprocessMessages (line 23) | func (a *AudioAdapter) PreprocessMessages(messages []context.Message) ...
function NewAudioAdapter (line 15) | func NewAudioAdapter(nativeSupport bool) *AudioAdapter {
FILE: agent/llm/adapters/reasoning.go
type ReasoningFormat (line 9) | type ReasoningFormat
constant ReasoningFormatNone (line 12) | ReasoningFormatNone ReasoningFormat = "none"
constant ReasoningFormatOpenAI (line 13) | ReasoningFormatOpenAI ReasoningFormat = "openai-o1"
constant ReasoningFormatGPT5 (line 14) | ReasoningFormatGPT5 ReasoningFormat = "gpt-5"
constant ReasoningFormatDeepSeek (line 15) | ReasoningFormatDeepSeek ReasoningFormat = "deepseek-r1"
type ReasoningAdapter (line 23) | type ReasoningAdapter struct
method PreprocessOptions (line 66) | func (a *ReasoningAdapter) PreprocessOptions(options *context.Completi...
method ProcessStreamChunk (line 101) | func (a *ReasoningAdapter) ProcessStreamChunk(chunkType context.Stream...
method PostprocessResponse (line 116) | func (a *ReasoningAdapter) PostprocessResponse(response *context.Compl...
function NewReasoningAdapter (line 32) | func NewReasoningAdapter(format ReasoningFormat, cap *openai.Capabilitie...
FILE: agent/llm/adapters/toolcall.go
type ToolCallAdapter (line 9) | type ToolCallAdapter struct
method PreprocessMessages (line 23) | func (a *ToolCallAdapter) PreprocessMessages(messages []context.Messag...
method PreprocessOptions (line 37) | func (a *ToolCallAdapter) PreprocessOptions(options *context.Completio...
method PostprocessResponse (line 55) | func (a *ToolCallAdapter) PostprocessResponse(response *context.Comple...
function NewToolCallAdapter (line 15) | func NewToolCallAdapter(nativeSupport bool) *ToolCallAdapter {
FILE: agent/llm/adapters/vision.go
type VisionAdapter (line 16) | type VisionAdapter struct
method PreprocessMessages (line 32) | func (a *VisionAdapter) PreprocessMessages(messages []context.Message)...
method removeImageContent (line 51) | func (a *VisionAdapter) removeImageContent(messages []context.Message)...
method convertToBase64Format (line 89) | func (a *VisionAdapter) convertToBase64Format(messages []context.Messa...
method convertImageURLToBase64 (line 126) | func (a *VisionAdapter) convertImageURLToBase64(part map[string]interf...
method downloadAndEncodeImage (line 180) | func (a *VisionAdapter) downloadAndEncodeImage(url string) (string, st...
function NewVisionAdapter (line 23) | func NewVisionAdapter(nativeSupport bool, format context.VisionFormat) *...
FILE: agent/llm/capabilities.go
function GetCapabilities (line 10) | func GetCapabilities(connectorID string) *goullm.Capabilities {
function GetCapabilitiesFromConn (line 24) | func GetCapabilitiesFromConn(conn connector.Connector) *goullm.Capabilit...
function getDefaultCapabilities (line 45) | func getDefaultCapabilities() *goullm.Capabilities {
function GetCapabilitiesMap (line 59) | func GetCapabilitiesMap(connectorID string) map[string]interface{} {
function ToMap (line 69) | func ToMap(caps *goullm.Capabilities) map[string]interface{} {
FILE: agent/llm/interfaces.go
type LLM (line 9) | type LLM interface
FILE: agent/llm/jsapi.go
type JSAPI (line 13) | type JSAPI struct
method Stream (line 35) | func (api *JSAPI) Stream(connectorID string, messages []interface{}, o...
method StreamWithHandler (line 40) | func (api *JSAPI) StreamWithHandler(connectorID string, messages []int...
method All (line 515) | func (api *JSAPI) All(requests []interface{}) []interface{} {
method Any (line 520) | func (api *JSAPI) Any(requests []interface{}) []interface{} {
method Race (line 525) | func (api *JSAPI) Race(requests []interface{}) []interface{} {
method AllWithHandler (line 530) | func (api *JSAPI) AllWithHandler(requests []interface{}, globalHandler...
method AnyWithHandler (line 536) | func (api *JSAPI) AnyWithHandler(requests []interface{}, globalHandler...
method RaceWithHandler (line 542) | func (api *JSAPI) RaceWithHandler(requests []interface{}, globalHandle...
method parseRequests (line 548) | func (api *JSAPI) parseRequests(requests []interface{}, globalHandler ...
method executeAll (line 597) | func (api *JSAPI) executeAll(requests []*Request) []interface{} {
method executeAny (line 634) | func (api *JSAPI) executeAny(requests []*Request) []interface{} {
method executeRace (line 706) | func (api *JSAPI) executeRace(requests []*Request) []interface{} {
method executeSingleRequestWithForkedContext (line 749) | func (api *JSAPI) executeSingleRequestWithForkedContext(request *Reque...
function NewJSAPI (line 22) | func NewJSAPI(ctx *agentContext.Context) *JSAPI {
function SetJSAPIFactory (line 28) | func SetJSAPIFactory() {
function createStreamHandlerWithCallback (line 102) | func createStreamHandlerWithCallback(ctx *agentContext.Context, handler ...
function parseMessages (line 123) | func parseMessages(messages []interface{}) ([]agentContext.Message, erro...
function parseToolCalls (line 170) | func parseToolCalls(toolCalls []interface{}) []agentContext.ToolCall {
function BuildCompletionOptions (line 206) | func BuildCompletionOptions(conn connector.Connector, opts map[string]in...
function buildCompletionOptions (line 210) | func buildCompletionOptions(conn connector.Connector, opts map[string]in...
type streamState (line 316) | type streamState struct
method generateMessageID (line 328) | func (s *streamState) generateMessageID() string {
method generateChunkID (line 337) | func (s *streamState) generateChunkID() string {
method handleChunk (line 346) | func (s *streamState) handleChunk(chunkType message.StreamChunkType, d...
function extractContent (line 484) | func extractContent(response *agentContext.CompletionResponse) string {
FILE: agent/llm/jsapi_types.go
type Request (line 9) | type Request struct
type Result (line 17) | type Result struct
FILE: agent/llm/llm.go
function New (line 12) | func New(conn connector.Connector, options *context.CompletionOptions) (...
FILE: agent/llm/process.go
function init (line 17) | func init() {
function ProcessChatCompletions (line 38) | func ProcessChatCompletions(p *process.Process) interface{} {
function toOpenAIFormat (line 160) | func toOpenAIFormat(resp *agentContext.CompletionResponse) map[string]in...
function newErrorResponse (line 197) | func newErrorResponse(errMsg string) map[string]interface{} {
function normalizeContentParts (line 210) | func normalizeContentParts(parts []interface{}) []agentContext.ContentPa...
FILE: agent/llm/providers/anthropic/anthropic.go
type Provider (line 23) | type Provider struct
method Stream (line 69) | func (p *Provider) Stream(ctx *context.Context, messages []context.Mes...
method streamWithRetry (line 160) | func (p *Provider) streamWithRetry(ctx *context.Context, messages []co...
method Post (line 598) | func (p *Provider) Post(ctx *context.Context, messages []context.Messa...
method postWithRetry (line 655) | func (p *Provider) postWithRetry(ctx *context.Context, messages []cont...
method buildRequestBody (line 789) | func (p *Provider) buildRequestBody(messages []context.Message, option...
function New (line 29) | func New(conn connector.Connector, capabilities *goullm.Capabilities) *P...
function buildAdapters (line 37) | func buildAdapters(cap *goullm.Capabilities) []adapters.CapabilityAdapter {
function convertTools (line 954) | func convertTools(tools []map[string]interface{}) []map[string]interface...
function convertToolChoice (line 978) | func convertToolChoice(choice interface{}) interface{} {
function convertImagePart (line 1003) | func convertImagePart(part context.ContentPart) map[string]interface{} {
function buildAPIURL (line 1039) | func buildAPIURL(host, endpoint string) string {
function mapStopReason (line 1044) | func mapStopReason(stopReason string) string {
function startMessage (line 1061) | func startMessage(mt *messageTracker, messageType message.StreamChunkTyp...
function startToolCallMessage (line 1089) | func startToolCallMessage(mt *messageTracker, toolCallInfo *message.Even...
function incrementChunk (line 1118) | func incrementChunk(mt *messageTracker) {
function endMessage (line 1124) | func endMessage(mt *messageTracker, handler message.StreamFunc) {
function isRetryableError (line 1152) | func isRetryableError(err error) bool {
FILE: agent/llm/providers/anthropic/anthropic_test.go
constant testConnectorID (line 20) | testConnectorID = "claude.haiku-3_0"
function TestAnthropicStreamBasic (line 23) | func TestAnthropicStreamBasic(t *testing.T) {
function TestAnthropicStreamWithToolCalls (line 103) | func TestAnthropicStreamWithToolCalls(t *testing.T) {
function TestAnthropicStreamRetry (line 210) | func TestAnthropicStreamRetry(t *testing.T) {
function newTestContext (line 270) | func newTestContext(chatID, connectorID string) *context.Context {
FILE: agent/llm/providers/anthropic/types.go
type StreamEvent (line 13) | type StreamEvent struct
type MessageStartEvent (line 18) | type MessageStartEvent struct
type MessageStart (line 24) | type MessageStart struct
type ContentBlockStartEvent (line 36) | type ContentBlockStartEvent struct
type ContentBlockDeltaEvent (line 43) | type ContentBlockDeltaEvent struct
type ContentBlockStopEvent (line 50) | type ContentBlockStopEvent struct
type MessageDeltaEvent (line 56) | type MessageDeltaEvent struct
type MessageDelta (line 63) | type MessageDelta struct
type DeltaUsage (line 69) | type DeltaUsage struct
type ContentBlock (line 74) | type ContentBlock struct
type DeltaBlock (line 85) | type DeltaBlock struct
type UsageInfo (line 93) | type UsageInfo struct
type NonStreamResponse (line 101) | type NonStreamResponse struct
type APIError (line 113) | type APIError struct
type streamAccumulator (line 122) | type streamAccumulator struct
type accumulatedToolCall (line 139) | type accumulatedToolCall struct
type messageTracker (line 146) | type messageTracker struct
FILE: agent/llm/providers/base/base.go
type Provider (line 13) | type Provider struct
method PreprocessMessages (line 29) | func (p *Provider) PreprocessMessages(messages []context.Message) ([]c...
method SupportsVision (line 74) | func (p *Provider) SupportsVision() bool {
method SupportsAudio (line 83) | func (p *Provider) SupportsAudio() bool {
method SupportsTools (line 88) | func (p *Provider) SupportsTools() bool {
method SupportsStreaming (line 93) | func (p *Provider) SupportsStreaming() bool {
method SupportsJSON (line 98) | func (p *Provider) SupportsJSON() bool {
method SupportsReasoning (line 103) | func (p *Provider) SupportsReasoning() bool {
method GetConnectorSetting (line 108) | func (p *Provider) GetConnectorSetting(key string) (interface{}, error) {
method GetConnectorStringSetting (line 127) | func (p *Provider) GetConnectorStringSetting(key string) (string, erro...
method GetModel (line 142) | func (p *Provider) GetModel() (string, error) {
method GetAPIKey (line 147) | func (p *Provider) GetAPIKey() (string, error) {
method GetHost (line 152) | func (p *Provider) GetHost() (string, error) {
function NewProvider (line 19) | func NewProvider(conn connector.Connector, capabilities *llm.Capabilitie...
FILE: agent/llm/providers/factory.go
type LLM (line 14) | type LLM interface
function SelectProvider (line 21) | func SelectProvider(conn connector.Connector, options *context.Completio...
function DetectAPIFormat (line 54) | func DetectAPIFormat(conn connector.Connector) string {
function contains (line 82) | func contains(s, substr string) bool {
function findSubstring (line 88) | func findSubstring(s, substr string) bool {
FILE: agent/llm/providers/openai/deepseek_r1_test.go
function TestDeepSeekR1StreamBasic (line 20) | func TestDeepSeekR1StreamBasic(t *testing.T) {
function TestDeepSeekR1PostBasic (line 197) | func TestDeepSeekR1PostBasic(t *testing.T) {
function TestDeepSeekR1LogicPuzzle (line 285) | func TestDeepSeekR1LogicPuzzle(t *testing.T) {
function newDeepSeekTestContext (line 397) | func newDeepSeekTestContext(chatID, connectorID string) *context.Context {
FILE: agent/llm/providers/openai/deepseek_v3_test.go
function TestDeepSeekV3StreamBasic (line 18) | func TestDeepSeekV3StreamBasic(t *testing.T) {
function TestDeepSeekV3PostBasic (line 127) | func TestDeepSeekV3PostBasic(t *testing.T) {
function TestDeepSeekV3WithToolCalls (line 216) | func TestDeepSeekV3WithToolCalls(t *testing.T) {
function TestDeepSeekV3NoReasoningEffort (line 306) | func TestDeepSeekV3NoReasoningEffort(t *testing.T) {
function newDeepSeekV3TestContext (line 369) | func newDeepSeekV3TestContext(chatID, connectorID string) *context.Conte...
FILE: agent/llm/providers/openai/openai.go
method startMessage (line 25) | func (mt *messageTracker) startMessage(messageType message.StreamChunkTy...
method startToolCallMessage (line 57) | func (mt *messageTracker) startToolCallMessage(toolCallInfo *message.Eve...
method incrementChunk (line 89) | func (mt *messageTracker) incrementChunk() {
method endMessage (line 98) | func (mt *messageTracker) endMessage(handler message.StreamFunc) {
type Provider (line 127) | type Provider struct
method Stream (line 195) | func (p *Provider) Stream(ctx *context.Context, messages []context.Mes...
method streamWithRetry (line 321) | func (p *Provider) streamWithRetry(ctx *context.Context, messages []co...
method Post (line 811) | func (p *Provider) Post(ctx *context.Context, messages []context.Messa...
method postWithRetry (line 896) | func (p *Provider) postWithRetry(ctx *context.Context, messages []cont...
method buildRequestBody (line 1031) | func (p *Provider) buildRequestBody(messages []context.Message, option...
method validateToolCallResults (line 1214) | func (p *Provider) validateToolCallResults(options *context.Completion...
function buildAPIURL (line 135) | func buildAPIURL(host, endpoint string) string {
function New (line 140) | func New(conn connector.Connector, capabilities *goullm.Capabilities) *P...
function buildAdapters (line 148) | func buildAdapters(cap *goullm.Capabilities) []adapters.CapabilityAdapter {
function detectReasoningFormat (line 185) | func detectReasoningFormat(cap *goullm.Capabilities) adapters.ReasoningF...
function isToolCallValidationError (line 1254) | func isToolCallValidationError(err error) bool {
function isRetryableError (line 1264) | func isRetryableError(err error) bool {
FILE: agent/llm/providers/openai/openai_test.go
function TestOpenAIStreamBasic (line 21) | func TestOpenAIStreamBasic(t *testing.T) {
function TestOpenAIPostBasic (line 108) | func TestOpenAIPostBasic(t *testing.T) {
function TestOpenAIStreamWithToolCalls (line 182) | func TestOpenAIStreamWithToolCalls(t *testing.T) {
function TestOpenAIPostWithToolCalls (line 296) | func TestOpenAIPostWithToolCalls(t *testing.T) {
function TestOpenAIStreamWithInvalidToolCall (line 412) | func TestOpenAIStreamWithInvalidToolCall(t *testing.T) {
function TestOpenAIStreamRetry (line 501) | func TestOpenAIStreamRetry(t *testing.T) {
function TestOpenAIStreamChunkTypes (line 570) | func TestOpenAIStreamChunkTypes(t *testing.T) {
function TestOpenAIStreamErrorCallback (line 626) | func TestOpenAIStreamErrorCallback(t *testing.T) {
function TestOpenAIToolCallValidationRetry (line 697) | func TestOpenAIToolCallValidationRetry(t *testing.T) {
function TestOpenAIJSONMode (line 800) | func TestOpenAIJSONMode(t *testing.T) {
function TestOpenAIJSONModePost (line 886) | func TestOpenAIJSONModePost(t *testing.T) {
function TestOpenAIJSONSchema (line 956) | func TestOpenAIJSONSchema(t *testing.T) {
function TestOpenAIJSONSchemaPost (line 1102) | func TestOpenAIJSONSchemaPost(t *testing.T) {
function TestOpenAIProxySupport (line 1212) | func TestOpenAIProxySupport(t *testing.T) {
function TestOpenAIStreamLifecycleEvents (line 1242) | func TestOpenAIStreamLifecycleEvents(t *testing.T) {
function TestOpenAIStreamContextCancellation (line 1347) | func TestOpenAIStreamContextCancellation(t *testing.T) {
function TestOpenAIStreamWithTemperature (line 1420) | func TestOpenAIStreamWithTemperature(t *testing.T) {
function newTestContext (line 1504) | func newTestContext(chatID, connectorID string) *context.Context {
FILE: agent/llm/providers/openai/temperature_test.go
function TestTemperatureDeepSeekR1AutoReset (line 67) | func TestTemperatureDeepSeekR1AutoReset(t *testing.T) {
function TestTemperatureGPT4oPreserved (line 119) | func TestTemperatureGPT4oPreserved(t *testing.T) {
function TestTemperatureDeepSeekV3Preserved (line 169) | func TestTemperatureDeepSeekV3Preserved(t *testing.T) {
function TestTemperatureNoTemperatureProvided (line 269) | func TestTemperatureNoTemperatureProvided(t *testing.T) {
function newTemperatureTestContext (line 338) | func newTemperatureTestContext(chatID, connectorID string) *context.Cont...
FILE: agent/llm/providers/openai/types.go
type StreamChunk (line 9) | type StreamChunk struct
type Delta (line 23) | type Delta struct
type DeltaContent (line 30) | type DeltaContent struct
type ToolCallDelta (line 39) | type ToolCallDelta struct
type FunctionCallDelta (line 47) | type FunctionCallDelta struct
type CompletionResponseFull (line 53) | type CompletionResponseFull struct
type streamAccumulator (line 74) | type streamAccumulator struct
type accumulatedToolCall (line 88) | type accumulatedToolCall struct
type messageTracker (line 96) | type messageTracker struct
FILE: agent/load.go
function Load (line 26) | func Load(cfg config.Config) error {
function GetAgent (line 115) | func GetAgent() *types.DSL {
function initGlobalI18n (line 120) | func initGlobalI18n() error {
function initGlobalPrompts (line 130) | func initGlobalPrompts() error {
function GetGlobalPrompts (line 141) | func GetGlobalPrompts(ctx map[string]string) []store.Prompt {
function initStore (line 149) | func initStore() error {
function initAssistant (line 180) | func initAssistant() error {
function initKBConfig (line 251) | func initKBConfig() error {
function initSearchConfig (line 274) | func initSearchConfig() error {
function mergeSearchConfig (line 301) | func mergeSearchConfig(base, override *searchTypes.Config) *searchTypes....
function GetSearchConfig (line 437) | func GetSearchConfig() *searchTypes.Config {
function defaultAssistant (line 445) | func defaultAssistant() (*assistant.Assistant, error) {
function resolveEnvStrings (line 455) | func resolveEnvStrings(setting *types.DSL) {
FILE: agent/load_test.go
function prepare (line 16) | func prepare(t *testing.T) {
function TestLoad (line 22) | func TestLoad(t *testing.T) {
function TestGetGlobalPrompts (line 137) | func TestGetGlobalPrompts(t *testing.T) {
function TestGetGlobalPromptsWithDisableFlag (line 190) | func TestGetGlobalPromptsWithDisableFlag(t *testing.T) {
function TestResolveEnvStrings (line 215) | func TestResolveEnvStrings(t *testing.T) {
function TestGlobalPromptsContent (line 321) | func TestGlobalPromptsContent(t *testing.T) {
function TestAssistantGlobalPrompts (line 355) | func TestAssistantGlobalPrompts(t *testing.T) {
FILE: agent/memory/interfaces.go
type Manager (line 6) | type Manager interface
type Accessor (line 16) | type Accessor interface
type NamespaceAccessor (line 38) | type NamespaceAccessor interface
type Factory (line 52) | type Factory interface
FILE: agent/memory/manager.go
function Init (line 12) | func Init(config *Config) {
function GetMemory (line 18) | func GetMemory(userID, teamID, chatID, contextID string) (*Memory, error) {
function Close (line 27) | func Close() error {
type DefaultManager (line 37) | type DefaultManager struct
method Memory (line 68) | func (m *DefaultManager) Memory(userID, teamID, chatID, contextID stri...
method Close (line 88) | func (m *DefaultManager) Close() error {
function NewManager (line 43) | func NewManager(config *Config) Manager {
function NewManagerWithDefaults (line 53) | func NewManagerWithDefaults() Manager {
function memoryKey (line 63) | func memoryKey(userID, teamID, chatID, contextID string) string {
FILE: agent/memory/memory.go
constant DefaultUserTTL (line 12) | DefaultUserTTL = 0
constant DefaultTeamTTL (line 13) | DefaultTeamTTL = 0
constant DefaultChatTTL (line 14) | DefaultChatTTL = 24 * time.Hour
constant DefaultContextTTL (line 15) | DefaultContextTTL = 30 * time.Minute
function New (line 19) | func New(cfg *Config, userID, teamID, chatID, contextID string) (*Memory...
function newNamespace (line 72) | func newNamespace(space Space, id, storeID string, defaultTTL time.Durat...
method GetUser (line 104) | func (m *Memory) GetUser() NamespaceAccessor {
method GetTeam (line 112) | func (m *Memory) GetTeam() NamespaceAccessor {
method GetChat (line 120) | func (m *Memory) GetChat() NamespaceAccessor {
method GetContext (line 128) | func (m *Memory) GetContext() NamespaceAccessor {
method GetSpace (line 136) | func (m *Memory) GetSpace(space Space) NamespaceAccessor {
method GetStats (line 152) | func (m *Memory) GetStats() *Stats {
method Clear (line 172) | func (m *Memory) Clear() {
method Fork (line 194) | func (m *Memory) Fork(newContextID string) (*Memory, error) {
FILE: agent/memory/memory_test.go
function TestMemoryNew (line 14) | func TestMemoryNew(t *testing.T) {
function TestMemoryPartialIDs (line 36) | func TestMemoryPartialIDs(t *testing.T) {
function TestNamespaceBasicOperations (line 52) | func TestNamespaceBasicOperations(t *testing.T) {
function TestNamespaceIsolation (line 122) | func TestNamespaceIsolation(t *testing.T) {
function TestNamespaceIncrDecr (line 359) | func TestNamespaceIncrDecr(t *testing.T) {
function TestNamespaceListOperations (line 384) | func TestNamespaceListOperations(t *testing.T) {
function TestNamespaceSetOperations (line 414) | func TestNamespaceSetOperations(t *testing.T) {
function TestNamespaceTTL (line 432) | func TestNamespaceTTL(t *testing.T) {
function TestMemoryClear (line 458) | func TestMemoryClear(t *testing.T) {
function TestMemoryStats (line 485) | func TestMemoryStats(t *testing.T) {
function TestManager (line 506) | func TestManager(t *testing.T) {
function TestGetSpace (line 532) | func TestGetSpace(t *testing.T) {
function TestNamespaceGetMultiSetMulti (line 549) | func TestNamespaceGetMultiSetMulti(t *testing.T) {
function TestNamespaceGetDel (line 578) | func TestNamespaceGetDel(t *testing.T) {
FILE: agent/memory/namespace.go
method GetID (line 11) | func (ns *Namespace) GetID() string {
method GetSpace (line 16) | func (ns *Namespace) GetSpace() Space {
method prefixKey (line 21) | func (ns *Namespace) prefixKey(key string) string {
method Get (line 26) | func (ns *Namespace) Get(key string) (interface{}, bool) {
method Set (line 31) | func (ns *Namespace) Set(key string, value interface{}, ttl time.Duratio...
method Has (line 39) | func (ns *Namespace) Has(key string) bool {
method Del (line 44) | func (ns *Namespace) Del(key string) error {
method Keys (line 50) | func (ns *Namespace) Keys(pattern ...string) []string {
method Len (line 74) | func (ns *Namespace) Len(pattern ...string) int {
method Clear (line 87) | func (ns *Namespace) Clear() {
method GetSet (line 92) | func (ns *Namespace) GetSet(key string, ttl time.Duration, getValue func...
method GetDel (line 100) | func (ns *Namespace) GetDel(key string) (interface{}, bool) {
method GetMulti (line 105) | func (ns *Namespace) GetMulti(keys []string) map[string]interface{} {
method SetMulti (line 126) | func (ns *Namespace) SetMulti(values map[string]interface{}, ttl time.Du...
method DelMulti (line 138) | func (ns *Namespace) DelMulti(keys []string) {
method GetSetMulti (line 147) | func (ns *Namespace) GetSetMulti(keys []string, ttl time.Duration, getVa...
method Incr (line 171) | func (ns *Namespace) Incr(key string, delta int64) (int64, error) {
method Decr (line 176) | func (ns *Namespace) Decr(key string, delta int64) (int64, error) {
method Push (line 181) | func (ns *Namespace) Push(key string, values ...interface{}) error {
method Pop (line 186) | func (ns *Namespace) Pop(key string, position int) (interface{}, error) {
method Pull (line 191) | func (ns *Namespace) Pull(key string, value interface{}) error {
method PullAll (line 196) | func (ns *Namespace) PullAll(key string, values []interface{}) error {
method AddToSet (line 201) | func (ns *Namespace) AddToSet(key string, values ...interface{}) error {
method ArrayLen (line 206) | func (ns *Namespace) ArrayLen(key string) int {
method ArrayGet (line 211) | func (ns *Namespace) ArrayGet(key string, index int) (interface{}, error) {
method ArraySet (line 216) | func (ns *Namespace) ArraySet(key string, index int, value interface{}) ...
method ArraySlice (line 221) | func (ns *Namespace) ArraySlice(key string, skip, limit int) ([]interfac...
method ArrayPage (line 226) | func (ns *Namespace) ArrayPage(key string, page, pageSize int) ([]interf...
method ArrayAll (line 231) | func (ns *Namespace) ArrayAll(key string) ([]interface{}, error) {
method Stats (line 236) | func (ns *Namespace) Stats() *NamespaceStats {
method Snapshot (line 247) | func (ns *Namespace) Snapshot() map[string]interface{} {
FILE: agent/memory/types.go
type Space (line 10) | type Space
constant SpaceUser (line 15) | SpaceUser Space = "user"
constant SpaceTeam (line 19) | SpaceTeam Space = "team"
constant SpaceChat (line 23) | SpaceChat Space = "chat"
constant SpaceContext (line 27) | SpaceContext Space = "context"
type Config (line 33) | type Config struct
constant DefaultUserStore (line 42) | DefaultUserStore = "__yao.agent.memory.user"
constant DefaultTeamStore (line 43) | DefaultTeamStore = "__yao.agent.memory.team"
constant DefaultChatStore (line 44) | DefaultChatStore = "__yao.agent.memory.chat"
constant DefaultContextStore (line 45) | DefaultContextStore = "__yao.agent.memory.context"
type Entry (line 49) | type Entry struct
type Namespace (line 61) | type Namespace struct
type Memory (line 72) | type Memory struct
type Stats (line 86) | type Stats struct
type NamespaceStats (line 94) | type NamespaceStats struct
FILE: agent/output/adapters/cui/adapter.go
type Adapter (line 8) | type Adapter struct
method Adapt (line 17) | func (a *Adapter) Adapt(msg *message.Message) ([]interface{}, error) {
method SupportsType (line 26) | func (a *Adapter) SupportsType(msgType string) bool {
function NewAdapter (line 11) | func NewAdapter() *Adapter {
FILE: agent/output/adapters/cui/writer.go
type Writer (line 13) | type Writer struct
method Write (line 33) | func (w *Writer) Write(msg *message.Message) error {
method WriteGroup (line 60) | func (w *Writer) WriteGroup(group *message.Group) error {
method Flush (line 79) | func (w *Writer) Flush() error {
method Close (line 86) | func (w *Writer) Close() error {
method sendChunk (line 93) | func (w *Writer) sendChunk(chunk interface{}) error {
method flush (line 128) | func (w *Writer) flush() error {
method sendData (line 138) | func (w *Writer) sendData(data []byte) error {
function NewWriter (line 23) | func NewWriter(options message.Options) (*Writer, error) {
FILE: agent/output/adapters/openai/adapter.go
type Adapter (line 6) | type Adapter struct
method Adapt (line 79) | func (a *Adapter) Adapt(msg *message.Message) ([]interface{}, error) {
method SupportsType (line 105) | func (a *Adapter) SupportsType(msgType string) bool {
method GetConfig (line 111) | func (a *Adapter) GetConfig() *AdapterConfig {
method GetRegistry (line 116) | func (a *Adapter) GetRegistry() *ConverterRegistry {
function NewAdapter (line 12) | func NewAdapter(options ...Option) *Adapter {
type Option (line 27) | type Option
function WithBaseURL (line 30) | func WithBaseURL(baseURL string) Option {
function WithLinkTemplate (line 37) | func WithLinkTemplate(msgType string, template string) Option {
function WithLinkTransformer (line 44) | func WithLinkTransformer(transformer LinkTransformer) Option {
function WithModel (line 51) | func WithModel(model string) Option {
function WithCapabilities (line 58) | func WithCapabilities(capabilities *ModelCapabilities) Option {
function WithLocale (line 65) | func WithLocale(locale string) Option {
function WithConverter (line 72) | func WithConverter(msgType string, converter ConverterFunc) Option {
FILE: agent/output/adapters/openai/converter.go
type ConverterRegistry (line 12) | type ConverterRegistry struct
method Register (line 35) | func (r *ConverterRegistry) Register(msgType string, converter Convert...
method GetConverter (line 40) | func (r *ConverterRegistry) GetConverter(msgType string) (ConverterFun...
method Convert (line 47) | func (r *ConverterRegistry) Convert(msg *message.Message, config *Adap...
function NewConverterRegistry (line 17) | func NewConverterRegistry() *ConverterRegistry {
function convertText (line 58) | func convertText(msg *message.Message, config *AdapterConfig) ([]interfa...
function convertThinking (line 69) | func convertThinking(msg *message.Message, config *AdapterConfig) ([]int...
function convertLoading (line 81) | func convertLoading(msg *message.Message, config *AdapterConfig) ([]inte...
function convertToolCall (line 93) | func convertToolCall(msg *message.Message, config *AdapterConfig) ([]int...
function convertError (line 119) | func convertError(msg *message.Message, config *AdapterConfig) ([]interf...
function convertAction (line 137) | func convertAction(msg *message.Message, config *AdapterConfig) ([]inter...
function convertStreamStart (line 145) | func convertStreamStart(msg *message.Message, config *AdapterConfig) ([]...
function generateTraceLink (line 211) | func generateTraceLink(traceID string, config *AdapterConfig) string {
function convertImage (line 222) | func convertImage(msg *message.Message, config *AdapterConfig) ([]interf...
function convertToLink (line 253) | func convertToLink(msg *message.Message, config *AdapterConfig) ([]inter...
function generateViewLink (line 281) | func generateViewLink(msg *message.Message, config *AdapterConfig) (stri...
function getLinkTemplate (line 308) | func getLinkTemplate(msgType string, config *AdapterConfig) string {
function createOpenAIChunk (line 318) | func createOpenAIChunk(id string, model string, delta map[string]interfa...
function getStringProp (line 335) | func getStringProp(props map[string]interface{}, key string, defaultValu...
FILE: agent/output/adapters/openai/types.go
type ConverterFunc (line 6) | type ConverterFunc
type LinkTransformer (line 10) | type LinkTransformer
type AdapterConfig (line 13) | type AdapterConfig struct
type ModelCapabilities (line 40) | type ModelCapabilities struct
function DefaultAdapterConfig (line 59) | func DefaultAdapterConfig() *AdapterConfig {
function copyLinkTemplates (line 69) | func copyLinkTemplates(templates map[string]string) map[string]string {
FILE: agent/output/adapters/openai/writer.go
type Writer (line 13) | type Writer struct
method Write (line 64) | func (w *Writer) Write(msg *message.Message) error {
method WriteGroup (line 103) | func (w *Writer) WriteGroup(group *message.Group) error {
method Flush (line 123) | func (w *Writer) Flush() error {
method Close (line 130) | func (w *Writer) Close() error {
method sendData (line 135) | func (w *Writer) sendData(data []byte) error {
method flush (line 143) | func (w *Writer) flush() error {
method sendChunk (line 154) | func (w *Writer) sendChunk(chunk interface{}) error {
method sendDone (line 191) | func (w *Writer) sendDone() error {
function NewWriter (line 22) | func NewWriter(options message.Options) (*Writer, error) {
function getBaseURL (line 48) | func getBaseURL(baseURL string) string {
FILE: agent/output/builtin.go
function NewUserInputMessage (line 11) | func NewUserInputMessage(content interface{}, role, name string) *messag...
function NewTextMessage (line 28) | func NewTextMessage(content string) *message.Message {
function NewThinkingMessage (line 38) | func NewThinkingMessage(content string) *message.Message {
function NewLoadingMessage (line 48) | func NewLoadingMessage(msg string) *message.Message {
function NewToolCallMessage (line 58) | func NewToolCallMessage(id, name, arguments string) *message.Message {
function NewErrorMessage (line 70) | func NewErrorMessage(msg, code string) *message.Message {
function NewActionMessage (line 81) | func NewActionMessage(name string, payload map[string]interface{}) *mess...
function NewEventMessage (line 92) | func NewEventMessage(event string, msg string, data interface{}) *messag...
function NewImageMessage (line 104) | func NewImageMessage(url string, alt string) *message.Message {
function NewAudioMessage (line 115) | func NewAudioMessage(url string, format string) *message.Message {
function NewVideoMessage (line 126) | func NewVideoMessage(url string) *message.Message {
function IsBuiltinType (line 136) | func IsBuiltinType(msgType string) bool {
function GenerateID (line 148) | func GenerateID() string {
FILE: agent/output/message/interfaces.go
type Writer (line 5) | type Writer interface
type Adapter (line 21) | type Adapter interface
type StreamHandler (line 32) | type StreamHandler interface
FILE: agent/output/message/types.go
type Options (line 11) | type Options struct
type Message (line 22) | type Message struct
type Metadata (line 47) | type Metadata struct
type Group (line 54) | type Group struct
constant TypeUserInput (line 64) | TypeUserInput = "user_input"
constant TypeText (line 67) | TypeText = "text"
constant TypeThinking (line 68) | TypeThinking = "thinking"
constant TypeLoading (line 69) | TypeLoading = "loading"
constant TypeToolCall (line 70) | TypeToolCall = "tool_call"
constant TypeError (line 71) | TypeError = "error"
constant TypeImage (line 74) | TypeImage = "image"
constant TypeAudio (line 75) | TypeAudio = "audio"
constant TypeVideo (line 76) | TypeVideo = "video"
constant TypeAction (line 79) | TypeAction = "action"
constant TypeEvent (line 80) | TypeEvent = "event"
constant EventStreamStart (line 87) | EventStreamStart = "stream_start"
constant EventStreamEnd (line 88) | EventStreamEnd = "stream_end"
constant EventThreadStart (line 91) | EventThreadStart = "thread_start"
constant EventThreadEnd (line 92) | EventThreadEnd = "thread_end"
constant EventBlockStart (line 95) | EventBlockStart = "block_start"
constant EventBlockEnd (line 96) | EventBlockEnd = "block_end"
constant EventMessageStart (line 99) | EventMessageStart = "message_start"
constant EventMessageEnd (line 100) | EventMessageEnd = "message_end"
type UserInputProps (line 108) | type UserInputProps struct
type TextProps (line 117) | type TextProps struct
type ThinkingProps (line 124) | type ThinkingProps struct
type LoadingProps (line 131) | type LoadingProps struct
type ToolCallProps (line 138) | type ToolCallProps struct
type ErrorProps (line 147) | type ErrorProps struct
type ActionProps (line 156) | type ActionProps struct
type EventProps (line 164) | type EventProps struct
type ImageProps (line 173) | type ImageProps struct
type AudioProps (line 184) | type AudioProps struct
type VideoProps (line 196) | type VideoProps struct
constant DeltaAppend (line 210) | DeltaAppend = "append"
constant DeltaReplace (line 211) | DeltaReplace = "replace"
constant DeltaMerge (line 212) | DeltaMerge = "merge"
constant DeltaSet (line 213) | DeltaSet = "set"
type StreamChunkType (line 217) | type StreamChunkType
constant ChunkText (line 222) | ChunkText StreamChunkType = "text"
constant ChunkThinking (line 223) | ChunkThinking StreamChunkType = "thinking"
constant ChunkToolCall (line 224) | ChunkToolCall StreamChunkType = "tool_call"
constant ChunkRefusal (line 225) | ChunkRefusal StreamChunkType = "refusal"
constant ChunkMetadata (line 226) | ChunkMetadata StreamChunkType = "metadata"
constant ChunkError (line 227) | ChunkError StreamChunkType = "error"
constant ChunkUnknown (line 228) | ChunkUnknown StreamChunkType = "unknown"
constant ChunkStreamStart (line 231) | ChunkStreamStart StreamChunkType = "stream_start"
constant ChunkStreamEnd (line 232) | ChunkStreamEnd StreamChunkType = "stream_end"
constant ChunkMessageStart (line 233) | ChunkMessageStart StreamChunkType = "message_start"
constant ChunkMessageEnd (line 234) | ChunkMessageEnd StreamChunkType = "message_end"
type StreamFunc (line 244) | type StreamFunc
type AssistantInfo (line 247) | type AssistantInfo struct
type UsageInfo (line 257) | type UsageInfo struct
type PromptTokensDetails (line 268) | type PromptTokensDetails struct
type CompletionTokensDetails (line 274) | type CompletionTokensDetails struct
type EventStreamStartData (line 290) | type EventStreamStartData struct
type EventStreamEndData (line 302) | type EventStreamEndData struct
type EventMessageStartData (line 317) | type EventMessageStartData struct
type EventMessageEndData (line 329) | type EventMessageEndData struct
type EventToolCallInfo (line 343) | type EventToolCallInfo struct
type EventBlockStartData (line 353) | type EventBlockStartData struct
type EventBlockEndData (line 364) | type EventBlockEndData struct
type EventThreadStartData (line 377) | type EventThreadStartData struct
type EventThreadEndData (line 387) | type EventThreadEndData struct
FILE: agent/output/message/utils.go
type IDGenerator (line 12) | type IDGenerator struct
method GenerateChunkID (line 26) | func (g *IDGenerator) GenerateChunkID() string {
method GenerateMessageID (line 33) | func (g *IDGenerator) GenerateMessageID() string {
method GenerateBlockID (line 40) | func (g *IDGenerator) GenerateBlockID() string {
method GenerateThreadID (line 47) | func (g *IDGenerator) GenerateThreadID() string {
method Reset (line 53) | func (g *IDGenerator) Reset() {
method GetCounters (line 61) | func (g *IDGenerator) GetCounters() (chunk, message, block, thread uin...
function NewIDGenerator (line 20) | func NewIDGenerator() *IDGenerator {
function GenerateNanoID (line 71) | func GenerateNanoID() string {
function GenerateCustomID (line 83) | func GenerateCustomID(prefix string) string {
FILE: agent/output/message/utils_test.go
function TestIDGenerator (line 8) | func TestIDGenerator(t *testing.T) {
function TestGenerateNanoID (line 153) | func TestGenerateNanoID(t *testing.T) {
function TestGenerateCustomID (line 170) | func TestGenerateCustomID(t *testing.T) {
FILE: agent/output/output.go
constant AcceptStandard (line 13) | AcceptStandard = "standard"
constant AcceptWebCUI (line 14) | AcceptWebCUI = "cui-web"
constant AccepNativeCUI (line 15) | AccepNativeCUI = "cui-native"
constant AcceptDesktopCUI (line 16) | AcceptDesktopCUI = "cui-desktop"
type Output (line 20) | type Output struct
method Send (line 54) | func (o *Output) Send(msg *message.Message) error {
method SendGroup (line 59) | func (o *Output) SendGroup(group *message.Group) error {
method Flush (line 64) | func (o *Output) Flush() error {
method Close (line 69) | func (o *Output) Close() error {
method SendMulti (line 74) | func (o *Output) SendMulti(messages ...*message.Message) error {
function NewOutput (line 25) | func NewOutput(options message.Options) (*Output, error) {
FILE: agent/output/safe_writer.go
type SafeWriter (line 20) | type SafeWriter struct
method run (line 76) | func (sw *SafeWriter) run() {
method drainUntilClosed (line 105) | func (sw *SafeWriter) drainUntilClosed() {
method Write (line 113) | func (sw *SafeWriter) Write(data []byte) (int, error) {
method Header (line 141) | func (sw *SafeWriter) Header() http.Header {
method WriteHeader (line 149) | func (sw *SafeWriter) WriteHeader(statusCode int) {
method Flush (line 157) | func (sw *SafeWriter) Flush() {
method Close (line 164) | func (sw *SafeWriter) Close() error {
method IsClosed (line 183) | func (sw *SafeWriter) IsClosed() bool {
method Underlying (line 191) | func (sw *SafeWriter) Underlying() http.ResponseWriter {
type writeRequest (line 32) | type writeRequest struct
constant QueueCapacity (line 38) | QueueCapacity = 10000
function NewSafeWriter (line 43) | func NewSafeWriter(w http.ResponseWriter) *SafeWriter {
function NewSafeWriterWithContext (line 60) | func NewSafeWriterWithContext(ctx context.Context, w http.ResponseWriter...
FILE: agent/output/safe_writer_test.go
type mockResponseWriter (line 14) | type mockResponseWriter struct
method Header (line 28) | func (m *mockResponseWriter) Header() http.Header {
method Write (line 32) | func (m *mockResponseWriter) Write(data []byte) (int, error) {
method WriteHeader (line 41) | func (m *mockResponseWriter) WriteHeader(statusCode int) {}
method Flush (line 43) | func (m *mockResponseWriter) Flush() {
method String (line 49) | func (m *mockResponseWriter) String() string {
method FlushCount (line 55) | func (m *mockResponseWriter) FlushCount() int {
function newMockResponseWriter (line 22) | func newMockResponseWriter() *mockResponseWriter {
function TestSafeWriter_BasicWrite (line 61) | func TestSafeWriter_BasicWrite(t *testing.T) {
function TestSafeWriter_ConcurrentWrites (line 84) | func TestSafeWriter_ConcurrentWrites(t *testing.T) {
function TestSafeWriter_NoDataCorruption (line 124) | func TestSafeWriter_NoDataCorruption(t *testing.T) {
function TestSafeWriter_CloseWaitsForPendingWrites (line 193) | func TestSafeWriter_CloseWaitsForPendingWrites(t *testing.T) {
function TestSafeWriter_WriteAfterClose (line 212) | func TestSafeWriter_WriteAfterClose(t *testing.T) {
function TestSafeWriter_ImplementsHTTPInterfaces (line 234) | func TestSafeWriter_ImplementsHTTPInterfaces(t *testing.T) {
function BenchmarkSafeWriter_ConcurrentWrites (line 253) | func BenchmarkSafeWriter_ConcurrentWrites(b *testing.B) {
function TestSafeWriter_RealHTTPServer (line 268) | func TestSafeWriter_RealHTTPServer(t *testing.T) {
function TestSafeWriter_ContextCancellation (line 314) | func TestSafeWriter_ContextCancellation(t *testing.T) {
function TestSafeWriter_GoroutineLeak (line 358) | func TestSafeWriter_GoroutineLeak(t *testing.T) {
FILE: agent/robot/api/activities.go
type ActivityQuery (line 15) | type ActivityQuery struct
method applyDefaults (line 105) | func (q *ActivityQuery) applyDefaults() {
type Activity (line 23) | type Activity struct
type ActivityListResponse (line 33) | type ActivityListResponse struct
function ListActivities (line 41) | func ListActivities(ctx *types.Context, query *ActivityQuery) (*Activity...
FILE: agent/robot/api/api_test.go
function TestAPIFullLifecycle (line 38) | func TestAPIFullLifecycle(t *testing.T) {
function TestAPIRobotQueryWithData (line 118) | func TestAPIRobotQueryWithData(t *testing.T) {
function TestListRobotsAutonomousModeFilter (line 209) | func TestListRobotsAutonomousModeFilter(t *testing.T) {
function TestAPIExecutionQueryWithData (line 278) | func TestAPIExecutionQueryWithData(t *testing.T) {
function TestAPITriggerWithData (line 378) | func TestAPITriggerWithData(t *testing.T) {
function setupAPITestRobotWithMode (line 450) | func setupAPITestRobotWithMode(t *testing.T, memberID, teamID string, au...
function setupAPITestRobot (line 488) | func setupAPITestRobot(t *testing.T, memberID, teamID string) {
function setupAPITestExecution (line 536) | func setupAPITestExecution(t *testing.T, execID, memberID string, trigge...
function cleanupAPITestRobots (line 563) | func cleanupAPITestRobots(t *testing.T) {
function cleanupAPITestExecutions (line 585) | func cleanupAPITestExecutions(t *testing.T) {
FILE: agent/robot/api/e2e_clock_test.go
function testAuth (line 30) | func testAuth() *oauthtypes.AuthorizedInfo {
function TestE2EClockTriggerFullFlow (line 39) | func TestE2EClockTriggerFullFlow(t *testing.T) {
function TestE2EClockTriggerPhaseProgression (line 163) | func TestE2EClockTriggerPhaseProgression(t *testing.T) {
function TestE2EClockTriggerDataPersistence (line 239) | func TestE2EClockTriggerDataPersistence(t *testing.T) {
function setupE2ERobotForClock (line 313) | func setupE2ERobotForClock(t *testing.T, memberID, teamID string) {
function cleanupE2ERobots (line 387) | func cleanupE2ERobots(t *testing.T) {
function cleanupE2EExecutions (line 402) | func cleanupE2EExecutions(t *testing.T) {
FILE: agent/robot/api/e2e_concurrent_test.go
function testAuthConcurrent (line 31) | func testAuthConcurrent() *oauthtypes.AuthorizedInfo {
function TestE2EConcurrentMultipleRobots (line 39) | func TestE2EConcurrentMultipleRobots(t *testing.T) {
function TestE2EConcurrentSameRobotMultipleTriggers (line 137) | func TestE2EConcurrentSameRobotMultipleTriggers(t *testing.T) {
function TestE2EConcurrentQuotaEnforcement (line 229) | func TestE2EConcurrentQuotaEnforcement(t *testing.T) {
function TestE2EConcurrentMixedTriggerTypes (line 295) | func TestE2EConcurrentMixedTriggerTypes(t *testing.T) {
function setupE2ERobotForConcurrent (line 390) | func setupE2ERobotForConcurrent(t *testing.T, memberID, teamID string) {
function setupE2ERobotHighQuota (line 461) | func setupE2ERobotHighQuota(t *testing.T, memberID, teamID string) {
function setupE2ERobotLowQuota (line 521) | func setupE2ERobotLowQuota(t *testing.T, memberID, teamID string) {
FILE: agent/robot/api/e2e_control_test.go
function testAuthControl (line 28) | func testAuthControl() *oauthtypes.AuthorizedInfo {
function TestE2EControlPauseResume (line 36) | func TestE2EControlPauseResume(t *testing.T) {
function TestE2EControlStop (line 141) | func TestE2EControlStop(t *testing.T) {
function TestE2EControlStopBeforeStart (line 248) | func TestE2EControlStopBeforeStart(t *testing.T) {
function TestE2EControlMultipleOperations (line 309) | func TestE2EControlMultipleOperations(t *testing.T) {
function TestE2EControlStatusQuery (line 401) | func TestE2EControlStatusQuery(t *testing.T) {
function setupE2ERobotForControl (line 487) | func setupE2ERobotForControl(t *testing.T, memberID, teamID string) {
FILE: agent/robot/api/e2e_event_test.go
function testAuthEvent (line 31) | func testAuthEvent() *oauthtypes.AuthorizedInfo {
function TestE2EEventTriggerFullFlow (line 40) | func TestE2EEventTriggerFullFlow(t *testing.T) {
function TestE2EEventTriggerDatabaseEvent (line 150) | func TestE2EEventTriggerDatabaseEvent(t *testing.T) {
function TestE2EEventTriggerVariousEventTypes (line 221) | func TestE2EEventTriggerVariousEventTypes(t *testing.T) {
function TestE2EEventTriggerWithComplexData (line 291) | func TestE2EEventTriggerWithComplexData(t *testing.T) {
function setupE2ERobotForEvent (line 377) | func setupE2ERobotForEvent(t *testing.T, memberID, teamID string) {
FILE: agent/robot/api/e2e_human_test.go
function testAuthHuman (line 32) | func testAuthHuman() *oauthtypes.AuthorizedInfo {
function TestE2EHumanTriggerFullFlow (line 41) | func TestE2EHumanTriggerFullFlow(t *testing.T) {
function TestE2EHumanTriggerWithMultimodalInput (line 149) | func TestE2EHumanTriggerWithMultimodalInput(t *testing.T) {
function TestE2EHumanTriggerAllActions (line 222) | func TestE2EHumanTriggerAllActions(t *testing.T) {
function setupE2ERobotForHuman (line 316) | func setupE2ERobotForHuman(t *testing.T, memberID, teamID string) {
FILE: agent/robot/api/e2e_interact_test.go
function TestE2EInteractNewAssignment (line 24) | func TestE2EInteractNewAssignment(t *testing.T) {
function TestE2EInteractStream (line 79) | func TestE2EInteractStream(t *testing.T) {
function TestE2EInteractMultiTurn (line 149) | func TestE2EInteractMultiTurn(t *testing.T) {
function TestE2EInteractStreamMultiTurn (line 208) | func TestE2EInteractStreamMultiTurn(t *testing.T) {
function setupInteractRobot (line 282) | func setupInteractRobot(t *testing.T, memberID, teamID string) {
function cleanupInteractRobots (line 339) | func cleanupInteractRobots(t *testing.T) {
function cleanupInteractExecutions (line 351) | func cleanupInteractExecutions(t *testing.T) {
FILE: agent/robot/api/e2e_suspend_test.go
function testAuthSuspend (line 29) | func testAuthSuspend() *oauthtypes.AuthorizedInfo {
function triggerSuspendRobot (line 37) | func triggerSuspendRobot(t *testing.T, ctx *types.Context, memberID stri...
function waitForStatus (line 55) | func waitForStatus(t *testing.T, execID string, statuses []types.ExecSta...
function TestE2ENormalExecutionNoSuspend (line 75) | func TestE2ENormalExecutionNoSuspend(t *testing.T) {
function TestE2ESuspendResumeFlow (line 114) | func TestE2ESuspendResumeFlow(t *testing.T) {
function TestE2EReplyShortcut (line 173) | func TestE2EReplyShortcut(t *testing.T) {
function TestE2EResumeContextPersistence (line 209) | func TestE2EResumeContextPersistence(t *testing.T) {
function TestE2EInteractRequiresExecutionID (line 262) | func TestE2EInteractRequiresExecutionID(t *testing.T) {
function TestE2EInteractWithNonWaitingExecution (line 277) | func TestE2EInteractWithNonWaitingExecution(t *testing.T) {
function setupE2ESuspendRobotWithTasksPlanner (line 316) | func setupE2ESuspendRobotWithTasksPlanner(t *testing.T, memberID, teamID...
function setupE2ESuspendRobot (line 378) | func setupE2ESuspendRobot(t *testing.T, memberID, teamID string, agents ...
function cleanupE2ESuspendRobots (line 383) | func cleanupE2ESuspendRobots(t *testing.T) {
function getExecution (line 396) | func getExecution(t *testing.T, execID string) *types.Execution {
FILE: agent/robot/api/execution.go
function getExecutionStore (line 19) | func getExecutionStore() *store.ExecutionStore {
function ResetExecutionStore (line 28) | func ResetExecutionStore() {
function GetExecution (line 37) | func GetExecution(ctx *types.Context, execID string) (*types.Execution, ...
function ListExecutions (line 55) | func ListExecutions(ctx *types.Context, memberID string, query *Executio...
function PauseExecution (line 104) | func PauseExecution(ctx *types.Context, execID string) error {
function ResumeExecution (line 123) | func ResumeExecution(ctx *types.Context, execID string) error {
function StopExecution (line 142) | func StopExecution(ctx *types.Context, execID string) error {
function GetExecutionStatus (line 164) | func GetExecutionStatus(ctx *types.Context, execID string) (*types.Execu...
FILE: agent/robot/api/execution_test.go
function TestGetExecutionValidation (line 15) | func TestGetExecutionValidation(t *testing.T) {
function TestListExecutionsValidation (line 40) | func TestListExecutionsValidation(t *testing.T) {
function TestPauseExecutionValidation (line 77) | func TestPauseExecutionValidation(t *testing.T) {
function TestResumeExecutionValidation (line 101) | func TestResumeExecutionValidation(t *testing.T) {
function TestStopExecutionValidation (line 125) | func TestStopExecutionValidation(t *testing.T) {
function TestGetExecutionStatusValidation (line 149) | func TestGetExecutionStatusValidation(t *testing.T) {
function TestExecutionControlWithManagerStarted (line 174) | func TestExecutionControlWithManagerStarted(t *testing.T) {
FILE: agent/robot/api/interact.go
type InteractRequest (line 13) | type InteractRequest struct
type InteractResult (line 22) | type InteractResult struct
function Interact (line 36) | func Interact(ctx *types.Context, memberID string, req *InteractRequest)...
function managerInteract (line 59) | func managerInteract(ctx *types.Context, mgr *manager.Manager, memberID ...
function legacyResume (line 84) | func legacyResume(ctx *types.Context, req *InteractRequest) (*InteractRe...
function Reply (line 106) | func Reply(ctx *types.Context, memberID string, execID string, taskID st...
function Confirm (line 116) | func Confirm(ctx *types.Context, memberID string, execID string, message...
function InteractStream (line 128) | func InteractStream(ctx *types.Context, memberID string, req *InteractRe...
function InteractStreamRaw (line 167) | func InteractStreamRaw(ctx *types.Context, memberID string, req *Interac...
function CancelExecution (line 204) | func CancelExecution(ctx *types.Context, execID string) error {
FILE: agent/robot/api/interact_test.go
function TestInteract (line 12) | func TestInteract(t *testing.T) {
function TestReply (line 36) | func TestReply(t *testing.T) {
function TestConfirm (line 55) | func TestConfirm(t *testing.T) {
function TestCancelExecution (line 72) | func TestCancelExecution(t *testing.T) {
function TestLegacyResume (line 82) | func TestLegacyResume(t *testing.T) {
function TestManagerInteract (line 95) | func TestManagerInteract(t *testing.T) {
function TestInteractLegacyFallback (line 116) | func TestInteractLegacyFallback(t *testing.T) {
function TestInteractResultFields (line 129) | func TestInteractResultFields(t *testing.T) {
function TestLegacyResumeStatusMapping (line 154) | func TestLegacyResumeStatusMapping(t *testing.T) {
FILE: agent/robot/api/lifecycle.go
function init (line 21) | func init() {
function Start (line 45) | func Start() error {
function StartWithConfig (line 78) | func StartWithConfig(config *manager.Config) error {
function Stop (line 96) | func Stop() error {
function IsRunning (line 119) | func IsRunning() bool {
function getManager (line 128) | func getManager() (*manager.Manager, error) {
function SetManager (line 139) | func SetManager(m *manager.Manager) {
FILE: agent/robot/api/lifecycle_test.go
function TestLifecycle (line 13) | func TestLifecycle(t *testing.T) {
FILE: agent/robot/api/results.go
type ResultQuery (line 15) | type ResultQuery struct
method applyDefaults (line 130) | func (q *ResultQuery) applyDefaults() {
type ResultItem (line 23) | type ResultItem struct
type ResultDetail (line 36) | type ResultDetail struct
type ResultListResponse (line 48) | type ResultListResponse struct
function ListResults (line 58) | func ListResults(ctx *types.Context, memberID string, query *ResultQuery...
function GetResult (line 105) | func GetResult(ctx *types.Context, execID string) (*ResultDetail, error) {
function recordToResultItem (line 143) | func recordToResultItem(record *store.ExecutionRecord) *ResultItem {
function recordToResultDetail (line 172) | func recordToResultDetail(record *store.ExecutionRecord) *ResultDetail {
FILE: agent/robot/api/robot.go
constant memberModel (line 21) | memberModel = "__yao.member"
function GetRobot (line 31) | func GetRobot(ctx *types.Context, memberID string) (*types.Robot, error) {
function ListRobots (line 58) | func ListRobots(ctx *types.Context, query *ListQuery) (*ListResult, erro...
function GetRobotStatus (line 84) | func GetRobotStatus(ctx *types.Context, memberID string) (*RobotState, e...
function loadRobotFromDB (line 161) | func loadRobotFromDB(memberID string) (*types.Robot, error) {
function listRobotsFromDB (line 192) | func listRobotsFromDB(query *ListQuery) (*ListResult, error) {
function paginateRobots (line 281) | func paginateRobots(robots []*types.Robot, query *ListQuery) *ListResult {
function CreateRobot (line 317) | func CreateRobot(ctx *types.Context, req *CreateRobotRequest) (*RobotRes...
function UpdateRobot (line 437) | func UpdateRobot(ctx *types.Context, memberID string, req *UpdateRobotRe...
function RemoveRobot (line 555) | func RemoveRobot(ctx *types.Context, memberID string) error {
function GetRobotResponse (line 599) | func GetRobotResponse(ctx *types.Context, memberID string) (*RobotRespon...
function recordToResponse (line 612) | func recordToResponse(record *store.RobotRecord) *RobotResponse {
function generateMemberID (line 652) | func generateMemberID(ctx context.Context) (string, error) {
function memberIDExists (line 678) | func memberIDExists(ctx context.Context, memberID string) (bool, error) {
FILE: agent/robot/api/robot_test.go
function TestGetRobotValidation (line 15) | func TestGetRobotValidation(t *testing.T) {
function TestListRobotsValidation (line 40) | func TestListRobotsValidation(t *testing.T) {
function TestGetRobotStatusValidation (line 81) | func TestGetRobotStatusValidation(t *testing.T) {
function TestCreateRobotValidation (line 108) | func TestCreateRobotValidation(t *testing.T) {
function TestCreateRobot (line 162) | func TestCreateRobot(t *testing.T) {
function TestUpdateRobot (line 266) | func TestUpdateRobot(t *testing.T) {
function TestRemoveRobot (line 373) | func TestRemoveRobot(t *testing.T) {
function TestGetRobotResponse (line 423) | func TestGetRobotResponse(t *testing.T) {
FILE: agent/robot/api/trigger.go
function Trigger (line 14) | func Trigger(ctx *types.Context, memberID string, req *TriggerRequest) (...
function TriggerManual (line 41) | func TriggerManual(ctx *types.Context, memberID string, triggerType type...
function Intervene (line 68) | func Intervene(ctx *types.Context, memberID string, req *TriggerRequest)...
function HandleEvent (line 86) | func HandleEvent(ctx *types.Context, memberID string, req *TriggerReques...
function triggerHuman (line 105) | func triggerHuman(ctx *types.Context, mgr managerInterface, memberID str...
function triggerEvent (line 133) | func triggerEvent(ctx *types.Context, mgr managerInterface, memberID str...
function triggerManual (line 160) | func triggerManual(ctx *types.Context, mgr managerInterface, memberID st...
type managerInterface (line 184) | type managerInterface interface
FILE: agent/robot/
Copy disabled (too large)
Download .json
Condensed preview — 1900 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (16,964K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 322,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Ask a question or discuss a topic\n url: https://discord.com/invi"
},
{
"path": ".github/ISSUE_TEMPLATE/issue_report.md",
"chars": 186,
"preview": "---\nname: \"Report an issue\"\nabout: \"Report an issue to help us improve\"\nlabels: \"\"\nassignees: \"\"\n---\n\n## Description\n\n##"
},
{
"path": ".github/actions/setup-db/Dockerfile",
"chars": 112,
"preview": "FROM docker:latest\n\n\nCOPY entrypoint.sh /entrypoint.sh\nRUN chmod +x /entrypoint.sh\nENTRYPOINT [\"/entrypoint.sh\"]"
},
{
"path": ".github/actions/setup-db/action.yml",
"chars": 528,
"preview": "inputs:\n kind:\n description: \"Chose the kind of database (MySQL8.0, MySQL5.7, Postgres9.6, Postgres14.0, SQLite3)\"\n "
},
{
"path": ".github/actions/setup-yao/action.yml",
"chars": 2994,
"preview": "name: \"Setup Yao Build Environment\"\ndescription: \"Checkout dependency repos, setup Go toolchain, and install build tools"
},
{
"path": ".github/codesign/entitlements.plist",
"chars": 329,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": ".github/env/sandbox-v2.env",
"chars": 4749,
"preview": "# ============================================================\n# Yao CI Environment — sandbox-v2 (v1.0.0)\n# Loaded via: "
},
{
"path": ".github/workflows/build-docker.yml",
"chars": 3219,
"preview": "name: Build and push docker images\n\non:\n # push:\n # branches: [main]\n # paths:\n # - \".github/workflows/docke"
},
{
"path": ".github/workflows/build-linux.yml",
"chars": 1429,
"preview": "name: Build Linux Artifacts\n\non:\n workflow_dispatch:\n inputs:\n tags:\n description: \"Version tags\"\n\njobs:"
},
{
"path": ".github/workflows/build-macos.yml",
"chars": 7128,
"preview": "name: Build MacOS Artifacts\n\non:\n workflow_dispatch:\n inputs:\n tags:\n description: \"Version tags\"\n\nenv:\n"
},
{
"path": ".github/workflows/notarize-macos.yml",
"chars": 3622,
"preview": "name: Notarize macOS\n\non:\n workflow_dispatch:\n inputs:\n run_id:\n description: \"Release macOS workflow ru"
},
{
"path": ".github/workflows/pr-receive.yml",
"chars": 457,
"preview": "name: Receive PR\n\n# read-only repo token\n# no access to secrets\non:\n pull_request:\n\njobs:\n build:\n runs-on: ubuntu-"
},
{
"path": ".github/workflows/pr-test.yml",
"chars": 61425,
"preview": "name: PR Unit Test\n\n# read-write repo token\n# access to secrets\non:\n workflow_run:\n workflows: [\"Receive PR\"]\n ty"
},
{
"path": ".github/workflows/release-linux.yml",
"chars": 4804,
"preview": "name: Release Linux\n\non:\n workflow_dispatch:\n push:\n tags:\n - \"v*\"\n\npermissions:\n contents: write\n\nenv:\n IMA"
},
{
"path": ".github/workflows/release-macos.yml",
"chars": 6931,
"preview": "name: Release macOS\n\non:\n workflow_dispatch:\n push:\n tags:\n - \"v*\"\n\npermissions:\n contents: write\n\njobs:\n # "
},
{
"path": ".github/workflows/release.yml",
"chars": 4422,
"preview": "name: Release\n\non:\n workflow_run:\n workflows: [\"Release Linux\", \"Release macOS\"]\n types:\n - completed\n\npermi"
},
{
"path": ".github/workflows/unit-test-v1.yml",
"chars": 22087,
"preview": "name: Unit Test V1\n\non:\n workflow_dispatch:\n inputs:\n tags:\n description: \"Version\"\n\nenv:\n CI_VERSION: "
},
{
"path": ".github/workflows/unit-test.yml",
"chars": 42738,
"preview": "name: Unit Test\n\non:\n workflow_dispatch:\n inputs:\n tags:\n description: \"Version\"\n push:\n branches: ["
},
{
"path": ".gitignore",
"chars": 1379,
"preview": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Ou"
},
{
"path": "COMMERCIAL_LICENSE.md",
"chars": 4202,
"preview": "> **DEPRECATED**: This license is no longer in effect. Please refer to the [LICENSE](LICENSE) file for current licensing"
},
{
"path": "COMMERCIAL_LICENSE.zh-CN.md",
"chars": 1640,
"preview": "> **已废弃**: 本许可证已不再生效。请参考 [LICENSE](LICENSE) 文件获取当前的许可条款。\n\n# Yao 商业许可证\n\n本文件概述了 **Yao** 项目的商业许可证条款。虽然 Yao 项目主要使用 **Apache "
},
{
"path": "LICENSE",
"chars": 1170,
"preview": "# Open Source License\n\nYao App Engine is licensed under a modified version of the Apache License 2.0, with the following"
},
{
"path": "Makefile",
"chars": 32001,
"preview": "GO ?= go\nGIT ?= git\nGOFMT ?= gofmt \"-s\"\nPACKAGES ?= $(shell $(GO) list ./...)\nVETPACKAGES ?= $(shell $(GO) list ./... | "
},
{
"path": "README.md",
"chars": 2383,
"preview": "# Yao — Build Autonomous Agents. Just Define the Role.\n\nYao is an open-source engine for autonomous agents — event-drive"
},
{
"path": "README.zh-CN.md",
"chars": 2589,
"preview": "# Yao\n\n[](https://github.com/YaoApp/"
},
{
"path": "agent/README.md",
"chars": 5961,
"preview": "# Yao Agent\n\nA powerful AI assistant framework for building intelligent conversational agents with tool integration, kno"
},
{
"path": "agent/agent_test.go",
"chars": 7909,
"preview": "package agent\n\n// type customResponseRecorder struct {\n// \t*httptest.ResponseRecorder\n// \tcloseChannel chan bool\n// }\n\n/"
},
{
"path": "agent/assistant/agent.go",
"chars": 29153,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/yaoapp/gou/conne"
},
{
"path": "agent/assistant/agent_interrupt_test.go",
"chars": 11853,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/yaoapp/yao/agent/assistan"
},
{
"path": "agent/assistant/agent_next_test.go",
"chars": 7173,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/ya"
},
{
"path": "agent/assistant/assistant.go",
"chars": 17524,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"path\"\n\n\t\"github.com/yaoapp/gou/fs\"\n\t\"github.com/yaoapp/yao/agent/caller\"\n\tagentCont"
},
{
"path": "agent/assistant/build.go",
"chars": 18099,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cast\"\n\t\"github.com/yaoapp/gou/json\"\n\t\"github.com/yaoapp/yao/agent"
},
{
"path": "agent/assistant/build_content.go",
"chars": 4324,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/yao/agent/content\"\n\t\"github.com/yaoapp/yao/agent/content/text\"\n\t"
},
{
"path": "agent/assistant/build_mcp_test.go",
"chars": 8658,
"preview": "package assistant_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/assistant\"\n\t\"github.com/yaoapp/yao/agent/cont"
},
{
"path": "agent/assistant/build_prompts_test.go",
"chars": 25096,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"gi"
},
{
"path": "agent/assistant/build_test.go",
"chars": 13810,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/assistant\"\n\t\"github.com"
},
{
"path": "agent/assistant/cache.go",
"chars": 3971,
"preview": "package assistant\n\nimport (\n\t\"container/list\"\n\t\"sync\"\n)\n\n// Cache represents a thread-safe LRU cache for Assistant objec"
},
{
"path": "agent/assistant/cache_test.go",
"chars": 6492,
"preview": "package assistant_test\n\nimport (\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/yaoapp/gou/proce"
},
{
"path": "agent/assistant/chat.go",
"chars": 12049,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n\tagentcontext \"github.com/yaoapp/yao/ag"
},
{
"path": "agent/assistant/chat_test.go",
"chars": 30817,
"preview": "package assistant_test\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/st"
},
{
"path": "agent/assistant/handlers/stream.go",
"chars": 12167,
"preview": "package handlers\n\nimport (\n\t\"time\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/yaoapp/kun/log\"\n\t\"github.com/ya"
},
{
"path": "agent/assistant/history.go",
"chars": 12387,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\tagentcontext \"github.com/yaoapp/"
},
{
"path": "agent/assistant/history_test.go",
"chars": 29934,
"preview": "package assistant_test\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/stretchr/t"
},
{
"path": "agent/assistant/hook/REALWORLD_PERFORMANCE_REPORT.md",
"chars": 8602,
"preview": "# Performance Test Report\n\n**Test Date**: November 28, 2025 \n**System**: Yao Agent Assistant - Create Hook \n**Hardware"
},
{
"path": "agent/assistant/hook/create.go",
"chars": 3029,
"preview": "package hook\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"github.com/yaoapp/yao/agent"
},
{
"path": "agent/assistant/hook/create_bench_test.go",
"chars": 9990,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/assistant\"\n\t\"github.com/yaoa"
},
{
"path": "agent/assistant/hook/create_mem_test.go",
"chars": 21305,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"runtime\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/yaoapp/yao/agent/assistant"
},
{
"path": "agent/assistant/hook/create_nested_test.go",
"chars": 2924,
"preview": "package hook_test\n\nimport (\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/assistant\"\n\t\"github.com/yaoapp/yao/agent/c"
},
{
"path": "agent/assistant/hook/create_test.go",
"chars": 16244,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/assistant\"\n\t\"github.com/yaoa"
},
{
"path": "agent/assistant/hook/goroutine_leak_test.go",
"chars": 8601,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/pprof\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\""
},
{
"path": "agent/assistant/hook/hook.go",
"chars": 13,
"preview": "package hook\n"
},
{
"path": "agent/assistant/hook/next.go",
"chars": 1843,
"preview": "package hook\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"github.com/yaoapp/yao/agent"
},
{
"path": "agent/assistant/hook/next_test.go",
"chars": 12458,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/assistant\"\n\t\"github.com/yaoa"
},
{
"path": "agent/assistant/hook/realworld_next_test.go",
"chars": 11457,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/yaoapp/"
},
{
"path": "agent/assistant/hook/realworld_stress_test.go",
"chars": 22685,
"preview": "package hook_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/te"
},
{
"path": "agent/assistant/hook/script.go",
"chars": 1075,
"preview": "package hook\n\nimport (\n\t\"strings\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\n// Execute execute the script\nfunc (s *Scri"
},
{
"path": "agent/assistant/hook/types.go",
"chars": 132,
"preview": "package hook\n\nimport (\n\tv8 \"github.com/yaoapp/gou/runtime/v8\"\n)\n\n// Script the script hook align\ntype Script struct {\n\t*"
},
{
"path": "agent/assistant/llm.go",
"chars": 4342,
"preview": "package assistant\n\nimport (\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/agent/llm\"\n\t\"github.com/yaoap"
},
{
"path": "agent/assistant/load.go",
"chars": 25849,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.c"
},
{
"path": "agent/assistant/load_merge_test.go",
"chars": 13663,
"preview": "package assistant_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "agent/assistant/load_process_test.go",
"chars": 3564,
"preview": "package assistant_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/yaoapp/gou/process\"\n\t\"gi"
},
{
"path": "agent/assistant/load_store_test.go",
"chars": 32457,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"githu"
},
{
"path": "agent/assistant/load_system.go",
"chars": 10040,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/gou/application\"\n\t\"github.com/yaoapp"
},
{
"path": "agent/assistant/load_test.go",
"chars": 26536,
"preview": "package assistant_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "agent/assistant/mcp.go",
"chars": 26121,
"preview": "package assistant\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\tgouJson \"github.com/y"
},
{
"path": "agent/assistant/mcp_test.go",
"chars": 11997,
"preview": "package assistant_test\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/stretchr/te"
},
{
"path": "agent/assistant/next.go",
"chars": 3145,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\n\tagentContext \"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/agent/ou"
},
{
"path": "agent/assistant/permission.go",
"chars": 248,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\nfunc (ast *Assistant) checkPermissions(ctx"
},
{
"path": "agent/assistant/sandbox.go",
"chars": 14312,
"preview": "package assistant\n\nimport (\n\tstdContext \"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gith"
},
{
"path": "agent/assistant/sandbox_debug_test.go",
"chars": 2274,
"preview": "package assistant_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "agent/assistant/sandbox_e2e_test.go",
"chars": 14994,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testi"
},
{
"path": "agent/assistant/sandbox_integration_test.go",
"chars": 6671,
"preview": "package assistant_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "agent/assistant/sandbox_test.go",
"chars": 10954,
"preview": "package assistant_test\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/te"
},
{
"path": "agent/assistant/sandbox_v2.go",
"chars": 8465,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/ya"
},
{
"path": "agent/assistant/scripts.go",
"chars": 10684,
"preview": "package assistant\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/yaoapp/gou/appli"
},
{
"path": "agent/assistant/scripts_process_test.go",
"chars": 5780,
"preview": "package assistant_test\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/yaoapp/gou/pr"
},
{
"path": "agent/assistant/scripts_test.go",
"chars": 9207,
"preview": "package assistant\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/r"
},
{
"path": "agent/assistant/search.go",
"chars": 37921,
"preview": "package assistant\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github."
},
{
"path": "agent/assistant/search_auth_db.go",
"chars": 2596,
"preview": "package assistant\n\nimport (\n\t\"github.com/yaoapp/gou/query/gou\"\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\n// BuildDBAuthW"
},
{
"path": "agent/assistant/search_auth_integration_test.go",
"chars": 19120,
"preview": "package assistant_test\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\tgraphragty"
},
{
"path": "agent/assistant/search_auth_kb.go",
"chars": 3095,
"preview": "package assistant\n\nimport (\n\t\"context\"\n\n\tagentContext \"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/kb\"\n"
},
{
"path": "agent/assistant/search_auto_disabled_test.go",
"chars": 2450,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/st"
},
{
"path": "agent/assistant/search_auto_full_test.go",
"chars": 3870,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"gi"
},
{
"path": "agent/assistant/search_auto_hook_disable_test.go",
"chars": 3139,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/st"
},
{
"path": "agent/assistant/search_auto_keyword_test.go",
"chars": 5534,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"gi"
},
{
"path": "agent/assistant/search_auto_web_test.go",
"chars": 3061,
"preview": "package assistant_test\n\nimport (\n\tstdContext \"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"gi"
},
{
"path": "agent/assistant/source.go",
"chars": 1405,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\tv8 \"github.com/yaoapp/gou/runtime/v8\"\n\t\"github.com/yaoapp/yao/ag"
},
{
"path": "agent/assistant/trace.go",
"chars": 5520,
"preview": "package assistant\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/connector/openai\"\n\t\"github.com/yaoapp/kun/log\"\n\t\"github.com/"
},
{
"path": "agent/assistant/types.go",
"chars": 5462,
"preview": "package assistant\n\nimport (\n\tjsoniter \"github.com/json-iterator/go\"\n\tv8 \"github.com/yaoapp/gou/runtime/v8\"\n\t\"github.com/"
},
{
"path": "agent/assistant/utils.go",
"chars": 2019,
"preview": "package assistant\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"time\"\n\n\tjsoniter \"github.com/json-itera"
},
{
"path": "agent/caller/caller.go",
"chars": 754,
"preview": "// Package caller provides a shared interface for calling agents\n// This package is used by both content and search pack"
},
{
"path": "agent/caller/context.go",
"chars": 1549,
"preview": "package caller\n\nimport (\n\t\"context\"\n\n\tagentContext \"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/openapi"
},
{
"path": "agent/caller/integration_test.go",
"chars": 6559,
"preview": "package caller_test\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify"
},
{
"path": "agent/caller/jsapi.go",
"chars": 10924,
"preview": "package caller\n\nimport (\n\tagentContext \"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/agent/output/messag"
},
{
"path": "agent/caller/jsapi_test.go",
"chars": 3651,
"preview": "package caller_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stret"
},
{
"path": "agent/caller/orchestrator.go",
"chars": 8642,
"preview": "package caller\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\tagentContext \"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/tra"
},
{
"path": "agent/caller/orchestrator_test.go",
"chars": 4052,
"preview": "package caller_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stret"
},
{
"path": "agent/caller/process.go",
"chars": 4611,
"preview": "package caller\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/yaoapp/gou/process\"\n\t\"github.com/yaoap"
},
{
"path": "agent/caller/process_e2e_test.go",
"chars": 12241,
"preview": "package caller_test\n\nimport (\n\t\"context\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr"
},
{
"path": "agent/caller/process_test.go",
"chars": 6467,
"preview": "package caller_test\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretc"
},
{
"path": "agent/caller/sandbox_integration_test.go",
"chars": 9473,
"preview": "package caller_test\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.c"
},
{
"path": "agent/caller/types.go",
"chars": 3946,
"preview": "// Package caller provides types and utilities for agent-to-agent calls\npackage caller\n\nimport (\n\tagentContext \"github.c"
},
{
"path": "agent/caller/types_test.go",
"chars": 2099,
"preview": "package caller_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t"
},
{
"path": "agent/content/content.go",
"chars": 7645,
"preview": "package content\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/kun/log\"\n\t\"github.com/yaoapp/yao/agent/content/docx\"\n\t\""
},
{
"path": "agent/content/docx/docx.go",
"chars": 3681,
"preview": "package docx\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/gou/office\"\n\t\"github.com/yaoapp/yao/agent/content/ty"
},
{
"path": "agent/content/docx/docx_test.go",
"chars": 3254,
"preview": "package docx_test\n\nimport (\n\tstdContext \"context\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/asser"
},
{
"path": "agent/content/image/image.go",
"chars": 12738,
"preview": "package image\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/yao/agent/content/tools\"\n\t\"github.com/"
},
{
"path": "agent/content/image/image_test.go",
"chars": 10897,
"preview": "package image_test\n\nimport (\n\tstdContext \"context\"\n\t\"encoding/base64\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testi"
},
{
"path": "agent/content/link/link.go",
"chars": 13,
"preview": "package link\n"
},
{
"path": "agent/content/pdf/pdf.go",
"chars": 10449,
"preview": "package pdf\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\tgoupdf \"github.com/yaoapp/gou/pdf\"\n\t\"github.com"
},
{
"path": "agent/content/pdf/pdf_test.go",
"chars": 9719,
"preview": "package pdf_test\n\nimport (\n\tstdContext \"context\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert"
},
{
"path": "agent/content/pptx/pptx.go",
"chars": 3681,
"preview": "package pptx\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/gou/office\"\n\t\"github.com/yaoapp/yao/agent/content/ty"
},
{
"path": "agent/content/pptx/pptx_test.go",
"chars": 3254,
"preview": "package pptx_test\n\nimport (\n\tstdContext \"context\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/asser"
},
{
"path": "agent/content/text/text.go",
"chars": 8557,
"preview": "package text\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/yao/agent/content/types\"\n\tagentCont"
},
{
"path": "agent/content/text/text_test.go",
"chars": 9182,
"preview": "package text_test\n\nimport (\n\tstdContext \"context\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/te"
},
{
"path": "agent/content/tools/tools.go",
"chars": 3635,
"preview": "package tools\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/yaoapp/gou/mcp\"\n\t\"github"
},
{
"path": "agent/content/types/types.go",
"chars": 708,
"preview": "package types\n\nimport (\n\t\"github.com/yaoapp/gou/connector\"\n\t\"github.com/yaoapp/gou/connector/openai\"\n\tagentContext \"gith"
},
{
"path": "agent/context/JSAPI.md",
"chars": 91622,
"preview": "# Context JavaScript API Documentation\n\n## Overview\n\nThe Context JavaScript API provides a comprehensive interface for i"
},
{
"path": "agent/context/RESOURCE_MANAGEMENT.md",
"chars": 5983,
"preview": "# Context Resource Management\n\nThis document explains the resource management strategy for Context and Trace objects in "
},
{
"path": "agent/context/authorized_test.go",
"chars": 2488,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/yaoa"
},
{
"path": "agent/context/buffer.go",
"chars": 14175,
"preview": "package context\n\nimport (\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n)\n\n// ============================================="
},
{
"path": "agent/context/buffer_test.go",
"chars": 45296,
"preview": "package context_test\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/str"
},
{
"path": "agent/context/chat.go",
"chars": 5590,
"preview": "package context\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\tgonanoid \"github.com/matoou"
},
{
"path": "agent/context/chat_test.go",
"chars": 8531,
"preview": "package context_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/yaoapp/gou/store\"\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"githu"
},
{
"path": "agent/context/context.go",
"chars": 16420,
"preview": "package context\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/yaoapp/yao/agent/memory\"\n\t\"g"
},
{
"path": "agent/context/context_test.go",
"chars": 6381,
"preview": "package context_test\n\nimport (\n\t\"bytes\"\n\tstdContext \"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testin"
},
{
"path": "agent/context/grpc.go",
"chars": 3672,
"preview": "package context\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/yaoapp/gou/connector\"\n\t\"github.co"
},
{
"path": "agent/context/interfaces.go",
"chars": 1770,
"preview": "package context\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/yaoapp/yao/agent/output/message\"\n)\n\n// StreamChunkType represents th"
},
{
"path": "agent/context/interrupt.go",
"chars": 6365,
"preview": "package context\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/yaoapp/kun/log\"\n)\n\n// NewInterruptController creates a"
},
{
"path": "agent/context/interrupt_test.go",
"chars": 19380,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n\t"
},
{
"path": "agent/context/jsapi.go",
"chars": 31753,
"preview": "package context\n\nimport (\n\t\"time\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"github.com/yaoapp/yao/agent/memory\"\n\t\"gi"
},
{
"path": "agent/context/jsapi_agent.go",
"chars": 16097,
"preview": "package context\n\nimport (\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"github.com/yaoapp/yao/agent/output/message\"\n\t\"rog"
},
{
"path": "agent/context/jsapi_agent_test.go",
"chars": 1408,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stre"
},
{
"path": "agent/context/jsapi_agent_v8_test.go",
"chars": 17984,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"gith"
},
{
"path": "agent/context/jsapi_computer.go",
"chars": 6444,
"preview": "package context\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\tinfraV2 \"github.com/"
},
{
"path": "agent/context/jsapi_helpers.go",
"chars": 5848,
"preview": "package context\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"github.com/yaoapp/yao/agent/output/messag"
},
{
"path": "agent/context/jsapi_llm.go",
"chars": 12084,
"preview": "package context\n\nimport (\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"github.com/yaoapp/yao/agent/output/message\"\n\t\"rog"
},
{
"path": "agent/context/jsapi_llm_v8_test.go",
"chars": 13809,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stre"
},
{
"path": "agent/context/jsapi_mcp.go",
"chars": 17141,
"preview": "package context\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/mcp/types\"\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"rogcha"
},
{
"path": "agent/context/jsapi_mcp_test.go",
"chars": 11300,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\tv8 \"github.com/y"
},
{
"path": "agent/context/jsapi_mcp_v8_test.go",
"chars": 17215,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stre"
},
{
"path": "agent/context/jsapi_memory_test.go",
"chars": 14283,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stre"
},
{
"path": "agent/context/jsapi_output_test.go",
"chars": 35478,
"preview": "package context_test\n\nimport (\n\t\"bytes\"\n\tstdContext \"context\"\n\t\"net/http\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/asse"
},
{
"path": "agent/context/jsapi_release_test.go",
"chars": 7104,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\tv8 \"github.com/y"
},
{
"path": "agent/context/jsapi_sandbox.go",
"chars": 8634,
"preview": "package context\n\nimport (\n\t\"context\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\topenapiSandbox \"github.com/yaoapp/yao/"
},
{
"path": "agent/context/jsapi_sandbox_test.go",
"chars": 14608,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.co"
},
{
"path": "agent/context/jsapi_search.go",
"chars": 10841,
"preview": "package context\n\nimport (\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"rogchap.com/v8go\"\n)\n\n// SearchAPI defines the sea"
},
{
"path": "agent/context/jsapi_search_test.go",
"chars": 11493,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"encoding/json\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testi"
},
{
"path": "agent/context/jsapi_stress_test.go",
"chars": 14690,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/st"
},
{
"path": "agent/context/jsapi_test.go",
"chars": 17975,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"fmt\"\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\tv"
},
{
"path": "agent/context/jsapi_workspace.go",
"chars": 8522,
"preview": "package context\n\nimport (\n\t\"io/fs\"\n\t\"os\"\n\n\t\"github.com/yaoapp/gou/runtime/v8/bridge\"\n\t\"rogchap.com/v8go\"\n)\n\n// createWor"
},
{
"path": "agent/context/log.go",
"chars": 15940,
"preview": "package context\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\tkunlog \"github.com/yaoapp/kun/log\"\n\t\"github.com/yaoapp/yao"
},
{
"path": "agent/context/mcp.go",
"chars": 21861,
"preview": "package context\n\nimport (\n\t\"fmt\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/yaoapp/gou/mcp\"\n\t\"github.com/yaoa"
},
{
"path": "agent/context/mcp_test.go",
"chars": 11205,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/gou/mcp/types\"\n\t\"github.com/yaoapp/"
},
{
"path": "agent/context/message.go",
"chars": 3872,
"preview": "package context\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sync\"\n)\n\n// messageMetadataStore provides thread-safe storage for me"
},
{
"path": "agent/context/message_events_test.go",
"chars": 3051,
"preview": "package context_test\n\nimport (\n\t\"bytes\"\n\tstdContext \"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"testing\"\n\n\t\"github.com/stre"
},
{
"path": "agent/context/message_test.go",
"chars": 9261,
"preview": "package context_test\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\nfunc TestMessage_U"
},
{
"path": "agent/context/openapi.go",
"chars": 17284,
"preview": "package context\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\n\t\"github.com/gin-gonic/g"
},
{
"path": "agent/context/openapi_test.go",
"chars": 30865,
"preview": "package context_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/gin-gonic/g"
},
{
"path": "agent/context/options.go",
"chars": 2055,
"preview": "package context\n\n// ToMap converts Options struct to map for JSON serialization\nfunc (opts *Options) ToMap() map[string]"
},
{
"path": "agent/context/output.go",
"chars": 18253,
"preview": "package context\n\nimport (\n\t\"time\"\n\n\t\"github.com/yaoapp/gou/llm\"\n\t\"github.com/yaoapp/yao/agent/output\"\n\t\"github.com/yaoap"
},
{
"path": "agent/context/stack.go",
"chars": 8155,
"preview": "package context\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/yaoapp/yao/trace\"\n)\n\n// NewStack create"
},
{
"path": "agent/context/stack_test.go",
"chars": 12312,
"preview": "package context_test\n\nimport (\n\tstdContext \"context\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github"
},
{
"path": "agent/context/types.go",
"chars": 33826,
"preview": "package context\n\nimport (\n\t\"context\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/yaoapp/gou/llm\"\n\t\"github.com/yaoapp/gou/store\"\n\t\"gith"
},
{
"path": "agent/context/types_llm.go",
"chars": 9964,
"preview": "package context\n\nimport (\n\t\"github.com/yaoapp/gou/llm\"\n\t\"github.com/yaoapp/yao/agent/output/message\"\n)\n\n// Uses represen"
},
{
"path": "agent/context/utils.go",
"chars": 1401,
"preview": "package context\n\n// getValidatedValue gets value from query, header, or default, and validates it\nfunc getValidatedValue"
},
{
"path": "agent/docs/configuration.md",
"chars": 5319,
"preview": "# Assistant Configuration\n\n## Directory Structure\n\n```\nassistants/\n└── <assistant-id>/\n ├── package.yao # Re"
},
{
"path": "agent/docs/context-api.md",
"chars": 14156,
"preview": "# Context API\n\nThe `ctx` object provides access to messaging, memory, tracing, and MCP operations.\n\n## Properties\n\n```ty"
},
{
"path": "agent/docs/hooks.md",
"chars": 7023,
"preview": "# Hooks\n\nHooks allow you to customize agent behavior at key points in the execution lifecycle.\n\n## Lifecycle\n\n```\nUser I"
},
{
"path": "agent/docs/i18n.md",
"chars": 3588,
"preview": "# Internationalization (i18n)\n\n## Locale Files\n\nCreate `locales/` directory in the assistant:\n\n```\nassistants/my-assista"
},
{
"path": "agent/docs/iframe.md",
"chars": 8484,
"preview": "# Iframe Integration\n\nAgent Pages can be embedded in CUI via `/web/` routes. This document covers the iframe communicati"
},
{
"path": "agent/docs/mcp.md",
"chars": 7879,
"preview": "# MCP Integration\n\nModel Context Protocol (MCP) enables tool integration with external services.\n\n## Directory Structure"
},
{
"path": "agent/docs/models.md",
"chars": 9288,
"preview": "# Assistant Models\n\nAssistants can define their own namespaced data models in the `models/` directory. These models are "
},
{
"path": "agent/docs/pages.md",
"chars": 16325,
"preview": "# Agent Pages\n\nAgent Pages provide a built-in SUI (Simple User Interface) framework for building web interfaces for AI a"
},
{
"path": "agent/docs/prompts.md",
"chars": 3527,
"preview": "# Prompts\n\n## Default Prompts\n\nCreate `prompts.yml` in the assistant directory:\n\n```yaml\n- role: system\n content: |\n "
},
{
"path": "agent/docs/search.md",
"chars": 5328,
"preview": "# Search\n\nThe agent search system provides automatic search across web, knowledge base (KB), and database (DB).\n\n## Auto"
},
{
"path": "agent/docs/testing.md",
"chars": 9437,
"preview": "# Agent Testing\n\nA comprehensive testing framework for Yao AI agents with support for standard testing, dynamic (simulat"
},
{
"path": "agent/i18n/builtin.go",
"chars": 19703,
"preview": "package i18n\n\n// init registers built-in global messages\nfunc init() {\n\t// Initialize __global__ if not exists\n\tif Local"
},
{
"path": "agent/i18n/i18n.go",
"chars": 11045,
"preview": "package i18n\n\nimport (\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/yaoapp/gou/application\"\n\t\"github.com/yaoapp/g"
},
{
"path": "agent/i18n/i18n_test.go",
"chars": 36615,
"preview": "package i18n\n\nimport (\n\t\"testing\"\n\n\t\"github.com/yaoapp/yao/config\"\n\t\"github.com/yaoapp/yao/test\"\n)\n\n// TestParseString t"
},
{
"path": "agent/llm/adapters/adapter.go",
"chars": 2333,
"preview": "package adapters\n\nimport (\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\n// CapabilityAdapter is the interface for capabilit"
},
{
"path": "agent/llm/adapters/audio.go",
"chars": 1808,
"preview": "package adapters\n\nimport (\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\n// AudioAdapter handles audio capability\n// If mode"
},
{
"path": "agent/llm/adapters/reasoning.go",
"chars": 4581,
"preview": "package adapters\n\nimport (\n\t\"github.com/yaoapp/gou/connector/openai\"\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\n// Reason"
},
{
"path": "agent/llm/adapters/toolcall.go",
"chars": 2006,
"preview": "package adapters\n\nimport (\n\t\"github.com/yaoapp/yao/agent/context\"\n)\n\n// ToolCallAdapter handles tool calling capability\n"
},
{
"path": "agent/llm/adapters/vision.go",
"chars": 6745,
"preview": "package adapters\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/yaoapp/yao/agent"
},
{
"path": "agent/llm/capabilities.go",
"chars": 2287,
"preview": "package llm\n\nimport (\n\t\"github.com/yaoapp/gou/connector\"\n\tgoullm \"github.com/yaoapp/gou/llm\"\n)\n\n// GetCapabilities get t"
},
{
"path": "agent/llm/interfaces.go",
"chars": 446,
"preview": "package llm\n\nimport (\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/agent/output/message\"\n)\n\n// LLM the"
},
{
"path": "agent/llm/jsapi.go",
"chars": 21013,
"preview": "// Package llm provides the LLM JSAPI implementation\npackage llm\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/connector\"\n\ta"
},
{
"path": "agent/llm/jsapi_types.go",
"chars": 1210,
"preview": "// Package llm provides types and utilities for LLM JSAPI\npackage llm\n\nimport (\n\tagentContext \"github.com/yaoapp/yao/age"
},
{
"path": "agent/llm/llm.go",
"chars": 491,
"preview": "package llm\n\nimport (\n\t\"github.com/yaoapp/gou/connector\"\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github.com/yaoapp/yao/"
},
{
"path": "agent/llm/process.go",
"chars": 6613,
"preview": "package llm\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/connector\"\n\tgouHTTP \"github.com/yaoapp"
},
{
"path": "agent/llm/providers/ANTHROPIC_PROVIDER_PROPOSAL.md",
"chars": 6824,
"preview": "# Anthropic Provider Implementation Proposal\n\n## Overview\n\nThis proposal outlines the implementation plan for native Ant"
},
{
"path": "agent/llm/providers/README.md",
"chars": 7788,
"preview": "# LLM Providers Architecture (New)\n\n## Overview\n\nThis directory contains LLM provider implementations using the **Capabi"
},
{
"path": "agent/llm/providers/anthropic/anthropic.go",
"chars": 32351,
"preview": "package anthropic\n\nimport (\n\tgocontext \"context\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\tjsoniter \"github.com/json-iterator/"
},
{
"path": "agent/llm/providers/anthropic/anthropic_test.go",
"chars": 7782,
"preview": "package anthropic_test\n\nimport (\n\tgocontext \"context\"\n\t\"encoding/json\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/yaoapp/gou/co"
},
{
"path": "agent/llm/providers/anthropic/types.go",
"chars": 5180,
"preview": "package anthropic\n\nimport (\n\t\"github.com/yaoapp/yao/agent/output/message\"\n)\n\n// ========================================"
},
{
"path": "agent/llm/providers/base/base.go",
"chars": 4232,
"preview": "package base\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/connector\"\n\t\"github.com/yaoapp/gou/llm\"\n\t\"github.com/yaoapp/yao/a"
},
{
"path": "agent/llm/providers/factory.go",
"chars": 2776,
"preview": "package providers\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/yaoapp/gou/connector\"\n\t\"github.com/yaoapp/yao/agent/context\"\n\t\"github.c"
},
{
"path": "agent/llm/providers/openai/claude_test.go",
"chars": 16527,
"preview": "package openai_test\n\n// import (\n// \tgocontext \"context\"\n// \t\"testing\"\n\n// \t\"github.com/yaoapp/gou/connector\"\n// \t\"githu"
},
{
"path": "agent/llm/providers/openai/deepseek_r1_test.go",
"chars": 11841,
"preview": "package openai_test\n\nimport (\n\tgocontext \"context\"\n\t\"strings\"\n\t\"testing\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"gith"
}
]
// ... and 1700 more files (download for full content)
About this extraction
This page contains the full source code of the YaoApp/yao GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1900 files (25.3 MB), approximately 3.9M tokens, and a symbol index with 15148 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.