acpkit 0.9.2__tar.gz → 0.9.3__tar.gz
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.
- acpkit-0.9.3/COVERAGE +2 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/PKG-INFO +24 -19
- acpkit-0.9.3/VERSION +1 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp.md +63 -1
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/README.md +62 -0
- acpkit-0.9.3/packages/adapters/langchain-acp/VERSION +1 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/pyproject.toml +1 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/__init__.py +52 -1
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/_slash_commands.py +46 -0
- {acpkit-0.9.2/packages/adapters/pydantic-acp/src/pydantic_acp → acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp}/_version.py +1 -1
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/approvals.py +208 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/bridges/__init__.py +3 -0
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/bridges/external_hooks.py +58 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/config.py +6 -0
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/hook_projection.py +78 -0
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/permission_presentation.py +68 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/projection.py +169 -8
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/runtime/adapter.py +236 -11
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/runtime/server.py +4 -49
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/runtime/slash_commands.py +327 -0
- acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp/slash.py +83 -0
- acpkit-0.9.3/packages/adapters/pydantic-acp/VERSION +1 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/pyproject.toml +1 -0
- {acpkit-0.9.2/packages/helpers/codex-auth-helper/src/codex_auth_helper → acpkit-0.9.3/packages/adapters/pydantic-acp/src/pydantic_acp}/_version.py +1 -1
- acpkit-0.9.3/packages/adapters/pydantic-acp/src/pydantic_acp/approval_store.py +89 -0
- acpkit-0.9.3/packages/adapters/pydantic-acp/src/pydantic_acp/prompt_capabilities.py +12 -0
- acpkit-0.9.3/packages/helpers/codex-auth-helper/VERSION +1 -0
- {acpkit-0.9.2/packages/transports/acpremote/src/acpremote → acpkit-0.9.3/packages/helpers/codex-auth-helper/src/codex_auth_helper}/_version.py +1 -1
- acpkit-0.9.3/packages/transports/acpremote/VERSION +1 -0
- {acpkit-0.9.2/packages/adapters/langchain-acp/src/langchain_acp → acpkit-0.9.3/packages/transports/acpremote/src/acpremote}/_version.py +1 -1
- {acpkit-0.9.2 → acpkit-0.9.3}/pyproject.toml +2 -7
- {acpkit-0.9.2 → acpkit-0.9.3}/pyrightconfig.json +1 -0
- acpkit-0.9.3/src/acpkit/_version.py +5 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/langchain/test_low_level_helpers.py +735 -2
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/langchain/test_runtime.py +114 -2
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_capability_support.py +20 -23
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_slash_commands.py +87 -14
- acpkit-0.9.2/COVERAGE +0 -2
- acpkit-0.9.2/VERSION +0 -1
- acpkit-0.9.2/packages/adapters/langchain-acp/VERSION +0 -1
- acpkit-0.9.2/packages/adapters/langchain-acp/src/langchain_acp/approvals.py +0 -106
- acpkit-0.9.2/packages/adapters/pydantic-acp/VERSION +0 -1
- acpkit-0.9.2/packages/helpers/codex-auth-helper/VERSION +0 -1
- acpkit-0.9.2/packages/transports/acpremote/VERSION +0 -1
- acpkit-0.9.2/src/acpkit/_version.py +0 -5
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpkit-sdk/SKILL.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpkit-sdk/agents/openai.yaml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpkit-sdk/examples/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpkit-sdk/resources/intro.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpkit-sdk/scripts/list_examples.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpkit-sdk/scripts/list_public_exports.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpremote/SKILL.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpremote/agents/openai.yaml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpremote/examples/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpremote/examples/mirror_remote.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/acpremote/examples/serve_command.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/codex-auth-helper/SKILL.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/codex-auth-helper/agents/openai.yaml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/codex-auth-helper/examples/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/codex-auth-helper/examples/codex_chat_openai_graph.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/codex-auth-helper/examples/codex_responses_agent.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/langchain-acp/SKILL.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/langchain-acp/agents/openai.yaml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/langchain-acp/examples/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/pydantic-acp/SKILL.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/pydantic-acp/agents/openai.yaml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.agents/skills/pydantic-acp/examples/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.cursorrules +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.editorconfig +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/dependabot.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/workflows/ci.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/workflows/codecov.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/workflows/docs.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/workflows/publish.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.github/workflows/test.yml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.gitignore +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.pre-commit-config.yaml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/.python-version +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/CODE_OF_CONDUCT.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/CONTRIBUTING.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/LICENSE +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/Makefile +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/SECURITY.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/context7.json +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/.partials/index-header.html +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/about/index.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/acpremote.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/api/acpkit.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/api/acpremote.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/api/codex_auth_helper.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/api/langchain_acp.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/api/pydantic_acp.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/bridges.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/cli.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/compatibility-matrix-template.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/deepagents.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/dynamic-factory.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/finance.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/index.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/langchain-codex.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/langchain-workspace.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/remote-hosting.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/examples/travel.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/getting-started/installation.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/getting-started/langchain-quickstart.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/getting-started/pydantic-quickstart.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/getting-started/quickstart.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/helpers.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/host-backends.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/index.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/integration-audit.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/integration-readiness.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/integration-testing.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/adapter-config.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/bridges.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/plans-thinking-approvals.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/projections.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/prompt-resources.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/providers.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/runtime-controls.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/langchain-acp/session-state.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/llms-full.txt +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/llms.txt +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/projection-cookbook.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/providers.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/pydantic-acp/adapter-config.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/pydantic-acp/plans-thinking-approvals.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/pydantic-acp/prompt-resources.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/pydantic-acp/runtime-controls.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/pydantic-acp/session-state.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/pydantic-acp.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/stylesheets/tweaks.css +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/docs/testing.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/.deepagents-graph/.deepagents-graph/brief.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/.deepagents-graph/brief.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/.workspace-graph/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/codex_graph.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/deepagents_graph.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/langchain/workspace_graph.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/.gitignore +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/.travel-agent/ideas.txt +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/.travel-agent/itinerary.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/finance_agent.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/examples/pydantic/travel_agent.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/mkdocs.yml +0 -0
- {acpkit-0.9.2/packages/adapters/pydantic-acp/src/pydantic_acp → acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp}/approval_store.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/bridge_manager.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/bridges/base.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/bridges/builtin.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/builders/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/builders/graph.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/event_projection.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/graph_source.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/plan.py +0 -0
- {acpkit-0.9.2/packages/adapters/pydantic-acp/src/pydantic_acp → acpkit-0.9.3/packages/adapters/langchain-acp/src/langchain_acp}/prompt_capabilities.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/providers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/py.typed +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/runtime/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/runtime/_native_plan_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/runtime/_prompt_conversion.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/serialization.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/session/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/session/state.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/session/store.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/types.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/_projection_risk.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/_projection_text.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/_slash_commands.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/agent_source.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/agent_types.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/approvals.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/awaitables.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/_hook_capability.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/base.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/capability_support.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/external_hooks.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/history_processor.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/hooks.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/mcp.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/prepare_tools.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/bridges/thinking.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/builders/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/builders/agent.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/config.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/hook_projection.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/_policy_commands.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/_policy_paths.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/context.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/filesystem.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/policy.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/host/terminal.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/models.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/permission_presentation.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/projection.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/projection_helpers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/providers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/py.typed +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_adapter_mixins.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_adapter_prompt.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_agent_state.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_compat.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_native_plan_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_prompt_execution.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_prompt_model_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_prompt_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_session_lifecycle.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_session_model_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_session_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/_session_surface_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/adapter.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/bridge_manager.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/hook_introspection.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/prompts.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/server.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/session_surface.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/runtime/slash_commands.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/serialization.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/session/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/session/state.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/session/store.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/slash.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/testing/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/testing/fakes.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/testing/harness.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/pydantic-acp/src/pydantic_acp/types.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/.gitignore +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/LICENSE +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/pyproject.toml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/config.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/manager.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/state.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/store.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/client.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/factory.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/model.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/helpers/codex-auth-helper/src/codex_auth_helper/py.typed +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/README.md +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/pyproject.toml +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/auth.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/client.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/command.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/config.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/limits.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/metadata.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/proxy_agent.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/py.typed +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/server.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/packages/transports/acpremote/src/acpremote/stream.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/check_pypi_versions.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/demo_mcp_server.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/generate_llms_docs.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/mock_hook_audit.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/mock_hook_snapshot.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/run_if_major_change.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/scripts/save_coverage_summary.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/__main__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/_compatibility_schema.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/adapters.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/cli.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/compatibility.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/py.typed +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/src/acpkit/runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/acpremote/test_command_server.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/acpremote/test_helpers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/acpremote/test_phase1.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/acpremote/test_phase2.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/acpremote/test_phase3.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/codex_auth_helper/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/codex_auth_helper/support.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/codex_auth_helper/test_auth.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/codex_auth_helper/test_factory.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/conftest.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/langchain/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/langchain/support.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/langchain/test_examples.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/langchain/test_support.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/__init__.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/support.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_adapter_helpers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_approvals.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_builder.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_hooks.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_mcp.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_prepare_tools.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_thinking.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_bridge_web_capabilities.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_compat.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_examples.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_hook_introspection.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_host.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_host_policy.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_low_level_helpers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_models.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_projection.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_projection_helpers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_runtime.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_session_runtime_helpers.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_sources.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_support.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_testing_fakes.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/pydantic/test_testing_harness.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/test_acpkit_cli.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/test_compatibility_manifest.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/test_native_langchain_agent.py +0 -0
- {acpkit-0.9.2 → acpkit-0.9.3}/tests/test_native_pydantic_agent.py +0 -0
acpkit-0.9.3/COVERAGE
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: acpkit
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: ACP Kit provides a common adapter for Agent Frameworks.
|
|
5
5
|
Project-URL: Homepage, https://vcoderun.github.io/acpkit/
|
|
6
6
|
Project-URL: Issues, https://github.com/vcoderun/acpkit/issues
|
|
@@ -16,31 +16,13 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Requires-Python: >=3.11
|
|
18
18
|
Requires-Dist: click>=8.1.8
|
|
19
|
-
Requires-Dist: fast-agent-mcp>=0.2.25
|
|
20
|
-
Requires-Dist: mcp>=1.27.0
|
|
21
19
|
Requires-Dist: typing-extensions>=4.12.0
|
|
22
20
|
Provides-Extra: all
|
|
23
21
|
Requires-Dist: acpremote; extra == 'all'
|
|
24
|
-
Requires-Dist: agent-client-protocol>=0.9.0; extra == 'all'
|
|
25
|
-
Requires-Dist: basedpyright; extra == 'all'
|
|
26
22
|
Requires-Dist: codex-auth-helper; extra == 'all'
|
|
27
23
|
Requires-Dist: langchain-acp; extra == 'all'
|
|
28
24
|
Requires-Dist: langchain-acp[deepagents]; extra == 'all'
|
|
29
|
-
Requires-Dist: langchain-openai>=0.3.26; extra == 'all'
|
|
30
|
-
Requires-Dist: mkdocs-material; extra == 'all'
|
|
31
|
-
Requires-Dist: mkdocstrings[python]; extra == 'all'
|
|
32
|
-
Requires-Dist: pre-commit; extra == 'all'
|
|
33
25
|
Requires-Dist: pydantic-acp; extra == 'all'
|
|
34
|
-
Requires-Dist: pydantic-ai-slim; extra == 'all'
|
|
35
|
-
Requires-Dist: pydantic-graph; extra == 'all'
|
|
36
|
-
Requires-Dist: pydantic>=2.7; extra == 'all'
|
|
37
|
-
Requires-Dist: pytest; extra == 'all'
|
|
38
|
-
Requires-Dist: pytest-asyncio; extra == 'all'
|
|
39
|
-
Requires-Dist: pytest-cov; extra == 'all'
|
|
40
|
-
Requires-Dist: python-dotenv; extra == 'all'
|
|
41
|
-
Requires-Dist: ruff; extra == 'all'
|
|
42
|
-
Requires-Dist: ty; extra == 'all'
|
|
43
|
-
Requires-Dist: typing-extensions>=4.12.0; extra == 'all'
|
|
44
26
|
Requires-Dist: uv>=0.8.3; extra == 'all'
|
|
45
27
|
Provides-Extra: codex
|
|
46
28
|
Requires-Dist: codex-auth-helper; extra == 'codex'
|
|
@@ -65,6 +47,29 @@ Requires-Dist: python-dotenv; extra == 'dev'
|
|
|
65
47
|
Requires-Dist: ruff; extra == 'dev'
|
|
66
48
|
Requires-Dist: ty; extra == 'dev'
|
|
67
49
|
Requires-Dist: typing-extensions>=4.12.0; extra == 'dev'
|
|
50
|
+
Provides-Extra: dev-all
|
|
51
|
+
Requires-Dist: acpremote; extra == 'dev-all'
|
|
52
|
+
Requires-Dist: agent-client-protocol>=0.9.0; extra == 'dev-all'
|
|
53
|
+
Requires-Dist: basedpyright; extra == 'dev-all'
|
|
54
|
+
Requires-Dist: codex-auth-helper; extra == 'dev-all'
|
|
55
|
+
Requires-Dist: langchain-acp; extra == 'dev-all'
|
|
56
|
+
Requires-Dist: langchain-acp[deepagents]; extra == 'dev-all'
|
|
57
|
+
Requires-Dist: langchain-openai>=0.3.26; extra == 'dev-all'
|
|
58
|
+
Requires-Dist: mkdocs-material; extra == 'dev-all'
|
|
59
|
+
Requires-Dist: mkdocstrings[python]; extra == 'dev-all'
|
|
60
|
+
Requires-Dist: pre-commit; extra == 'dev-all'
|
|
61
|
+
Requires-Dist: pydantic-acp; extra == 'dev-all'
|
|
62
|
+
Requires-Dist: pydantic-ai-slim; extra == 'dev-all'
|
|
63
|
+
Requires-Dist: pydantic-graph; extra == 'dev-all'
|
|
64
|
+
Requires-Dist: pydantic>=2.7; extra == 'dev-all'
|
|
65
|
+
Requires-Dist: pytest; extra == 'dev-all'
|
|
66
|
+
Requires-Dist: pytest-asyncio; extra == 'dev-all'
|
|
67
|
+
Requires-Dist: pytest-cov; extra == 'dev-all'
|
|
68
|
+
Requires-Dist: python-dotenv; extra == 'dev-all'
|
|
69
|
+
Requires-Dist: ruff; extra == 'dev-all'
|
|
70
|
+
Requires-Dist: ty; extra == 'dev-all'
|
|
71
|
+
Requires-Dist: typing-extensions>=4.12.0; extra == 'dev-all'
|
|
72
|
+
Requires-Dist: uv>=0.8.3; extra == 'dev-all'
|
|
68
73
|
Provides-Extra: docs
|
|
69
74
|
Requires-Dist: mkdocs-material; extra == 'docs'
|
|
70
75
|
Requires-Dist: mkdocstrings[python]; extra == 'docs'
|
acpkit-0.9.3/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.3
|
|
@@ -82,10 +82,13 @@ called inside `graph_factory=...`.
|
|
|
82
82
|
- `AdapterConfig`
|
|
83
83
|
- explicit session stores and transcript replay
|
|
84
84
|
- provider-owned models, modes, and config options
|
|
85
|
+
- prompt capability advertisement
|
|
85
86
|
- native ACP plan state with `TaskPlan`
|
|
86
|
-
- approval bridging
|
|
87
|
+
- approval bridging with projection-aware permission cards
|
|
87
88
|
- capability bridges
|
|
89
|
+
- built-in and host-defined slash commands
|
|
88
90
|
- projection maps and event projection maps
|
|
91
|
+
- external hook event projection
|
|
89
92
|
- ACP-facing type exports in `langchain_acp.types`
|
|
90
93
|
|
|
91
94
|
The important difference is upstream shape, not ACP Kit architecture. On the LangChain side the adapter deals in graphs and middleware instead of model profiles and tool preparers.
|
|
@@ -133,6 +136,51 @@ The point is not to make the adapter magical. The point is to keep the host,
|
|
|
133
136
|
the graph, and the ACP surface aligned without inventing runtime state the graph
|
|
134
137
|
cannot really honor.
|
|
135
138
|
|
|
139
|
+
## Prompt Capabilities And Slash Commands
|
|
140
|
+
|
|
141
|
+
Prompt capability advertisement is configurable instead of hardcoded:
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from langchain_acp import AdapterConfig, AdapterPromptCapabilities
|
|
145
|
+
|
|
146
|
+
config = AdapterConfig(
|
|
147
|
+
prompt_capabilities=AdapterPromptCapabilities(
|
|
148
|
+
audio=False,
|
|
149
|
+
image=False,
|
|
150
|
+
embedded_context=True,
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The adapter also owns an ACP-native slash-command layer:
|
|
156
|
+
|
|
157
|
+
- mode commands such as `/ask`
|
|
158
|
+
- `/model`
|
|
159
|
+
- `/tools`
|
|
160
|
+
- `/mcp-servers`
|
|
161
|
+
- custom host commands through `slash_command_provider`
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
from acp.schema import AvailableCommand
|
|
165
|
+
from langchain_acp import (
|
|
166
|
+
AdapterConfig,
|
|
167
|
+
SlashCommandResult,
|
|
168
|
+
StaticSlashCommand,
|
|
169
|
+
StaticSlashCommandProvider,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
config = AdapterConfig(
|
|
173
|
+
slash_command_provider=StaticSlashCommandProvider(
|
|
174
|
+
commands=[
|
|
175
|
+
StaticSlashCommand(
|
|
176
|
+
command=AvailableCommand(name="ping", description="Return pong."),
|
|
177
|
+
handler=lambda _request: SlashCommandResult(text="pong"),
|
|
178
|
+
)
|
|
179
|
+
]
|
|
180
|
+
)
|
|
181
|
+
)
|
|
182
|
+
```
|
|
183
|
+
|
|
136
184
|
## Session Lifecycle And Replay
|
|
137
185
|
|
|
138
186
|
Session lifecycle is first-class:
|
|
@@ -209,10 +257,23 @@ The adapter surface is:
|
|
|
209
257
|
|
|
210
258
|
- `ApprovalBridge`
|
|
211
259
|
- `NativeApprovalBridge`
|
|
260
|
+
- `ProjectionAwareApprovalBridge`
|
|
261
|
+
- `PermissionToolCallBuilder`
|
|
262
|
+
- `ApprovalPolicyStore`
|
|
212
263
|
- ACP permission requests and resume flow
|
|
213
264
|
|
|
214
265
|
When the runtime really pauses for approval, the ACP session pauses for approval too.
|
|
215
266
|
|
|
267
|
+
Remembered approval choices and permission card rendering live on `NativeApprovalBridge`:
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
from langchain_acp import NativeApprovalBridge
|
|
271
|
+
|
|
272
|
+
config = AdapterConfig(
|
|
273
|
+
approval_bridge=NativeApprovalBridge(enable_persistent_choices=True),
|
|
274
|
+
)
|
|
275
|
+
```
|
|
276
|
+
|
|
216
277
|
## Capability Bridges And Graph Build Contributions
|
|
217
278
|
|
|
218
279
|
ACP Kit's bridge architecture remains intact in the LangChain adapter.
|
|
@@ -224,6 +285,7 @@ Built-in bridges:
|
|
|
224
285
|
- `ConfigOptionsBridge`
|
|
225
286
|
- `ToolSurfaceBridge`
|
|
226
287
|
- `DeepAgentsCompatibilityBridge`
|
|
288
|
+
- `ExternalHookEventBridge`
|
|
227
289
|
|
|
228
290
|
Graph-build contributions are aggregated through:
|
|
229
291
|
|
|
@@ -105,10 +105,14 @@ acp_agent = create_acp_agent(graph_factory=graph_from_session)
|
|
|
105
105
|
|
|
106
106
|
- session stores and transcript replay
|
|
107
107
|
- model, mode, and config-option providers
|
|
108
|
+
- prompt capability advertisement through `prompt_capabilities`
|
|
108
109
|
- native plan state through `TaskPlan`
|
|
109
110
|
- approval bridging from `HumanInTheLoopMiddleware`
|
|
111
|
+
- remembered approval policies and permission card rendering on `NativeApprovalBridge`
|
|
110
112
|
- capability bridges and graph-build contributions
|
|
113
|
+
- built-in and host-defined slash commands
|
|
111
114
|
- tool projection maps and event projection maps
|
|
115
|
+
- external hook/event projection through `ExternalHookEventBridge`
|
|
112
116
|
- `graph`, `graph_factory`, and `graph_source`
|
|
113
117
|
- DeepAgents compatibility helpers where they add truthful ACP behavior
|
|
114
118
|
|
|
@@ -120,6 +124,64 @@ That means the adapter can expose:
|
|
|
120
124
|
|
|
121
125
|
without collapsing everything into a bespoke ACP runtime.
|
|
122
126
|
|
|
127
|
+
## Runtime Controls
|
|
128
|
+
|
|
129
|
+
The adapter now owns a small ACP-native slash-command layer instead of leaving that surface entirely to the graph:
|
|
130
|
+
|
|
131
|
+
- mode commands such as `/ask` or `/review` when the session publishes modes
|
|
132
|
+
- `/model` for ACP-owned model selection
|
|
133
|
+
- `/tools` for the active graph tool node
|
|
134
|
+
- `/mcp-servers` for attached session MCP servers
|
|
135
|
+
- custom host commands through `slash_command_provider`
|
|
136
|
+
|
|
137
|
+
Example:
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from acp.schema import AvailableCommand
|
|
141
|
+
from langchain_acp import (
|
|
142
|
+
AdapterConfig,
|
|
143
|
+
SlashCommandResult,
|
|
144
|
+
StaticSlashCommand,
|
|
145
|
+
StaticSlashCommandProvider,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
config = AdapterConfig(
|
|
149
|
+
slash_command_provider=StaticSlashCommandProvider(
|
|
150
|
+
commands=[
|
|
151
|
+
StaticSlashCommand(
|
|
152
|
+
command=AvailableCommand(name="ping", description="Return pong."),
|
|
153
|
+
handler=lambda _request: SlashCommandResult(text="pong"),
|
|
154
|
+
)
|
|
155
|
+
]
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Prompt capability advertisement is also explicit now:
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
from langchain_acp import AdapterConfig, AdapterPromptCapabilities
|
|
164
|
+
|
|
165
|
+
config = AdapterConfig(
|
|
166
|
+
prompt_capabilities=AdapterPromptCapabilities(
|
|
167
|
+
audio=False,
|
|
168
|
+
image=False,
|
|
169
|
+
embedded_context=True,
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
If the graph uses approval middleware, remembered choices and ACP permission presentation stay on
|
|
175
|
+
`NativeApprovalBridge`, not on `AdapterConfig`:
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from langchain_acp import NativeApprovalBridge
|
|
179
|
+
|
|
180
|
+
config = AdapterConfig(
|
|
181
|
+
approval_bridge=NativeApprovalBridge(enable_persistent_choices=True),
|
|
182
|
+
)
|
|
183
|
+
```
|
|
184
|
+
|
|
123
185
|
## Session-owned Graph Rebuilds
|
|
124
186
|
|
|
125
187
|
If ACP session state should decide which graph gets built, `graph_factory=` is the intended seam:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.3
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
from __future__ import annotations as _annotations
|
|
2
2
|
|
|
3
3
|
from ._version import __version__
|
|
4
|
-
from .
|
|
4
|
+
from .approval_store import (
|
|
5
|
+
ApprovalPolicy,
|
|
6
|
+
ApprovalPolicyStore,
|
|
7
|
+
PermissionOptionSet,
|
|
8
|
+
SessionMetadataApprovalPolicyStore,
|
|
9
|
+
)
|
|
10
|
+
from .approvals import (
|
|
11
|
+
ApprovalBridge,
|
|
12
|
+
ApprovalDecision,
|
|
13
|
+
NativeApprovalBridge,
|
|
14
|
+
ProjectionAwareApprovalBridge,
|
|
15
|
+
supports_projection_aware_approval_bridge,
|
|
16
|
+
)
|
|
5
17
|
from .bridges import (
|
|
6
18
|
BufferedCapabilityBridge,
|
|
7
19
|
CapabilityBridge,
|
|
8
20
|
ConfigOptionsBridge,
|
|
9
21
|
DeepAgentsCompatibilityBridge,
|
|
22
|
+
EventEmissionMode,
|
|
23
|
+
ExternalHookEventBridge,
|
|
10
24
|
ModelSelectionBridge,
|
|
11
25
|
ModeSelectionBridge,
|
|
12
26
|
ToolSurfaceBridge,
|
|
@@ -26,6 +40,12 @@ from .graph_source import (
|
|
|
26
40
|
GraphSource,
|
|
27
41
|
StaticGraphSource,
|
|
28
42
|
)
|
|
43
|
+
from .hook_projection import HookEvent, HookProjectionMap
|
|
44
|
+
from .permission_presentation import (
|
|
45
|
+
DefaultPermissionToolCallBuilder,
|
|
46
|
+
PermissionRequestContext,
|
|
47
|
+
PermissionToolCallBuilder,
|
|
48
|
+
)
|
|
29
49
|
from .plan import (
|
|
30
50
|
NativePlanGeneration,
|
|
31
51
|
PlanGenerationType,
|
|
@@ -46,6 +66,7 @@ from .projection import (
|
|
|
46
66
|
FileSystemProjectionMap,
|
|
47
67
|
FinanceProjectionMap,
|
|
48
68
|
HttpRequestProjectionMap,
|
|
69
|
+
ProjectionAwareToolClassifier,
|
|
49
70
|
ProjectionMap,
|
|
50
71
|
ToolClassifier,
|
|
51
72
|
WebFetchProjectionMap,
|
|
@@ -55,6 +76,7 @@ from .projection import (
|
|
|
55
76
|
compose_projection_maps,
|
|
56
77
|
extract_tool_call_locations,
|
|
57
78
|
)
|
|
79
|
+
from .prompt_capabilities import AdapterPromptCapabilities
|
|
58
80
|
from .providers import (
|
|
59
81
|
ConfigOption,
|
|
60
82
|
ConfigOptionsProvider,
|
|
@@ -73,6 +95,14 @@ from .session import (
|
|
|
73
95
|
MemorySessionStore,
|
|
74
96
|
SessionStore,
|
|
75
97
|
)
|
|
98
|
+
from .slash import (
|
|
99
|
+
SlashCommandHandler,
|
|
100
|
+
SlashCommandProvider,
|
|
101
|
+
SlashCommandRequest,
|
|
102
|
+
SlashCommandResult,
|
|
103
|
+
StaticSlashCommand,
|
|
104
|
+
StaticSlashCommandProvider,
|
|
105
|
+
)
|
|
76
106
|
from .types import (
|
|
77
107
|
AcpAgent,
|
|
78
108
|
AgentPromptBlock,
|
|
@@ -94,8 +124,11 @@ __all__ = (
|
|
|
94
124
|
"AcpAgent",
|
|
95
125
|
"AcpSessionContext",
|
|
96
126
|
"AdapterConfig",
|
|
127
|
+
"AdapterPromptCapabilities",
|
|
97
128
|
"AgentPromptBlock",
|
|
98
129
|
"ApprovalBridge",
|
|
130
|
+
"ApprovalPolicy",
|
|
131
|
+
"ApprovalPolicyStore",
|
|
99
132
|
"CompositeEventProjectionMap",
|
|
100
133
|
"ApprovalDecision",
|
|
101
134
|
"AudioContentBlock",
|
|
@@ -117,7 +150,9 @@ __all__ = (
|
|
|
117
150
|
"DeepAgentsProjectionMap",
|
|
118
151
|
"DeepAgentsCompatibilityBridge",
|
|
119
152
|
"EmbeddedResourceContentBlock",
|
|
153
|
+
"EventEmissionMode",
|
|
120
154
|
"EventProjectionMap",
|
|
155
|
+
"ExternalHookEventBridge",
|
|
121
156
|
"FactoryGraphSource",
|
|
122
157
|
"FileSessionStore",
|
|
123
158
|
"FileSystemProjectionMap",
|
|
@@ -126,6 +161,8 @@ __all__ = (
|
|
|
126
161
|
"GraphBridgeBuilder",
|
|
127
162
|
"GraphBuildContributions",
|
|
128
163
|
"GraphSource",
|
|
164
|
+
"HookEvent",
|
|
165
|
+
"HookProjectionMap",
|
|
129
166
|
"HttpRequestProjectionMap",
|
|
130
167
|
"HttpMcpServer",
|
|
131
168
|
"ImageContentBlock",
|
|
@@ -143,14 +180,27 @@ __all__ = (
|
|
|
143
180
|
"PlanEntry",
|
|
144
181
|
"PlanGenerationType",
|
|
145
182
|
"PlanProvider",
|
|
183
|
+
"ProjectionAwareApprovalBridge",
|
|
184
|
+
"ProjectionAwareToolClassifier",
|
|
146
185
|
"ProjectionMap",
|
|
186
|
+
"PermissionOptionSet",
|
|
187
|
+
"PermissionRequestContext",
|
|
188
|
+
"PermissionToolCallBuilder",
|
|
189
|
+
"DefaultPermissionToolCallBuilder",
|
|
147
190
|
"ResourceContentBlock",
|
|
191
|
+
"SessionMetadataApprovalPolicyStore",
|
|
148
192
|
"SessionModelsProvider",
|
|
149
193
|
"SessionModesProvider",
|
|
150
194
|
"SessionStore",
|
|
151
195
|
"StaticGraphSource",
|
|
152
196
|
"StructuredEventProjectionMap",
|
|
153
197
|
"SseMcpServer",
|
|
198
|
+
"SlashCommandHandler",
|
|
199
|
+
"SlashCommandProvider",
|
|
200
|
+
"SlashCommandRequest",
|
|
201
|
+
"SlashCommandResult",
|
|
202
|
+
"StaticSlashCommand",
|
|
203
|
+
"StaticSlashCommandProvider",
|
|
154
204
|
"TaskPlan",
|
|
155
205
|
"TextContentBlock",
|
|
156
206
|
"TextResourceContents",
|
|
@@ -170,4 +220,5 @@ __all__ = (
|
|
|
170
220
|
"extract_tool_call_locations",
|
|
171
221
|
"native_plan_tools",
|
|
172
222
|
"run_acp",
|
|
223
|
+
"supports_projection_aware_approval_bridge",
|
|
173
224
|
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from __future__ import annotations as _annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Iterable
|
|
4
|
+
|
|
5
|
+
__all__ = (
|
|
6
|
+
"MCP_SERVERS_COMMAND_NAME",
|
|
7
|
+
"MODEL_COMMAND_NAME",
|
|
8
|
+
"RESERVED_SLASH_COMMAND_NAMES",
|
|
9
|
+
"TOOLS_COMMAND_NAME",
|
|
10
|
+
"validate_mode_command_ids",
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
MODEL_COMMAND_NAME = "model"
|
|
14
|
+
TOOLS_COMMAND_NAME = "tools"
|
|
15
|
+
MCP_SERVERS_COMMAND_NAME = "mcp-servers"
|
|
16
|
+
RESERVED_SLASH_COMMAND_NAMES = frozenset(
|
|
17
|
+
{
|
|
18
|
+
MODEL_COMMAND_NAME,
|
|
19
|
+
TOOLS_COMMAND_NAME,
|
|
20
|
+
MCP_SERVERS_COMMAND_NAME,
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def validate_mode_command_ids(mode_ids: Iterable[str]) -> None:
|
|
26
|
+
normalized_ids: list[str] = []
|
|
27
|
+
for mode_id in mode_ids:
|
|
28
|
+
normalized_id = mode_id.strip().lower()
|
|
29
|
+
if not normalized_id:
|
|
30
|
+
raise ValueError("Mode slash command ids must be non-empty after normalization.")
|
|
31
|
+
if any(character.isspace() for character in normalized_id):
|
|
32
|
+
raise ValueError(
|
|
33
|
+
f"Mode slash command id {mode_id!r} cannot contain whitespace after normalization."
|
|
34
|
+
)
|
|
35
|
+
normalized_ids.append(normalized_id)
|
|
36
|
+
duplicate_ids = sorted(
|
|
37
|
+
mode_id for mode_id in set(normalized_ids) if normalized_ids.count(mode_id) > 1
|
|
38
|
+
)
|
|
39
|
+
if duplicate_ids:
|
|
40
|
+
raise ValueError(f"Duplicate ids: {', '.join(duplicate_ids)}.")
|
|
41
|
+
reserved_ids = sorted(set(normalized_ids) & RESERVED_SLASH_COMMAND_NAMES)
|
|
42
|
+
if reserved_ids:
|
|
43
|
+
raise ValueError(
|
|
44
|
+
"Mode slash command ids cannot reuse reserved slash command names "
|
|
45
|
+
f"({', '.join(reserved_ids)})."
|
|
46
|
+
)
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
from __future__ import annotations as _annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Any, Protocol
|
|
5
|
+
|
|
6
|
+
from acp.exceptions import RequestError
|
|
7
|
+
from acp.interfaces import Client as AcpClient
|
|
8
|
+
from acp.schema import PermissionOption
|
|
9
|
+
from typing_extensions import TypeIs
|
|
10
|
+
|
|
11
|
+
from .approval_store import (
|
|
12
|
+
ApprovalPolicy,
|
|
13
|
+
ApprovalPolicyStore,
|
|
14
|
+
PermissionOptionSet,
|
|
15
|
+
SessionMetadataApprovalPolicyStore,
|
|
16
|
+
)
|
|
17
|
+
from .permission_presentation import (
|
|
18
|
+
DefaultPermissionToolCallBuilder,
|
|
19
|
+
PermissionRequestContext,
|
|
20
|
+
PermissionToolCallBuilder,
|
|
21
|
+
)
|
|
22
|
+
from .projection import ProjectionMap, ToolClassifier
|
|
23
|
+
from .session.state import AcpSessionContext
|
|
24
|
+
|
|
25
|
+
__all__ = (
|
|
26
|
+
"ApprovalBridge",
|
|
27
|
+
"ApprovalDecision",
|
|
28
|
+
"NativeApprovalBridge",
|
|
29
|
+
"ProjectionAwareApprovalBridge",
|
|
30
|
+
"supports_projection_aware_approval_bridge",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(slots=True, frozen=True, kw_only=True)
|
|
35
|
+
class ApprovalDecision:
|
|
36
|
+
decisions: list[dict[str, Any]]
|
|
37
|
+
cancelled: bool = False
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class ApprovalBridge(Protocol):
|
|
41
|
+
async def resolve_action_requests(
|
|
42
|
+
self,
|
|
43
|
+
*,
|
|
44
|
+
client: AcpClient,
|
|
45
|
+
session: AcpSessionContext,
|
|
46
|
+
action_requests: list[dict[str, Any]],
|
|
47
|
+
review_configs: list[dict[str, Any]],
|
|
48
|
+
classifier: ToolClassifier,
|
|
49
|
+
) -> ApprovalDecision: ...
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class ProjectionAwareApprovalBridge(Protocol):
|
|
53
|
+
async def resolve_action_requests(
|
|
54
|
+
self,
|
|
55
|
+
*,
|
|
56
|
+
client: AcpClient,
|
|
57
|
+
session: AcpSessionContext,
|
|
58
|
+
action_requests: list[dict[str, Any]],
|
|
59
|
+
review_configs: list[dict[str, Any]],
|
|
60
|
+
classifier: ToolClassifier,
|
|
61
|
+
projection_map: ProjectionMap | None,
|
|
62
|
+
) -> ApprovalDecision: ...
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def supports_projection_aware_approval_bridge(
|
|
66
|
+
bridge: ApprovalBridge | ProjectionAwareApprovalBridge | None,
|
|
67
|
+
) -> TypeIs[ProjectionAwareApprovalBridge]:
|
|
68
|
+
if bridge is None:
|
|
69
|
+
return False
|
|
70
|
+
return hasattr(bridge, "_supports_projection_aware_approval_bridge")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@dataclass(slots=True, kw_only=True)
|
|
74
|
+
class NativeApprovalBridge:
|
|
75
|
+
enable_persistent_choices: bool = False
|
|
76
|
+
option_set: PermissionOptionSet = field(default_factory=PermissionOptionSet)
|
|
77
|
+
policy_store: ApprovalPolicyStore = field(default_factory=SessionMetadataApprovalPolicyStore)
|
|
78
|
+
tool_call_builder: PermissionToolCallBuilder = field(
|
|
79
|
+
default_factory=DefaultPermissionToolCallBuilder
|
|
80
|
+
)
|
|
81
|
+
_supports_projection_aware_approval_bridge: bool = field(
|
|
82
|
+
default=True,
|
|
83
|
+
init=False,
|
|
84
|
+
repr=False,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
async def resolve_action_requests(
|
|
88
|
+
self,
|
|
89
|
+
*,
|
|
90
|
+
client: AcpClient,
|
|
91
|
+
session: AcpSessionContext,
|
|
92
|
+
action_requests: list[dict[str, Any]],
|
|
93
|
+
review_configs: list[dict[str, Any]],
|
|
94
|
+
classifier: ToolClassifier,
|
|
95
|
+
projection_map: ProjectionMap | None = None,
|
|
96
|
+
) -> ApprovalDecision:
|
|
97
|
+
decisions: list[dict[str, Any]] = []
|
|
98
|
+
config_by_action = {
|
|
99
|
+
config.get("action_name"): config
|
|
100
|
+
for config in review_configs
|
|
101
|
+
if isinstance(config, dict)
|
|
102
|
+
}
|
|
103
|
+
for action_request in action_requests:
|
|
104
|
+
if not isinstance(action_request, dict):
|
|
105
|
+
raise RequestError.invalid_request({"action_request": action_request})
|
|
106
|
+
tool_name = action_request.get("name")
|
|
107
|
+
tool_args = action_request.get("args", {})
|
|
108
|
+
if not isinstance(tool_name, str) or not isinstance(tool_args, dict):
|
|
109
|
+
raise RequestError.invalid_request({"action_request": action_request})
|
|
110
|
+
policy_key = classifier.approval_policy_key(tool_name, tool_args)
|
|
111
|
+
remembered_policy = (
|
|
112
|
+
self.policy_store.get_policy(session, policy_key)
|
|
113
|
+
if self.enable_persistent_choices
|
|
114
|
+
else None
|
|
115
|
+
)
|
|
116
|
+
if remembered_policy == "allow":
|
|
117
|
+
decisions.append({"type": "approve"})
|
|
118
|
+
continue
|
|
119
|
+
if remembered_policy == "reject":
|
|
120
|
+
decisions.append({"type": "reject"})
|
|
121
|
+
continue
|
|
122
|
+
review_config = config_by_action.get(tool_name, {})
|
|
123
|
+
allowed_decisions = review_config.get("allowed_decisions", ["approve", "reject"])
|
|
124
|
+
if "edit" in allowed_decisions and set(allowed_decisions) == {"edit"}:
|
|
125
|
+
raise RequestError.invalid_request(
|
|
126
|
+
{"reason": "ACP permission prompts cannot collect edited tool arguments."}
|
|
127
|
+
)
|
|
128
|
+
permission = await client.request_permission(
|
|
129
|
+
session_id=session.session_id,
|
|
130
|
+
options=self._build_permission_options(),
|
|
131
|
+
tool_call=self.tool_call_builder.build_tool_call_update(
|
|
132
|
+
PermissionRequestContext(
|
|
133
|
+
session=session,
|
|
134
|
+
tool_call_id=self._tool_call_id(action_request, tool_name),
|
|
135
|
+
tool_name=tool_name,
|
|
136
|
+
raw_input=tool_args,
|
|
137
|
+
cwd=session.cwd,
|
|
138
|
+
classifier=classifier,
|
|
139
|
+
projection_map=projection_map,
|
|
140
|
+
)
|
|
141
|
+
),
|
|
142
|
+
)
|
|
143
|
+
outcome = permission.outcome
|
|
144
|
+
if outcome.outcome == "cancelled":
|
|
145
|
+
return ApprovalDecision(decisions=decisions, cancelled=True)
|
|
146
|
+
option_id = getattr(outcome, "option_id", None)
|
|
147
|
+
if option_id == "allow_once":
|
|
148
|
+
decisions.append({"type": "approve"})
|
|
149
|
+
continue
|
|
150
|
+
if option_id == "reject_once":
|
|
151
|
+
decisions.append({"type": "reject"})
|
|
152
|
+
continue
|
|
153
|
+
if option_id == "allow_always":
|
|
154
|
+
self._remember_policy(session, policy_key, "allow")
|
|
155
|
+
decisions.append({"type": "approve"})
|
|
156
|
+
continue
|
|
157
|
+
if option_id == "reject_always":
|
|
158
|
+
self._remember_policy(session, policy_key, "reject")
|
|
159
|
+
decisions.append({"type": "reject"})
|
|
160
|
+
continue
|
|
161
|
+
raise RequestError.invalid_request({"optionId": option_id})
|
|
162
|
+
return ApprovalDecision(decisions=decisions)
|
|
163
|
+
|
|
164
|
+
def _build_permission_options(self) -> list[PermissionOption]:
|
|
165
|
+
options = [
|
|
166
|
+
PermissionOption(
|
|
167
|
+
option_id="allow_once",
|
|
168
|
+
name=self.option_set.allow_once_name,
|
|
169
|
+
kind="allow_once",
|
|
170
|
+
),
|
|
171
|
+
PermissionOption(
|
|
172
|
+
option_id="reject_once",
|
|
173
|
+
name=self.option_set.reject_once_name,
|
|
174
|
+
kind="reject_once",
|
|
175
|
+
),
|
|
176
|
+
]
|
|
177
|
+
if self.enable_persistent_choices:
|
|
178
|
+
options.extend(
|
|
179
|
+
[
|
|
180
|
+
PermissionOption(
|
|
181
|
+
option_id="allow_always",
|
|
182
|
+
name=self.option_set.allow_always_name,
|
|
183
|
+
kind="allow_always",
|
|
184
|
+
),
|
|
185
|
+
PermissionOption(
|
|
186
|
+
option_id="reject_always",
|
|
187
|
+
name=self.option_set.reject_always_name,
|
|
188
|
+
kind="reject_always",
|
|
189
|
+
),
|
|
190
|
+
]
|
|
191
|
+
)
|
|
192
|
+
return options
|
|
193
|
+
|
|
194
|
+
def _remember_policy(
|
|
195
|
+
self,
|
|
196
|
+
session: AcpSessionContext,
|
|
197
|
+
policy_key: str,
|
|
198
|
+
policy: ApprovalPolicy,
|
|
199
|
+
) -> None:
|
|
200
|
+
if not self.enable_persistent_choices:
|
|
201
|
+
return
|
|
202
|
+
self.policy_store.set_policy(session, policy_key, policy)
|
|
203
|
+
|
|
204
|
+
def _tool_call_id(self, action_request: dict[str, Any], tool_name: str) -> str:
|
|
205
|
+
action_id = action_request.get("id")
|
|
206
|
+
if isinstance(action_id, str) and action_id:
|
|
207
|
+
return action_id
|
|
208
|
+
return f"hitl:{tool_name}"
|
{acpkit-0.9.2 → acpkit-0.9.3}/packages/adapters/langchain-acp/src/langchain_acp/bridges/__init__.py
RENAMED
|
@@ -8,12 +8,15 @@ from .builtin import (
|
|
|
8
8
|
ModeSelectionBridge,
|
|
9
9
|
ToolSurfaceBridge,
|
|
10
10
|
)
|
|
11
|
+
from .external_hooks import EventEmissionMode, ExternalHookEventBridge
|
|
11
12
|
|
|
12
13
|
__all__ = (
|
|
13
14
|
"BufferedCapabilityBridge",
|
|
14
15
|
"CapabilityBridge",
|
|
15
16
|
"ConfigOptionsBridge",
|
|
16
17
|
"DeepAgentsCompatibilityBridge",
|
|
18
|
+
"EventEmissionMode",
|
|
19
|
+
"ExternalHookEventBridge",
|
|
17
20
|
"ModeSelectionBridge",
|
|
18
21
|
"ModelSelectionBridge",
|
|
19
22
|
"ToolSurfaceBridge",
|