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 @@
|
|
|
1
|
+
{"schemaVersion":1,"sourceCommit":"8e37106d1faed44c2de8b7f72a0d8cd2f1fbddd5","sourceTree":"clean","version":"0.8.4"}
|
ksadk/agui/_agent_helpers.py
CHANGED
|
@@ -127,6 +127,10 @@ def a2ui_operations(
|
|
|
127
127
|
if isinstance(event.update.data, Mapping):
|
|
128
128
|
return project_a2ui_operations("a2ui.surface.update", dict(event.update.data))
|
|
129
129
|
return []
|
|
130
|
+
# A dynamic tool operation batch closes its canonical item for reducer
|
|
131
|
+
# conformance; that completion is not a request to delete the UI surface.
|
|
132
|
+
if event.source.metadata.get("operation_batch") is True:
|
|
133
|
+
return []
|
|
130
134
|
# ItemCompleted (end): produce deleteSurface to preserve AG-UI wire
|
|
131
135
|
if surface_id:
|
|
132
136
|
return [{"version": "v0.9", "deleteSurface": {"surfaceId": surface_id}}]
|
ksadk/api/client.py
CHANGED
|
@@ -162,8 +162,30 @@ class AgentEngineClient:
|
|
|
162
162
|
timeout: float = 60.0,
|
|
163
163
|
dry_run: bool = False,
|
|
164
164
|
extra_headers: Optional[Dict[str, str]] = None,
|
|
165
|
+
allow_env_fallback: bool = True,
|
|
166
|
+
api_version: Optional[str] = None,
|
|
165
167
|
):
|
|
166
|
-
|
|
168
|
+
if type(allow_env_fallback) is not bool:
|
|
169
|
+
raise ValueError("allow_env_fallback must be a boolean")
|
|
170
|
+
self._allow_env_fallback = allow_env_fallback
|
|
171
|
+
self._explicit_api_version = api_version
|
|
172
|
+
if not allow_env_fallback:
|
|
173
|
+
parsed = urlsplit(base_url or "")
|
|
174
|
+
parsed.port # validate malformed or out-of-range ports before any transport
|
|
175
|
+
if (
|
|
176
|
+
parsed.scheme not in {"http", "https"} or not parsed.hostname
|
|
177
|
+
or parsed.username is not None or parsed.password is not None
|
|
178
|
+
or parsed.query or parsed.fragment or "\\" in (base_url or "")
|
|
179
|
+
or any(char.isspace() for char in (base_url or ""))
|
|
180
|
+
or not access_key or not secret_key or not region
|
|
181
|
+
or region.strip().lower() == "pre-online"
|
|
182
|
+
):
|
|
183
|
+
raise ValueError(
|
|
184
|
+
"Explicit control clients require endpoint, credentials and region"
|
|
185
|
+
)
|
|
186
|
+
resolved_base_url = base_url or (
|
|
187
|
+
os.getenv("AGENTENGINE_SERVER_URL") if allow_env_fallback else None
|
|
188
|
+
)
|
|
167
189
|
self.base_url: str = resolved_base_url or self._detect_default_base_url()
|
|
168
190
|
|
|
169
191
|
# 本地调试覆盖 (如果需要)
|
|
@@ -172,10 +194,12 @@ class AgentEngineClient:
|
|
|
172
194
|
self.logical_region = region
|
|
173
195
|
self.region = self._normalize_control_region(region)
|
|
174
196
|
self.custom_source = self._resolve_custom_source(region)
|
|
175
|
-
self.dry_run = bool(dry_run or self._is_global_dry_run_enabled())
|
|
197
|
+
self.dry_run = bool(dry_run or (allow_env_fallback and self._is_global_dry_run_enabled()))
|
|
176
198
|
self.extra_headers = extra_headers or {}
|
|
177
199
|
# 签名 service 可通过环境变量覆盖(例如 aicp)
|
|
178
|
-
self.service: str = service or
|
|
200
|
+
self.service: str = service or (
|
|
201
|
+
os.getenv("AGENTENGINE_SIGN_SERVICE") if allow_env_fallback else None
|
|
202
|
+
) or "aicp"
|
|
179
203
|
|
|
180
204
|
# AWS V4 签名
|
|
181
205
|
self._auth = AWSV4Auth(
|
|
@@ -183,6 +207,7 @@ class AgentEngineClient:
|
|
|
183
207
|
secret_access_key=secret_key or "",
|
|
184
208
|
region=self.region,
|
|
185
209
|
service=self.service,
|
|
210
|
+
allow_env_fallback=allow_env_fallback,
|
|
186
211
|
)
|
|
187
212
|
|
|
188
213
|
if self._auth.is_enabled:
|
|
@@ -197,10 +222,6 @@ class AgentEngineClient:
|
|
|
197
222
|
# requests.Session must not be used by several worker threads at once.
|
|
198
223
|
self._async_action_lock = asyncio.Lock()
|
|
199
224
|
self._http_error_log_suppressors: list[HttpErrorLogSuppressor] = []
|
|
200
|
-
# A Server Action can be deployed before the external KOP publication
|
|
201
|
-
# finishes. Remember that result per client so an approval retry does
|
|
202
|
-
# not repeatedly hit the known-unpublished control-plane route.
|
|
203
|
-
self._unpublished_kop_actions: set[str] = set()
|
|
204
225
|
# 反查身份的实例缓存(避免同会话重复调 IAM);None=未尝试,ResolvedIdentity|None=已反查
|
|
205
226
|
self._resolved_identity: Any = None
|
|
206
227
|
self._identity_resolve_attempted: bool = False
|
|
@@ -217,6 +238,15 @@ class AgentEngineClient:
|
|
|
217
238
|
return False
|
|
218
239
|
return True
|
|
219
240
|
|
|
241
|
+
def _request_ssl_verify(self) -> bool:
|
|
242
|
+
return True if not self._allow_env_fallback else self._ssl_verify_enabled()
|
|
243
|
+
|
|
244
|
+
def _request_api_version(self) -> str:
|
|
245
|
+
return self._explicit_api_version or (
|
|
246
|
+
os.getenv("AGENTENGINE_API_VERSION", "2024-06-12")
|
|
247
|
+
if self._allow_env_fallback else "2024-06-12"
|
|
248
|
+
)
|
|
249
|
+
|
|
220
250
|
@staticmethod
|
|
221
251
|
def _is_global_dry_run_enabled() -> bool:
|
|
222
252
|
"""根命令 --dry-run 开关:支持未显式透传 dry_run 参数的命令。"""
|
|
@@ -259,6 +289,7 @@ class AgentEngineClient:
|
|
|
259
289
|
def _get_session(self) -> requests.Session:
|
|
260
290
|
if self._session is None:
|
|
261
291
|
self._session = requests.Session()
|
|
292
|
+
self._session.trust_env = self._allow_env_fallback
|
|
262
293
|
return self._session
|
|
263
294
|
|
|
264
295
|
def _get_host(self) -> str:
|
|
@@ -421,6 +452,8 @@ class AgentEngineClient:
|
|
|
421
452
|
)
|
|
422
453
|
|
|
423
454
|
def _can_retry_with_inner_aicp_endpoint(self, details: Dict[str, Any]) -> bool:
|
|
455
|
+
if not self._allow_env_fallback:
|
|
456
|
+
return False
|
|
424
457
|
if not self._is_inner_account_intranet_error(details):
|
|
425
458
|
return False
|
|
426
459
|
parsed = urlparse(self.base_url or "")
|
|
@@ -439,7 +472,7 @@ class AgentEngineClient:
|
|
|
439
472
|
kop_mode = self._is_kop_mode()
|
|
440
473
|
headers = self._build_headers(action=action, kop_mode=kop_mode)
|
|
441
474
|
if kop_mode:
|
|
442
|
-
version =
|
|
475
|
+
version = self._request_api_version()
|
|
443
476
|
full_url = f"{self.base_url.rstrip('/')}/?Action={action}&Version={version}"
|
|
444
477
|
else:
|
|
445
478
|
full_url = f"{self.base_url}{path}"
|
|
@@ -453,7 +486,7 @@ class AgentEngineClient:
|
|
|
453
486
|
headers["Accept"] = accept
|
|
454
487
|
if has_files:
|
|
455
488
|
headers.pop("Content-Type", None)
|
|
456
|
-
version =
|
|
489
|
+
version = self._request_api_version()
|
|
457
490
|
full_url = (
|
|
458
491
|
f"{self.base_url.rstrip('/')}/?Action={action}&Version={version}"
|
|
459
492
|
if kop_mode
|
|
@@ -532,7 +565,7 @@ class AgentEngineClient:
|
|
|
532
565
|
}
|
|
533
566
|
if kop_mode and action:
|
|
534
567
|
headers["X-Action"] = action
|
|
535
|
-
headers["X-Version"] =
|
|
568
|
+
headers["X-Version"] = self._request_api_version()
|
|
536
569
|
if self.custom_source:
|
|
537
570
|
headers["X-KSC-CUSTOM-SOURCE"] = self.custom_source
|
|
538
571
|
|
|
@@ -579,6 +612,10 @@ class AgentEngineClient:
|
|
|
579
612
|
|
|
580
613
|
def _get_resolved_identity(self) -> Any:
|
|
581
614
|
"""反查身份并缓存到实例。dry-run 只读文件缓存不联网。"""
|
|
615
|
+
if not self._allow_env_fallback:
|
|
616
|
+
# Explicit resource admission owns identity resolution and its target.
|
|
617
|
+
# Never consult a global identity cache or contact an implicit service.
|
|
618
|
+
return None
|
|
582
619
|
if self._identity_resolve_attempted:
|
|
583
620
|
return self._resolved_identity
|
|
584
621
|
self._identity_resolve_attempted = True
|
|
@@ -606,7 +643,9 @@ class AgentEngineClient:
|
|
|
606
643
|
if key.lower() == "x-ksc-account-id" and str(value or "").strip():
|
|
607
644
|
return str(value).strip()
|
|
608
645
|
# 2. env KSYUN_ACCOUNT_ID
|
|
609
|
-
account_id =
|
|
646
|
+
account_id = (
|
|
647
|
+
os.getenv("KSYUN_ACCOUNT_ID", "").strip() if self._allow_env_fallback else ""
|
|
648
|
+
)
|
|
610
649
|
if account_id:
|
|
611
650
|
return account_id
|
|
612
651
|
# 3. 反查主账号 ID(复用 _get_resolved_identity 的反查,不重复调)
|
|
@@ -734,11 +773,17 @@ class AgentEngineClient:
|
|
|
734
773
|
headers=headers,
|
|
735
774
|
auth=self._auth.get_auth(), # AWS V4 签名
|
|
736
775
|
timeout=self.timeout,
|
|
737
|
-
verify=self.
|
|
776
|
+
verify=self._request_ssl_verify(),
|
|
777
|
+
allow_redirects=self._allow_env_fallback,
|
|
738
778
|
)
|
|
739
779
|
|
|
740
780
|
logger.debug(f"Response: {response.status_code}")
|
|
741
781
|
|
|
782
|
+
if not self._allow_env_fallback and 300 <= response.status_code < 400:
|
|
783
|
+
raise AgentEngineAPIError(
|
|
784
|
+
response.status_code, "Explicit connection redirect refused"
|
|
785
|
+
)
|
|
786
|
+
|
|
742
787
|
if response.status_code < 400:
|
|
743
788
|
break
|
|
744
789
|
|
|
@@ -996,24 +1041,6 @@ class AgentEngineClient:
|
|
|
996
1041
|
)
|
|
997
1042
|
return AgentEngineAPIError(response.status_code, message)
|
|
998
1043
|
|
|
999
|
-
@staticmethod
|
|
1000
|
-
def _is_unregistered_kop_action(error: AgentEngineAPIError, action: str) -> bool:
|
|
1001
|
-
"""Return whether KOP rejected an otherwise valid Server Action.
|
|
1002
|
-
|
|
1003
|
-
Public Action publication is an infrastructure step independent of a
|
|
1004
|
-
Server rollout. During that window the per-Agent Gateway route is
|
|
1005
|
-
already authenticated and still forwards the exact same Action to
|
|
1006
|
-
Server admission, so callers can safely use it as the data-plane
|
|
1007
|
-
fallback instead of losing an approval response.
|
|
1008
|
-
"""
|
|
1009
|
-
|
|
1010
|
-
message = str(error.message or "").strip().lower()
|
|
1011
|
-
return (
|
|
1012
|
-
error.code == 400
|
|
1013
|
-
and f"action {action.lower()}" in message
|
|
1014
|
-
and "not valid for this web service" in message
|
|
1015
|
-
)
|
|
1016
|
-
|
|
1017
1044
|
def _runtime_action(
|
|
1018
1045
|
self,
|
|
1019
1046
|
*,
|
|
@@ -1031,7 +1058,8 @@ class AgentEngineClient:
|
|
|
1031
1058
|
headers={"Authorization": f"Bearer {api_key}"},
|
|
1032
1059
|
json=params,
|
|
1033
1060
|
timeout=self.timeout,
|
|
1034
|
-
verify=self.
|
|
1061
|
+
verify=self._request_ssl_verify(),
|
|
1062
|
+
allow_redirects=self._allow_env_fallback,
|
|
1035
1063
|
)
|
|
1036
1064
|
if response.status_code >= 400:
|
|
1037
1065
|
raise self._workspace_runtime_error(response)
|
|
@@ -1057,22 +1085,6 @@ class AgentEngineClient:
|
|
|
1057
1085
|
raise AgentEngineAPIError(502, "Runtime Action returned non-object Data")
|
|
1058
1086
|
return normalized
|
|
1059
1087
|
|
|
1060
|
-
async def _runtime_action_for_agent(
|
|
1061
|
-
self,
|
|
1062
|
-
*,
|
|
1063
|
-
agent_id: str,
|
|
1064
|
-
action: str,
|
|
1065
|
-
params: Dict[str, Any],
|
|
1066
|
-
) -> Dict[str, Any]:
|
|
1067
|
-
detail = await self.get_agent(agent_id, include_api_key=True)
|
|
1068
|
-
access = self._extract_runtime_access(detail)
|
|
1069
|
-
return await asyncio.to_thread(
|
|
1070
|
-
self._runtime_action,
|
|
1071
|
-
access=access,
|
|
1072
|
-
action=action,
|
|
1073
|
-
params=params,
|
|
1074
|
-
)
|
|
1075
|
-
|
|
1076
1088
|
@staticmethod
|
|
1077
1089
|
def _compact_params(params: Dict[str, Any] | None) -> Dict[str, Any]:
|
|
1078
1090
|
return {key: value for key, value in (params or {}).items() if value is not None}
|
|
@@ -1164,7 +1176,8 @@ class AgentEngineClient:
|
|
|
1164
1176
|
headers=headers,
|
|
1165
1177
|
auth=self._auth.get_auth(),
|
|
1166
1178
|
timeout=self.timeout,
|
|
1167
|
-
verify=self.
|
|
1179
|
+
verify=self._request_ssl_verify(),
|
|
1180
|
+
allow_redirects=self._allow_env_fallback,
|
|
1168
1181
|
)
|
|
1169
1182
|
if response.status_code < 400:
|
|
1170
1183
|
return response
|
|
@@ -1238,7 +1251,8 @@ class AgentEngineClient:
|
|
|
1238
1251
|
files=files,
|
|
1239
1252
|
stream=False,
|
|
1240
1253
|
timeout=self.timeout,
|
|
1241
|
-
verify=self.
|
|
1254
|
+
verify=self._request_ssl_verify(),
|
|
1255
|
+
allow_redirects=self._allow_env_fallback,
|
|
1242
1256
|
)
|
|
1243
1257
|
setattr(response, "_ksadk_workspace_url", url)
|
|
1244
1258
|
if response.status_code >= 400:
|
|
@@ -1501,8 +1515,13 @@ class AgentEngineClient:
|
|
|
1501
1515
|
}
|
|
1502
1516
|
if manifest_sha256:
|
|
1503
1517
|
payload["ManifestSHA256"] = manifest_sha256
|
|
1518
|
+
if isinstance(declaration, dict) and declaration.get("plugin_artifacts"):
|
|
1519
|
+
payload["PluginArtifacts"] = declaration["plugin_artifacts"]
|
|
1504
1520
|
return payload
|
|
1505
1521
|
|
|
1522
|
+
async def get_plugin_delivery_capabilities(self) -> Dict[str, Any]:
|
|
1523
|
+
return await self._action_async("GetPluginDeliveryCapabilities", {})
|
|
1524
|
+
|
|
1506
1525
|
async def create_agent(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
|
1507
1526
|
"""Create an Agent through the established order workflow.
|
|
1508
1527
|
|
|
@@ -1604,21 +1623,10 @@ class AgentEngineClient:
|
|
|
1604
1623
|
advanced["ProjectId"] = project_id
|
|
1605
1624
|
params["Advanced"] = advanced
|
|
1606
1625
|
|
|
1607
|
-
#
|
|
1608
|
-
#
|
|
1609
|
-
#
|
|
1610
|
-
|
|
1611
|
-
action = (
|
|
1612
|
-
"CreateAgent"
|
|
1613
|
-
if params["DeploymentType"] == "ManagedRuntime"
|
|
1614
|
-
else "CreateAgentProduct"
|
|
1615
|
-
)
|
|
1616
|
-
if action == "CreateAgent":
|
|
1617
|
-
# CreateAgent is also used as an order callback and therefore
|
|
1618
|
-
# requires an InstanceId. A declarative runtime has no order to
|
|
1619
|
-
# allocate one for us, so the SDK supplies a stable request UUID.
|
|
1620
|
-
params["InstanceId"] = str(data.get("instance_id") or uuid.uuid4())
|
|
1621
|
-
return self._action(action, params)
|
|
1626
|
+
# CreateAgentProduct is the established public Action. The Server
|
|
1627
|
+
# handles ManagedRuntime synchronously without involving Ding, while
|
|
1628
|
+
# Code and Container retain their existing order/callback lifecycle.
|
|
1629
|
+
return self._action("CreateAgentProduct", params)
|
|
1622
1630
|
|
|
1623
1631
|
async def get_agent(
|
|
1624
1632
|
self,
|
|
@@ -1686,6 +1694,33 @@ class AgentEngineClient:
|
|
|
1686
1694
|
params["Name"] = name
|
|
1687
1695
|
return self._action("ListAgentModels", params)
|
|
1688
1696
|
|
|
1697
|
+
async def list_knowledge_bases(self) -> Dict[str, Any]:
|
|
1698
|
+
"""List knowledge bases visible to the current signed cloud identity."""
|
|
1699
|
+
|
|
1700
|
+
result = await self._action_async("ListKnowledgeBases", {})
|
|
1701
|
+
return {
|
|
1702
|
+
"knowledge_bases": result.get("knowledge_bases", []),
|
|
1703
|
+
"total_count": result.get("total_count", 0),
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
async def list_memory_instances(self) -> Dict[str, Any]:
|
|
1707
|
+
"""List long-term memory instances visible to the signed identity."""
|
|
1708
|
+
|
|
1709
|
+
result = await self._action_async("ListMemoryInstances", {})
|
|
1710
|
+
return {
|
|
1711
|
+
"memory_instances": result.get("memory_instances", []),
|
|
1712
|
+
"total_count": result.get("total_count", 0),
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
async def list_skill_workspaces(self) -> Dict[str, Any]:
|
|
1716
|
+
"""List Skill Center workspaces visible to the signed identity."""
|
|
1717
|
+
|
|
1718
|
+
result = await self._action_async("ListSkillWorkspaces", {})
|
|
1719
|
+
return {
|
|
1720
|
+
"skill_workspaces": result.get("skill_workspaces", []),
|
|
1721
|
+
"total_count": result.get("total_count", 0),
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1689
1724
|
async def create_dashboard_access_link(
|
|
1690
1725
|
self,
|
|
1691
1726
|
*,
|
|
@@ -2013,6 +2048,7 @@ class AgentEngineClient:
|
|
|
2013
2048
|
agent_id: str,
|
|
2014
2049
|
session_id: str,
|
|
2015
2050
|
after_seq_id: int | None = None,
|
|
2051
|
+
offset: int | None = None,
|
|
2016
2052
|
limit: int = 100,
|
|
2017
2053
|
) -> Dict[str, Any]:
|
|
2018
2054
|
"""Read canonical cloud session events through the Server Action API."""
|
|
@@ -2024,6 +2060,8 @@ class AgentEngineClient:
|
|
|
2024
2060
|
}
|
|
2025
2061
|
if after_seq_id is not None:
|
|
2026
2062
|
params["AfterSeqId"] = after_seq_id
|
|
2063
|
+
if offset is not None:
|
|
2064
|
+
params["Offset"] = offset
|
|
2027
2065
|
return await self._action_async("ListSessionEvents", params)
|
|
2028
2066
|
|
|
2029
2067
|
async def submit_interaction(
|
|
@@ -2057,24 +2095,7 @@ class AgentEngineClient:
|
|
|
2057
2095
|
"Response": response or {},
|
|
2058
2096
|
"IdempotencyKey": idempotency_key,
|
|
2059
2097
|
}
|
|
2060
|
-
|
|
2061
|
-
try:
|
|
2062
|
-
return await self._action_async("SubmitInteraction", params)
|
|
2063
|
-
except AgentEngineAPIError as exc:
|
|
2064
|
-
if not self._is_unregistered_kop_action(exc, "SubmitInteraction"):
|
|
2065
|
-
raise
|
|
2066
|
-
self._unpublished_kop_actions.add("SubmitInteraction")
|
|
2067
|
-
if "SubmitInteraction" in self._unpublished_kop_actions:
|
|
2068
|
-
# KOP publication can lag the Server/Gateway rollout. The
|
|
2069
|
-
# per-Agent endpoint is authenticated with the API key returned by
|
|
2070
|
-
# signed GetAgent and still traverses Gateway -> Server admission;
|
|
2071
|
-
# it never submits directly to Runtime.
|
|
2072
|
-
return await self._runtime_action_for_agent(
|
|
2073
|
-
agent_id=agent_id,
|
|
2074
|
-
action="SubmitInteraction",
|
|
2075
|
-
params=params,
|
|
2076
|
-
)
|
|
2077
|
-
raise AssertionError("unreachable SubmitInteraction transport state")
|
|
2098
|
+
return await self._action_async("SubmitInteraction", params)
|
|
2078
2099
|
|
|
2079
2100
|
async def list_workspace_files(
|
|
2080
2101
|
self,
|
|
@@ -2579,6 +2600,7 @@ class AgentEngineClient:
|
|
|
2579
2600
|
raise AssertionError("dry-run request unexpectedly returned")
|
|
2580
2601
|
|
|
2581
2602
|
session = requests.Session()
|
|
2603
|
+
session.trust_env = self._allow_env_fallback
|
|
2582
2604
|
response: requests.Response | None = None
|
|
2583
2605
|
retried_inner_endpoint = False
|
|
2584
2606
|
try:
|
|
@@ -2593,7 +2615,8 @@ class AgentEngineClient:
|
|
|
2593
2615
|
# reasoning before its next SSE chunk. Bound connection
|
|
2594
2616
|
# establishment, not the lifetime of an admitted stream.
|
|
2595
2617
|
timeout=(self.timeout, None),
|
|
2596
|
-
verify=self.
|
|
2618
|
+
verify=self._request_ssl_verify(),
|
|
2619
|
+
allow_redirects=self._allow_env_fallback,
|
|
2597
2620
|
stream=True,
|
|
2598
2621
|
)
|
|
2599
2622
|
content_type = str(response.headers.get("content-type") or "").lower()
|
|
@@ -2619,9 +2642,7 @@ class AgentEngineClient:
|
|
|
2619
2642
|
)
|
|
2620
2643
|
message = (
|
|
2621
2644
|
str(
|
|
2622
|
-
details.get("remote_error_message")
|
|
2623
|
-
or details.get("message")
|
|
2624
|
-
or ""
|
|
2645
|
+
details.get("remote_error_message") or details.get("message") or ""
|
|
2625
2646
|
).strip()
|
|
2626
2647
|
or "RunAgent stream did not return text/event-stream"
|
|
2627
2648
|
)
|
|
@@ -2647,11 +2668,7 @@ class AgentEngineClient:
|
|
|
2647
2668
|
details=details,
|
|
2648
2669
|
)
|
|
2649
2670
|
message = (
|
|
2650
|
-
str(
|
|
2651
|
-
details.get("remote_error_message")
|
|
2652
|
-
or details.get("message")
|
|
2653
|
-
or ""
|
|
2654
|
-
).strip()
|
|
2671
|
+
str(details.get("remote_error_message") or details.get("message") or "").strip()
|
|
2655
2672
|
or resp_text
|
|
2656
2673
|
)
|
|
2657
2674
|
raise AgentEngineAPIError(
|
ksadk/builders/code_builder.py
CHANGED
|
@@ -280,7 +280,15 @@ class CodeBuilder(BaseBuilder):
|
|
|
280
280
|
"mcp>=1.1.0",
|
|
281
281
|
"langchain-mcp-adapters>=0.0.1",
|
|
282
282
|
)
|
|
283
|
-
BUNDLED_KSADK_POSTGRES_SESSION_REQUIREMENTS = (
|
|
283
|
+
BUNDLED_KSADK_POSTGRES_SESSION_REQUIREMENTS = (
|
|
284
|
+
"asyncpg>=0.30.0,<1.0.0",
|
|
285
|
+
"greenlet>=1.0.0",
|
|
286
|
+
)
|
|
287
|
+
BUNDLED_KSADK_LANGGRAPH_POSTGRES_REQUIREMENTS = (
|
|
288
|
+
"langgraph-checkpoint-postgres>=3.1.0",
|
|
289
|
+
"psycopg[binary]>=3.2,<4.0",
|
|
290
|
+
"psycopg-pool>=3.2,<4.0",
|
|
291
|
+
)
|
|
284
292
|
BUNDLED_KSADK_ATTACHMENT_RUNTIME_REQUIREMENTS = (
|
|
285
293
|
"pypdf>=6.0.0",
|
|
286
294
|
"beautifulsoup4>=4.12.0",
|
|
@@ -584,8 +592,14 @@ class CodeBuilder(BaseBuilder):
|
|
|
584
592
|
value = os.getenv("KSADK_BUILD_ENABLE_ATTACHMENT_OCR", "")
|
|
585
593
|
return value.strip().lower() in {"1", "true", "yes", "on"}
|
|
586
594
|
|
|
587
|
-
def _bundled_runtime_requirements(self) -> tuple[str, ...]:
|
|
595
|
+
def _bundled_runtime_requirements(self, detection_result: Any = None) -> tuple[str, ...]:
|
|
588
596
|
requirements = list(self.BUNDLED_KSADK_RUNTIME_REQUIREMENTS)
|
|
597
|
+
detection_type = getattr(detection_result, "type", None)
|
|
598
|
+
framework = str(
|
|
599
|
+
getattr(detection_type, "value", detection_type) or ""
|
|
600
|
+
).strip().lower()
|
|
601
|
+
if framework in {"langgraph", "langchain", "deepagents"}:
|
|
602
|
+
requirements.extend(self.BUNDLED_KSADK_LANGGRAPH_POSTGRES_REQUIREMENTS)
|
|
589
603
|
if self._attachment_ocr_runtime_enabled():
|
|
590
604
|
requirements.extend(self.BUNDLED_KSADK_ATTACHMENT_OCR_RUNTIME_REQUIREMENTS)
|
|
591
605
|
if self._mcp_runtime_enabled():
|
|
@@ -612,16 +626,26 @@ class CodeBuilder(BaseBuilder):
|
|
|
612
626
|
if self._env_flag_enabled("KSADK_BUILD_ENABLE_POSTGRES_SESSION"):
|
|
613
627
|
return True
|
|
614
628
|
backend = (
|
|
615
|
-
self.
|
|
616
|
-
or self.
|
|
617
|
-
or self.
|
|
629
|
+
self._project_file_env_value("KSADK_SESSION_BACKEND")
|
|
630
|
+
or self._project_file_env_value("AGENTENGINE_SESSION_BACKEND")
|
|
631
|
+
or self._project_file_env_value("KSADK_STM_BACKEND")
|
|
632
|
+
or os.getenv("KSADK_SESSION_BACKEND")
|
|
633
|
+
or os.getenv("AGENTENGINE_SESSION_BACKEND")
|
|
634
|
+
or os.getenv("KSADK_STM_BACKEND")
|
|
635
|
+
or ""
|
|
618
636
|
)
|
|
619
637
|
if backend.strip().lower() == "postgres":
|
|
620
638
|
return True
|
|
621
639
|
dsn = (
|
|
622
|
-
self.
|
|
623
|
-
or self.
|
|
624
|
-
or self.
|
|
640
|
+
self._project_file_env_value("KSADK_CHECKPOINT_DSN")
|
|
641
|
+
or self._project_file_env_value("KSADK_SESSION_DSN")
|
|
642
|
+
or self._project_file_env_value("KSADK_STM_URL")
|
|
643
|
+
or self._project_file_env_value("KSADK_STM_DB_URL")
|
|
644
|
+
or os.getenv("KSADK_CHECKPOINT_DSN")
|
|
645
|
+
or os.getenv("KSADK_SESSION_DSN")
|
|
646
|
+
or os.getenv("KSADK_STM_URL")
|
|
647
|
+
or os.getenv("KSADK_STM_DB_URL")
|
|
648
|
+
or ""
|
|
625
649
|
)
|
|
626
650
|
return self._looks_like_postgres_dsn(dsn)
|
|
627
651
|
|
|
@@ -642,6 +666,9 @@ class CodeBuilder(BaseBuilder):
|
|
|
642
666
|
value = os.getenv(name)
|
|
643
667
|
if value:
|
|
644
668
|
return value
|
|
669
|
+
return self._project_file_env_value(name)
|
|
670
|
+
|
|
671
|
+
def _project_file_env_value(self, name: str) -> str:
|
|
645
672
|
for env_file in (self.project_dir / ".env", self.project_dir / "agentengine.env"):
|
|
646
673
|
if not env_file.is_file():
|
|
647
674
|
continue
|
|
@@ -942,7 +969,7 @@ class CodeBuilder(BaseBuilder):
|
|
|
942
969
|
def _build_requirements_list(self, detection_result) -> List[str]:
|
|
943
970
|
final_deps = merge_requirement_lists(
|
|
944
971
|
self._get_base_requirements(detection_result),
|
|
945
|
-
self._bundled_runtime_requirements(),
|
|
972
|
+
self._bundled_runtime_requirements(detection_result),
|
|
946
973
|
)
|
|
947
974
|
|
|
948
975
|
user_requirements = self.project_dir / "requirements.txt"
|
|
@@ -8,8 +8,9 @@ FASTAPI_REQUIREMENT = "fastapi>=0.136.0,<0.137.0"
|
|
|
8
8
|
STARLETTE_REQUIREMENT = "starlette>=1.0,<1.4"
|
|
9
9
|
|
|
10
10
|
ADK_REQUIREMENTS = (
|
|
11
|
-
#
|
|
11
|
+
# 与 ksadk 自身 adk extra 对齐,支持 1.x 与 2.x。
|
|
12
12
|
"google-adk>=1.34.0,<3.0.0",
|
|
13
|
+
"greenlet>=1.0.0",
|
|
13
14
|
"litellm>=1.0.0",
|
|
14
15
|
)
|
|
15
16
|
|
ksadk/builders/ks3_uploader.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
KS3 上传模块 - 金山云对象存储上传
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import os
|
|
6
7
|
import socket
|
|
7
8
|
import time
|
|
@@ -27,7 +28,15 @@ class KS3Uploader:
|
|
|
27
28
|
UPLOAD_TIMEOUT_PER_MB_SECONDS = 4.0
|
|
28
29
|
UPLOAD_TIMEOUT_MAX_SECONDS = 3600
|
|
29
30
|
|
|
30
|
-
def __init__(
|
|
31
|
+
def __init__(
|
|
32
|
+
self,
|
|
33
|
+
region: str = "cn-beijing-6",
|
|
34
|
+
bucket: Optional[str] = None,
|
|
35
|
+
*,
|
|
36
|
+
access_key: Optional[str] = None,
|
|
37
|
+
secret_key: Optional[str] = None,
|
|
38
|
+
public_read: bool = True,
|
|
39
|
+
):
|
|
31
40
|
"""初始化 KS3 上传器
|
|
32
41
|
|
|
33
42
|
Args:
|
|
@@ -37,7 +46,15 @@ class KS3Uploader:
|
|
|
37
46
|
- 如果未指定,优先从环境变量 KS3_BUCKET 读取
|
|
38
47
|
- 如果环境变量也未设置,默认使用 agentengine-{region}
|
|
39
48
|
"""
|
|
49
|
+
# ks3sdk logs the signed Authorization header at INFO. Studio uploads
|
|
50
|
+
# run inside a long-lived server process, so keep that transport logger
|
|
51
|
+
# above INFO before any request can be emitted.
|
|
52
|
+
logging.getLogger("ks3.http").setLevel(logging.WARNING)
|
|
53
|
+
|
|
40
54
|
self.region = region
|
|
55
|
+
self.access_key = access_key
|
|
56
|
+
self.secret_key = secret_key
|
|
57
|
+
self.public_read = public_read
|
|
41
58
|
|
|
42
59
|
# 确定 bucket 名称 (优先级: 参数 > 环境变量 > 默认值)
|
|
43
60
|
if bucket:
|
|
@@ -260,8 +277,12 @@ class KS3Uploader:
|
|
|
260
277
|
def _upload_via_host(self, file_path: Path, object_key: str, host: str) -> bool:
|
|
261
278
|
from ks3.connection import Connection # type: ignore[import-untyped]
|
|
262
279
|
|
|
263
|
-
ak = os.environ.get("KSYUN_ACCESS_KEY") or os.environ.get(
|
|
264
|
-
|
|
280
|
+
ak = self.access_key or os.environ.get("KSYUN_ACCESS_KEY") or os.environ.get(
|
|
281
|
+
"KS3_ACCESS_KEY"
|
|
282
|
+
)
|
|
283
|
+
sk = self.secret_key or os.environ.get("KSYUN_SECRET_KEY") or os.environ.get(
|
|
284
|
+
"KS3_SECRET_KEY"
|
|
285
|
+
)
|
|
265
286
|
|
|
266
287
|
conn = Connection(
|
|
267
288
|
ak,
|
|
@@ -291,10 +312,14 @@ class KS3Uploader:
|
|
|
291
312
|
resumable=True,
|
|
292
313
|
resumable_filename=str(resume_path),
|
|
293
314
|
)
|
|
294
|
-
|
|
315
|
+
headers = {"x-kss-acl": "public-read"} if self.public_read else {}
|
|
316
|
+
result = upload_task.upload(headers=headers)
|
|
295
317
|
else:
|
|
296
318
|
click.echo(f" 普通上传: {file_path.stat().st_size / (1024 * 1024):.2f} MB")
|
|
297
|
-
|
|
319
|
+
if self.public_read:
|
|
320
|
+
result = key.set_contents_from_filename(str(file_path), policy="public-read")
|
|
321
|
+
else:
|
|
322
|
+
result = key.set_contents_from_filename(str(file_path))
|
|
298
323
|
|
|
299
324
|
status = getattr(result, "status", None)
|
|
300
325
|
if status is None:
|
|
@@ -313,8 +338,12 @@ class KS3Uploader:
|
|
|
313
338
|
成功返回 ks3:// URI, 失败返回 None
|
|
314
339
|
"""
|
|
315
340
|
# 检查环境变量 (优先使用 KSYUN_* 金山云 IAM 凭证)
|
|
316
|
-
ak = os.environ.get("KSYUN_ACCESS_KEY") or os.environ.get(
|
|
317
|
-
|
|
341
|
+
ak = self.access_key or os.environ.get("KSYUN_ACCESS_KEY") or os.environ.get(
|
|
342
|
+
"KS3_ACCESS_KEY"
|
|
343
|
+
)
|
|
344
|
+
sk = self.secret_key or os.environ.get("KSYUN_SECRET_KEY") or os.environ.get(
|
|
345
|
+
"KS3_SECRET_KEY"
|
|
346
|
+
)
|
|
318
347
|
|
|
319
348
|
if not ak or not sk:
|
|
320
349
|
click.secho("❌ 请在 .env 文件中设置金山云 IAM 凭证:", fg="red")
|