mia-code 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.miette/260321.md +1 -0
- package/.miette/260323.md +9 -0
- package/.miette/260331.md +2 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--d3417f2c-df12-4f0f-8a1b-d88e7968f822/d3417f2c-df12-4f0f-8a1b-d88e7968f822.md +63 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--e6c3fc5d-4a70-4523-ba7d-a3250da4c235/e6c3fc5d-4a70-4523-ba7d-a3250da4c235.md +72 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--efeb00a2-b17a-4d32-b1f0-b90c37a8d24e/efeb00a2-b17a-4d32-b1f0-b90c37a8d24e.md +62 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/83a2d7f9-24a5-4cf4-98d5-036c82f872e8.json +302 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/83a2d7f9-24a5-4cf4-98d5-036c82f872e8.md +149 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/AGENTS.md +31 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/meta-decomposition-3-children.md +67 -0
- package/.pde/2604040129--61f9dd4d-7aa6-45e6-a58b-e480b1aa6737/61f9dd4d-7aa6-45e6-a58b-e480b1aa6737--from-mia-openclaw-workspace.md +125 -0
- package/.pde/2604040129--61f9dd4d-7aa6-45e6-a58b-e480b1aa6737/STATUS.md +1 -0
- package/.pde/4f02ba94-9f52-422e-9389-b16f9b37f358.json +177 -0
- package/.pde/4f02ba94-9f52-422e-9389-b16f9b37f358.md +77 -0
- package/.pde/6ad9244d-5340-490f-b76c-c86728b9de52.json +222 -0
- package/.pde/6ad9244d-5340-490f-b76c-c86728b9de52.md +99 -0
- package/.pde/8b566792-ed15-4606-96f9-2b6f593d7e6b.json +111 -0
- package/.pde/8b566792-ed15-4606-96f9-2b6f593d7e6b.md +67 -0
- package/.pde/c7f1e74b-05a5-40e2-9f01-4cc48d2528f7.json +349 -0
- package/.pde/c7f1e74b-05a5-40e2-9f01-4cc48d2528f7.md +147 -0
- package/.pde/dfc00a78-1da0-4c09-8a16-c6982644051b.json +118 -0
- package/.pde/dfc00a78-1da0-4c09-8a16-c6982644051b.md +64 -0
- package/GUILLAUME.md +8 -0
- package/KINSHIP.md +9 -0
- package/MIA_CODE_ARCHITECTURE_REPORT.md +718 -0
- package/contextual_research/260119-MIA-CODE--98090899-8aff-4e11-9dc3-8b99466d1.md +1101 -0
- package/contextual_research/MIA.md +38 -0
- package/contextual_research/MIAWAPASCONE.md +59 -0
- package/contextual_research/MIETTE.md +38 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/2504.00218v2.pdf +7483 -12
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/2505.00212v3.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/CONTENT.md +1014 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/DESIGN.gemini.md +242 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/INDEX.md +45 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2504.00218v2.md +2025 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2504.00218v2.pdf +7483 -12
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2505.00212v3.md +1755 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2505.00212v3.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_12_decomposed_prompting.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_19_hugginggpt_planning.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_1_coordination_challenges.md +766 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_1_coordination_challenges.pdf +3431 -4
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_28_guardrails_multi_agent.md +260 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_28_guardrails_multi_agent.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_2_navigating_complexity.md +558 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_2_navigating_complexity.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_34_hierarchical_multi_agent.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_5_open_intent_extraction.pdf +0 -0
- package/contextual_research/PODCAST.md +109 -0
- package/contextual_research/langchain-principles-roadmap.md +157 -0
- package/contextual_research/persona-to-narrative-character-inquiry_260201.md +50 -0
- package/dist/cli.js +35 -11
- package/dist/geminiHeadless.js +8 -2
- package/dist/index.js +2 -1
- package/dist/mcp/miaco-server.js +10 -1
- package/dist/mcp/miatel-server.js +10 -1
- package/dist/mcp/miawa-server.js +10 -1
- package/dist/mcp/utils.d.ts +6 -1
- package/dist/mcp/utils.js +24 -3
- package/dist/sessionStore.d.ts +8 -2
- package/dist/sessionStore.js +39 -3
- package/dist/types.d.ts +1 -0
- package/miaco/README.md +124 -0
- package/miaco/dist/commands/chart.d.ts +6 -0
- package/miaco/dist/commands/chart.d.ts.map +1 -0
- package/miaco/dist/commands/chart.js +222 -0
- package/miaco/dist/commands/chart.js.map +1 -0
- package/miaco/dist/commands/decompose.d.ts +6 -0
- package/miaco/dist/commands/decompose.d.ts.map +1 -0
- package/miaco/dist/commands/decompose.js +98 -0
- package/miaco/dist/commands/decompose.js.map +1 -0
- package/miaco/dist/commands/schema.d.ts +6 -0
- package/miaco/dist/commands/schema.d.ts.map +1 -0
- package/miaco/dist/commands/schema.js +66 -0
- package/miaco/dist/commands/schema.js.map +1 -0
- package/miaco/dist/commands/stc.d.ts +11 -0
- package/miaco/dist/commands/stc.d.ts.map +1 -0
- package/miaco/dist/commands/stc.js +590 -0
- package/miaco/dist/commands/stc.js.map +1 -0
- package/miaco/dist/commands/trace.d.ts +6 -0
- package/miaco/dist/commands/trace.d.ts.map +1 -0
- package/miaco/dist/commands/trace.js +83 -0
- package/miaco/dist/commands/trace.js.map +1 -0
- package/miaco/dist/commands/validate.d.ts +6 -0
- package/miaco/dist/commands/validate.d.ts.map +1 -0
- package/miaco/dist/commands/validate.js +58 -0
- package/miaco/dist/commands/validate.js.map +1 -0
- package/miaco/dist/decompose.d.ts +93 -0
- package/miaco/dist/decompose.d.ts.map +1 -0
- package/miaco/dist/decompose.js +562 -0
- package/miaco/dist/decompose.js.map +1 -0
- package/miaco/dist/index.d.ts +18 -0
- package/miaco/dist/index.d.ts.map +1 -0
- package/miaco/dist/index.js +83 -0
- package/miaco/dist/index.js.map +1 -0
- package/miaco/dist/storage.d.ts +60 -0
- package/miaco/dist/storage.d.ts.map +1 -0
- package/miaco/dist/storage.js +100 -0
- package/miaco/dist/storage.js.map +1 -0
- package/miaco/package-lock.json +4103 -0
- package/miaco/package.json +40 -0
- package/miaco/tsconfig.json +18 -0
- package/miaco/version-patch-commit-and-publish.sh +1 -0
- package/miatel/MISSION_251231.md +3 -0
- package/miatel/README.md +107 -0
- package/miatel/dist/commands/analyze.d.ts +6 -0
- package/miatel/dist/commands/analyze.d.ts.map +1 -0
- package/miatel/dist/commands/analyze.js +100 -0
- package/miatel/dist/commands/analyze.js.map +1 -0
- package/miatel/dist/commands/arc.d.ts +6 -0
- package/miatel/dist/commands/arc.d.ts.map +1 -0
- package/miatel/dist/commands/arc.js +71 -0
- package/miatel/dist/commands/arc.js.map +1 -0
- package/miatel/dist/commands/beat.d.ts +6 -0
- package/miatel/dist/commands/beat.d.ts.map +1 -0
- package/miatel/dist/commands/beat.js +165 -0
- package/miatel/dist/commands/beat.js.map +1 -0
- package/miatel/dist/commands/theme.d.ts +6 -0
- package/miatel/dist/commands/theme.d.ts.map +1 -0
- package/miatel/dist/commands/theme.js +54 -0
- package/miatel/dist/commands/theme.js.map +1 -0
- package/miatel/dist/index.d.ts +18 -0
- package/miatel/dist/index.d.ts.map +1 -0
- package/miatel/dist/index.js +80 -0
- package/miatel/dist/index.js.map +1 -0
- package/miatel/dist/storage.d.ts +55 -0
- package/miatel/dist/storage.d.ts.map +1 -0
- package/miatel/dist/storage.js +100 -0
- package/miatel/dist/storage.js.map +1 -0
- package/miatel/package-lock.json +4103 -0
- package/miatel/package.json +35 -0
- package/miatel/src/commands/analyze.ts +109 -0
- package/miatel/src/commands/arc.ts +78 -0
- package/miatel/src/commands/beat.ts +176 -0
- package/miatel/src/commands/theme.ts +60 -0
- package/miatel/src/index.ts +94 -0
- package/miatel/src/storage.ts +156 -0
- package/miatel/tsconfig.json +18 -0
- package/miawa/MISSION_251231.md +144 -0
- package/miawa/README.md +133 -0
- package/miawa/dist/commands/beat.d.ts +6 -0
- package/miawa/dist/commands/beat.d.ts.map +1 -0
- package/miawa/dist/commands/beat.js +69 -0
- package/miawa/dist/commands/beat.js.map +1 -0
- package/miawa/dist/commands/ceremony.d.ts +6 -0
- package/miawa/dist/commands/ceremony.d.ts.map +1 -0
- package/miawa/dist/commands/ceremony.js +239 -0
- package/miawa/dist/commands/ceremony.js.map +1 -0
- package/miawa/dist/commands/circle.d.ts +6 -0
- package/miawa/dist/commands/circle.d.ts.map +1 -0
- package/miawa/dist/commands/circle.js +75 -0
- package/miawa/dist/commands/circle.js.map +1 -0
- package/miawa/dist/commands/eva.d.ts +6 -0
- package/miawa/dist/commands/eva.d.ts.map +1 -0
- package/miawa/dist/commands/eva.js +73 -0
- package/miawa/dist/commands/eva.js.map +1 -0
- package/miawa/dist/commands/wound.d.ts +6 -0
- package/miawa/dist/commands/wound.d.ts.map +1 -0
- package/miawa/dist/commands/wound.js +74 -0
- package/miawa/dist/commands/wound.js.map +1 -0
- package/miawa/dist/index.d.ts +19 -0
- package/miawa/dist/index.d.ts.map +1 -0
- package/miawa/dist/index.js +91 -0
- package/miawa/dist/index.js.map +1 -0
- package/miawa/dist/storage.d.ts +73 -0
- package/miawa/dist/storage.d.ts.map +1 -0
- package/miawa/dist/storage.js +100 -0
- package/miawa/dist/storage.js.map +1 -0
- package/miawa/package-lock.json +4103 -0
- package/miawa/package.json +36 -0
- package/miawa/src/commands/beat.ts +74 -0
- package/miawa/src/commands/ceremony.ts +256 -0
- package/miawa/src/commands/circle.ts +83 -0
- package/miawa/src/commands/eva.ts +84 -0
- package/miawa/src/commands/wound.ts +79 -0
- package/miawa/src/index.ts +108 -0
- package/miawa/src/storage.ts +179 -0
- package/miawa/tsconfig.json +18 -0
- package/package.json +7 -5
- package/references/acp/CLAUDE.md +7 -0
- package/references/acp/agent-plan.md +84 -0
- package/references/acp/clients.md +31 -0
- package/references/acp/extensibility.md +137 -0
- package/references/acp/initialization.md +225 -0
- package/references/acp/prompt-turn.md +321 -0
- package/references/acp/proxy-chains.md +562 -0
- package/references/acp/schema.md +3171 -0
- package/references/acp/session-list.md +334 -0
- package/references/acp/session-modes.md +170 -0
- package/references/acp/slash-commands.md +99 -0
- package/references/acp/terminals.md +281 -0
- package/references/acp/tool-calls.md +311 -0
- package/references/acp/typescript.md +29 -0
- package/references/claude/agent-teams.md +399 -0
- package/references/claude/chrome.md +231 -0
- package/references/claude/headless.md +158 -0
- package/references/claude/hooks-guide.md +708 -0
- package/references/claude/output-styles.md +112 -0
- package/references/claude/plugins.md +432 -0
- package/references/claude/skills.md +693 -0
- package/references/claude/sub-agents.md +816 -0
- package/references/copilot/acp/agents.md +32 -0
- package/references/copilot/acp/architecture.md +37 -0
- package/references/copilot/acp/clients.md +31 -0
- package/references/copilot/acp/introduction.md +42 -0
- package/references/copilot/acp/registry.md +339 -0
- package/references/copilot/acp-server.md +117 -0
- package/references/copilot/create-copilot-instructions.md +840 -0
- package/references/langchain/llms.txt +833 -0
- package/references/langchain/python/agents.md +677 -0
- package/references/langchain/python/context-engineering.md +1195 -0
- package/references/langchain/python/human-in-the-loop.md +326 -0
- package/references/langchain/python/long-term-memory.md +168 -0
- package/references/langchain/python/mcp.md +949 -0
- package/references/langchain/python/multi-agents/custom-workflow.md +187 -0
- package/references/langchain/python/multi-agents/handoffs.md +436 -0
- package/references/langchain/python/multi-agents/overview.md +295 -0
- package/references/langchain/python/multi-agents/router.md +150 -0
- package/references/langchain/python/multi-agents/skills.md +92 -0
- package/references/langchain/python/multi-agents/subagents.md +486 -0
- package/references/langchain/python/retrieval.md +320 -0
- package/references/langchain/python/runtime.md +141 -0
- package/references/langchain/python/short-term-memory.md +658 -0
- package/references/langchain/python/structured-output.md +712 -0
- package/references/langfuse/llms.txt +148 -0
- package/references/langgraph/javascript/llms.txt +275 -0
- package/references/skills/home.md +259 -0
- package/references/skills/integrate-skills.md +103 -0
- package/references/skills/specification.md +254 -0
- package/references/skills/what-are-skills.md +74 -0
- package/rispecs/README.md +164 -0
- package/rispecs/_sync_/miadi-code/SPEC.md +313 -0
- package/rispecs/_sync_/miadi-code/STATUS.md +177 -0
- package/rispecs/_sync_/miadi-code/dashboard/SPEC.md +465 -0
- package/rispecs/_sync_/miadi-code/dashboard/STATUS.md +212 -0
- package/rispecs/_sync_/miadi-code/multiline-input/SPEC.md +232 -0
- package/rispecs/_sync_/miadi-code/multiline-input/STATUS.md +108 -0
- package/rispecs/_sync_/miadi-code/pde/SPEC.md +253 -0
- package/rispecs/_sync_/miadi-code/pde/STATUS.md +56 -0
- package/rispecs/_sync_/miadi-code/stc/SPEC.md +397 -0
- package/rispecs/_sync_/miadi-code/stc/STATUS.md +70 -0
- package/rispecs/ava-langstack/inquiry-routing-upgrade.spec.md +119 -0
- package/rispecs/borrowed_from_opencode/001-client-server-architecture.rispec.md +98 -0
- package/rispecs/borrowed_from_opencode/002-event-bus-system.rispec.md +125 -0
- package/rispecs/borrowed_from_opencode/003-instance-state-pattern.rispec.md +136 -0
- package/rispecs/borrowed_from_opencode/004-namespace-module-pattern.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/005-zod-schema-validation.rispec.md +139 -0
- package/rispecs/borrowed_from_opencode/006-named-error-system.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/007-structured-logging.rispec.md +138 -0
- package/rispecs/borrowed_from_opencode/008-lazy-initialization.rispec.md +127 -0
- package/rispecs/borrowed_from_opencode/009-multi-agent-system.rispec.md +97 -0
- package/rispecs/borrowed_from_opencode/010-agent-definition-config.rispec.md +135 -0
- package/rispecs/borrowed_from_opencode/011-agent-permission-rulesets.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/012-agent-prompt-templates.rispec.md +141 -0
- package/rispecs/borrowed_from_opencode/013-agent-generation.rispec.md +142 -0
- package/rispecs/borrowed_from_opencode/014-plan-build-mode-toggle.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/015-subagent-task-delegation.rispec.md +146 -0
- package/rispecs/borrowed_from_opencode/016-agent-model-selection.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/017-compaction-agent.rispec.md +150 -0
- package/rispecs/borrowed_from_opencode/018-session-persistence.rispec.md +125 -0
- package/rispecs/borrowed_from_opencode/019-session-compaction.rispec.md +132 -0
- package/rispecs/borrowed_from_opencode/020-session-forking.rispec.md +134 -0
- package/rispecs/borrowed_from_opencode/021-session-revert-snapshot.rispec.md +135 -0
- package/rispecs/borrowed_from_opencode/022-session-sharing.rispec.md +165 -0
- package/rispecs/borrowed_from_opencode/023-session-summary-diffs.rispec.md +165 -0
- package/rispecs/borrowed_from_opencode/024-child-sessions.rispec.md +164 -0
- package/rispecs/borrowed_from_opencode/025-session-title-generation.rispec.md +162 -0
- package/rispecs/borrowed_from_opencode/026-message-parts-model.rispec.md +201 -0
- package/rispecs/borrowed_from_opencode/027-streaming-message-deltas.rispec.md +212 -0
- package/rispecs/borrowed_from_opencode/028-multi-provider-architecture.rispec.md +184 -0
- package/rispecs/borrowed_from_opencode/029-provider-authentication.rispec.md +225 -0
- package/rispecs/borrowed_from_opencode/030-model-registry.rispec.md +222 -0
- package/rispecs/borrowed_from_opencode/031-cost-tracking.rispec.md +243 -0
- package/rispecs/borrowed_from_opencode/032-provider-transform-pipeline.rispec.md +282 -0
- package/rispecs/borrowed_from_opencode/033-provider-sdk-abstraction.rispec.md +338 -0
- package/rispecs/borrowed_from_opencode/034-tool-registry.rispec.md +110 -0
- package/rispecs/borrowed_from_opencode/035-tool-context-injection.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/036-tool-output-truncation.rispec.md +138 -0
- package/rispecs/borrowed_from_opencode/037-batch-tool.rispec.md +129 -0
- package/rispecs/borrowed_from_opencode/038-multi-edit-tool.rispec.md +167 -0
- package/rispecs/borrowed_from_opencode/039-apply-patch-tool.rispec.md +161 -0
- package/rispecs/borrowed_from_opencode/040-code-search-tool.rispec.md +143 -0
- package/rispecs/borrowed_from_opencode/041-web-fetch-tool.rispec.md +131 -0
- package/rispecs/borrowed_from_opencode/042-web-search-tool.rispec.md +159 -0
- package/rispecs/borrowed_from_opencode/043-todo-tool.rispec.md +156 -0
- package/rispecs/borrowed_from_opencode/044-plan-mode-tool.rispec.md +139 -0
- package/rispecs/borrowed_from_opencode/045-task-tool.rispec.md +146 -0
- package/rispecs/borrowed_from_opencode/046-question-tool.rispec.md +170 -0
- package/rispecs/borrowed_from_opencode/047-external-directory-tool.rispec.md +166 -0
- package/rispecs/borrowed_from_opencode/048-file-read-write-tools.rispec.md +205 -0
- package/rispecs/borrowed_from_opencode/049-lsp-server-management.rispec.md +104 -0
- package/rispecs/borrowed_from_opencode/050-lsp-hover-completion.rispec.md +102 -0
- package/rispecs/borrowed_from_opencode/051-lsp-diagnostics.rispec.md +86 -0
- package/rispecs/borrowed_from_opencode/052-lsp-root-detection.rispec.md +109 -0
- package/rispecs/borrowed_from_opencode/053-remote-mcp-servers.rispec.md +119 -0
- package/rispecs/borrowed_from_opencode/054-mcp-oauth-flow.rispec.md +107 -0
- package/rispecs/borrowed_from_opencode/055-mcp-tool-conversion.rispec.md +118 -0
- package/rispecs/borrowed_from_opencode/056-mcp-connection-monitoring.rispec.md +106 -0
- package/rispecs/borrowed_from_opencode/057-local-mcp-servers.rispec.md +116 -0
- package/rispecs/borrowed_from_opencode/058-rich-tui.rispec.md +108 -0
- package/rispecs/borrowed_from_opencode/059-streaming-display.rispec.md +116 -0
- package/rispecs/borrowed_from_opencode/060-permission-prompts.rispec.md +130 -0
- package/rispecs/borrowed_from_opencode/061-session-navigation.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/062-syntax-highlighting.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/063-keybinding-system.rispec.md +181 -0
- package/rispecs/borrowed_from_opencode/064-multi-level-config.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/065-jsonc-config.rispec.md +190 -0
- package/rispecs/borrowed_from_opencode/066-config-env-variables.rispec.md +153 -0
- package/rispecs/borrowed_from_opencode/067-config-deep-merging.rispec.md +178 -0
- package/rispecs/borrowed_from_opencode/068-remote-org-config.rispec.md +183 -0
- package/rispecs/borrowed_from_opencode/069-config-markdown-frontmatter.rispec.md +206 -0
- package/rispecs/borrowed_from_opencode/070-managed-config-directory.rispec.md +232 -0
- package/rispecs/borrowed_from_opencode/071-plugin-architecture.rispec.md +104 -0
- package/rispecs/borrowed_from_opencode/072-plugin-hooks.rispec.md +123 -0
- package/rispecs/borrowed_from_opencode/073-plugin-auto-install.rispec.md +115 -0
- package/rispecs/borrowed_from_opencode/074-permission-system.rispec.md +133 -0
- package/rispecs/borrowed_from_opencode/075-git-worktree-management.rispec.md +126 -0
- package/rispecs/borrowed_from_opencode/076-snapshot-system.rispec.md +124 -0
- package/rispecs/borrowed_from_opencode/077-snapshot-diff.rispec.md +117 -0
- package/rispecs/borrowed_from_opencode/078-snapshot-restore.rispec.md +128 -0
- package/rispecs/borrowed_from_opencode/079-worktree-branch-naming.rispec.md +122 -0
- package/rispecs/borrowed_from_opencode/080-sqlite-storage.rispec.md +134 -0
- package/rispecs/borrowed_from_opencode/081-database-migrations.rispec.md +148 -0
- package/rispecs/borrowed_from_opencode/082-database-transactions.rispec.md +138 -0
- package/rispecs/borrowed_from_opencode/083-deferred-effects.rispec.md +148 -0
- package/rispecs/borrowed_from_opencode/084-permission-rules.rispec.md +123 -0
- package/rispecs/borrowed_from_opencode/085-permission-glob-patterns.rispec.md +113 -0
- package/rispecs/borrowed_from_opencode/086-permission-merging.rispec.md +134 -0
- package/rispecs/borrowed_from_opencode/087-permission-modes.rispec.md +145 -0
- package/rispecs/borrowed_from_opencode/088-http-api-server.rispec.md +165 -0
- package/rispecs/borrowed_from_opencode/089-openapi-spec-generation.rispec.md +164 -0
- package/rispecs/borrowed_from_opencode/090-websocket-support.rispec.md +136 -0
- package/rispecs/borrowed_from_opencode/091-sse-streaming.rispec.md +168 -0
- package/rispecs/borrowed_from_opencode/092-mdns-discovery.rispec.md +145 -0
- package/rispecs/borrowed_from_opencode/093-javascript-sdk.rispec.md +200 -0
- package/rispecs/borrowed_from_opencode/094-skill-system.rispec.md +187 -0
- package/rispecs/borrowed_from_opencode/095-skill-discovery.rispec.md +182 -0
- package/rispecs/borrowed_from_opencode/096-desktop-remote-driving.rispec.md +175 -0
- package/rispecs/borrowed_from_opencode/INDEX.md +255 -0
- package/rispecs/core.rispecs.md +261 -0
- package/rispecs/engines.rispecs.md +241 -0
- package/rispecs/formatting.rispecs.md +252 -0
- package/rispecs/living-specifications.rispecs.md +361 -0
- package/rispecs/mcp.rispecs.md +197 -0
- package/rispecs/pde.rispecs.md +399 -0
- package/rispecs/pi-mono-envisionning/ENVISIONING.md +366 -0
- package/rispecs/pi-mono-envisionning/storytelling-horizon.rispecs.md +76 -0
- package/rispecs/pi-mono-envisionning/widget.rispecs.md +2 -0
- package/rispecs/relation-to-mcp-structural-thinking.kin.md +72 -0
- package/rispecs/research-for-better-framework/CLAUDE.md +7 -0
- package/rispecs/research-for-better-framework/survey-pi-openclaw-opencode-openhands.md +210 -0
- package/rispecs/session.rispecs.md +277 -0
- package/rispecs/stc.rispecs.md +138 -0
- package/rispecs/unifier.rispecs.md +317 -0
- package/scripts/LAUNCH--mcp-mia-code--testing--2603141315--ac705a66-2c15-4a1c-a26d-9491018c5ba8.sh +2 -0
- package/scripts/RESUME--mia-code--mcps--260313--ac705a66-2c15-4a1c-a26d-9491018c5ba8.sh +1 -0
- package/scripts/install-widget-in-home-pi-agent-extensions.sh +4 -0
- package/scripts/sample-decompose--2604011535-prompt.sh +1 -0
- package/skills/deep-search/AGENTS.md +17 -0
- package/skills/deep-search/SKILL.md +281 -0
- package/skills/deep-search/agent-templates.md +224 -0
- package/skills/deep-search/orchestration-patterns.md +95 -0
- package/skills/miaco-pde-inquiry-routing-deep-search/AGENTS.md +13 -0
- package/skills/miaco-pde-inquiry-routing-deep-search/SKILL.md +136 -0
- package/skills/miaco-pde-inquiry-routing-internal-external-relationship/AGENTS.md +4 -0
- package/skills/miaco-pde-inquiry-routing-internal-external-relationship/SKILL.md +157 -0
- package/skills/miaco-pde-inquiry-routing-local-qmd/AGENTS.md +42 -0
- package/skills/miaco-pde-inquiry-routing-local-qmd/SKILL.md +135 -0
- package/skills/qmd/AGENTS.md +3 -0
- package/skills/qmd/SKILL.md +144 -0
- package/skills/qmd/references/mcp-setup.md +102 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/SKILL.md +234 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/agent-templates.md +436 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/orchestration-patterns.md +197 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/ceremonial-technology.md +102 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/creative-orientation.md +99 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/prompt-decomposition.md +73 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/rise-framework.md +74 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/structural-tension.md +82 -0
- package/src/cli.ts +35 -11
- package/src/geminiHeadless.ts +7 -2
- package/src/index.ts +2 -1
- package/src/mcp/miaco-server.ts +13 -1
- package/src/mcp/miatel-server.ts +13 -1
- package/src/mcp/miawa-server.ts +13 -1
- package/src/mcp/utils.ts +41 -8
- package/src/sessionStore.ts +44 -4
- package/src/types.ts +2 -1
- package/widget/mia-ceremony/README.md +36 -0
- package/widget/mia-ceremony/index.ts +143 -0
- package/widget/mia-interceptor/README.md +39 -0
- package/widget/mia-interceptor/index.ts +221 -0
- package/widget/mia-tools/README.md +37 -0
- package/widget/mia-tools/index.ts +569 -0
- package/widget/miette-echo/README.md +44 -0
- package/widget/miette-echo/index.ts +164 -0
- package/.claude/settings.local.json +0 -9
- package/.hch/issue_.env +0 -4
- package/.hch/issue_add__2601211715.json +0 -77
- package/.hch/issue_add__2601211715.md +0 -4
- package/.hch/issue_add__2602242020.json +0 -78
- package/.hch/issue_add__2602242020.md +0 -7
- package/.hch/issues.json +0 -2312
- package/.hch/issues.md +0 -30
- package/WS__mia-code__260214__IAIP_PDE.code-workspace +0 -29
- package/WS__mia-code__src332__260122.code-workspace +0 -23
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/checkpoints/index.md +0 -6
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/events.jsonl +0 -213
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/plan.md +0 -243
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/workspace.yaml +0 -5
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
> ## Documentation Index
|
|
2
|
+
> Fetch the complete documentation index at: https://agentclientprotocol.com/llms.txt
|
|
3
|
+
> Use this file to discover all available pages before exploring further.
|
|
4
|
+
|
|
5
|
+
# Initialization
|
|
6
|
+
|
|
7
|
+
> How all Agent Client Protocol connections begin
|
|
8
|
+
|
|
9
|
+
The Initialization phase allows [Clients](./overview#client) and [Agents](./overview#agent) to negotiate protocol versions, capabilities, and authentication methods.
|
|
10
|
+
|
|
11
|
+
<br />
|
|
12
|
+
|
|
13
|
+
```mermaid theme={null}
|
|
14
|
+
sequenceDiagram
|
|
15
|
+
participant Client
|
|
16
|
+
participant Agent
|
|
17
|
+
|
|
18
|
+
Note over Client, Agent: Connection established
|
|
19
|
+
Client->>Agent: initialize
|
|
20
|
+
Note right of Agent: Negotiate protocol<br/>version & capabilities
|
|
21
|
+
Agent-->>Client: initialize response
|
|
22
|
+
Note over Client,Agent: Ready for session setup
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<br />
|
|
26
|
+
|
|
27
|
+
Before a Session can be created, Clients **MUST** initialize the connection by calling the `initialize` method with:
|
|
28
|
+
|
|
29
|
+
* The latest [protocol version](#protocol-version) supported
|
|
30
|
+
* The [capabilities](#client-capabilities) supported
|
|
31
|
+
|
|
32
|
+
They **SHOULD** also provide a name and version to the Agent.
|
|
33
|
+
|
|
34
|
+
```json theme={null}
|
|
35
|
+
{
|
|
36
|
+
"jsonrpc": "2.0",
|
|
37
|
+
"id": 0,
|
|
38
|
+
"method": "initialize",
|
|
39
|
+
"params": {
|
|
40
|
+
"protocolVersion": 1,
|
|
41
|
+
"clientCapabilities": {
|
|
42
|
+
"fs": {
|
|
43
|
+
"readTextFile": true,
|
|
44
|
+
"writeTextFile": true
|
|
45
|
+
},
|
|
46
|
+
"terminal": true
|
|
47
|
+
},
|
|
48
|
+
"clientInfo": {
|
|
49
|
+
"name": "my-client",
|
|
50
|
+
"title": "My Client",
|
|
51
|
+
"version": "1.0.0"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The Agent **MUST** respond with the chosen [protocol version](#protocol-version) and the [capabilities](#agent-capabilities) it supports. It **SHOULD** also provide a name and version to the Client as well:
|
|
58
|
+
|
|
59
|
+
```json theme={null}
|
|
60
|
+
{
|
|
61
|
+
"jsonrpc": "2.0",
|
|
62
|
+
"id": 0,
|
|
63
|
+
"result": {
|
|
64
|
+
"protocolVersion": 1,
|
|
65
|
+
"agentCapabilities": {
|
|
66
|
+
"loadSession": true,
|
|
67
|
+
"promptCapabilities": {
|
|
68
|
+
"image": true,
|
|
69
|
+
"audio": true,
|
|
70
|
+
"embeddedContext": true
|
|
71
|
+
},
|
|
72
|
+
"mcp": {
|
|
73
|
+
"http": true,
|
|
74
|
+
"sse": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"agentInfo": {
|
|
78
|
+
"name": "my-agent",
|
|
79
|
+
"title": "My Agent",
|
|
80
|
+
"version": "1.0.0"
|
|
81
|
+
},
|
|
82
|
+
"authMethods": []
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Protocol version
|
|
88
|
+
|
|
89
|
+
The protocol versions that appear in the `initialize` requests and responses are a single integer that identifies a **MAJOR** protocol version. This version is only incremented when breaking changes are introduced.
|
|
90
|
+
|
|
91
|
+
Clients and Agents **MUST** agree on a protocol version and act according to its specification.
|
|
92
|
+
|
|
93
|
+
See [Capabilities](#capabilities) to learn how non-breaking features are introduced.
|
|
94
|
+
|
|
95
|
+
### Version Negotiation
|
|
96
|
+
|
|
97
|
+
The `initialize` request **MUST** include the latest protocol version the Client supports.
|
|
98
|
+
|
|
99
|
+
If the Agent supports the requested version, it **MUST** respond with the same version. Otherwise, the Agent **MUST** respond with the latest version it supports.
|
|
100
|
+
|
|
101
|
+
If the Client does not support the version specified by the Agent in the `initialize` response, the Client **SHOULD** close the connection and inform the user about it.
|
|
102
|
+
|
|
103
|
+
## Capabilities
|
|
104
|
+
|
|
105
|
+
Capabilities describe features supported by the Client and the Agent.
|
|
106
|
+
|
|
107
|
+
All capabilities included in the `initialize` request are **OPTIONAL**. Clients and Agents **SHOULD** support all possible combinations of their peer's capabilities.
|
|
108
|
+
|
|
109
|
+
The introduction of new capabilities is not considered a breaking change. Therefore, Clients and Agents **MUST** treat all capabilities omitted in the `initialize` request as **UNSUPPORTED**.
|
|
110
|
+
|
|
111
|
+
Capabilities are high-level and are not attached to a specific base protocol concept.
|
|
112
|
+
|
|
113
|
+
Capabilities may specify the availability of protocol methods, notifications, or a subset of their parameters. They may also signal behaviors of the Agent or Client implementation.
|
|
114
|
+
|
|
115
|
+
Implementations can also [advertise custom capabilities](./extensibility#advertising-custom-capabilities) using the `_meta` field to indicate support for protocol extensions.
|
|
116
|
+
|
|
117
|
+
### Client Capabilities
|
|
118
|
+
|
|
119
|
+
The Client **SHOULD** specify whether it supports the following capabilities:
|
|
120
|
+
|
|
121
|
+
#### File System
|
|
122
|
+
|
|
123
|
+
<ParamField path="readTextFile" type="boolean">
|
|
124
|
+
The `fs/read_text_file` method is available.
|
|
125
|
+
</ParamField>
|
|
126
|
+
|
|
127
|
+
<ParamField path="writeTextFile" type="boolean">
|
|
128
|
+
The `fs/write_text_file` method is available.
|
|
129
|
+
</ParamField>
|
|
130
|
+
|
|
131
|
+
<Card icon="file" horizontal href="./file-system">
|
|
132
|
+
Learn more about File System methods
|
|
133
|
+
</Card>
|
|
134
|
+
|
|
135
|
+
#### Terminal
|
|
136
|
+
|
|
137
|
+
<ParamField path="terminal" type="boolean">
|
|
138
|
+
All `terminal/*` methods are available, allowing the Agent to execute and
|
|
139
|
+
manage shell commands.
|
|
140
|
+
</ParamField>
|
|
141
|
+
|
|
142
|
+
<Card icon="terminal" horizontal href="./terminals">
|
|
143
|
+
Learn more about Terminals
|
|
144
|
+
</Card>
|
|
145
|
+
|
|
146
|
+
### Agent Capabilities
|
|
147
|
+
|
|
148
|
+
The Agent **SHOULD** specify whether it supports the following capabilities:
|
|
149
|
+
|
|
150
|
+
<ResponseField name="loadSession" type="boolean" post={["default: false"]}>
|
|
151
|
+
The [`session/load`](./session-setup#loading-sessions) method is available.
|
|
152
|
+
</ResponseField>
|
|
153
|
+
|
|
154
|
+
<ResponseField name="promptCapabilities" type="PromptCapabilities Object">
|
|
155
|
+
Object indicating the different types of [content](./content) that may be
|
|
156
|
+
included in `session/prompt` requests.
|
|
157
|
+
</ResponseField>
|
|
158
|
+
|
|
159
|
+
#### Prompt capabilities
|
|
160
|
+
|
|
161
|
+
As a baseline, all Agents **MUST** support `ContentBlock::Text` and `ContentBlock::ResourceLink` in `session/prompt` requests.
|
|
162
|
+
|
|
163
|
+
Optionally, they **MAY** support richer types of [content](./content) by specifying the following capabilities:
|
|
164
|
+
|
|
165
|
+
<ResponseField name="image" type="boolean" post={["default: false"]}>
|
|
166
|
+
The prompt may include `ContentBlock::Image`
|
|
167
|
+
</ResponseField>
|
|
168
|
+
|
|
169
|
+
<ResponseField name="audio" type="boolean" post={["default: false"]}>
|
|
170
|
+
The prompt may include `ContentBlock::Audio`
|
|
171
|
+
</ResponseField>
|
|
172
|
+
|
|
173
|
+
<ResponseField name="embeddedContext" type="boolean" post={["default: false"]}>
|
|
174
|
+
The prompt may include `ContentBlock::Resource`
|
|
175
|
+
</ResponseField>
|
|
176
|
+
|
|
177
|
+
#### MCP capabilities
|
|
178
|
+
|
|
179
|
+
<ResponseField name="http" type="boolean" post={["default: false"]}>
|
|
180
|
+
The Agent supports connecting to MCP servers over HTTP.
|
|
181
|
+
</ResponseField>
|
|
182
|
+
|
|
183
|
+
<ResponseField name="sse" type="boolean" post={["default: false"]}>
|
|
184
|
+
The Agent supports connecting to MCP servers over SSE.
|
|
185
|
+
|
|
186
|
+
Note: This transport has been deprecated by the MCP spec.
|
|
187
|
+
</ResponseField>
|
|
188
|
+
|
|
189
|
+
#### Session Capabilities
|
|
190
|
+
|
|
191
|
+
As a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.
|
|
192
|
+
|
|
193
|
+
Optionally, they **MAY** support other session methods and notifications by specifying additional capabilities.
|
|
194
|
+
|
|
195
|
+
<Note>
|
|
196
|
+
`session/load` is still handled by the top-level `load_session` capability.
|
|
197
|
+
This will be unified in future versions of the protocol.
|
|
198
|
+
</Note>
|
|
199
|
+
|
|
200
|
+
## Implementation Information
|
|
201
|
+
|
|
202
|
+
Both Clients and Agents **SHOULD** provide information about their implementation in the `clientInfo` and `agentInfo` fields respectively. Both take the following three fields:
|
|
203
|
+
|
|
204
|
+
<ParamField path="name" type="string">
|
|
205
|
+
Intended for programmatic or logical use, but can be used as a display name
|
|
206
|
+
fallback if title isn’t present.
|
|
207
|
+
</ParamField>
|
|
208
|
+
|
|
209
|
+
<ParamField path="title" type="string">
|
|
210
|
+
Intended for UI and end-user contexts — optimized to be human-readable and
|
|
211
|
+
easily understood. If not provided, the name should be used for display.
|
|
212
|
+
</ParamField>
|
|
213
|
+
|
|
214
|
+
<ParamField path="version" type="string">
|
|
215
|
+
Version of the implementation. Can be displayed to the user or used for
|
|
216
|
+
debugging or metrics purposes.
|
|
217
|
+
</ParamField>
|
|
218
|
+
|
|
219
|
+
<Info>
|
|
220
|
+
Note: in future versions of the protocol, this information will be required.
|
|
221
|
+
</Info>
|
|
222
|
+
|
|
223
|
+
***
|
|
224
|
+
|
|
225
|
+
Once the connection is initialized, you're ready to [create a session](./session-setup) and begin the conversation with the Agent.
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
> ## Documentation Index
|
|
2
|
+
> Fetch the complete documentation index at: https://agentclientprotocol.com/llms.txt
|
|
3
|
+
> Use this file to discover all available pages before exploring further.
|
|
4
|
+
|
|
5
|
+
# Prompt Turn
|
|
6
|
+
|
|
7
|
+
> Understanding the core conversation flow
|
|
8
|
+
|
|
9
|
+
A prompt turn represents a complete interaction cycle between the [Client](./overview#client) and [Agent](./overview#agent), starting with a user message and continuing until the Agent completes its response. This may involve multiple exchanges with the language model and tool invocations.
|
|
10
|
+
|
|
11
|
+
Before sending prompts, Clients **MUST** first complete the [initialization](./initialization) phase and [session setup](./session-setup).
|
|
12
|
+
|
|
13
|
+
## The Prompt Turn Lifecycle
|
|
14
|
+
|
|
15
|
+
A prompt turn follows a structured flow that enables rich interactions between the user, Agent, and any connected tools.
|
|
16
|
+
|
|
17
|
+
<br />
|
|
18
|
+
|
|
19
|
+
```mermaid theme={null}
|
|
20
|
+
sequenceDiagram
|
|
21
|
+
participant Client
|
|
22
|
+
participant Agent
|
|
23
|
+
|
|
24
|
+
Note over Agent,Client: Session ready
|
|
25
|
+
|
|
26
|
+
Note left of Client: User sends message
|
|
27
|
+
Client->>Agent: session/prompt (user message)
|
|
28
|
+
Note right of Agent: Process with LLM
|
|
29
|
+
|
|
30
|
+
loop Until completion
|
|
31
|
+
Note right of Agent: LLM responds with<br/>content/tool calls
|
|
32
|
+
Agent->>Client: session/update (plan)
|
|
33
|
+
Agent->>Client: session/update (agent_message_chunk)
|
|
34
|
+
|
|
35
|
+
opt Tool calls requested
|
|
36
|
+
Agent->>Client: session/update (tool_call)
|
|
37
|
+
opt Permission required
|
|
38
|
+
Agent->>Client: session/request_permission
|
|
39
|
+
Note left of Client: User grants/denies
|
|
40
|
+
Client-->>Agent: Permission response
|
|
41
|
+
end
|
|
42
|
+
Agent->>Client: session/update (tool_call status: in_progress)
|
|
43
|
+
Note right of Agent: Execute tool
|
|
44
|
+
Agent->>Client: session/update (tool_call status: completed)
|
|
45
|
+
Note right of Agent: Send tool results<br/>back to LLM
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
opt User cancelled during execution
|
|
49
|
+
Note left of Client: User cancels prompt
|
|
50
|
+
Client->>Agent: session/cancel
|
|
51
|
+
Note right of Agent: Abort operations
|
|
52
|
+
Agent-->>Client: session/prompt response (cancelled)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
Agent-->>Client: session/prompt response (stopReason)
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 1. User Message
|
|
61
|
+
|
|
62
|
+
The turn begins when the Client sends a `session/prompt`:
|
|
63
|
+
|
|
64
|
+
```json theme={null}
|
|
65
|
+
{
|
|
66
|
+
"jsonrpc": "2.0",
|
|
67
|
+
"id": 2,
|
|
68
|
+
"method": "session/prompt",
|
|
69
|
+
"params": {
|
|
70
|
+
"sessionId": "sess_abc123def456",
|
|
71
|
+
"prompt": [
|
|
72
|
+
{
|
|
73
|
+
"type": "text",
|
|
74
|
+
"text": "Can you analyze this code for potential issues?"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "resource",
|
|
78
|
+
"resource": {
|
|
79
|
+
"uri": "file:///home/user/project/main.py",
|
|
80
|
+
"mimeType": "text/x-python",
|
|
81
|
+
"text": "def process_data(items):\n for item in items:\n print(item)"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
<ParamField path="sessionId" type="SessionId">
|
|
90
|
+
The [ID](./session-setup#session-id) of the session to send this message to.
|
|
91
|
+
</ParamField>
|
|
92
|
+
|
|
93
|
+
<ParamField path="prompt" type="ContentBlock[]">
|
|
94
|
+
The contents of the user message, e.g. text, images, files, etc.
|
|
95
|
+
|
|
96
|
+
Clients **MUST** restrict types of content according to the [Prompt Capabilities](./initialization#prompt-capabilities) established during [initialization](./initialization).
|
|
97
|
+
|
|
98
|
+
<Card icon="comments" horizontal href="./content">
|
|
99
|
+
Learn more about Content
|
|
100
|
+
</Card>
|
|
101
|
+
</ParamField>
|
|
102
|
+
|
|
103
|
+
### 2. Agent Processing
|
|
104
|
+
|
|
105
|
+
Upon receiving the prompt request, the Agent processes the user's message and sends it to the language model, which **MAY** respond with text content, tool calls, or both.
|
|
106
|
+
|
|
107
|
+
### 3. Agent Reports Output
|
|
108
|
+
|
|
109
|
+
The Agent reports the model's output to the Client via `session/update` notifications. This may include the Agent's plan for accomplishing the task:
|
|
110
|
+
|
|
111
|
+
```json expandable theme={null}
|
|
112
|
+
{
|
|
113
|
+
"jsonrpc": "2.0",
|
|
114
|
+
"method": "session/update",
|
|
115
|
+
"params": {
|
|
116
|
+
"sessionId": "sess_abc123def456",
|
|
117
|
+
"update": {
|
|
118
|
+
"sessionUpdate": "plan",
|
|
119
|
+
"entries": [
|
|
120
|
+
{
|
|
121
|
+
"content": "Check for syntax errors",
|
|
122
|
+
"priority": "high",
|
|
123
|
+
"status": "pending"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"content": "Identify potential type issues",
|
|
127
|
+
"priority": "medium",
|
|
128
|
+
"status": "pending"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"content": "Review error handling patterns",
|
|
132
|
+
"priority": "medium",
|
|
133
|
+
"status": "pending"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"content": "Suggest improvements",
|
|
137
|
+
"priority": "low",
|
|
138
|
+
"status": "pending"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
<Card icon="lightbulb" horizontal href="./agent-plan">
|
|
147
|
+
Learn more about Agent Plans
|
|
148
|
+
</Card>
|
|
149
|
+
|
|
150
|
+
The Agent then reports text responses from the model:
|
|
151
|
+
|
|
152
|
+
```json theme={null}
|
|
153
|
+
{
|
|
154
|
+
"jsonrpc": "2.0",
|
|
155
|
+
"method": "session/update",
|
|
156
|
+
"params": {
|
|
157
|
+
"sessionId": "sess_abc123def456",
|
|
158
|
+
"update": {
|
|
159
|
+
"sessionUpdate": "agent_message_chunk",
|
|
160
|
+
"content": {
|
|
161
|
+
"type": "text",
|
|
162
|
+
"text": "I'll analyze your code for potential issues. Let me examine it..."
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
If the model requested tool calls, these are also reported immediately:
|
|
170
|
+
|
|
171
|
+
```json theme={null}
|
|
172
|
+
{
|
|
173
|
+
"jsonrpc": "2.0",
|
|
174
|
+
"method": "session/update",
|
|
175
|
+
"params": {
|
|
176
|
+
"sessionId": "sess_abc123def456",
|
|
177
|
+
"update": {
|
|
178
|
+
"sessionUpdate": "tool_call",
|
|
179
|
+
"toolCallId": "call_001",
|
|
180
|
+
"title": "Analyzing Python code",
|
|
181
|
+
"kind": "other",
|
|
182
|
+
"status": "pending"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 4. Check for Completion
|
|
189
|
+
|
|
190
|
+
If there are no pending tool calls, the turn ends and the Agent **MUST** respond to the original `session/prompt` request with a `StopReason`:
|
|
191
|
+
|
|
192
|
+
```json theme={null}
|
|
193
|
+
{
|
|
194
|
+
"jsonrpc": "2.0",
|
|
195
|
+
"id": 2,
|
|
196
|
+
"result": {
|
|
197
|
+
"stopReason": "end_turn"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Agents **MAY** stop the turn at any point by returning the corresponding [`StopReason`](#stop-reasons).
|
|
203
|
+
|
|
204
|
+
### 5. Tool Invocation and Status Reporting
|
|
205
|
+
|
|
206
|
+
Before proceeding with execution, the Agent **MAY** request permission from the Client via the `session/request_permission` method.
|
|
207
|
+
|
|
208
|
+
Once permission is granted (if required), the Agent **SHOULD** invoke the tool and report a status update marking the tool as `in_progress`:
|
|
209
|
+
|
|
210
|
+
```json theme={null}
|
|
211
|
+
{
|
|
212
|
+
"jsonrpc": "2.0",
|
|
213
|
+
"method": "session/update",
|
|
214
|
+
"params": {
|
|
215
|
+
"sessionId": "sess_abc123def456",
|
|
216
|
+
"update": {
|
|
217
|
+
"sessionUpdate": "tool_call_update",
|
|
218
|
+
"toolCallId": "call_001",
|
|
219
|
+
"status": "in_progress"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
As the tool runs, the Agent **MAY** send additional updates, providing real-time feedback about tool execution progress.
|
|
226
|
+
|
|
227
|
+
While tools execute on the Agent, they **MAY** leverage Client capabilities such as the file system (`fs`) methods to access resources within the Client's environment.
|
|
228
|
+
|
|
229
|
+
When the tool completes, the Agent sends another update with the final status and any content:
|
|
230
|
+
|
|
231
|
+
```json theme={null}
|
|
232
|
+
{
|
|
233
|
+
"jsonrpc": "2.0",
|
|
234
|
+
"method": "session/update",
|
|
235
|
+
"params": {
|
|
236
|
+
"sessionId": "sess_abc123def456",
|
|
237
|
+
"update": {
|
|
238
|
+
"sessionUpdate": "tool_call_update",
|
|
239
|
+
"toolCallId": "call_001",
|
|
240
|
+
"status": "completed",
|
|
241
|
+
"content": [
|
|
242
|
+
{
|
|
243
|
+
"type": "content",
|
|
244
|
+
"content": {
|
|
245
|
+
"type": "text",
|
|
246
|
+
"text": "Analysis complete:\n- No syntax errors found\n- Consider adding type hints for better clarity\n- The function could benefit from error handling for empty lists"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
<Card icon="hammer" horizontal href="./tool-calls">
|
|
256
|
+
Learn more about Tool Calls
|
|
257
|
+
</Card>
|
|
258
|
+
|
|
259
|
+
### 6. Continue Conversation
|
|
260
|
+
|
|
261
|
+
The Agent sends the tool results back to the language model as another request.
|
|
262
|
+
|
|
263
|
+
The cycle returns to [step 2](#2-agent-processing), continuing until the language model completes its response without requesting additional tool calls or the turn gets stopped by the Agent or cancelled by the Client.
|
|
264
|
+
|
|
265
|
+
## Stop Reasons
|
|
266
|
+
|
|
267
|
+
When an Agent stops a turn, it must specify the corresponding `StopReason`:
|
|
268
|
+
|
|
269
|
+
<ResponseField name="end_turn">
|
|
270
|
+
The language model finishes responding without requesting more tools
|
|
271
|
+
</ResponseField>
|
|
272
|
+
|
|
273
|
+
<ResponseField name="max_tokens">
|
|
274
|
+
The maximum token limit is reached
|
|
275
|
+
</ResponseField>
|
|
276
|
+
|
|
277
|
+
<ResponseField name="max_turn_requests">
|
|
278
|
+
The maximum number of model requests in a single turn is exceeded
|
|
279
|
+
</ResponseField>
|
|
280
|
+
|
|
281
|
+
<ResponseField name="refusal">The Agent refuses to continue</ResponseField>
|
|
282
|
+
|
|
283
|
+
<ResponseField name="cancelled">The Client cancels the turn</ResponseField>
|
|
284
|
+
|
|
285
|
+
## Cancellation
|
|
286
|
+
|
|
287
|
+
Clients **MAY** cancel an ongoing prompt turn at any time by sending a `session/cancel` notification:
|
|
288
|
+
|
|
289
|
+
```json theme={null}
|
|
290
|
+
{
|
|
291
|
+
"jsonrpc": "2.0",
|
|
292
|
+
"method": "session/cancel",
|
|
293
|
+
"params": {
|
|
294
|
+
"sessionId": "sess_abc123def456"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
The Client **SHOULD** preemptively mark all non-finished tool calls pertaining to the current turn as `cancelled` as soon as it sends the `session/cancel` notification.
|
|
300
|
+
|
|
301
|
+
The Client **MUST** respond to all pending `session/request_permission` requests with the `cancelled` outcome.
|
|
302
|
+
|
|
303
|
+
When the Agent receives this notification, it **SHOULD** stop all language model requests and all tool call invocations as soon as possible.
|
|
304
|
+
|
|
305
|
+
After all ongoing operations have been successfully aborted and pending updates have been sent, the Agent **MUST** respond to the original `session/prompt` request with the `cancelled` [stop reason](#stop-reasons).
|
|
306
|
+
|
|
307
|
+
<Warning>
|
|
308
|
+
API client libraries and tools often throw an exception when their operation is aborted, which may propagate as an error response to `session/prompt`.
|
|
309
|
+
|
|
310
|
+
Clients often display unrecognized errors from the Agent to the user, which would be undesirable for cancellations as they aren't considered errors.
|
|
311
|
+
|
|
312
|
+
Agents **MUST** catch these errors and return the semantically meaningful `cancelled` stop reason, so that Clients can reliably confirm the cancellation.
|
|
313
|
+
</Warning>
|
|
314
|
+
|
|
315
|
+
The Agent **MAY** send `session/update` notifications with content or tool call updates after receiving the `session/cancel` notification, but it **MUST** ensure that it does so before responding to the `session/prompt` request.
|
|
316
|
+
|
|
317
|
+
The Client **SHOULD** still accept tool call updates received after sending `session/cancel`.
|
|
318
|
+
|
|
319
|
+
***
|
|
320
|
+
|
|
321
|
+
Once a prompt turn completes, the Client may send another `session/prompt` to continue the conversation, building on the context established in previous turns.
|