agentengine-sdk-python 0.8.2__py3-none-any.whl → 0.8.4__py3-none-any.whl
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.
- {agentengine_sdk_python-0.8.2.dist-info → agentengine_sdk_python-0.8.4.dist-info}/METADATA +22 -28
- agentengine_sdk_python-0.8.4.dist-info/RECORD +1070 -0
- ksadk/_build_provenance.json +1 -0
- ksadk/agui/_agent_helpers.py +4 -0
- ksadk/api/client.py +108 -91
- ksadk/builders/code_builder.py +36 -9
- ksadk/builders/framework_requirements.py +2 -1
- ksadk/builders/ks3_uploader.py +36 -7
- ksadk/builders/managed_runtime_builder.py +4 -0
- ksadk/cli/__init__.py +38 -3
- ksadk/cli/cmd_managed_runtime.py +13 -1
- ksadk/cli/cmd_plugin.py +662 -0
- ksadk/cli/cmd_web.py +2 -5
- ksadk/cli/runtime_bootstrap.py +23 -1
- ksadk/codex/client.py +424 -96
- ksadk/codex/projection.py +24 -0
- ksadk/codex/runtime.py +83 -283
- ksadk/common/auth.py +16 -10
- ksadk/configs/env_registry.py +59 -3
- ksadk/configs/settings.py +9 -0
- ksadk/context_engine/contributors.py +73 -8
- ksadk/conversations/__init__.py +19 -0
- ksadk/conversations/context.py +104 -24
- ksadk/conversations/contracts.py +266 -0
- ksadk/conversations/message_projection.py +154 -15
- ksadk/conversations/projector.py +614 -0
- ksadk/conversations/reducer.py +98 -0
- ksadk/conversations/runtime_invocation.py +5 -0
- ksadk/conversations/runtime_payloads.py +1 -0
- ksadk/conversations/runtime_preparation.py +30 -27
- ksadk/conversations/runtime_resume.py +50 -2
- ksadk/conversations/runtime_stream_events.py +5 -0
- ksadk/conversations/runtime_streaming.py +25 -7
- ksadk/deployment/env_forward.py +2 -2
- ksadk/deployment/providers/serverless.py +1 -1
- ksadk/events/_v1_compat/projection.py +2 -0
- ksadk/events/adapters/_codex_validators.py +18 -7
- ksadk/events/adapters/codex.py +190 -0
- ksadk/events/adapters/langgraph.py +15 -1
- ksadk/events/canonical_store.py +3 -1
- ksadk/events/projections.py +1 -1
- ksadk/harness/__init__.py +45 -35
- ksadk/harness/config.py +2 -2
- ksadk/harness/runtime.py +75 -16
- ksadk/harness/tools.py +38 -13
- ksadk/interaction/provider.py +1 -0
- ksadk/interaction/providers/langgraph.py +1 -0
- ksadk/kernel/bootstrap.py +28 -4
- ksadk/kernel/contract_fingerprints.py +5 -4
- ksadk/kernel/contracts.py +8 -0
- ksadk/kernel/control.py +1 -0
- ksadk/kernel/ingress.py +36 -2
- ksadk/kernel/memory_store.py +1 -0
- ksadk/kernel/postgres_store.py +1 -0
- ksadk/kernel/sqlite_store.py +28 -0
- ksadk/kernel/store.py +3 -0
- ksadk/kernel/worker.py +76 -10
- ksadk/knowledge_base/client.py +57 -27
- ksadk/mcp_runtime/__init__.py +12 -4
- ksadk/memory/adk/backends/sdk_ltm_backend.py +161 -41
- ksadk/memory/adk/resilient_session_service.py +25 -17
- ksadk/memory/adk/short_term_memory.py +26 -9
- ksadk/memory/models.py +7 -4
- ksadk/memory/provider_resolver.py +3 -0
- ksadk/memory/providers/local_sqlite.py +7 -0
- ksadk/model_proxy/server.py +10 -5
- ksadk/plugins/__init__.py +171 -0
- ksadk/plugins/artifacts.py +275 -0
- ksadk/plugins/bridges/__init__.py +47 -0
- ksadk/plugins/bridges/codex.py +659 -0
- ksadk/plugins/bridges/dsh.py +1300 -0
- ksadk/plugins/builtins.py +746 -0
- ksadk/plugins/bundle.py +246 -0
- ksadk/plugins/bundle_security.py +191 -0
- ksadk/plugins/codex_manifest.py +983 -0
- ksadk/plugins/composition.py +537 -0
- ksadk/plugins/context_contributor.py +437 -0
- ksadk/plugins/contracts.py +569 -0
- ksadk/plugins/delivery.py +153 -0
- ksadk/plugins/dsh_installation_digest.py +71 -0
- ksadk/plugins/dsh_toolchain.py +1024 -0
- ksadk/plugins/ecosystem_bridge.py +1105 -0
- ksadk/plugins/ecosystem_probe.py +191 -0
- ksadk/plugins/host.py +787 -0
- ksadk/plugins/kernel_adapter.py +205 -0
- ksadk/plugins/providers/__init__.py +108 -0
- ksadk/plugins/providers/bundles/dsh-knowledge/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/dsh-knowledge/index.mjs +53 -0
- ksadk/plugins/providers/bundles/dsh-knowledge/package.json +16 -0
- ksadk/plugins/providers/bundles/dsh-memory/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/dsh-memory/index.mjs +175 -0
- ksadk/plugins/providers/bundles/dsh-memory/package.json +16 -0
- ksadk/plugins/providers/bundles/dsh-platform-resources/client.mjs +166 -0
- ksadk/plugins/providers/bundles/dsh-platform-resources/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/dsh-platform-resources/index.mjs +9 -0
- ksadk/plugins/providers/bundles/dsh-platform-resources/package.json +12 -0
- ksadk/plugins/providers/bundles/dsh-skill-center/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/dsh-skill-center/index.mjs +125 -0
- ksadk/plugins/providers/bundles/dsh-skill-center/package.json +16 -0
- ksadk/plugins/providers/bundles/ksadk-codex/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/ksadk-codex/index.mjs +18 -0
- ksadk/plugins/providers/bundles/ksadk-codex/package.json +19 -0
- ksadk/plugins/providers/bundles/ksadk-dsh-capability-host/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/ksadk-dsh-capability-host/index.mjs +870 -0
- ksadk/plugins/providers/bundles/ksadk-dsh-capability-host/package.json +27 -0
- ksadk/plugins/providers/bundles/ksadk-dsh-studio/client.js +92 -0
- ksadk/plugins/providers/bundles/ksadk-dsh-studio/index.mjs +15 -0
- ksadk/plugins/providers/bundles/ksadk-dsh-studio/package.json +7 -0
- ksadk/plugins/providers/bundles/ksadk-harness/cordis.patch.yml +3 -0
- ksadk/plugins/providers/bundles/ksadk-harness/index.mjs +19 -0
- ksadk/plugins/providers/bundles/ksadk-harness/package.json +19 -0
- ksadk/plugins/providers/codex.py +988 -0
- ksadk/plugins/providers/codex_dsh.py +83 -0
- ksadk/plugins/providers/codex_native.py +368 -0
- ksadk/plugins/providers/codex_turn.py +301 -0
- ksadk/plugins/providers/dsh.py +951 -0
- ksadk/plugins/providers/dsh_capabilities.py +1389 -0
- ksadk/plugins/providers/dsh_descriptor_host.py +226 -0
- ksadk/plugins/providers/dsh_mcp.py +467 -0
- ksadk/plugins/providers/harness.py +632 -0
- ksadk/plugins/providers/harness_dsh.py +91 -0
- ksadk/plugins/providers/legacy.py +215 -0
- ksadk/plugins/providers/legacy_catalog.py +100 -0
- ksadk/plugins/providers/mcp_projection.py +150 -0
- ksadk/plugins/providers/platform_resources.py +657 -0
- ksadk/plugins/providers/shipped_dsh.py +370 -0
- ksadk/plugins/resolver.py +338 -0
- ksadk/plugins/subagent_providers/__init__.py +12 -0
- ksadk/plugins/subagent_providers/codex.py +443 -0
- ksadk/plugins/subagents.py +333 -0
- ksadk/resource_runtime/__init__.py +4 -0
- ksadk/resource_runtime/broker.py +616 -0
- ksadk/resource_runtime/build_artifacts.py +165 -0
- ksadk/resource_runtime/contracts.py +138 -0
- ksadk/resource_runtime/discovery_receipts.py +100 -0
- ksadk/resource_runtime/discovery_skills.py +172 -0
- ksadk/resource_runtime/errors.py +6 -0
- ksadk/resource_runtime/ipc.py +142 -0
- ksadk/resource_runtime/kernel_approval.py +165 -0
- ksadk/resource_runtime/knowledge.py +114 -0
- ksadk/resource_runtime/langgraph.py +94 -0
- ksadk/resource_runtime/leases.py +191 -0
- ksadk/resource_runtime/managed_projection.py +186 -0
- ksadk/resource_runtime/mcp_server.py +138 -0
- ksadk/resource_runtime/memory_provider.py +318 -0
- ksadk/resource_runtime/memory_receipts.py +34 -0
- ksadk/resource_runtime/operation_ledger.py +211 -0
- ksadk/resource_runtime/plugin_config.py +48 -0
- ksadk/resource_runtime/policy_authorization.py +54 -0
- ksadk/resource_runtime/process.py +110 -0
- ksadk/resource_runtime/skill_artifacts.py +153 -0
- ksadk/resource_runtime/skill_runtime.py +42 -0
- ksadk/resource_runtime/skill_workspace.py +118 -0
- ksadk/resource_runtime/skills.py +215 -0
- ksadk/resource_runtime/snapshots.py +180 -0
- ksadk/resource_runtime/socket_server.py +103 -0
- ksadk/resource_runtime/supervisor.py +380 -0
- ksadk/resource_runtime/worker.py +504 -0
- ksadk/runners/_langgraph_runner_streams.py +74 -6
- ksadk/runners/adk_runner.py +149 -11
- ksadk/runners/base_runner.py +29 -1
- ksadk/runners/langgraph_runner.py +475 -145
- ksadk/runtime/_runner_adapter/stream_mapping.py +193 -60
- ksadk/runtime/adapter.py +3 -0
- ksadk/runtime/conversation_execution.py +92 -16
- ksadk/runtime/executor.py +78 -2
- ksadk/runtime/factory.py +30 -200
- ksadk/runtime/framework_adapters.py +41 -0
- ksadk/runtime/preprocessing.py +10 -2
- ksadk/runtime/runner_adapter.py +78 -14
- ksadk/runtime_context.py +40 -2
- ksadk/sandbox/__init__.py +2 -1
- ksadk/sandbox/backends/e2b.py +52 -11
- ksadk/sandbox/backends/local_process.py +9 -0
- ksadk/sandbox/base.py +2 -0
- ksadk/sandbox/e2b_connection.py +66 -0
- ksadk/sandbox/factory.py +72 -0
- ksadk/scheduler/__init__.py +18 -0
- ksadk/scheduler/calendar.py +102 -0
- ksadk/scheduler/contracts.py +254 -0
- ksadk/scheduler/dispatcher.py +129 -0
- ksadk/scheduler/engine.py +416 -0
- ksadk/scheduler/sqlite_store.py +581 -0
- ksadk/server/composition.py +2 -0
- ksadk/server/factory.py +5 -0
- ksadk/server/persistence_capability.py +516 -0
- ksadk/server/routes/control.py +210 -46
- ksadk/server/routes/dependencies.py +15 -0
- ksadk/server/routes/models.py +47 -4
- ksadk/server/routes/projection.py +252 -12
- ksadk/server/routes/sessions.py +284 -107
- ksadk/server/routes/streaming.py +43 -9
- ksadk/server/static/assets/{ArtifactsPanel-DSU1sWD_.js → ArtifactsPanel-CGbWlMNh.js} +1 -1
- ksadk/server/static/assets/{CodeBlock-DOH6MVcn.js → CodeBlock-b4C7upmO.js} +3 -3
- ksadk/server/static/assets/{MathMessageMarkdown-BL8my1R2.js → MathMessageMarkdown-DbdW5A4_.js} +4 -4
- ksadk/server/static/assets/{MermaidBlock-Dz4IP-Tx.js → MermaidBlock-BEBN4Ksz.js} +6 -6
- ksadk/server/static/assets/{NativeTerminalPanel-DUrK0JpZ.js → NativeTerminalPanel-zvL-WpAn.js} +1 -1
- ksadk/server/static/assets/{abnfDiagram-VCTEODGH-g20pFzNV.js → abnfDiagram-VCTEODGH-BYafW7Za.js} +1 -1
- ksadk/server/static/assets/{arc-C4FzinUA.js → arc-bTohInsS.js} +1 -1
- ksadk/server/static/assets/architecture-7GRP2DOG-BW5UtSnx.js +1 -0
- ksadk/server/static/assets/{architectureDiagram-5GKGNRK7-DpIqL5h4.js → architectureDiagram-5GKGNRK7-Ch5Lbzsi.js} +1 -1
- ksadk/server/static/assets/{blockDiagram-NRAW4CY4-BjkljTNz.js → blockDiagram-NRAW4CY4-kqF4MDOG.js} +1 -1
- ksadk/server/static/assets/{c4Diagram-UCG6FXSJ-Dk_ieq2X.js → c4Diagram-UCG6FXSJ-8uSRIODv.js} +1 -1
- ksadk/server/static/assets/channel-CF5Up3hQ.js +1 -0
- ksadk/server/static/assets/chunk-2Q5K7J3B-KkXX47WI.js +1 -0
- ksadk/server/static/assets/{chunk-5VM5RSS4-BVHAchFb.js → chunk-5VM5RSS4-DkhehZDr.js} +1 -1
- ksadk/server/static/assets/{chunk-F27PBJKO-C-ipQzuS.js → chunk-F27PBJKO-BdXhtPe9.js} +1 -1
- ksadk/server/static/assets/{chunk-G27WJ6UU-C2EyJbIK.js → chunk-G27WJ6UU-DPTpvpwi.js} +1 -1
- ksadk/server/static/assets/{chunk-JWPE2WC7-vYvVJb_M.js → chunk-JWPE2WC7-Pqoh38el.js} +1 -1
- ksadk/server/static/assets/{chunk-LCL6LL3I-BcI6ysPT.js → chunk-LCL6LL3I-DeU00qC-.js} +1 -1
- ksadk/server/static/assets/{chunk-POPQ4Y6H-C030x_Z1.js → chunk-POPQ4Y6H-CzxScFkr.js} +1 -1
- ksadk/server/static/assets/{chunk-RHFEMEQ7-yyGpsz4n.js → chunk-RHFEMEQ7-DpqMx-ux.js} +1 -1
- ksadk/server/static/assets/{chunk-SVP7TREG-BLTlmMU7.js → chunk-SVP7TREG-C6t0SypQ.js} +1 -1
- ksadk/server/static/assets/{chunk-XXDRQBXY-C_32ArgP.js → chunk-XXDRQBXY-DVaeafZk.js} +1 -1
- ksadk/server/static/assets/classDiagram-DTDB5LWJ-Cz81acRQ.js +1 -0
- ksadk/server/static/assets/classDiagram-v2-JRS7N3AN-Cz81acRQ.js +1 -0
- ksadk/server/static/assets/{cose-bilkent-JH36ORCC-9YQYwdl0.js → cose-bilkent-JH36ORCC-Bf9D3tzJ.js} +1 -1
- ksadk/server/static/assets/cynefin-OW5HDTMX-DVWs8a2t.js +1 -0
- ksadk/server/static/assets/{cynefinDiagram-5FMLGOSQ-ErLF5N13.js → cynefinDiagram-5FMLGOSQ-B9cY3iTz.js} +1 -1
- ksadk/server/static/assets/{dagre-3AP2YEHR-DFiQF-6f.js → dagre-3AP2YEHR-CSwlx3CB.js} +1 -1
- ksadk/server/static/assets/{dagre-BuhGnRI1.js → dagre-UBpgon5q.js} +1 -1
- ksadk/server/static/assets/{diagram-S7CK7UJ4-Bt1v8-GC.js → diagram-S7CK7UJ4-C9akhN9a.js} +1 -1
- ksadk/server/static/assets/{diagram-UQ7AKVKN-DSCxJdBK.js → diagram-UQ7AKVKN-CgedhTPI.js} +1 -1
- ksadk/server/static/assets/{diagram-VSXAHHWV-DHfYwp_9.js → diagram-VSXAHHWV-Cjucz5BY.js} +1 -1
- ksadk/server/static/assets/{diagram-VX7I27RA-DdzD-4Le.js → diagram-VX7I27RA-Dd4Vleyn.js} +1 -1
- ksadk/server/static/assets/{diagram-Z3DM3KII-Du-nAJ9F.js → diagram-Z3DM3KII-CZ2jGtYW.js} +1 -1
- ksadk/server/static/assets/{dist-B7seoj3d.js → dist-B2_CVgKv.js} +1 -1
- ksadk/server/static/assets/{dist-CSh_DE14.js → dist-B3FR1SKK.js} +1 -1
- ksadk/server/static/assets/{dist-DUX-id_F.js → dist-BIr4DSRq.js} +1 -1
- ksadk/server/static/assets/{dist-C_wsv-Qd.js → dist-BgV_owcB.js} +1 -1
- ksadk/server/static/assets/{dist-W-TIVntx.js → dist-Bj730Ib4.js} +1 -1
- ksadk/server/static/assets/{dist-BytlxIDT.js → dist-BnaTiyzN.js} +1 -1
- ksadk/server/static/assets/{dist-CXYYBw3_.js → dist-C1NMAY5a.js} +1 -1
- ksadk/server/static/assets/{dist-dDdADKFA.js → dist-C5_ZAZsG.js} +1 -1
- ksadk/server/static/assets/{dist-BVDffZ0U.js → dist-CB9iJrvg.js} +1 -1
- ksadk/server/static/assets/{dist-Bf2M8m3N.js → dist-CFzsn6BG.js} +1 -1
- ksadk/server/static/assets/{dist-ngtN0DJB.js → dist-Cf125P_m.js} +1 -1
- ksadk/server/static/assets/{dist-BE7bu-DL.js → dist-ClYUxfeK.js} +1 -1
- ksadk/server/static/assets/{dist-DNp6rLRA.js → dist-DFD6Qa6T.js} +1 -1
- ksadk/server/static/assets/{dist-BX8z72IC.js → dist-DVCOWtha.js} +1 -1
- ksadk/server/static/assets/{dist-dydu68Fl.js → dist-D_ctSS2i.js} +1 -1
- ksadk/server/static/assets/{dist-ClxGviKw.js → dist-DiixqL0J.js} +1 -1
- ksadk/server/static/assets/{dist-BjU6y-A2.js → dist-DoVSwoDb.js} +1 -1
- ksadk/server/static/assets/{dist-Dq9gLD7L.js → dist-DvFK7p5S.js} +1 -1
- ksadk/server/static/assets/{dist-8hqcx0sU.js → dist-QfkEHOlb.js} +1 -1
- ksadk/server/static/assets/{dist-CttYUqzS.js → dist-btbmmX5O.js} +1 -1
- ksadk/server/static/assets/{dist-DmldrHd_.js → dist-fBO2v5Kt.js} +1 -1
- ksadk/server/static/assets/{dist-DnfXs8Vn.js → dist-ufY3F5p6.js} +1 -1
- ksadk/server/static/assets/{ebnfDiagram-PWID7BFC-Da9C9NO1.js → ebnfDiagram-PWID7BFC-Ci8NqqZu.js} +1 -1
- ksadk/server/static/assets/{erDiagram-SSCWMZ5O-EAGqqR79.js → erDiagram-SSCWMZ5O-CCIOhLZG.js} +1 -1
- ksadk/server/static/assets/eventmodeling-NTZA5JFV-CQqR2hg3.js +1 -0
- ksadk/server/static/assets/flowDiagram-A5DVABFB-DDRRbGPm.js +1 -0
- ksadk/server/static/assets/{ganttDiagram-EL5Y4UJY-DqJsKb59.js → ganttDiagram-EL5Y4UJY-Cp_r9Hb6.js} +1 -1
- ksadk/server/static/assets/gitGraph-4MIJSDKK-fgWEf7UD.js +1 -0
- ksadk/server/static/assets/{gitGraphDiagram-WWUBYQGX-B6g4dtDi.js → gitGraphDiagram-WWUBYQGX-Dlhc8Wr8.js} +1 -1
- ksadk/server/static/assets/index-DcTML1Up.css +2 -0
- ksadk/server/static/assets/index-Dh2XHqPK.js +244 -0
- ksadk/server/static/assets/info-A6RAGUB7-BUecLTdt.js +1 -0
- ksadk/server/static/assets/{infoDiagram-RXCK75RN-Djm_nbd5.js → infoDiagram-RXCK75RN-CO0rRTRA.js} +1 -1
- ksadk/server/static/assets/{ishikawaDiagram-5VMMS53U-DWya9SG2.js → ishikawaDiagram-5VMMS53U-CHiaedSS.js} +1 -1
- ksadk/server/static/assets/{journeyDiagram-EYS64GPL-DutxhSNI.js → journeyDiagram-EYS64GPL-CHcCIB09.js} +1 -1
- ksadk/server/static/assets/{kanban-definition-3QL26DDD-DJdOF8Fm.js → kanban-definition-3QL26DDD-CJ_ebBZf.js} +1 -1
- ksadk/server/static/assets/{katex-vFWytM5c.js → katex-B4weu383.js} +1 -1
- ksadk/server/static/assets/{linear-BHjG8b-J.js → linear-V-MgYHW1.js} +1 -1
- ksadk/server/static/assets/{mermaid-parser.core-KGSy4jWT.js → mermaid-parser.core-CBijEX_c.js} +2 -2
- ksadk/server/static/assets/{mindmap-definition-FBJOCRG2-9-HC88D4.js → mindmap-definition-FBJOCRG2-Bc-pQvpp.js} +1 -1
- ksadk/server/static/assets/packet-AYTQ26CC-BeW-btFv.js +1 -0
- ksadk/server/static/assets/{pegDiagram-XKGWAZYB-DrEZd4fD.js → pegDiagram-XKGWAZYB-D7genGLl.js} +1 -1
- ksadk/server/static/assets/pie-WAS4IAKB-X0xh4SaT.js +1 -0
- ksadk/server/static/assets/{pieDiagram-E7YTZNPT-DpjqOFFp.js → pieDiagram-E7YTZNPT-Bxj32zwD.js} +1 -1
- ksadk/server/static/assets/{quadrantDiagram-AXDQQJYC-BiNhgOXX.js → quadrantDiagram-AXDQQJYC-BURv2mGh.js} +1 -1
- ksadk/server/static/assets/radar-RG4KPBEZ-DzRMSqjd.js +1 -0
- ksadk/server/static/assets/railroad-74A4TZTK-Cc44icX-.js +1 -0
- ksadk/server/static/assets/railroad-abnf-HS5TGJTU-D6S4BdV-.js +1 -0
- ksadk/server/static/assets/railroad-ebnf-LZEXJU2U-vD3aVE2o.js +1 -0
- ksadk/server/static/assets/railroad-peg-WCYAUIDC-CYbW_b4T.js +1 -0
- ksadk/server/static/assets/{railroadDiagram-O6MQD6OU-_Y3Ojg6G.js → railroadDiagram-O6MQD6OU-CCsh3avW.js} +1 -1
- ksadk/server/static/assets/{requirementDiagram-EFPCY7ZU-DeCFdg9K.js → requirementDiagram-EFPCY7ZU-_FRRBKEd.js} +1 -1
- ksadk/server/static/assets/{sankeyDiagram-P5KCCOFB-CPH75rhw.js → sankeyDiagram-P5KCCOFB-C-gr2o9M.js} +1 -1
- ksadk/server/static/assets/{sequenceDiagram-WJ2MYXX4-OEpQQdr4.js → sequenceDiagram-WJ2MYXX4-D97NmfKg.js} +1 -1
- ksadk/server/static/assets/{sizeCapture-X5ZJPWSS-heUErzhI.js → sizeCapture-X5ZJPWSS-DjrPC5FX.js} +1 -1
- ksadk/server/static/assets/{stateDiagram-HBIQ2CUA-DvA3jSMB.js → stateDiagram-HBIQ2CUA-DzMNg1hh.js} +1 -1
- ksadk/server/static/assets/stateDiagram-v2-4QOOHH4V-BIcjKFhF.js +1 -0
- ksadk/server/static/assets/{swimlanes-XN3QIQJK-CR-dfN_t.js → swimlanes-XN3QIQJK-Cssf_CsU.js} +1 -1
- ksadk/server/static/assets/swimlanesDiagram-VK2B7HYN-tq3K3Ybl.js +8 -0
- ksadk/server/static/assets/{timeline-definition-24CTP7MA-DAVJf1TX.js → timeline-definition-24CTP7MA-BWTHzyS1.js} +1 -1
- ksadk/server/static/assets/treeView-Q6P3EWNA-DBXt3GdU.js +1 -0
- ksadk/server/static/assets/treemap-WGGIJYW6-DrCy4E_l.js +1 -0
- ksadk/server/static/assets/{vennDiagram-4TSXK5OY-DwM8eDkh.js → vennDiagram-4TSXK5OY-BSKgJsmR.js} +1 -1
- ksadk/server/static/assets/wardley-WFR3VGLG-CefhOliM.js +1 -0
- ksadk/server/static/assets/{wardleyDiagram-VM6X3IG4-DZL-Zz2t.js → wardleyDiagram-VM6X3IG4-eflHNoaZ.js} +1 -1
- ksadk/server/static/assets/{xychartDiagram-S5SC5T6Z-Dy6Yh_hu.js → xychartDiagram-S5SC5T6Z-eYqrQ-v4.js} +1 -1
- ksadk/server/static/index.html +2 -2
- ksadk/session_context.py +66 -0
- ksadk/sessions/__init__.py +11 -21
- ksadk/sessions/_local_service_sync.py +263 -1
- ksadk/sessions/base.py +176 -0
- ksadk/sessions/errors.py +4 -0
- ksadk/sessions/in_memory.py +309 -19
- ksadk/sessions/local_service.py +83 -1
- ksadk/sessions/persistence.py +275 -0
- ksadk/sessions/postgres_service.py +358 -0
- ksadk/sessions/resilience.py +8 -0
- ksadk/sessions/resilient.py +362 -4
- ksadk/sessions/topology.py +135 -0
- ksadk/skills/models.py +26 -4
- ksadk/skills/package_store.py +186 -38
- ksadk/skills/runtime/agent.py +31 -6
- ksadk/skills/runtime/artifact_delivery.py +139 -0
- ksadk/skills/runtime/backends/e2b.py +98 -6
- ksadk/skills/runtime/backends/local.py +73 -8
- ksadk/skills/runtime/base.py +3 -0
- ksadk/skills/runtime/executor.py +2 -0
- ksadk/skills/runtime/loader.py +10 -2
- ksadk/skills/runtime/pinned.py +114 -0
- ksadk/skills/runtime/request.py +31 -0
- ksadk/skills/service_client.py +211 -24
- ksadk/studio/agent_lifecycle.py +26 -20
- ksadk/studio/api.py +714 -90
- ksadk/studio/api_catalog_routes.py +23 -0
- ksadk/studio/api_contracts.py +34 -1
- ksadk/studio/api_plugin_routes.py +911 -0
- ksadk/studio/api_resource_connections.py +183 -0
- ksadk/studio/attachment_store.py +187 -0
- ksadk/studio/authoring.py +10 -4
- ksadk/studio/authoring_coordinator.py +31 -16
- ksadk/studio/builder.py +199 -43
- ksadk/studio/cloud.py +346 -104
- ksadk/studio/cloud_shared_web.py +565 -0
- ksadk/studio/codex_agent_service.py +140 -27
- ksadk/studio/codex_builder.py +294 -16
- ksadk/studio/codex_credentials.py +90 -0
- ksadk/studio/codex_manifest.py +51 -4
- ksadk/studio/codex_plugin_store.py +746 -0
- ksadk/studio/codex_provider_build.py +231 -0
- ksadk/studio/codex_run.py +200 -29
- ksadk/studio/compatibility_report.py +456 -0
- ksadk/studio/compiler.py +84 -15
- ksadk/studio/contracts.py +249 -4
- ksadk/studio/dsh_application.py +137 -0
- ksadk/studio/dsh_capability_service.py +1107 -0
- ksadk/studio/dsh_models.py +59 -0
- ksadk/studio/dsh_provider_registration.py +1075 -0
- ksadk/studio/event_store.py +54 -6
- ksadk/studio/framework_run.py +37 -4
- ksadk/studio/hosted_kernel.py +89 -14
- ksadk/studio/mcp_runtime.py +11 -3
- ksadk/studio/model_client.py +2 -2
- ksadk/studio/operations.py +12 -2
- ksadk/studio/plugin_composition.py +468 -0
- ksadk/studio/plugin_kernel_adapter.py +28 -0
- ksadk/studio/plugin_runtime.py +831 -0
- ksadk/studio/resource_authority.py +637 -0
- ksadk/studio/resource_binding_validation.py +77 -0
- ksadk/studio/resource_build_admission.py +196 -0
- ksadk/studio/resource_build_materializer.py +149 -0
- ksadk/studio/resource_catalog.py +149 -3
- ksadk/studio/resource_connections.py +220 -0
- ksadk/studio/run_service.py +1144 -96
- ksadk/studio/runtime_source.py +24 -8
- ksadk/studio/scheduler_assistant.py +317 -0
- ksadk/studio/scheduler_runtime.py +383 -0
- ksadk/studio/scheduler_service.py +214 -0
- ksadk/studio/service.py +1131 -95
- ksadk/studio/shared_web.py +610 -87
- ksadk/studio/soul.py +52 -0
- ksadk/studio/static/assets/CodeBlock-DCUUY0PL-BLjA7kbS.js +41 -0
- ksadk/studio/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- ksadk/studio/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- ksadk/studio/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- ksadk/studio/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- ksadk/studio/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- ksadk/studio/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- ksadk/studio/static/assets/MathMessageMarkdown-CBcDrAw--BEOyPC3w.css +1 -0
- ksadk/studio/static/assets/MathMessageMarkdown-CBcDrAw--CUYIXwgI.js +8 -0
- ksadk/studio/static/assets/MermaidBlock-DBFTztfQ-BTYKWEbD.js +44 -0
- ksadk/studio/static/assets/PrismRenderer-wiXRHURw.js +3 -0
- ksadk/studio/static/assets/abnfDiagram-VCTEODGH-CLETGjKq.js +1 -0
- ksadk/studio/static/assets/arc-Pry-7G1_.js +1 -0
- ksadk/studio/static/assets/architecture-7GRP2DOG-hXMiO_AU.js +1 -0
- ksadk/studio/static/assets/architectureDiagram-5GKGNRK7-B5EQysk6.js +36 -0
- ksadk/studio/static/assets/array-BifhSqXX.js +1 -0
- ksadk/studio/static/assets/blockDiagram-I7D4REHJ-CFmPl1de.js +129 -0
- ksadk/studio/static/assets/c4Diagram-7LVT6UL2-BRrGu8qt.js +38 -0
- ksadk/studio/static/assets/channel-BqO-gtEw.js +1 -0
- ksadk/studio/static/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- ksadk/studio/static/assets/chunk-4HAMMTFA-D220vUtq.js +62 -0
- ksadk/studio/static/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- ksadk/studio/static/assets/chunk-75Z2AOVW-C8lLv_qc.js +2 -0
- ksadk/studio/static/assets/chunk-DU6HZSFF-C4DtVpCu.js +128 -0
- ksadk/studio/static/assets/chunk-F27PBJKO-Cpw14SNG.js +1 -0
- ksadk/studio/static/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
- ksadk/studio/static/assets/chunk-GMAD6QVW-DiQA-u2N.js +72 -0
- ksadk/studio/static/assets/chunk-GVQU2GXP-DUdNBUCi.js +1 -0
- ksadk/studio/static/assets/chunk-IMKFNOWR-BSlbjT_b.js +231 -0
- ksadk/studio/static/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- ksadk/studio/static/assets/chunk-L3NEJ4N5-Db8Ab22W.js +1 -0
- ksadk/studio/static/assets/chunk-OSK3NFVY-M2m6G3j4.js +10 -0
- ksadk/studio/static/assets/chunk-P2QGCYS3-DezaQxiK.js +1 -0
- ksadk/studio/static/assets/chunk-POPQ4Y6H-DOpufJ3t.js +1 -0
- ksadk/studio/static/assets/chunk-PWAF6VOD-CfLb1gSc.js +1 -0
- ksadk/studio/static/assets/chunk-SHT3W25Y-DAyIVp5H.js +168 -0
- ksadk/studio/static/assets/chunk-SVP7TREG-DulomOrS.js +88 -0
- ksadk/studio/static/assets/chunk-TICWLB2K-bHJYoflj.js +206 -0
- ksadk/studio/static/assets/chunk-XXDRQBXY-7PcdR2B1.js +1 -0
- ksadk/studio/static/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- ksadk/studio/static/assets/classDiagram-ZZMXUADV-D_bW8JjA.js +1 -0
- ksadk/studio/static/assets/classDiagram-v2-VYDZK3BY-D_bW8JjA.js +1 -0
- ksadk/studio/static/assets/cose-bilkent-JH36ORCC-snL88wkX.js +1 -0
- ksadk/studio/static/assets/cynefin-OW5HDTMX-Bd1YhRo1.js +1 -0
- ksadk/studio/static/assets/cynefinDiagram-5FMLGOSQ-BBrIG_mI.js +62 -0
- ksadk/studio/static/assets/cytoscape.esm-CGd-uY3x.js +321 -0
- ksadk/studio/static/assets/dagre-GXQ25YYZ-DtF1nGdY.js +4 -0
- ksadk/studio/static/assets/dagre-PrKaheQc.js +1 -0
- ksadk/studio/static/assets/defaultLocale-BFoDCU3G.js +1 -0
- ksadk/studio/static/assets/diagram-S7CK7UJ4-0BZ98mya.js +30 -0
- ksadk/studio/static/assets/diagram-UQ7AKVKN-6mLKEo6L.js +41 -0
- ksadk/studio/static/assets/diagram-VSXAHHWV-CJBIaiZ2.js +3 -0
- ksadk/studio/static/assets/diagram-VX7I27RA-BohLEE1C.js +24 -0
- ksadk/studio/static/assets/diagram-Z3DM3KII-D8KIGonG.js +24 -0
- ksadk/studio/static/assets/dist-v5Q1xZ2K.js +1 -0
- ksadk/studio/static/assets/ebnfDiagram-PWID7BFC-C99HU61t.js +1 -0
- ksadk/studio/static/assets/erDiagram-RLTQ6QDP-DLGry2Ap.js +99 -0
- ksadk/studio/static/assets/eventmodeling-NTZA5JFV-B1_5Ac8j.js +1 -0
- ksadk/studio/static/assets/flowDiagram-HODETNUW-DD5hmicn.js +1 -0
- ksadk/studio/static/assets/ganttDiagram-EL5Y4UJY-BPJrVLSG.js +292 -0
- ksadk/studio/static/assets/gitGraph-4MIJSDKK-Cy_ZQBGi.js +1 -0
- ksadk/studio/static/assets/gitGraphDiagram-WWUBYQGX-CZCUz4MT.js +106 -0
- ksadk/studio/static/assets/graphlib-DS17s2tU.js +1 -0
- ksadk/studio/static/assets/index-CeHL9ARV.css +2 -0
- ksadk/studio/static/assets/index-D9QEcVpL.js +320 -0
- ksadk/studio/static/assets/info-A6RAGUB7-DBzDQB_I.js +1 -0
- ksadk/studio/static/assets/infoDiagram-27XIBGKW-B-sq07Hi.js +2 -0
- ksadk/studio/static/assets/init-C-OQMol4.js +1 -0
- ksadk/studio/static/assets/ishikawaDiagram-5VMMS53U-CljI2wyf.js +70 -0
- ksadk/studio/static/assets/journeyDiagram-3NMN7TZE-D50Fo2sL.js +139 -0
- ksadk/studio/static/assets/kanban-definition-UXKFOSKX-DimfOTam.js +89 -0
- ksadk/studio/static/assets/katex-DhON-x74.js +257 -0
- ksadk/studio/static/assets/line-CX5BOOUP.js +1 -0
- ksadk/studio/static/assets/linear-BCxN9JLv.js +1 -0
- ksadk/studio/static/assets/mermaid-parser.core-BdCz8fkS.js +7 -0
- ksadk/studio/static/assets/mindmap-definition-YA3MSWOX-Bizzqy5R.js +96 -0
- ksadk/studio/static/assets/ordinal-BDEzSJ7C.js +1 -0
- ksadk/studio/static/assets/packet-AYTQ26CC-gPln-_kG.js +1 -0
- ksadk/studio/static/assets/path-fybaL0A-.js +1 -0
- ksadk/studio/static/assets/pegDiagram-XKGWAZYB-Dy3fB-gW.js +1 -0
- ksadk/studio/static/assets/pie-WAS4IAKB-qZdHMr7B.js +1 -0
- ksadk/studio/static/assets/pieDiagram-E7YTZNPT-B9mrFSDF.js +39 -0
- ksadk/studio/static/assets/quadrantDiagram-AXDQQJYC-NzUfCbMR.js +7 -0
- ksadk/studio/static/assets/radar-RG4KPBEZ-BZlnaea9.js +1 -0
- ksadk/studio/static/assets/railroad-74A4TZTK-Ce3__H9c.js +1 -0
- ksadk/studio/static/assets/railroad-abnf-HS5TGJTU-DqQn7EzD.js +1 -0
- ksadk/studio/static/assets/railroad-ebnf-LZEXJU2U-B55kCA8F.js +1 -0
- ksadk/studio/static/assets/railroad-peg-WCYAUIDC-DfQnvkHd.js +1 -0
- ksadk/studio/static/assets/railroadDiagram-O6MQD6OU-DnhMjZCk.js +1 -0
- ksadk/studio/static/assets/requirementDiagram-BXWQKSXE-BF3d103U.js +84 -0
- ksadk/studio/static/assets/rolldown-runtime-Dy4uBu1J-DK3Fl9T5.js +1 -0
- ksadk/studio/static/assets/rough.esm-Dy-Kn_BL.js +1 -0
- ksadk/studio/static/assets/sankeyDiagram-P5KCCOFB-Bo-JTwt0.js +40 -0
- ksadk/studio/static/assets/sequenceDiagram-WJ2MYXX4-Dh4wZtUm.js +162 -0
- ksadk/studio/static/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- ksadk/studio/static/assets/src-SFn9St9H.js +1 -0
- ksadk/studio/static/assets/stateDiagram-D77RDMKH-DH774G6d.js +1 -0
- ksadk/studio/static/assets/stateDiagram-v2-MP3YSRHH-DZvVWPBo.js +1 -0
- ksadk/studio/static/assets/swimlanes-42K2YHIH-Bl13OvTX.js +1 -0
- ksadk/studio/static/assets/swimlanesDiagram-VR7AAH4N-BnFOTALJ.js +8 -0
- ksadk/studio/static/assets/timeline-definition-24CTP7MA-DxmSSjRB.js +120 -0
- ksadk/studio/static/assets/treeView-Q6P3EWNA-D5Nn9Swz.js +1 -0
- ksadk/studio/static/assets/treemap-WGGIJYW6-CgHgnQhE.js +1 -0
- ksadk/studio/static/assets/vennDiagram-4TSXK5OY-B9QEXcJq.js +34 -0
- ksadk/studio/static/assets/wardley-WFR3VGLG-DXrK2RRY.js +1 -0
- ksadk/studio/static/assets/wardleyDiagram-VM6X3IG4-Ba1AOWoe.js +78 -0
- ksadk/studio/static/assets/xychartDiagram-S5SC5T6Z-Cr5pt5Y-.js +7 -0
- ksadk/studio/static/index.html +2 -2
- ksadk/studio/validator.py +1 -1
- ksadk/studio/workspace.py +1 -0
- ksadk/version.py +1 -1
- ksadk_runtime_common/workspace_files/path_utils.py +41 -0
- agentengine_sdk_python-0.8.2.dist-info/RECORD +0 -778
- ksadk/server/static/assets/architecture-7GRP2DOG-DjKratdf.js +0 -1
- ksadk/server/static/assets/channel-4cQHKtx1.js +0 -1
- ksadk/server/static/assets/chunk-2Q5K7J3B-DmgWkESh.js +0 -1
- ksadk/server/static/assets/classDiagram-DTDB5LWJ-DLFd9Xi0.js +0 -1
- ksadk/server/static/assets/classDiagram-v2-JRS7N3AN-DLFd9Xi0.js +0 -1
- ksadk/server/static/assets/cynefin-OW5HDTMX-DjEM48Qp.js +0 -1
- ksadk/server/static/assets/eventmodeling-NTZA5JFV-CMgMaJrC.js +0 -1
- ksadk/server/static/assets/flowDiagram-A5DVABFB-BBKL0x3P.js +0 -1
- ksadk/server/static/assets/gitGraph-4MIJSDKK-Dw63mrhw.js +0 -1
- ksadk/server/static/assets/index-8ipRcQ-M.js +0 -240
- ksadk/server/static/assets/index-ByFCqjlh.css +0 -2
- ksadk/server/static/assets/info-A6RAGUB7-B6iAblII.js +0 -1
- ksadk/server/static/assets/packet-AYTQ26CC-BOYAipuq.js +0 -1
- ksadk/server/static/assets/pie-WAS4IAKB-Ctq0Kbku.js +0 -1
- ksadk/server/static/assets/radar-RG4KPBEZ-DN0-ul_0.js +0 -1
- ksadk/server/static/assets/railroad-74A4TZTK-C6cC_to0.js +0 -1
- ksadk/server/static/assets/railroad-abnf-HS5TGJTU-BimjIuRc.js +0 -1
- ksadk/server/static/assets/railroad-ebnf-LZEXJU2U-CvY65ABq.js +0 -1
- ksadk/server/static/assets/railroad-peg-WCYAUIDC-D72Iq_Tv.js +0 -1
- ksadk/server/static/assets/stateDiagram-v2-4QOOHH4V-BgQY03nz.js +0 -1
- ksadk/server/static/assets/swimlanesDiagram-VK2B7HYN-DLVw3q5Q.js +0 -8
- ksadk/server/static/assets/treeView-Q6P3EWNA-BMpO0wsB.js +0 -1
- ksadk/server/static/assets/treemap-WGGIJYW6-Et0aqzU3.js +0 -1
- ksadk/server/static/assets/wardley-WFR3VGLG-CbY0mhpl.js +0 -1
- ksadk/studio/static/assets/PrismRenderer-IYN-ffww.js +0 -3
- ksadk/studio/static/assets/index-BLpcdrgW.css +0 -1
- ksadk/studio/static/assets/index-CYekR2Xv.js +0 -260
- {agentengine_sdk_python-0.8.2.dist-info → agentengine_sdk_python-0.8.4.dist-info}/WHEEL +0 -0
- {agentengine_sdk_python-0.8.2.dist-info → agentengine_sdk_python-0.8.4.dist-info}/entry_points.txt +0 -0
- {agentengine_sdk_python-0.8.2.dist-info → agentengine_sdk_python-0.8.4.dist-info}/licenses/LICENSE +0 -0
- {agentengine_sdk_python-0.8.2.dist-info → agentengine_sdk_python-0.8.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
"""Deterministic build-time compatibility report for AgentBundle v2.
|
|
2
|
+
|
|
3
|
+
The report contains only immutable, already-resolved facts. It deliberately
|
|
4
|
+
does not inspect environment variables, import plugin entrypoints, or claim
|
|
5
|
+
that a process is healthy. Runtime readiness remains an Activation concern.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import hashlib
|
|
11
|
+
import json
|
|
12
|
+
from collections.abc import Callable, Mapping
|
|
13
|
+
from typing import Any
|
|
14
|
+
|
|
15
|
+
from ksadk.plugins.builtins import builtin_capability_permissions
|
|
16
|
+
from ksadk.plugins.contracts import LockedCapability, PluginLockEntry, PluginManifest
|
|
17
|
+
from ksadk.plugins.resolver import (
|
|
18
|
+
PluginResolutionError,
|
|
19
|
+
ResolvedComposition,
|
|
20
|
+
version_satisfies,
|
|
21
|
+
)
|
|
22
|
+
from ksadk.studio.contracts import AgentDraft
|
|
23
|
+
|
|
24
|
+
COMPATIBILITY_REPORT_FORMAT = "agentkit.compatibility-report/v1"
|
|
25
|
+
CURRENT_KERNEL_API_VERSION = "1.0.0"
|
|
26
|
+
CURRENT_RUNTIME_CONTRACT = "agentkit.runtime/v1"
|
|
27
|
+
SUPPORTED_RUNTIME_PROTOCOLS = (CURRENT_RUNTIME_CONTRACT,)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def compatibility_facts_digest(
|
|
31
|
+
*,
|
|
32
|
+
draft: AgentDraft,
|
|
33
|
+
composition: ResolvedComposition | None,
|
|
34
|
+
runtime_lock: Mapping[str, Any],
|
|
35
|
+
) -> str:
|
|
36
|
+
"""Address every static input that can change a compatibility conclusion."""
|
|
37
|
+
|
|
38
|
+
payload: dict[str, Any] = {
|
|
39
|
+
"allowedPermissions": sorted(set(draft.spec.security.allowed_permissions)),
|
|
40
|
+
"hostOwnedPermissions": (
|
|
41
|
+
sorted(builtin_capability_permissions(composition.profile))
|
|
42
|
+
if composition is not None
|
|
43
|
+
else []
|
|
44
|
+
),
|
|
45
|
+
"runtime": {
|
|
46
|
+
"type": str(runtime_lock.get("type") or ""),
|
|
47
|
+
"version": str(runtime_lock.get("version") or ""),
|
|
48
|
+
},
|
|
49
|
+
"composition": None,
|
|
50
|
+
}
|
|
51
|
+
if composition is not None:
|
|
52
|
+
payload["composition"] = {
|
|
53
|
+
"profileDigest": composition.profile_digest,
|
|
54
|
+
"pluginLockDigest": composition.plugin_lock_digest,
|
|
55
|
+
"manifests": [
|
|
56
|
+
manifest.model_dump(
|
|
57
|
+
by_alias=True,
|
|
58
|
+
exclude_none=True,
|
|
59
|
+
mode="json",
|
|
60
|
+
)
|
|
61
|
+
for manifest in sorted(
|
|
62
|
+
composition.manifests,
|
|
63
|
+
key=lambda item: (item.metadata.id, item.metadata.version),
|
|
64
|
+
)
|
|
65
|
+
],
|
|
66
|
+
}
|
|
67
|
+
canonical = json.dumps(
|
|
68
|
+
payload,
|
|
69
|
+
ensure_ascii=False,
|
|
70
|
+
sort_keys=True,
|
|
71
|
+
separators=(",", ":"),
|
|
72
|
+
).encode("utf-8")
|
|
73
|
+
return f"sha256:{hashlib.sha256(canonical).hexdigest()}"
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def build_bundle_compatibility_report(
|
|
77
|
+
*,
|
|
78
|
+
draft: AgentDraft,
|
|
79
|
+
composition: ResolvedComposition | None,
|
|
80
|
+
runtime_lock: Mapping[str, Any],
|
|
81
|
+
resolved_digest: str,
|
|
82
|
+
facts_digest: str,
|
|
83
|
+
plugin_lock_digest: str,
|
|
84
|
+
composition_profile_digest: str | None,
|
|
85
|
+
) -> dict[str, Any]:
|
|
86
|
+
"""Project auditable static compatibility without reading host secrets."""
|
|
87
|
+
|
|
88
|
+
bundle = {
|
|
89
|
+
"bundleFormat": "agentkit.bundle/v2",
|
|
90
|
+
"compatibilityFactsDigest": facts_digest,
|
|
91
|
+
"resolvedDigest": resolved_digest,
|
|
92
|
+
"pluginLockDigest": plugin_lock_digest,
|
|
93
|
+
**(
|
|
94
|
+
{"compositionProfileDigest": composition_profile_digest}
|
|
95
|
+
if composition_profile_digest is not None
|
|
96
|
+
else {}
|
|
97
|
+
),
|
|
98
|
+
}
|
|
99
|
+
allowed_permissions = sorted(
|
|
100
|
+
set(draft.spec.security.allowed_permissions)
|
|
101
|
+
| set(builtin_capability_permissions(composition.profile))
|
|
102
|
+
if composition is not None
|
|
103
|
+
else set(draft.spec.security.allowed_permissions)
|
|
104
|
+
)
|
|
105
|
+
if composition is None:
|
|
106
|
+
return _legacy_report(
|
|
107
|
+
bundle=bundle,
|
|
108
|
+
runtime_lock=runtime_lock,
|
|
109
|
+
allowed_permissions=allowed_permissions,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
manifests = {manifest.metadata.id: manifest for manifest in composition.manifests}
|
|
113
|
+
locked = {entry.id: entry for entry in composition.plugin_lock.plugins}
|
|
114
|
+
blockers: list[dict[str, str]] = []
|
|
115
|
+
|
|
116
|
+
def block(code: str, subject: str, reason: str) -> None:
|
|
117
|
+
blockers.append({"code": code, "subject": subject, "reason": reason})
|
|
118
|
+
|
|
119
|
+
permission_items: list[dict[str, Any]] = []
|
|
120
|
+
protocol_items: list[dict[str, Any]] = []
|
|
121
|
+
kernel_items: list[dict[str, str]] = []
|
|
122
|
+
capability_items: list[dict[str, str]] = []
|
|
123
|
+
|
|
124
|
+
for entry in composition.plugin_lock.plugins:
|
|
125
|
+
manifest = manifests.get(entry.id)
|
|
126
|
+
if manifest is None:
|
|
127
|
+
block(
|
|
128
|
+
"plugin_manifest_facts_missing",
|
|
129
|
+
entry.id,
|
|
130
|
+
"The exact manifest used to resolve this lock entry is unavailable.",
|
|
131
|
+
)
|
|
132
|
+
permission_items.append(
|
|
133
|
+
{
|
|
134
|
+
"pluginId": entry.id,
|
|
135
|
+
"required": [],
|
|
136
|
+
"unapproved": [],
|
|
137
|
+
"status": "blocked",
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
protocol_items.append(
|
|
141
|
+
{
|
|
142
|
+
"pluginId": entry.id,
|
|
143
|
+
"required": [],
|
|
144
|
+
"supported": list(SUPPORTED_RUNTIME_PROTOCOLS),
|
|
145
|
+
"status": "blocked",
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
kernel_items.append(
|
|
149
|
+
{
|
|
150
|
+
"pluginId": entry.id,
|
|
151
|
+
"required": "unknown",
|
|
152
|
+
"resolved": CURRENT_KERNEL_API_VERSION,
|
|
153
|
+
"status": "blocked",
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
for capability in entry.provides:
|
|
157
|
+
capability_items.append(
|
|
158
|
+
_capability_item(entry, capability, mode="unknown", status="blocked")
|
|
159
|
+
)
|
|
160
|
+
continue
|
|
161
|
+
|
|
162
|
+
_append_manifest_conclusions(
|
|
163
|
+
entry=entry,
|
|
164
|
+
manifest=manifest,
|
|
165
|
+
allowed_permissions=allowed_permissions,
|
|
166
|
+
permission_items=permission_items,
|
|
167
|
+
protocol_items=protocol_items,
|
|
168
|
+
kernel_items=kernel_items,
|
|
169
|
+
capability_items=capability_items,
|
|
170
|
+
block=block,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
provider_ref = composition.profile.agent_provider.ref
|
|
174
|
+
provider_id, requested_version = _plugin_ref_parts(provider_ref)
|
|
175
|
+
provider_entry = locked.get(provider_id)
|
|
176
|
+
provider_manifest = manifests.get(provider_id)
|
|
177
|
+
if provider_entry is None:
|
|
178
|
+
block(
|
|
179
|
+
"agent_provider_lock_missing",
|
|
180
|
+
provider_id,
|
|
181
|
+
"The CompositionProfile AgentProvider has no exact PluginLock entry.",
|
|
182
|
+
)
|
|
183
|
+
elif provider_entry.version != requested_version:
|
|
184
|
+
block(
|
|
185
|
+
"agent_provider_version_mismatch",
|
|
186
|
+
provider_id,
|
|
187
|
+
(
|
|
188
|
+
f"Profile requests {requested_version}, but the lock resolves "
|
|
189
|
+
f"{provider_entry.version}."
|
|
190
|
+
),
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
blockers.sort(key=lambda item: (item["code"], item["subject"], item["reason"]))
|
|
194
|
+
blocked_subjects = {item["subject"] for item in blockers}
|
|
195
|
+
overall = "blocked" if blockers else "compatible"
|
|
196
|
+
provider_status = "blocked" if provider_id in blocked_subjects else "compatible"
|
|
197
|
+
|
|
198
|
+
return {
|
|
199
|
+
"format": COMPATIBILITY_REPORT_FORMAT,
|
|
200
|
+
"scope": "build-time-static",
|
|
201
|
+
"overallStatus": overall,
|
|
202
|
+
"bundle": bundle,
|
|
203
|
+
"host": {
|
|
204
|
+
"kind": _host_kind(provider_manifest),
|
|
205
|
+
"kernelApiVersion": CURRENT_KERNEL_API_VERSION,
|
|
206
|
+
"runtimeContract": CURRENT_RUNTIME_CONTRACT,
|
|
207
|
+
"readiness": "notEvaluated",
|
|
208
|
+
"status": overall,
|
|
209
|
+
},
|
|
210
|
+
"provider": _provider_conclusion(
|
|
211
|
+
provider_ref=provider_ref,
|
|
212
|
+
provider_id=provider_id,
|
|
213
|
+
requested_version=requested_version,
|
|
214
|
+
entry=provider_entry,
|
|
215
|
+
manifest=provider_manifest,
|
|
216
|
+
status=provider_status,
|
|
217
|
+
),
|
|
218
|
+
"kernelApi": sorted(kernel_items, key=lambda item: item["pluginId"]),
|
|
219
|
+
"protocols": sorted(protocol_items, key=lambda item: item["pluginId"]),
|
|
220
|
+
"permissions": {
|
|
221
|
+
"allowed": allowed_permissions,
|
|
222
|
+
"plugins": sorted(permission_items, key=lambda item: item["pluginId"]),
|
|
223
|
+
"status": (
|
|
224
|
+
"blocked"
|
|
225
|
+
if any(item["status"] == "blocked" for item in permission_items)
|
|
226
|
+
else "compatible"
|
|
227
|
+
),
|
|
228
|
+
},
|
|
229
|
+
"capabilities": sorted(
|
|
230
|
+
capability_items,
|
|
231
|
+
key=lambda item: (item["definition"], item["slot"], item["owner"]),
|
|
232
|
+
),
|
|
233
|
+
"blockingReasons": blockers,
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def _legacy_report(
|
|
238
|
+
*,
|
|
239
|
+
bundle: dict[str, Any],
|
|
240
|
+
runtime_lock: Mapping[str, Any],
|
|
241
|
+
allowed_permissions: list[str],
|
|
242
|
+
) -> dict[str, Any]:
|
|
243
|
+
runtime_type = str(runtime_lock.get("type") or "")
|
|
244
|
+
version = str(runtime_lock.get("version") or "")
|
|
245
|
+
return {
|
|
246
|
+
"format": COMPATIBILITY_REPORT_FORMAT,
|
|
247
|
+
"scope": "build-time-static",
|
|
248
|
+
"overallStatus": "compatible",
|
|
249
|
+
"bundle": bundle,
|
|
250
|
+
"host": {
|
|
251
|
+
"kind": "legacy-runtime",
|
|
252
|
+
"kernelApiVersion": CURRENT_KERNEL_API_VERSION,
|
|
253
|
+
"runtimeContract": CURRENT_RUNTIME_CONTRACT,
|
|
254
|
+
"readiness": "notEvaluated",
|
|
255
|
+
"status": "compatible",
|
|
256
|
+
},
|
|
257
|
+
"provider": {
|
|
258
|
+
"ref": None,
|
|
259
|
+
"id": runtime_type or "builtin.legacy",
|
|
260
|
+
"hostRuntime": runtime_type or "unknown",
|
|
261
|
+
"isolation": "legacy",
|
|
262
|
+
"source": "builtin",
|
|
263
|
+
"digest": None,
|
|
264
|
+
"version": {
|
|
265
|
+
"requested": version or None,
|
|
266
|
+
"resolved": version or None,
|
|
267
|
+
"status": "compatible" if version else "unknown",
|
|
268
|
+
},
|
|
269
|
+
"status": "compatible",
|
|
270
|
+
},
|
|
271
|
+
"kernelApi": [],
|
|
272
|
+
"protocols": [
|
|
273
|
+
{
|
|
274
|
+
"pluginId": runtime_type or "builtin.legacy",
|
|
275
|
+
"required": [CURRENT_RUNTIME_CONTRACT],
|
|
276
|
+
"supported": list(SUPPORTED_RUNTIME_PROTOCOLS),
|
|
277
|
+
"status": "compatible",
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"permissions": {
|
|
281
|
+
"allowed": allowed_permissions,
|
|
282
|
+
"plugins": [],
|
|
283
|
+
"status": "compatible",
|
|
284
|
+
},
|
|
285
|
+
"capabilities": [],
|
|
286
|
+
"blockingReasons": [],
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
def _append_manifest_conclusions(
|
|
291
|
+
*,
|
|
292
|
+
entry: PluginLockEntry,
|
|
293
|
+
manifest: PluginManifest,
|
|
294
|
+
allowed_permissions: list[str],
|
|
295
|
+
permission_items: list[dict[str, Any]],
|
|
296
|
+
protocol_items: list[dict[str, Any]],
|
|
297
|
+
kernel_items: list[dict[str, str]],
|
|
298
|
+
capability_items: list[dict[str, str]],
|
|
299
|
+
block: Callable[[str, str, str], None],
|
|
300
|
+
) -> None:
|
|
301
|
+
if (
|
|
302
|
+
manifest.metadata.id != entry.id
|
|
303
|
+
or manifest.metadata.version != entry.version
|
|
304
|
+
or manifest.spec.provenance.digest != entry.digest
|
|
305
|
+
):
|
|
306
|
+
block(
|
|
307
|
+
"plugin_manifest_lock_mismatch",
|
|
308
|
+
entry.id,
|
|
309
|
+
"Resolved manifest identity or digest does not match the PluginLock entry.",
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
required_permissions = sorted(set(manifest.spec.permissions))
|
|
313
|
+
unapproved = sorted(set(required_permissions) - set(allowed_permissions))
|
|
314
|
+
permission_status = "blocked" if unapproved else "compatible"
|
|
315
|
+
permission_items.append(
|
|
316
|
+
{
|
|
317
|
+
"pluginId": entry.id,
|
|
318
|
+
"required": required_permissions,
|
|
319
|
+
"unapproved": unapproved,
|
|
320
|
+
"status": permission_status,
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
if unapproved:
|
|
324
|
+
block(
|
|
325
|
+
"plugin_permission_unapproved",
|
|
326
|
+
entry.id,
|
|
327
|
+
"Unapproved permissions: " + ", ".join(unapproved),
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
protocols = sorted(set(manifest.spec.compatibility.runtime_protocols))
|
|
331
|
+
protocol_status = (
|
|
332
|
+
"compatible" if not protocols or CURRENT_RUNTIME_CONTRACT in protocols else "blocked"
|
|
333
|
+
)
|
|
334
|
+
protocol_items.append(
|
|
335
|
+
{
|
|
336
|
+
"pluginId": entry.id,
|
|
337
|
+
"required": protocols,
|
|
338
|
+
"supported": list(SUPPORTED_RUNTIME_PROTOCOLS),
|
|
339
|
+
"status": protocol_status,
|
|
340
|
+
}
|
|
341
|
+
)
|
|
342
|
+
if protocol_status == "blocked":
|
|
343
|
+
block(
|
|
344
|
+
"runtime_protocol_incompatible",
|
|
345
|
+
entry.id,
|
|
346
|
+
f"Plugin accepts {', '.join(protocols)}, host provides {CURRENT_RUNTIME_CONTRACT}.",
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
kernel_constraint = manifest.spec.compatibility.kernel_api
|
|
350
|
+
try:
|
|
351
|
+
kernel_compatible = version_satisfies(
|
|
352
|
+
CURRENT_KERNEL_API_VERSION,
|
|
353
|
+
kernel_constraint,
|
|
354
|
+
)
|
|
355
|
+
except PluginResolutionError:
|
|
356
|
+
kernel_compatible = False
|
|
357
|
+
kernel_items.append(
|
|
358
|
+
{
|
|
359
|
+
"pluginId": entry.id,
|
|
360
|
+
"required": kernel_constraint,
|
|
361
|
+
"resolved": CURRENT_KERNEL_API_VERSION,
|
|
362
|
+
"status": "compatible" if kernel_compatible else "blocked",
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
if not kernel_compatible:
|
|
366
|
+
block(
|
|
367
|
+
"kernel_api_incompatible",
|
|
368
|
+
entry.id,
|
|
369
|
+
f"Plugin requires {kernel_constraint}, host provides {CURRENT_KERNEL_API_VERSION}.",
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
offers = {(offer.definition, offer.slot): offer for offer in manifest.spec.provides}
|
|
373
|
+
for capability in entry.provides:
|
|
374
|
+
offer = offers.get((capability.definition, capability.slot))
|
|
375
|
+
status = "compatible" if capability.owner == entry.id and offer is not None else "blocked"
|
|
376
|
+
capability_items.append(
|
|
377
|
+
_capability_item(
|
|
378
|
+
entry,
|
|
379
|
+
capability,
|
|
380
|
+
mode=offer.mode if offer is not None else "unknown",
|
|
381
|
+
status=status,
|
|
382
|
+
)
|
|
383
|
+
)
|
|
384
|
+
if status == "blocked":
|
|
385
|
+
block(
|
|
386
|
+
"capability_lock_mismatch",
|
|
387
|
+
entry.id,
|
|
388
|
+
f"Locked capability {capability.definition} at {capability.slot} "
|
|
389
|
+
"does not match the resolved manifest owner.",
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
def _capability_item(
|
|
394
|
+
entry: PluginLockEntry,
|
|
395
|
+
capability: LockedCapability,
|
|
396
|
+
*,
|
|
397
|
+
mode: str,
|
|
398
|
+
status: str,
|
|
399
|
+
) -> dict[str, str]:
|
|
400
|
+
return {
|
|
401
|
+
"definition": capability.definition,
|
|
402
|
+
"slot": capability.slot,
|
|
403
|
+
"owner": capability.owner,
|
|
404
|
+
"version": entry.version,
|
|
405
|
+
"mode": mode,
|
|
406
|
+
"status": status,
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
def _provider_conclusion(
|
|
411
|
+
*,
|
|
412
|
+
provider_ref: str,
|
|
413
|
+
provider_id: str,
|
|
414
|
+
requested_version: str,
|
|
415
|
+
entry: PluginLockEntry | None,
|
|
416
|
+
manifest: PluginManifest | None,
|
|
417
|
+
status: str,
|
|
418
|
+
) -> dict[str, Any]:
|
|
419
|
+
return {
|
|
420
|
+
"ref": provider_ref,
|
|
421
|
+
"id": provider_id,
|
|
422
|
+
"hostRuntime": manifest.spec.runtime if manifest is not None else "unknown",
|
|
423
|
+
"isolation": manifest.spec.isolation if manifest is not None else "unknown",
|
|
424
|
+
"source": entry.source if entry is not None else "unknown",
|
|
425
|
+
"digest": entry.digest if entry is not None else None,
|
|
426
|
+
"version": {
|
|
427
|
+
"requested": requested_version,
|
|
428
|
+
"resolved": entry.version if entry is not None else None,
|
|
429
|
+
"status": (
|
|
430
|
+
"compatible"
|
|
431
|
+
if entry is not None and entry.version == requested_version
|
|
432
|
+
else "blocked"
|
|
433
|
+
),
|
|
434
|
+
},
|
|
435
|
+
"status": status,
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
def _host_kind(provider: PluginManifest | None) -> str:
|
|
440
|
+
if provider is not None and provider.spec.domain == "runtime-native":
|
|
441
|
+
return "runtime-native"
|
|
442
|
+
return "composition-host"
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
def _plugin_ref_parts(value: str) -> tuple[str, str]:
|
|
446
|
+
plugin_id, version = value.removeprefix("plugin://").rsplit("@", 1)
|
|
447
|
+
return plugin_id, version
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
__all__ = [
|
|
451
|
+
"COMPATIBILITY_REPORT_FORMAT",
|
|
452
|
+
"CURRENT_KERNEL_API_VERSION",
|
|
453
|
+
"CURRENT_RUNTIME_CONTRACT",
|
|
454
|
+
"build_bundle_compatibility_report",
|
|
455
|
+
"compatibility_facts_digest",
|
|
456
|
+
]
|
ksadk/studio/compiler.py
CHANGED
|
@@ -6,6 +6,8 @@ from dataclasses import dataclass
|
|
|
6
6
|
from typing import Any
|
|
7
7
|
from urllib.parse import urlparse
|
|
8
8
|
|
|
9
|
+
from ksadk.plugins.providers.legacy_catalog import CODEX_AGENT_PROVIDER_PLUGIN_ID
|
|
10
|
+
from ksadk.resource_runtime.plugin_config import resource_plugin_config
|
|
9
11
|
from ksadk.studio.capabilities import (
|
|
10
12
|
CapabilityResolver,
|
|
11
13
|
LocalCapabilityResolver,
|
|
@@ -20,6 +22,7 @@ from ksadk.studio.contracts import (
|
|
|
20
22
|
)
|
|
21
23
|
from ksadk.studio.errors import StudioError
|
|
22
24
|
from ksadk.studio.resource_catalog import LocalResourceCatalog
|
|
25
|
+
from ksadk.studio.soul import compose_system_instruction
|
|
23
26
|
from ksadk.studio.validator import AgentValidator
|
|
24
27
|
from ksadk.studio.workspace import Workspace
|
|
25
28
|
|
|
@@ -45,6 +48,39 @@ class AgentCompiler:
|
|
|
45
48
|
self.catalog = catalog or LocalResourceCatalog(workspace)
|
|
46
49
|
|
|
47
50
|
def compile(self, draft: AgentDraft) -> CompileResult:
|
|
51
|
+
unsupported_plugins = [
|
|
52
|
+
binding.plugin_ref
|
|
53
|
+
for binding in draft.spec.bindings.plugins
|
|
54
|
+
if binding.enabled
|
|
55
|
+
and resource_plugin_config(
|
|
56
|
+
binding.plugin_ref,
|
|
57
|
+
binding.ecosystem,
|
|
58
|
+
binding.config,
|
|
59
|
+
enabled=True,
|
|
60
|
+
)
|
|
61
|
+
is None
|
|
62
|
+
]
|
|
63
|
+
if unsupported_plugins:
|
|
64
|
+
raise StudioError(
|
|
65
|
+
"NATIVE_PLUGIN_RUNTIME_INCOMPATIBLE",
|
|
66
|
+
"Framework Agent 不能直接绑定未物化的原生插件快照",
|
|
67
|
+
status_code=422,
|
|
68
|
+
field="spec.bindings.plugins",
|
|
69
|
+
details={"pluginRefs": sorted(unsupported_plugins)},
|
|
70
|
+
)
|
|
71
|
+
direct_dynamic = [
|
|
72
|
+
server.name
|
|
73
|
+
for server in draft.spec.capabilities.mcp_servers
|
|
74
|
+
if server.enabled and server.materialization == "dsh-profile"
|
|
75
|
+
]
|
|
76
|
+
if direct_dynamic:
|
|
77
|
+
raise StudioError(
|
|
78
|
+
"DSH_MCP_MANAGED_BINDING_REQUIRED",
|
|
79
|
+
"DSH Profile MCP 必须从当前 Catalog Resource 显式绑定,不能直接写入 AgentSpec",
|
|
80
|
+
status_code=422,
|
|
81
|
+
field="spec.capabilities.mcpServers",
|
|
82
|
+
details={"servers": sorted(direct_dynamic)},
|
|
83
|
+
)
|
|
48
84
|
source_payload = draft.model_dump(by_alias=True, exclude_none=True, mode="json")
|
|
49
85
|
source_digest = sha256_digest(canonical_json(source_payload))
|
|
50
86
|
materialized = self._materialize_bindings(draft)
|
|
@@ -61,10 +97,7 @@ class AgentCompiler:
|
|
|
61
97
|
for ref in materialized.spec.capabilities.mcp_servers
|
|
62
98
|
if ref.enabled
|
|
63
99
|
]
|
|
64
|
-
tools = [
|
|
65
|
-
self.resolver.resolve_tool(tool)
|
|
66
|
-
for tool in materialized.spec.capabilities.tools
|
|
67
|
-
]
|
|
100
|
+
tools = [self.resolver.resolve_tool(tool) for tool in materialized.spec.capabilities.tools]
|
|
68
101
|
skills.sort(key=lambda item: (item["name"], item["version"], item["digest"]))
|
|
69
102
|
mcp_servers.sort(key=lambda item: (item["name"], item["version"], item["digest"]))
|
|
70
103
|
tools.sort(key=lambda item: (item.name, item.version, item.digest or ""))
|
|
@@ -72,7 +105,11 @@ class AgentCompiler:
|
|
|
72
105
|
resolved = ResolvedAgentSpec(
|
|
73
106
|
agent_id=draft.metadata.id,
|
|
74
107
|
source_revision=draft.metadata.revision,
|
|
75
|
-
instructions=
|
|
108
|
+
instructions=compose_system_instruction(
|
|
109
|
+
materialized.spec.instructions,
|
|
110
|
+
materialized.spec.soul,
|
|
111
|
+
),
|
|
112
|
+
soul=materialized.spec.soul,
|
|
76
113
|
model=self.resolver.resolve_model(materialized.spec.model),
|
|
77
114
|
capabilities=ResolvedCapabilities(
|
|
78
115
|
skills=skills,
|
|
@@ -106,21 +143,53 @@ class AgentCompiler:
|
|
|
106
143
|
"skills": skills,
|
|
107
144
|
"mcpServers": mcp_servers,
|
|
108
145
|
"tools": [
|
|
109
|
-
tool.model_dump(by_alias=True, exclude_none=True, mode="json")
|
|
110
|
-
for tool in tools
|
|
146
|
+
tool.model_dump(by_alias=True, exclude_none=True, mode="json") for tool in tools
|
|
111
147
|
],
|
|
112
148
|
}
|
|
113
149
|
return CompileResult(resolved=resolved, dependency_lock=dependency_lock)
|
|
114
150
|
|
|
115
151
|
def _materialize_bindings(self, draft: AgentDraft) -> AgentDraft:
|
|
152
|
+
runtime = draft.spec.runtime
|
|
153
|
+
uses_codex_native_tools = bool(
|
|
154
|
+
runtime
|
|
155
|
+
and (
|
|
156
|
+
runtime.type == "codex"
|
|
157
|
+
or (
|
|
158
|
+
runtime.type == "plugin"
|
|
159
|
+
and runtime.provider_ref
|
|
160
|
+
and runtime.provider_ref.startswith(
|
|
161
|
+
f"plugin://{CODEX_AGENT_PROVIDER_PLUGIN_ID}@"
|
|
162
|
+
)
|
|
163
|
+
)
|
|
164
|
+
)
|
|
165
|
+
)
|
|
116
166
|
bindings = draft.spec.bindings
|
|
167
|
+
if uses_codex_native_tools and bindings.tools:
|
|
168
|
+
bindings = bindings.model_copy(update={"tools": []})
|
|
117
169
|
if (
|
|
118
|
-
not
|
|
170
|
+
not uses_codex_native_tools
|
|
171
|
+
and not bindings.model_profile_id
|
|
119
172
|
and not bindings.tools
|
|
120
173
|
and not bindings.mcp_servers
|
|
121
174
|
and not bindings.skills
|
|
122
175
|
):
|
|
123
176
|
return draft
|
|
177
|
+
runtime_type = draft.spec.runtime.type if draft.spec.runtime is not None else None
|
|
178
|
+
for binding in bindings.mcp_servers:
|
|
179
|
+
if not binding.enabled:
|
|
180
|
+
continue
|
|
181
|
+
descriptor = self.catalog.get(binding.resource_id)
|
|
182
|
+
if (
|
|
183
|
+
descriptor.contract.get("materialization") == "dsh-profile"
|
|
184
|
+
and runtime_type != "harness"
|
|
185
|
+
):
|
|
186
|
+
raise StudioError(
|
|
187
|
+
"DSH_MCP_RUNTIME_INCOMPATIBLE",
|
|
188
|
+
"DSH Profile MCP 当前只支持 Harness Runtime",
|
|
189
|
+
status_code=422,
|
|
190
|
+
field="spec.runtime.type",
|
|
191
|
+
details={"runtimeType": runtime_type},
|
|
192
|
+
)
|
|
124
193
|
materialized = draft.model_copy(deep=True)
|
|
125
194
|
model = self.catalog.resolve_model(bindings) or materialized.spec.model
|
|
126
195
|
if model is None:
|
|
@@ -142,9 +211,13 @@ class AgentCompiler:
|
|
|
142
211
|
*self.catalog.resolve_mcp_servers(bindings),
|
|
143
212
|
],
|
|
144
213
|
tools=[
|
|
145
|
-
*materialized.spec.capabilities.tools,
|
|
214
|
+
*([] if uses_codex_native_tools else materialized.spec.capabilities.tools),
|
|
146
215
|
*bound_tools,
|
|
147
|
-
|
|
216
|
+
# Non-Codex runtimes consume the probed MCP contracts through
|
|
217
|
+
# the generic Tool execution path. Codex connects to the MCP
|
|
218
|
+
# server natively, so expanding those contracts here turns a
|
|
219
|
+
# valid MCP binding into unsupported third-party tools.
|
|
220
|
+
*([] if uses_codex_native_tools else bound_mcp_tools),
|
|
148
221
|
],
|
|
149
222
|
)
|
|
150
223
|
self._require_unique(
|
|
@@ -164,11 +237,7 @@ class AgentCompiler:
|
|
|
164
237
|
materialized.spec.security.allowed_permissions = sorted(
|
|
165
238
|
set(materialized.spec.security.allowed_permissions)
|
|
166
239
|
| set(permissions)
|
|
167
|
-
| {
|
|
168
|
-
permission
|
|
169
|
-
for tool in bound_mcp_tools
|
|
170
|
-
for permission in tool.permissions
|
|
171
|
-
}
|
|
240
|
+
| {permission for tool in bound_mcp_tools for permission in tool.permissions}
|
|
172
241
|
)
|
|
173
242
|
endpoint = model.endpoint_url or model.base_url or ""
|
|
174
243
|
hostname = (urlparse(endpoint).hostname or "").lower().rstrip(".")
|