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,77 @@
|
|
|
1
|
+
"""Static resource checks shared by Studio validation and the actual Build entry."""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Sequence
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from ksadk.resource_runtime.plugin_config import resource_plugin_config
|
|
7
|
+
from ksadk.resource_runtime.snapshots import MemoryRecallPolicy
|
|
8
|
+
from ksadk.studio.contracts import Diagnostic, DiagnosticSeverity, MemorySpec
|
|
9
|
+
from ksadk.studio.errors import StudioError
|
|
10
|
+
from ksadk.studio.resource_connections import ResourceConnectionRepository
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def resource_binding_diagnostics(
|
|
14
|
+
bindings: Sequence[Any],
|
|
15
|
+
memory: MemorySpec | None,
|
|
16
|
+
connections: ResourceConnectionRepository,
|
|
17
|
+
) -> list[Diagnostic]:
|
|
18
|
+
diagnostics = []
|
|
19
|
+
for index, binding in enumerate(bindings):
|
|
20
|
+
if not binding.enabled:
|
|
21
|
+
continue
|
|
22
|
+
config = resource_plugin_config(
|
|
23
|
+
binding.plugin_ref,
|
|
24
|
+
binding.ecosystem,
|
|
25
|
+
binding.config,
|
|
26
|
+
enabled=True,
|
|
27
|
+
)
|
|
28
|
+
if config is None:
|
|
29
|
+
continue
|
|
30
|
+
field = f"spec.bindings.plugins[{index}].config"
|
|
31
|
+
try:
|
|
32
|
+
connection = connections.get(config.binding.connection_ref)
|
|
33
|
+
# Only confirm referenced secrets exist; no network or identity claims.
|
|
34
|
+
connections.resolve_credentials(connection.target)
|
|
35
|
+
except StudioError as error:
|
|
36
|
+
diagnostics.append(
|
|
37
|
+
Diagnostic(
|
|
38
|
+
severity=DiagnosticSeverity.ERROR,
|
|
39
|
+
code=error.code,
|
|
40
|
+
message=error.message,
|
|
41
|
+
field=field + ".binding.connectionRef",
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
if (
|
|
45
|
+
config.binding.resource.kind == "memory-instance"
|
|
46
|
+
and memory is not None
|
|
47
|
+
and memory.enabled
|
|
48
|
+
):
|
|
49
|
+
if memory.provider_ref != f"binding://{config.binding.id}":
|
|
50
|
+
diagnostics.append(
|
|
51
|
+
Diagnostic(
|
|
52
|
+
severity=DiagnosticSeverity.ERROR,
|
|
53
|
+
code="MEMORY_BINDING_MISMATCH",
|
|
54
|
+
message="记忆策略必须引用当前记忆插件绑定",
|
|
55
|
+
field="spec.memory.providerRef",
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
try:
|
|
59
|
+
MemoryRecallPolicy.model_validate(memory.recall.model_dump(exclude={"enabled"}))
|
|
60
|
+
except ValueError:
|
|
61
|
+
diagnostics.append(
|
|
62
|
+
Diagnostic(
|
|
63
|
+
severity=DiagnosticSeverity.ERROR,
|
|
64
|
+
code="MEMORY_SEARCH_POLICY_UNSUPPORTED",
|
|
65
|
+
message="记忆后端不支持当前召回阈值或预算,请调整策略",
|
|
66
|
+
field="spec.memory.recall",
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
diagnostics.append(
|
|
70
|
+
Diagnostic(
|
|
71
|
+
severity=DiagnosticSeverity.WARNING,
|
|
72
|
+
code="RESOURCE_AUTHORITY_UNVERIFIED",
|
|
73
|
+
message="本次仅校验连接声明与凭证引用,尚未验证平台主体和资源权限",
|
|
74
|
+
field=field + ".binding",
|
|
75
|
+
)
|
|
76
|
+
)
|
|
77
|
+
return diagnostics
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"""Trusted admission input for immutable platform-resource Build materialization."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass, field
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Protocol
|
|
9
|
+
|
|
10
|
+
from ksadk.plugins.bridges.dsh import DshProfileBuildSnapshot
|
|
11
|
+
from ksadk.resource_runtime.contracts import ResourceConfig
|
|
12
|
+
from ksadk.resource_runtime.plugin_config import resource_plugin_config
|
|
13
|
+
from ksadk.resource_runtime.snapshots import (
|
|
14
|
+
FrozenResourceBinding,
|
|
15
|
+
MemoryRecallPolicy,
|
|
16
|
+
ResourceSnapshot,
|
|
17
|
+
)
|
|
18
|
+
from ksadk.studio.capabilities import canonical_json, sha256_digest
|
|
19
|
+
from ksadk.studio.contracts import AgentDraft, MemorySpec, NativePluginBinding
|
|
20
|
+
from ksadk.studio.errors import StudioError
|
|
21
|
+
from ksadk.studio.resource_authority import (
|
|
22
|
+
VerifiedResourceAuthority,
|
|
23
|
+
resource_allowed_operations,
|
|
24
|
+
)
|
|
25
|
+
from ksadk.studio.resource_build_materializer import materialize_resource_build
|
|
26
|
+
from ksadk.studio.resource_connections import ResourceConnectionRepository
|
|
27
|
+
|
|
28
|
+
_RESOURCE_BUNDLES = {
|
|
29
|
+
"knowledge-base": "@kingsoftcloud/dsh-knowledge",
|
|
30
|
+
"memory-instance": "@kingsoftcloud/dsh-memory",
|
|
31
|
+
"skill-space": "@kingsoftcloud/dsh-skill-center",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ResourceAuthority(Protocol):
|
|
36
|
+
def admit(
|
|
37
|
+
self,
|
|
38
|
+
config: ResourceConfig,
|
|
39
|
+
*,
|
|
40
|
+
expected_connection_revision: int | None = None,
|
|
41
|
+
) -> VerifiedResourceAuthority: ...
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class AdmittedResourceBuild:
|
|
46
|
+
"""Credential-free snapshot plus private materialization dependencies."""
|
|
47
|
+
|
|
48
|
+
snapshot: ResourceSnapshot
|
|
49
|
+
bindings: tuple[NativePluginBinding, ...]
|
|
50
|
+
memory: MemorySpec
|
|
51
|
+
connections: ResourceConnectionRepository = field(repr=False, compare=False)
|
|
52
|
+
|
|
53
|
+
def materialize(self, directory: Path):
|
|
54
|
+
return materialize_resource_build(
|
|
55
|
+
directory,
|
|
56
|
+
bindings=self.bindings,
|
|
57
|
+
memory=self.memory,
|
|
58
|
+
admitted_snapshot=self.snapshot,
|
|
59
|
+
connections=self.connections,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def admit_resource_build(
|
|
64
|
+
draft: AgentDraft,
|
|
65
|
+
*,
|
|
66
|
+
authority: ResourceAuthority | None,
|
|
67
|
+
connections: ResourceConnectionRepository,
|
|
68
|
+
dsh_profile: DshProfileBuildSnapshot | None,
|
|
69
|
+
) -> AdmittedResourceBuild | None:
|
|
70
|
+
"""Admit enabled official resources without trusting browser-supplied identity."""
|
|
71
|
+
|
|
72
|
+
selected: list[tuple[NativePluginBinding, ResourceConfig]] = []
|
|
73
|
+
for binding in draft.spec.bindings.plugins:
|
|
74
|
+
if not binding.enabled:
|
|
75
|
+
continue
|
|
76
|
+
config = resource_plugin_config(
|
|
77
|
+
binding.plugin_ref,
|
|
78
|
+
binding.ecosystem,
|
|
79
|
+
binding.config,
|
|
80
|
+
enabled=True,
|
|
81
|
+
)
|
|
82
|
+
if config is not None:
|
|
83
|
+
selected.append((binding, config))
|
|
84
|
+
if not selected:
|
|
85
|
+
return None
|
|
86
|
+
if authority is None:
|
|
87
|
+
raise StudioError(
|
|
88
|
+
"RESOURCE_AUTHORITY_REQUIRED",
|
|
89
|
+
"平台资源 Build 需要宿主配置可信身份与权限校验",
|
|
90
|
+
status_code=503,
|
|
91
|
+
field="spec.bindings.plugins",
|
|
92
|
+
)
|
|
93
|
+
if dsh_profile is None:
|
|
94
|
+
raise StudioError(
|
|
95
|
+
"RESOURCE_BUILD_PROFILE_REQUIRED",
|
|
96
|
+
"平台资源 Build 需要锁定当前 DSH Profile 安装快照",
|
|
97
|
+
status_code=503,
|
|
98
|
+
field="spec.bindings.plugins",
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
required_bundles = {
|
|
102
|
+
_RESOURCE_BUNDLES[config.binding.resource.kind]
|
|
103
|
+
for _, config in selected
|
|
104
|
+
}
|
|
105
|
+
missing_bundles = sorted(required_bundles - set(dsh_profile.projection.bundles))
|
|
106
|
+
if missing_bundles:
|
|
107
|
+
raise StudioError(
|
|
108
|
+
"RESOURCE_PLUGIN_NOT_INSTALLED",
|
|
109
|
+
"当前 DSH Profile 未安装并启用所绑定的平台资源插件",
|
|
110
|
+
status_code=409,
|
|
111
|
+
field="spec.bindings.plugins",
|
|
112
|
+
details={"missingBundles": missing_bundles},
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
frozen: list[FrozenResourceBinding] = []
|
|
116
|
+
for binding, config in selected:
|
|
117
|
+
record = connections.get(config.binding.connection_ref)
|
|
118
|
+
grant = authority.admit(config, expected_connection_revision=record.revision)
|
|
119
|
+
current = connections.get(config.binding.connection_ref)
|
|
120
|
+
if current != record:
|
|
121
|
+
raise StudioError(
|
|
122
|
+
"RESOURCE_CONNECTION_CHANGED",
|
|
123
|
+
"资源准入期间连接发生变化,请重新构建",
|
|
124
|
+
status_code=409,
|
|
125
|
+
)
|
|
126
|
+
if (
|
|
127
|
+
grant.connection_ref != record.target.connection_ref
|
|
128
|
+
or grant.connection_revision != record.revision
|
|
129
|
+
or grant.tenant_ref != record.target.tenant_ref
|
|
130
|
+
or grant.resource_principal_ref != record.target.principal_ref
|
|
131
|
+
or grant.resource != config.binding.resource
|
|
132
|
+
or grant.data_endpoint != record.target.endpoint
|
|
133
|
+
or grant.expires_at <= datetime.now(timezone.utc)
|
|
134
|
+
or tuple(grant.allowed_operations) != resource_allowed_operations(config)
|
|
135
|
+
):
|
|
136
|
+
raise StudioError(
|
|
137
|
+
"RESOURCE_AUTHORITY_INVALID",
|
|
138
|
+
"平台资源准入结果与当前绑定不一致",
|
|
139
|
+
status_code=409,
|
|
140
|
+
field="spec.bindings.plugins",
|
|
141
|
+
)
|
|
142
|
+
frozen.append(
|
|
143
|
+
FrozenResourceBinding(
|
|
144
|
+
config=config,
|
|
145
|
+
connection=record.target,
|
|
146
|
+
connection_revision=record.revision,
|
|
147
|
+
memory_recall=(
|
|
148
|
+
MemoryRecallPolicy.model_validate(
|
|
149
|
+
draft.spec.memory.recall.model_dump(exclude={"enabled"})
|
|
150
|
+
)
|
|
151
|
+
if config.binding.resource.kind == "memory-instance"
|
|
152
|
+
and draft.spec.memory.enabled
|
|
153
|
+
else None
|
|
154
|
+
),
|
|
155
|
+
)
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
native_lock = [
|
|
159
|
+
{
|
|
160
|
+
"pluginRef": binding.plugin_ref,
|
|
161
|
+
"ecosystem": binding.ecosystem,
|
|
162
|
+
"snapshotDigest": binding.snapshot_digest,
|
|
163
|
+
"components": sorted(binding.components),
|
|
164
|
+
"configDigest": config.digest,
|
|
165
|
+
}
|
|
166
|
+
for binding, config in selected
|
|
167
|
+
]
|
|
168
|
+
native_lock.sort(key=lambda item: item["pluginRef"])
|
|
169
|
+
snapshot = ResourceSnapshot(
|
|
170
|
+
plugin_lock_digest=sha256_digest(canonical_json(native_lock)),
|
|
171
|
+
bindings=tuple(frozen),
|
|
172
|
+
dsh_profile=dsh_profile,
|
|
173
|
+
)
|
|
174
|
+
return AdmittedResourceBuild(
|
|
175
|
+
snapshot=snapshot,
|
|
176
|
+
bindings=tuple(binding for binding, _ in selected),
|
|
177
|
+
memory=draft.spec.memory.model_copy(deep=True),
|
|
178
|
+
connections=connections,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def resource_build_required(draft: AgentDraft) -> bool:
|
|
183
|
+
return any(
|
|
184
|
+
binding.enabled
|
|
185
|
+
and resource_plugin_config(
|
|
186
|
+
binding.plugin_ref,
|
|
187
|
+
binding.ecosystem,
|
|
188
|
+
binding.config,
|
|
189
|
+
enabled=True,
|
|
190
|
+
)
|
|
191
|
+
is not None
|
|
192
|
+
for binding in draft.spec.bindings.plugins
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
__all__ = ["AdmittedResourceBuild", "admit_resource_build", "resource_build_required"]
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"""Produce resource files inside a caller-owned Build staging directory.
|
|
2
|
+
|
|
3
|
+
The trusted Build adapter supplies a snapshot after identity, permission, plugin
|
|
4
|
+
lock and engine admission. This producer cannot authorize a browser declaration
|
|
5
|
+
and is deliberately not exposed as a standalone API or artifact repository.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import tempfile
|
|
11
|
+
from collections.abc import Sequence
|
|
12
|
+
from dataclasses import replace
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
from ksadk.resource_runtime.build_artifacts import ResourceBuildReference, write_resource_build
|
|
16
|
+
from ksadk.resource_runtime.plugin_config import resource_plugin_config
|
|
17
|
+
from ksadk.resource_runtime.snapshots import MemoryRecallPolicy, ResourceSnapshot
|
|
18
|
+
from ksadk.skills.models import ContentHash
|
|
19
|
+
from ksadk.skills.package_store import PackageStore, SkillPackageError
|
|
20
|
+
from ksadk.skills.service_client import SkillServiceClient
|
|
21
|
+
from ksadk.studio.contracts import MemorySpec, NativePluginBinding
|
|
22
|
+
from ksadk.studio.resource_connections import ResourceConnectionRepository
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def materialize_resource_build(
|
|
26
|
+
directory: Path,
|
|
27
|
+
*,
|
|
28
|
+
bindings: Sequence[NativePluginBinding],
|
|
29
|
+
memory: MemorySpec | None,
|
|
30
|
+
admitted_snapshot: ResourceSnapshot,
|
|
31
|
+
connections: ResourceConnectionRepository,
|
|
32
|
+
) -> ResourceBuildReference:
|
|
33
|
+
"""Validate declaration/admission equality, then retain verified pinned bytes.
|
|
34
|
+
|
|
35
|
+
Connections are rechecked before and after downloads. No test writes or Skill
|
|
36
|
+
execution occur, and no credential or download URL enters the saved artifact.
|
|
37
|
+
The enclosing Build must still lock dependencies and publish atomically.
|
|
38
|
+
"""
|
|
39
|
+
snapshot = ResourceSnapshot.model_validate(admitted_snapshot.model_dump())
|
|
40
|
+
if snapshot.dsh_profile is None:
|
|
41
|
+
raise ValueError("Resource Build requires its admitted DSH profile snapshot")
|
|
42
|
+
configs = []
|
|
43
|
+
for value in bindings:
|
|
44
|
+
binding = NativePluginBinding.model_validate(value.model_dump())
|
|
45
|
+
if not binding.enabled:
|
|
46
|
+
continue
|
|
47
|
+
config = resource_plugin_config(
|
|
48
|
+
binding.plugin_ref,
|
|
49
|
+
binding.ecosystem,
|
|
50
|
+
binding.config,
|
|
51
|
+
enabled=True,
|
|
52
|
+
)
|
|
53
|
+
if config is not None:
|
|
54
|
+
configs.append(config)
|
|
55
|
+
if len(configs) != len(snapshot.bindings) or {
|
|
56
|
+
item.binding.id: item.digest for item in configs
|
|
57
|
+
} != {item.config.binding.id: item.config.digest for item in snapshot.bindings}:
|
|
58
|
+
raise ValueError("Resource declaration does not match admitted Build snapshot")
|
|
59
|
+
credentials = {}
|
|
60
|
+
for frozen in snapshot.bindings:
|
|
61
|
+
config = frozen.config
|
|
62
|
+
if config.include_public:
|
|
63
|
+
raise ValueError("Public Skill Build admission is not implemented")
|
|
64
|
+
if config.execution_mode == "isolated" and frozen.skill_execution is None:
|
|
65
|
+
raise ValueError("Isolated Skill Build requires an admitted execution target")
|
|
66
|
+
recall = None
|
|
67
|
+
if config.binding.resource.kind == "memory-instance" and memory and memory.enabled:
|
|
68
|
+
if memory.provider_ref != f"binding://{config.binding.id}":
|
|
69
|
+
raise ValueError("Memory policy does not match admitted binding")
|
|
70
|
+
recall = MemoryRecallPolicy.model_validate(
|
|
71
|
+
memory.recall.model_dump(exclude={"enabled"})
|
|
72
|
+
)
|
|
73
|
+
if frozen.memory_recall != recall:
|
|
74
|
+
raise ValueError("Memory recall policy does not match admitted Build snapshot")
|
|
75
|
+
credentials[config.binding.id] = connections.resolve_credentials(
|
|
76
|
+
frozen.connection,
|
|
77
|
+
expected_revision=frozen.connection_revision,
|
|
78
|
+
)
|
|
79
|
+
if frozen.skill_execution is not None:
|
|
80
|
+
connections.resolve_credentials(frozen.skill_execution.connection)
|
|
81
|
+
|
|
82
|
+
directory = Path(directory)
|
|
83
|
+
if directory.exists():
|
|
84
|
+
raise FileExistsError("Resource Build staging destination already exists")
|
|
85
|
+
directory.parent.mkdir(parents=True, exist_ok=True)
|
|
86
|
+
with tempfile.TemporaryDirectory(prefix=".resource-packages-", dir=directory.parent) as cache:
|
|
87
|
+
store = PackageStore(Path(cache), namespace=snapshot.digest, require_hash=True)
|
|
88
|
+
packages = {}
|
|
89
|
+
for frozen in snapshot.bindings:
|
|
90
|
+
config = frozen.config
|
|
91
|
+
if (
|
|
92
|
+
config.binding.resource.kind != "skill-space"
|
|
93
|
+
or config.selection_mode == "discovery"
|
|
94
|
+
or not config.selected_skills
|
|
95
|
+
):
|
|
96
|
+
continue
|
|
97
|
+
secret = credentials[config.binding.id]
|
|
98
|
+
if secret.session_token is not None:
|
|
99
|
+
raise ValueError("Skill client does not support STS Build downloads")
|
|
100
|
+
|
|
101
|
+
def reveal(value):
|
|
102
|
+
return value.get_secret_value() if value is not None else ""
|
|
103
|
+
|
|
104
|
+
client = SkillServiceClient(
|
|
105
|
+
base_url=frozen.connection.endpoint,
|
|
106
|
+
region=config.binding.resource.region,
|
|
107
|
+
access_key=reveal(secret.access_key),
|
|
108
|
+
secret_key=reveal(secret.secret_key),
|
|
109
|
+
token=reveal(secret.token),
|
|
110
|
+
allow_env_fallback=False,
|
|
111
|
+
)
|
|
112
|
+
try:
|
|
113
|
+
listing = client.list_skills_by_space_id(config.binding.resource.id)
|
|
114
|
+
if listing.space_id != config.binding.resource.id:
|
|
115
|
+
raise SkillPackageError("Skill catalog does not match admitted space")
|
|
116
|
+
catalog = {}
|
|
117
|
+
for ref in listing.active_skills(allow_partial=True):
|
|
118
|
+
if ref.skill_id in catalog:
|
|
119
|
+
raise SkillPackageError("Skill catalog contains duplicate identities")
|
|
120
|
+
catalog[ref.skill_id] = ref
|
|
121
|
+
selected_packages = []
|
|
122
|
+
for selected in config.selected_skills:
|
|
123
|
+
ref = catalog.get(selected.skill_id)
|
|
124
|
+
if ref is None:
|
|
125
|
+
raise SkillPackageError("Selected Skill is absent from admitted catalog")
|
|
126
|
+
# The catalog establishes space membership; the selected version
|
|
127
|
+
# and hash establish package identity, including historical pins.
|
|
128
|
+
algorithm, digest = selected.content_hash.split(":", 1)
|
|
129
|
+
ref = replace(
|
|
130
|
+
ref,
|
|
131
|
+
version_id=selected.version_id,
|
|
132
|
+
version="",
|
|
133
|
+
archive_uri="",
|
|
134
|
+
content_hash=ContentHash(algorithm, digest),
|
|
135
|
+
)
|
|
136
|
+
selected_packages.append(
|
|
137
|
+
store.store_archive(ref, client.download_skill_archive(ref))
|
|
138
|
+
)
|
|
139
|
+
packages[config.binding.id] = selected_packages
|
|
140
|
+
finally:
|
|
141
|
+
client.close()
|
|
142
|
+
for frozen in snapshot.bindings:
|
|
143
|
+
connections.resolve_credentials(
|
|
144
|
+
frozen.connection,
|
|
145
|
+
expected_revision=frozen.connection_revision,
|
|
146
|
+
)
|
|
147
|
+
if frozen.skill_execution is not None:
|
|
148
|
+
connections.resolve_credentials(frozen.skill_execution.connection)
|
|
149
|
+
return write_resource_build(directory, snapshot, packages)
|
ksadk/studio/resource_catalog.py
CHANGED
|
@@ -20,6 +20,13 @@ from pydantic import ValidationError
|
|
|
20
20
|
|
|
21
21
|
from ksadk.cli.model_catalog import fetch_provider_model_catalog
|
|
22
22
|
from ksadk.conversations.model_context import normalize_model_metadata
|
|
23
|
+
from ksadk.plugins.providers.dsh_capabilities import (
|
|
24
|
+
DshProfileCapabilityDescriptor,
|
|
25
|
+
)
|
|
26
|
+
from ksadk.plugins.providers.dsh_mcp import (
|
|
27
|
+
DSH_PROFILE_TOOL_PERMISSION,
|
|
28
|
+
dsh_harness_tool_alias,
|
|
29
|
+
)
|
|
23
30
|
from ksadk.studio.capabilities import (
|
|
24
31
|
LocalCapabilityResolver,
|
|
25
32
|
canonical_json,
|
|
@@ -162,6 +169,7 @@ class LocalResourceCatalog:
|
|
|
162
169
|
self.skill_discovery = SkillDiscoveryService(workspace)
|
|
163
170
|
self.python_tool_inspector = PythonToolInspector(workspace)
|
|
164
171
|
self._provider_models: dict[str, ResourceDescriptor] = {}
|
|
172
|
+
self._dsh_mcp_resources: dict[str, ResourceDescriptor] = {}
|
|
165
173
|
# api_base -> (monotonic_ts, descriptors, source),见 discover_provider_models。
|
|
166
174
|
self._provider_catalog_cache: dict[
|
|
167
175
|
str, tuple[float, builtins.list[ResourceDescriptor], str]
|
|
@@ -274,6 +282,7 @@ class LocalResourceCatalog:
|
|
|
274
282
|
) -> builtins.list[ResourceDescriptor]:
|
|
275
283
|
candidates = [
|
|
276
284
|
*self._provider_models.values(),
|
|
285
|
+
*self._dsh_mcp_resources.values(),
|
|
277
286
|
*self._builtin_tools(),
|
|
278
287
|
*self._persisted("models"),
|
|
279
288
|
*self._persisted("mcp"),
|
|
@@ -338,7 +347,12 @@ class LocalResourceCatalog:
|
|
|
338
347
|
if not catalog:
|
|
339
348
|
if cached is not None:
|
|
340
349
|
return cached[1], cached[2]
|
|
341
|
-
|
|
350
|
+
# No provider response and no cache: return an empty catalog so the
|
|
351
|
+
# UI can guide the user to configure a provider instead of showing
|
|
352
|
+
# a phantom default model.
|
|
353
|
+
self._provider_models = {}
|
|
354
|
+
self._provider_catalog_cache[cache_key] = (now, [], source)
|
|
355
|
+
return [], source
|
|
342
356
|
|
|
343
357
|
descriptors: list[ResourceDescriptor] = []
|
|
344
358
|
for item in catalog:
|
|
@@ -415,6 +429,77 @@ class LocalResourceCatalog:
|
|
|
415
429
|
)
|
|
416
430
|
return found
|
|
417
431
|
|
|
432
|
+
def replace_dsh_profile_mcp(
|
|
433
|
+
self,
|
|
434
|
+
descriptor: DshProfileCapabilityDescriptor,
|
|
435
|
+
) -> ResourceDescriptor:
|
|
436
|
+
"""Publish one live DSH Profile as a bindable, credential-free MCP.
|
|
437
|
+
|
|
438
|
+
This entry is intentionally memory-only. The stable descriptor is
|
|
439
|
+
compiled into a Build when selected, while its endpoint and bearer
|
|
440
|
+
token are acquired later by the PluginHost runtime.
|
|
441
|
+
"""
|
|
442
|
+
|
|
443
|
+
name = f"dsh-profile-{resource_slug(descriptor.profile)}"
|
|
444
|
+
server = MCPServerRef(
|
|
445
|
+
name=name,
|
|
446
|
+
version=descriptor.dsh_version,
|
|
447
|
+
transport="http",
|
|
448
|
+
materialization="dsh-profile",
|
|
449
|
+
profile=descriptor.profile,
|
|
450
|
+
profile_digest=descriptor.profile_digest,
|
|
451
|
+
descriptor_digest=descriptor.descriptor_digest,
|
|
452
|
+
inventory_digest=descriptor.inventory_digest,
|
|
453
|
+
)
|
|
454
|
+
resolved = self.resolver.resolve_mcp(server)
|
|
455
|
+
resolved["discoveredTools"] = [
|
|
456
|
+
ToolContract(
|
|
457
|
+
name=tool.name,
|
|
458
|
+
version=descriptor.dsh_version,
|
|
459
|
+
description=tool.description,
|
|
460
|
+
input_schema=tool.input_schema,
|
|
461
|
+
permissions=["network:mcp", DSH_PROFILE_TOOL_PERMISSION],
|
|
462
|
+
timeout_seconds=60,
|
|
463
|
+
side_effect="external",
|
|
464
|
+
approval="policy",
|
|
465
|
+
executor="mcp",
|
|
466
|
+
mcp_server=name,
|
|
467
|
+
group="dsh",
|
|
468
|
+
boundary="dsh-profile-sidecar",
|
|
469
|
+
backend="mcp",
|
|
470
|
+
).model_dump(by_alias=True, exclude_none=True, mode="json")
|
|
471
|
+
for tool in descriptor.tools
|
|
472
|
+
]
|
|
473
|
+
stable_id = resource_id("mcp", "provider", name, descriptor.dsh_version)
|
|
474
|
+
snapshot_suffix = descriptor.descriptor_digest.removeprefix("sha256:")[:20]
|
|
475
|
+
resource = ResourceDescriptor(
|
|
476
|
+
resource_id=f"{stable_id}:{snapshot_suffix}",
|
|
477
|
+
kind="mcp",
|
|
478
|
+
name=name,
|
|
479
|
+
display_name=f"DSH Profile: {descriptor.profile}",
|
|
480
|
+
version=descriptor.dsh_version,
|
|
481
|
+
digest=str(resolved["digest"]),
|
|
482
|
+
source="provider",
|
|
483
|
+
status="ready",
|
|
484
|
+
description="DSH/Cordis Profile tools exposed through a runtime MCP lease",
|
|
485
|
+
category="dsh",
|
|
486
|
+
contract=resolved,
|
|
487
|
+
health={
|
|
488
|
+
"profileDigest": descriptor.profile_digest,
|
|
489
|
+
"descriptorDigest": descriptor.descriptor_digest,
|
|
490
|
+
"inventoryDigest": descriptor.inventory_digest,
|
|
491
|
+
},
|
|
492
|
+
)
|
|
493
|
+
self._dsh_mcp_resources = {resource.resource_id: resource}
|
|
494
|
+
return resource
|
|
495
|
+
|
|
496
|
+
def clear_dsh_profile_mcp(self) -> None:
|
|
497
|
+
"""Withdraw stale Profile resources before the DSH generation changes."""
|
|
498
|
+
|
|
499
|
+
# Copy-on-write keeps concurrent catalog readers on a complete old or
|
|
500
|
+
# new snapshot instead of mutating a dict while it is being iterated.
|
|
501
|
+
self._dsh_mcp_resources = {}
|
|
502
|
+
|
|
418
503
|
def create_model_profile(
|
|
419
504
|
self,
|
|
420
505
|
*,
|
|
@@ -450,6 +535,13 @@ class LocalResourceCatalog:
|
|
|
450
535
|
description: str,
|
|
451
536
|
server: MCPServerRef,
|
|
452
537
|
) -> ResourceDescriptor:
|
|
538
|
+
if server.materialization == "dsh-profile":
|
|
539
|
+
raise StudioError(
|
|
540
|
+
"DSH_MCP_MANAGED_RESOURCE_REQUIRED",
|
|
541
|
+
"DSH Profile MCP 只能由当前受管理 Profile 发布",
|
|
542
|
+
status_code=422,
|
|
543
|
+
field="server.materialization",
|
|
544
|
+
)
|
|
453
545
|
require_exact_version(server.version, field="version")
|
|
454
546
|
resolved = self.resolver.resolve_mcp(server)
|
|
455
547
|
descriptor = self._descriptor(
|
|
@@ -633,6 +725,13 @@ class LocalResourceCatalog:
|
|
|
633
725
|
detail: str | None = None,
|
|
634
726
|
) -> ResourceDescriptor:
|
|
635
727
|
descriptor = self.get(resource)
|
|
728
|
+
if descriptor.kind != "mcp" or descriptor.source != "local":
|
|
729
|
+
raise StudioError(
|
|
730
|
+
"RESOURCE_KIND_INVALID",
|
|
731
|
+
"只有本地 MCP Resource 可以保存探测结果",
|
|
732
|
+
status_code=422,
|
|
733
|
+
details={"resourceId": resource},
|
|
734
|
+
)
|
|
636
735
|
updated = descriptor.model_copy(deep=True)
|
|
637
736
|
updated.status = "unhealthy"
|
|
638
737
|
updated.health = {
|
|
@@ -762,17 +861,33 @@ class LocalResourceCatalog:
|
|
|
762
861
|
if not binding.enabled:
|
|
763
862
|
continue
|
|
764
863
|
descriptor = self._ready_binding(binding, expected_kind="mcp")
|
|
864
|
+
raw_filter = binding.config.get("toolFilter")
|
|
865
|
+
tool_filter = (
|
|
866
|
+
{str(item).strip() for item in raw_filter} if isinstance(raw_filter, list) else None
|
|
867
|
+
)
|
|
868
|
+
raw_prefix = binding.config.get("toolNamePrefix")
|
|
869
|
+
prefix = raw_prefix.strip() if isinstance(raw_prefix, str) else ""
|
|
870
|
+
dynamic_dsh = descriptor.contract.get("materialization") == "dsh-profile"
|
|
765
871
|
for payload in descriptor.contract.get("discoveredTools") or []:
|
|
766
872
|
tool = ToolContract.model_validate(payload)
|
|
873
|
+
if tool_filter is not None and tool.name not in tool_filter:
|
|
874
|
+
continue
|
|
767
875
|
approval = self._effective_approval(
|
|
768
876
|
tool,
|
|
769
877
|
bindings.policy_template,
|
|
770
878
|
binding,
|
|
771
879
|
)
|
|
880
|
+
name = (
|
|
881
|
+
dsh_harness_tool_alias(tool.name, prefix)
|
|
882
|
+
if dynamic_dsh
|
|
883
|
+
else f"{prefix}_{tool.name}"
|
|
884
|
+
if prefix
|
|
885
|
+
else tool.name
|
|
886
|
+
)
|
|
772
887
|
tools.append(
|
|
773
888
|
cast(
|
|
774
889
|
ToolContract,
|
|
775
|
-
tool.model_copy(update={"approval": approval}),
|
|
890
|
+
tool.model_copy(update={"name": name, "approval": approval}),
|
|
776
891
|
)
|
|
777
892
|
)
|
|
778
893
|
return tools
|
|
@@ -1108,12 +1223,36 @@ class LocalResourceCatalog:
|
|
|
1108
1223
|
)
|
|
1109
1224
|
|
|
1110
1225
|
def _persisted(self, directory: str) -> Iterable[ResourceDescriptor]:
|
|
1226
|
+
expected_kind = {
|
|
1227
|
+
"models": "model",
|
|
1228
|
+
"mcp": "mcp",
|
|
1229
|
+
"tools": "tool",
|
|
1230
|
+
}.get(directory)
|
|
1231
|
+
if expected_kind is None:
|
|
1232
|
+
return
|
|
1111
1233
|
root = self.workspace.resolve(Path(".agentkit/catalog") / directory)
|
|
1112
1234
|
for path in sorted(root.glob("*.yaml")):
|
|
1113
1235
|
try:
|
|
1114
|
-
|
|
1236
|
+
descriptor = ResourceDescriptor.model_validate(load_yaml_file(path))
|
|
1115
1237
|
except (StudioError, ValidationError):
|
|
1116
1238
|
continue
|
|
1239
|
+
# Provider resources are live, memory-only projections. Never let
|
|
1240
|
+
# a stale or forged workspace YAML shadow their lifecycle fence.
|
|
1241
|
+
if descriptor.source != "local":
|
|
1242
|
+
continue
|
|
1243
|
+
if descriptor.kind != expected_kind:
|
|
1244
|
+
continue
|
|
1245
|
+
expected_id = resource_id(
|
|
1246
|
+
descriptor.kind,
|
|
1247
|
+
"local",
|
|
1248
|
+
descriptor.name,
|
|
1249
|
+
descriptor.version,
|
|
1250
|
+
)
|
|
1251
|
+
if descriptor.resource_id != expected_id:
|
|
1252
|
+
continue
|
|
1253
|
+
if descriptor.contract.get("materialization") == "dsh-profile":
|
|
1254
|
+
continue
|
|
1255
|
+
yield descriptor
|
|
1117
1256
|
|
|
1118
1257
|
def _persist_descriptor(
|
|
1119
1258
|
self,
|
|
@@ -1147,6 +1286,13 @@ class LocalResourceCatalog:
|
|
|
1147
1286
|
def delete_resource(self, resource_id: str) -> None:
|
|
1148
1287
|
"""Remove a persisted catalog resource (model/tool/mcp/skill) by id."""
|
|
1149
1288
|
descriptor = self.get(resource_id)
|
|
1289
|
+
if descriptor.source != "local":
|
|
1290
|
+
raise StudioError(
|
|
1291
|
+
"RESOURCE_DELETE_FORBIDDEN",
|
|
1292
|
+
"只有本地持久化 Resource 可以删除",
|
|
1293
|
+
status_code=422,
|
|
1294
|
+
details={"resourceId": resource_id, "source": descriptor.source},
|
|
1295
|
+
)
|
|
1150
1296
|
kind = descriptor.kind
|
|
1151
1297
|
if kind == "skill":
|
|
1152
1298
|
# Skill 以目录形式安装在 capabilities/skills/{name}
|