pythinker-code 2.0.0__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.
- pythinker_code/CHANGELOG.md +16 -0
- pythinker_code/__init__.py +0 -0
- pythinker_code/__main__.py +92 -0
- pythinker_code/acp/AGENTS.md +93 -0
- pythinker_code/acp/__init__.py +13 -0
- pythinker_code/acp/convert.py +128 -0
- pythinker_code/acp/host.py +298 -0
- pythinker_code/acp/mcp.py +46 -0
- pythinker_code/acp/server.py +497 -0
- pythinker_code/acp/session.py +496 -0
- pythinker_code/acp/tools.py +167 -0
- pythinker_code/acp/types.py +13 -0
- pythinker_code/acp/version.py +45 -0
- pythinker_code/agents/default/agent.yaml +36 -0
- pythinker_code/agents/default/coder.yaml +25 -0
- pythinker_code/agents/default/explore.yaml +46 -0
- pythinker_code/agents/default/plan.yaml +30 -0
- pythinker_code/agents/default/system.md +164 -0
- pythinker_code/agents/okabe/agent.yaml +22 -0
- pythinker_code/agentspec.py +163 -0
- pythinker_code/app.py +820 -0
- pythinker_code/approval_runtime/__init__.py +29 -0
- pythinker_code/approval_runtime/models.py +42 -0
- pythinker_code/approval_runtime/runtime.py +235 -0
- pythinker_code/auth/__init__.py +25 -0
- pythinker_code/auth/anthropic_direct.py +207 -0
- pythinker_code/auth/deepseek.py +192 -0
- pythinker_code/auth/lm_studio.py +418 -0
- pythinker_code/auth/minimax.py +203 -0
- pythinker_code/auth/oauth.py +1122 -0
- pythinker_code/auth/ollama.py +293 -0
- pythinker_code/auth/openai.py +771 -0
- pythinker_code/auth/opencode_go.py +203 -0
- pythinker_code/auth/openrouter.py +225 -0
- pythinker_code/auth/platforms.py +466 -0
- pythinker_code/background/__init__.py +36 -0
- pythinker_code/background/agent_runner.py +231 -0
- pythinker_code/background/ids.py +19 -0
- pythinker_code/background/manager.py +650 -0
- pythinker_code/background/models.py +105 -0
- pythinker_code/background/store.py +237 -0
- pythinker_code/background/summary.py +66 -0
- pythinker_code/background/worker.py +209 -0
- pythinker_code/cli/__init__.py +1326 -0
- pythinker_code/cli/__main__.py +19 -0
- pythinker_code/cli/_lazy_group.py +238 -0
- pythinker_code/cli/export.py +322 -0
- pythinker_code/cli/info.py +62 -0
- pythinker_code/cli/mcp.py +349 -0
- pythinker_code/cli/plugin.py +351 -0
- pythinker_code/cli/toad.py +74 -0
- pythinker_code/cli/vis.py +38 -0
- pythinker_code/cli/web.py +80 -0
- pythinker_code/config.py +453 -0
- pythinker_code/constant.py +33 -0
- pythinker_code/exception.py +43 -0
- pythinker_code/hooks/__init__.py +4 -0
- pythinker_code/hooks/config.py +34 -0
- pythinker_code/hooks/engine.py +371 -0
- pythinker_code/hooks/events.py +190 -0
- pythinker_code/hooks/runner.py +89 -0
- pythinker_code/llm.py +412 -0
- pythinker_code/metadata.py +79 -0
- pythinker_code/notifications/__init__.py +33 -0
- pythinker_code/notifications/llm.py +77 -0
- pythinker_code/notifications/manager.py +145 -0
- pythinker_code/notifications/models.py +50 -0
- pythinker_code/notifications/notifier.py +41 -0
- pythinker_code/notifications/store.py +118 -0
- pythinker_code/notifications/wire.py +21 -0
- pythinker_code/plugin/__init__.py +124 -0
- pythinker_code/plugin/manager.py +153 -0
- pythinker_code/plugin/tool.py +173 -0
- pythinker_code/prompts/__init__.py +6 -0
- pythinker_code/prompts/compact.md +73 -0
- pythinker_code/prompts/init.md +21 -0
- pythinker_code/py.typed +0 -0
- pythinker_code/session.py +319 -0
- pythinker_code/session_fork.py +325 -0
- pythinker_code/session_state.py +132 -0
- pythinker_code/share.py +14 -0
- pythinker_code/skill/__init__.py +727 -0
- pythinker_code/skill/flow/__init__.py +99 -0
- pythinker_code/skill/flow/d2.py +482 -0
- pythinker_code/skill/flow/mermaid.py +266 -0
- pythinker_code/skills/pythinker-code-help/SKILL.md +54 -0
- pythinker_code/skills/skill-creator/SKILL.md +367 -0
- pythinker_code/soul/__init__.py +304 -0
- pythinker_code/soul/agent.py +520 -0
- pythinker_code/soul/approval.py +267 -0
- pythinker_code/soul/btw.py +214 -0
- pythinker_code/soul/compaction.py +189 -0
- pythinker_code/soul/context.py +339 -0
- pythinker_code/soul/denwarenji.py +39 -0
- pythinker_code/soul/dynamic_injection.py +84 -0
- pythinker_code/soul/dynamic_injections/__init__.py +0 -0
- pythinker_code/soul/dynamic_injections/auto_mode.py +72 -0
- pythinker_code/soul/dynamic_injections/plan_mode.py +239 -0
- pythinker_code/soul/message.py +92 -0
- pythinker_code/soul/pythinkersoul.py +1613 -0
- pythinker_code/soul/slash.py +340 -0
- pythinker_code/soul/toolset.py +788 -0
- pythinker_code/subagents/__init__.py +21 -0
- pythinker_code/subagents/builder.py +42 -0
- pythinker_code/subagents/core.py +86 -0
- pythinker_code/subagents/git_context.py +172 -0
- pythinker_code/subagents/models.py +54 -0
- pythinker_code/subagents/output.py +71 -0
- pythinker_code/subagents/registry.py +28 -0
- pythinker_code/subagents/runner.py +428 -0
- pythinker_code/subagents/store.py +196 -0
- pythinker_code/telemetry/__init__.py +211 -0
- pythinker_code/telemetry/config.py +54 -0
- pythinker_code/telemetry/crash.py +157 -0
- pythinker_code/telemetry/metrics.py +208 -0
- pythinker_code/telemetry/otel.py +240 -0
- pythinker_code/telemetry/sentry.py +167 -0
- pythinker_code/telemetry/sink.py +189 -0
- pythinker_code/tools/AGENTS.md +6 -0
- pythinker_code/tools/__init__.py +105 -0
- pythinker_code/tools/agent/__init__.py +277 -0
- pythinker_code/tools/agent/description.md +41 -0
- pythinker_code/tools/ask_user/__init__.py +159 -0
- pythinker_code/tools/ask_user/description.md +19 -0
- pythinker_code/tools/background/__init__.py +318 -0
- pythinker_code/tools/background/list.md +10 -0
- pythinker_code/tools/background/output.md +11 -0
- pythinker_code/tools/background/stop.md +8 -0
- pythinker_code/tools/display.py +46 -0
- pythinker_code/tools/dmail/__init__.py +38 -0
- pythinker_code/tools/dmail/dmail.md +17 -0
- pythinker_code/tools/file/__init__.py +30 -0
- pythinker_code/tools/file/glob.md +17 -0
- pythinker_code/tools/file/glob.py +160 -0
- pythinker_code/tools/file/grep.md +6 -0
- pythinker_code/tools/file/grep_local.py +589 -0
- pythinker_code/tools/file/plan_mode.py +45 -0
- pythinker_code/tools/file/read.md +16 -0
- pythinker_code/tools/file/read.py +300 -0
- pythinker_code/tools/file/read_media.md +24 -0
- pythinker_code/tools/file/read_media.py +217 -0
- pythinker_code/tools/file/replace.md +7 -0
- pythinker_code/tools/file/replace.py +195 -0
- pythinker_code/tools/file/utils.py +257 -0
- pythinker_code/tools/file/write.md +5 -0
- pythinker_code/tools/file/write.py +177 -0
- pythinker_code/tools/plan/__init__.py +327 -0
- pythinker_code/tools/plan/description.md +29 -0
- pythinker_code/tools/plan/enter.py +190 -0
- pythinker_code/tools/plan/enter_description.md +35 -0
- pythinker_code/tools/plan/heroes.py +277 -0
- pythinker_code/tools/shell/__init__.py +253 -0
- pythinker_code/tools/shell/bash.md +35 -0
- pythinker_code/tools/shell/powershell.md +30 -0
- pythinker_code/tools/test.py +55 -0
- pythinker_code/tools/think/__init__.py +21 -0
- pythinker_code/tools/think/think.md +1 -0
- pythinker_code/tools/todo/__init__.py +168 -0
- pythinker_code/tools/todo/set_todo_list.md +23 -0
- pythinker_code/tools/utils.py +199 -0
- pythinker_code/tools/web/__init__.py +4 -0
- pythinker_code/tools/web/fetch.md +1 -0
- pythinker_code/tools/web/fetch.py +189 -0
- pythinker_code/tools/web/search.md +1 -0
- pythinker_code/tools/web/search.py +163 -0
- pythinker_code/ui/__init__.py +0 -0
- pythinker_code/ui/acp/__init__.py +99 -0
- pythinker_code/ui/print/__init__.py +474 -0
- pythinker_code/ui/print/visualize.py +185 -0
- pythinker_code/ui/shell/__init__.py +1696 -0
- pythinker_code/ui/shell/console.py +109 -0
- pythinker_code/ui/shell/debug.py +190 -0
- pythinker_code/ui/shell/echo.py +17 -0
- pythinker_code/ui/shell/export_import.py +117 -0
- pythinker_code/ui/shell/keyboard.py +300 -0
- pythinker_code/ui/shell/mcp_status.py +113 -0
- pythinker_code/ui/shell/model_picker.py +318 -0
- pythinker_code/ui/shell/oauth.py +272 -0
- pythinker_code/ui/shell/placeholders.py +531 -0
- pythinker_code/ui/shell/prompt.py +2278 -0
- pythinker_code/ui/shell/replay.py +215 -0
- pythinker_code/ui/shell/session_picker.py +227 -0
- pythinker_code/ui/shell/setup.py +212 -0
- pythinker_code/ui/shell/slash.py +898 -0
- pythinker_code/ui/shell/startup.py +32 -0
- pythinker_code/ui/shell/task_browser.py +486 -0
- pythinker_code/ui/shell/update.py +350 -0
- pythinker_code/ui/shell/usage.py +291 -0
- pythinker_code/ui/shell/usage_adapters/__init__.py +50 -0
- pythinker_code/ui/shell/usage_adapters/anthropic_admin.py +233 -0
- pythinker_code/ui/shell/usage_adapters/base.py +72 -0
- pythinker_code/ui/shell/usage_adapters/deepseek.py +137 -0
- pythinker_code/ui/shell/usage_adapters/minimax.py +236 -0
- pythinker_code/ui/shell/usage_adapters/openai_admin.py +225 -0
- pythinker_code/ui/shell/usage_adapters/openai_chatgpt.py +241 -0
- pythinker_code/ui/shell/usage_adapters/opencode_go.py +232 -0
- pythinker_code/ui/shell/usage_adapters/openrouter.py +105 -0
- pythinker_code/ui/shell/usage_adapters/pythinker.py +189 -0
- pythinker_code/ui/shell/usage_adapters/pythinker_ai.py +50 -0
- pythinker_code/ui/shell/usage_render.py +150 -0
- pythinker_code/ui/shell/visualize/__init__.py +165 -0
- pythinker_code/ui/shell/visualize/_approval_panel.py +505 -0
- pythinker_code/ui/shell/visualize/_blocks.py +629 -0
- pythinker_code/ui/shell/visualize/_btw_panel.py +224 -0
- pythinker_code/ui/shell/visualize/_input_router.py +48 -0
- pythinker_code/ui/shell/visualize/_interactive.py +523 -0
- pythinker_code/ui/shell/visualize/_live_view.py +826 -0
- pythinker_code/ui/shell/visualize/_question_panel.py +586 -0
- pythinker_code/ui/theme.py +241 -0
- pythinker_code/usage_ratelimit_cache.py +175 -0
- pythinker_code/utils/__init__.py +0 -0
- pythinker_code/utils/aiohttp.py +24 -0
- pythinker_code/utils/aioqueue.py +72 -0
- pythinker_code/utils/broadcast.py +37 -0
- pythinker_code/utils/changelog.py +108 -0
- pythinker_code/utils/clipboard.py +246 -0
- pythinker_code/utils/datetime.py +64 -0
- pythinker_code/utils/diff.py +135 -0
- pythinker_code/utils/editor.py +91 -0
- pythinker_code/utils/environment.py +73 -0
- pythinker_code/utils/envvar.py +22 -0
- pythinker_code/utils/export.py +696 -0
- pythinker_code/utils/file_filter.py +375 -0
- pythinker_code/utils/frontmatter.py +70 -0
- pythinker_code/utils/io.py +27 -0
- pythinker_code/utils/logging.py +146 -0
- pythinker_code/utils/media_tags.py +29 -0
- pythinker_code/utils/message.py +24 -0
- pythinker_code/utils/path.py +199 -0
- pythinker_code/utils/proctitle.py +33 -0
- pythinker_code/utils/proxy.py +31 -0
- pythinker_code/utils/pyinstaller.py +45 -0
- pythinker_code/utils/rich/__init__.py +33 -0
- pythinker_code/utils/rich/columns.py +99 -0
- pythinker_code/utils/rich/diff_render.py +481 -0
- pythinker_code/utils/rich/markdown.py +900 -0
- pythinker_code/utils/rich/markdown_sample.md +108 -0
- pythinker_code/utils/rich/markdown_sample_short.md +2 -0
- pythinker_code/utils/rich/syntax.py +114 -0
- pythinker_code/utils/sensitive.py +54 -0
- pythinker_code/utils/server.py +121 -0
- pythinker_code/utils/signals.py +43 -0
- pythinker_code/utils/slashcmd.py +124 -0
- pythinker_code/utils/string.py +41 -0
- pythinker_code/utils/subprocess_env.py +73 -0
- pythinker_code/utils/term.py +168 -0
- pythinker_code/utils/typing.py +20 -0
- pythinker_code/vis/__init__.py +0 -0
- pythinker_code/vis/api/__init__.py +5 -0
- pythinker_code/vis/api/sessions.py +687 -0
- pythinker_code/vis/api/statistics.py +209 -0
- pythinker_code/vis/api/system.py +19 -0
- pythinker_code/vis/app.py +175 -0
- pythinker_code/vis/static/assets/highlighted-body-B3W2YXNL-D2MTYyJz.js +1 -0
- pythinker_code/vis/static/assets/index-CezafTt_.js +185 -0
- pythinker_code/vis/static/assets/index-DSRInNnm.css +1 -0
- pythinker_code/vis/static/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- pythinker_code/vis/static/index.html +17 -0
- pythinker_code/web/__init__.py +5 -0
- pythinker_code/web/api/__init__.py +15 -0
- pythinker_code/web/api/config.py +208 -0
- pythinker_code/web/api/open_in.py +199 -0
- pythinker_code/web/api/sessions.py +1225 -0
- pythinker_code/web/app.py +451 -0
- pythinker_code/web/auth.py +191 -0
- pythinker_code/web/models.py +98 -0
- pythinker_code/web/runner/__init__.py +5 -0
- pythinker_code/web/runner/messages.py +57 -0
- pythinker_code/web/runner/process.py +754 -0
- pythinker_code/web/runner/worker.py +97 -0
- pythinker_code/web/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- pythinker_code/web/static/assets/_baseUniq--dyU3g5v.js +1 -0
- pythinker_code/web/static/assets/abap-BdImnpbu.js +1 -0
- pythinker_code/web/static/assets/actionscript-3-CfeIJUat.js +1 -0
- pythinker_code/web/static/assets/ada-bCR0ucgS.js +1 -0
- pythinker_code/web/static/assets/andromeeda-C-Jbm3Hp.js +1 -0
- pythinker_code/web/static/assets/angular-html-CU67Zn6k.js +1 -0
- pythinker_code/web/static/assets/angular-ts-BwZT4LLn.js +1 -0
- pythinker_code/web/static/assets/apache-Pmp26Uib.js +1 -0
- pythinker_code/web/static/assets/apex-D8_7TLub.js +1 -0
- pythinker_code/web/static/assets/apl-dKokRX4l.js +1 -0
- pythinker_code/web/static/assets/applescript-Co6uUVPk.js +1 -0
- pythinker_code/web/static/assets/ara-BRHolxvo.js +1 -0
- pythinker_code/web/static/assets/arc-DkMjLpYa.js +1 -0
- pythinker_code/web/static/assets/architectureDiagram-VXUJARFQ-CHWVaGo9.js +36 -0
- pythinker_code/web/static/assets/asciidoc-Dv7Oe6Be.js +1 -0
- pythinker_code/web/static/assets/asm-D_Q5rh1f.js +1 -0
- pythinker_code/web/static/assets/astro-CbQHKStN.js +1 -0
- pythinker_code/web/static/assets/aurora-x-D-2ljcwZ.js +1 -0
- pythinker_code/web/static/assets/awk-DMzUqQB5.js +1 -0
- pythinker_code/web/static/assets/ayu-dark-CmMr59Fi.js +1 -0
- pythinker_code/web/static/assets/ballerina-BFfxhgS-.js +1 -0
- pythinker_code/web/static/assets/bat-BkioyH1T.js +1 -0
- pythinker_code/web/static/assets/beancount-k_qm7-4y.js +1 -0
- pythinker_code/web/static/assets/berry-uYugtg8r.js +1 -0
- pythinker_code/web/static/assets/bibtex-CHM0blh-.js +1 -0
- pythinker_code/web/static/assets/bicep-Bmn6On1c.js +1 -0
- pythinker_code/web/static/assets/blade-D4QpJJKB.js +1 -0
- pythinker_code/web/static/assets/blockDiagram-VD42YOAC-DzdKe497.js +122 -0
- pythinker_code/web/static/assets/bsl-BO_Y6i37.js +1 -0
- pythinker_code/web/static/assets/c-BIGW1oBm.js +1 -0
- pythinker_code/web/static/assets/c3-VCDPK7BO.js +1 -0
- pythinker_code/web/static/assets/c4Diagram-YG6GDRKO-D84Blotg.js +10 -0
- pythinker_code/web/static/assets/cadence-Bv_4Rxtq.js +1 -0
- pythinker_code/web/static/assets/cairo-KRGpt6FW.js +1 -0
- pythinker_code/web/static/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- pythinker_code/web/static/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- pythinker_code/web/static/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- pythinker_code/web/static/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- pythinker_code/web/static/assets/channel-CllSjjdl.js +1 -0
- pythinker_code/web/static/assets/chunk-4BX2VUAB-C9w8wleE.js +1 -0
- pythinker_code/web/static/assets/chunk-55IACEB6-YlYJ8HnF.js +1 -0
- pythinker_code/web/static/assets/chunk-B4BG7PRW-Bwtz_AHU.js +165 -0
- pythinker_code/web/static/assets/chunk-DI55MBZ5-BbEHkl8h.js +220 -0
- pythinker_code/web/static/assets/chunk-FMBD7UC4-BKPbvjLC.js +15 -0
- pythinker_code/web/static/assets/chunk-QN33PNHL-D73dQvKf.js +1 -0
- pythinker_code/web/static/assets/chunk-QZHKN3VN-zGiLKes_.js +1 -0
- pythinker_code/web/static/assets/chunk-TZMSLE5B-LHJCi2fy.js +1 -0
- pythinker_code/web/static/assets/clarity-D53aC0YG.js +1 -0
- pythinker_code/web/static/assets/classDiagram-2ON5EDUG-vX27iZwa.js +1 -0
- pythinker_code/web/static/assets/classDiagram-v2-WZHVMYZB-vX27iZwa.js +1 -0
- pythinker_code/web/static/assets/clojure-P80f7IUj.js +1 -0
- pythinker_code/web/static/assets/clone-DYBkaPm2.js +1 -0
- pythinker_code/web/static/assets/cmake-D1j8_8rp.js +1 -0
- pythinker_code/web/static/assets/cobol-nwyudZeR.js +1 -0
- pythinker_code/web/static/assets/code-block-IT6T5CEO-NtKViZGl.js +2 -0
- pythinker_code/web/static/assets/codeowners-Bp6g37R7.js +1 -0
- pythinker_code/web/static/assets/codeql-DsOJ9woJ.js +1 -0
- pythinker_code/web/static/assets/coffee-Ch7k5sss.js +1 -0
- pythinker_code/web/static/assets/common-lisp-Cg-RD9OK.js +1 -0
- pythinker_code/web/static/assets/coq-DkFqJrB1.js +1 -0
- pythinker_code/web/static/assets/cose-bilkent-S5V4N54A-DialjZpd.js +1 -0
- pythinker_code/web/static/assets/cpp-CofmeUqb.js +1 -0
- pythinker_code/web/static/assets/crystal-tKQVLTB8.js +1 -0
- pythinker_code/web/static/assets/csharp-K5feNrxe.js +1 -0
- pythinker_code/web/static/assets/css-DPfMkruS.js +1 -0
- pythinker_code/web/static/assets/csv-fuZLfV_i.js +1 -0
- pythinker_code/web/static/assets/cue-D82EKSYY.js +1 -0
- pythinker_code/web/static/assets/cypher-COkxafJQ.js +1 -0
- pythinker_code/web/static/assets/cytoscape.esm-C_Fzpdck.js +321 -0
- pythinker_code/web/static/assets/d-85-TOEBH.js +1 -0
- pythinker_code/web/static/assets/dagre-6UL2VRFP-DfuvkZZ7.js +4 -0
- pythinker_code/web/static/assets/dark-plus-C3mMm8J8.js +1 -0
- pythinker_code/web/static/assets/dart-CF10PKvl.js +1 -0
- pythinker_code/web/static/assets/dax-CEL-wOlO.js +1 -0
- pythinker_code/web/static/assets/defaultLocale-DX6XiGOO.js +1 -0
- pythinker_code/web/static/assets/desktop-BmXAJ9_W.js +1 -0
- pythinker_code/web/static/assets/diagram-PSM6KHXK-DLGctX3v.js +24 -0
- pythinker_code/web/static/assets/diagram-QEK2KX5R-DnxN6S0F.js +43 -0
- pythinker_code/web/static/assets/diagram-S2PKOQOG-Caq_Set9.js +24 -0
- pythinker_code/web/static/assets/diff-D97Zzqfu.js +1 -0
- pythinker_code/web/static/assets/docker-BcOcwvcX.js +1 -0
- pythinker_code/web/static/assets/dotenv-Da5cRb03.js +1 -0
- pythinker_code/web/static/assets/dracula-BzJJZx-M.js +1 -0
- pythinker_code/web/static/assets/dracula-soft-BXkSAIEj.js +1 -0
- pythinker_code/web/static/assets/dream-maker-BtqSS_iP.js +1 -0
- pythinker_code/web/static/assets/edge-BkV0erSs.js +1 -0
- pythinker_code/web/static/assets/elixir-CDX3lj18.js +1 -0
- pythinker_code/web/static/assets/elm-DbKCFpqz.js +1 -0
- pythinker_code/web/static/assets/emacs-lisp-C9XAeP06.js +1 -0
- pythinker_code/web/static/assets/erDiagram-Q2GNP2WA-BgTfALoK.js +60 -0
- pythinker_code/web/static/assets/erb-BOJIQeun.js +1 -0
- pythinker_code/web/static/assets/erlang-DsQrWhSR.js +1 -0
- pythinker_code/web/static/assets/everforest-dark-BgDCqdQA.js +1 -0
- pythinker_code/web/static/assets/everforest-light-C8M2exoo.js +1 -0
- pythinker_code/web/static/assets/fennel-BYunw83y.js +1 -0
- pythinker_code/web/static/assets/fish-BvzEVeQv.js +1 -0
- pythinker_code/web/static/assets/flowDiagram-NV44I4VS-QjW_fnGi.js +162 -0
- pythinker_code/web/static/assets/fluent-C4IJs8-o.js +1 -0
- pythinker_code/web/static/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- pythinker_code/web/static/assets/fortran-free-form-BxgE0vQu.js +1 -0
- pythinker_code/web/static/assets/fsharp-CXgrBDvD.js +1 -0
- pythinker_code/web/static/assets/ganttDiagram-JELNMOA3-fqi8JFof.js +267 -0
- pythinker_code/web/static/assets/gdresource-B7Tvp0Sc.js +1 -0
- pythinker_code/web/static/assets/gdscript-DTMYz4Jt.js +1 -0
- pythinker_code/web/static/assets/gdshader-DkwncUOv.js +1 -0
- pythinker_code/web/static/assets/genie-D0YGMca9.js +1 -0
- pythinker_code/web/static/assets/gherkin-DyxjwDmM.js +1 -0
- pythinker_code/web/static/assets/git-commit-F4YmCXRG.js +1 -0
- pythinker_code/web/static/assets/git-rebase-r7XF79zn.js +1 -0
- pythinker_code/web/static/assets/gitGraphDiagram-NY62KEGX-i7o6VQ8x.js +65 -0
- pythinker_code/web/static/assets/github-dark-DHJKELXO.js +1 -0
- pythinker_code/web/static/assets/github-dark-default-Cuk6v7N8.js +1 -0
- pythinker_code/web/static/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- pythinker_code/web/static/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- pythinker_code/web/static/assets/github-light-DAi9KRSo.js +1 -0
- pythinker_code/web/static/assets/github-light-default-D7oLnXFd.js +1 -0
- pythinker_code/web/static/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- pythinker_code/web/static/assets/gleam-BspZqrRM.js +1 -0
- pythinker_code/web/static/assets/glimmer-js-Rg0-pVw9.js +1 -0
- pythinker_code/web/static/assets/glimmer-ts-U6CK756n.js +1 -0
- pythinker_code/web/static/assets/glsl-DplSGwfg.js +1 -0
- pythinker_code/web/static/assets/gn-n2N0HUVH.js +1 -0
- pythinker_code/web/static/assets/gnuplot-DdkO51Og.js +1 -0
- pythinker_code/web/static/assets/go-Dn2_MT6a.js +1 -0
- pythinker_code/web/static/assets/graph-C0vZK2pT.js +1 -0
- pythinker_code/web/static/assets/graphql-ChdNCCLP.js +1 -0
- pythinker_code/web/static/assets/groovy-gcz8RCvz.js +1 -0
- pythinker_code/web/static/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- pythinker_code/web/static/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- pythinker_code/web/static/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- pythinker_code/web/static/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- pythinker_code/web/static/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- pythinker_code/web/static/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- pythinker_code/web/static/assets/hack-CaT9iCJl.js +1 -0
- pythinker_code/web/static/assets/haml-B8DHNrY2.js +1 -0
- pythinker_code/web/static/assets/handlebars-BL8al0AC.js +1 -0
- pythinker_code/web/static/assets/haskell-Df6bDoY_.js +1 -0
- pythinker_code/web/static/assets/haxe-CzTSHFRz.js +1 -0
- pythinker_code/web/static/assets/hcl-BWvSN4gD.js +1 -0
- pythinker_code/web/static/assets/hjson-D5-asLiD.js +1 -0
- pythinker_code/web/static/assets/hlsl-D3lLCCz7.js +1 -0
- pythinker_code/web/static/assets/houston-DnULxvSX.js +1 -0
- pythinker_code/web/static/assets/html-GMplVEZG.js +1 -0
- pythinker_code/web/static/assets/html-derivative-BFtXZ54Q.js +1 -0
- pythinker_code/web/static/assets/http-jrhK8wxY.js +1 -0
- pythinker_code/web/static/assets/hurl-irOxFIW8.js +1 -0
- pythinker_code/web/static/assets/hxml-Bvhsp5Yf.js +1 -0
- pythinker_code/web/static/assets/hy-DFXneXwc.js +1 -0
- pythinker_code/web/static/assets/imba-DGztddWO.js +1 -0
- pythinker_code/web/static/assets/index-BYCCk6-K.js +153 -0
- pythinker_code/web/static/assets/index-BpoLgcEt.js +1 -0
- pythinker_code/web/static/assets/index-Cpy4G3uJ.js +2 -0
- pythinker_code/web/static/assets/index-CzV_vCfu.css +1 -0
- pythinker_code/web/static/assets/index-DI2oedCt.js +19 -0
- pythinker_code/web/static/assets/index-DdIkp80K.js +5 -0
- pythinker_code/web/static/assets/infoDiagram-WHAUD3N6-BMPpeZSM.js +2 -0
- pythinker_code/web/static/assets/ini-BEwlwnbL.js +1 -0
- pythinker_code/web/static/assets/init-Gi6I4Gst.js +1 -0
- pythinker_code/web/static/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- pythinker_code/web/static/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- pythinker_code/web/static/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- pythinker_code/web/static/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- pythinker_code/web/static/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- pythinker_code/web/static/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- pythinker_code/web/static/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- pythinker_code/web/static/assets/java-CylS5w8V.js +1 -0
- pythinker_code/web/static/assets/javascript-wDzz0qaB.js +1 -0
- pythinker_code/web/static/assets/jinja-4LBKfQ-Z.js +1 -0
- pythinker_code/web/static/assets/jison-wvAkD_A8.js +1 -0
- pythinker_code/web/static/assets/journeyDiagram-XKPGCS4Q-DAM7gngo.js +139 -0
- pythinker_code/web/static/assets/json-Cp-IABpG.js +1 -0
- pythinker_code/web/static/assets/json5-C9tS-k6U.js +1 -0
- pythinker_code/web/static/assets/jsonc-Des-eS-w.js +1 -0
- pythinker_code/web/static/assets/jsonl-DcaNXYhu.js +1 -0
- pythinker_code/web/static/assets/jsonnet-DFQXde-d.js +1 -0
- pythinker_code/web/static/assets/jssm-C2t-YnRu.js +1 -0
- pythinker_code/web/static/assets/jsx-g9-lgVsj.js +1 -0
- pythinker_code/web/static/assets/julia-CxzCAyBv.js +1 -0
- pythinker_code/web/static/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- pythinker_code/web/static/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- pythinker_code/web/static/assets/kanagawa-wave-DWedfzmr.js +1 -0
- pythinker_code/web/static/assets/kanban-definition-3W4ZIXB7-ChpBpV0k.js +89 -0
- pythinker_code/web/static/assets/katex-D2lIc1rk.css +1 -0
- pythinker_code/web/static/assets/kdl-DV7GczEv.js +1 -0
- pythinker_code/web/static/assets/kotlin-BdnUsdx6.js +1 -0
- pythinker_code/web/static/assets/kusto-DZf3V79B.js +1 -0
- pythinker_code/web/static/assets/laserwave-DUszq2jm.js +1 -0
- pythinker_code/web/static/assets/latex-B4uzh10-.js +1 -0
- pythinker_code/web/static/assets/layout-C3Jp1gKO.js +1 -0
- pythinker_code/web/static/assets/lean-BZvkOJ9d.js +1 -0
- pythinker_code/web/static/assets/less-B1dDrJ26.js +1 -0
- pythinker_code/web/static/assets/light-plus-B7mTdjB0.js +1 -0
- pythinker_code/web/static/assets/linear-BGHtL1N4.js +1 -0
- pythinker_code/web/static/assets/liquid-DYVedYrR.js +1 -0
- pythinker_code/web/static/assets/llvm-BtvRca6l.js +1 -0
- pythinker_code/web/static/assets/log-2UxHyX5q.js +1 -0
- pythinker_code/web/static/assets/logo-BtOb2qkB.js +1 -0
- pythinker_code/web/static/assets/lua-BbnMAYS6.js +1 -0
- pythinker_code/web/static/assets/luau-C-HG3fhB.js +1 -0
- pythinker_code/web/static/assets/make-CHLpvVh8.js +1 -0
- pythinker_code/web/static/assets/markdown-Cvjx9yec.js +1 -0
- pythinker_code/web/static/assets/marko-DZsq8hO1.js +1 -0
- pythinker_code/web/static/assets/material-theme-D5KoaKCx.js +1 -0
- pythinker_code/web/static/assets/material-theme-darker-BfHTSMKl.js +1 -0
- pythinker_code/web/static/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- pythinker_code/web/static/assets/material-theme-ocean-CyktbL80.js +1 -0
- pythinker_code/web/static/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- pythinker_code/web/static/assets/matlab-D7o27uSR.js +1 -0
- pythinker_code/web/static/assets/mdc-DUICxH0z.js +1 -0
- pythinker_code/web/static/assets/mdx-Cmh6b_Ma.js +1 -0
- pythinker_code/web/static/assets/mermaid-VLURNSYL-B2P5VJ9v.css +1 -0
- pythinker_code/web/static/assets/mermaid-VLURNSYL-C_HW6koB.js +465 -0
- pythinker_code/web/static/assets/mermaid-mWjccvbQ.js +1 -0
- pythinker_code/web/static/assets/mermaid.core-CnT4VrPC.js +191 -0
- pythinker_code/web/static/assets/min-Dn5VRVmX.js +1 -0
- pythinker_code/web/static/assets/min-dark-CafNBF8u.js +1 -0
- pythinker_code/web/static/assets/min-light-CTRr51gU.js +1 -0
- pythinker_code/web/static/assets/mindmap-definition-VGOIOE7T-x8EwhfIt.js +68 -0
- pythinker_code/web/static/assets/mipsasm-CKIfxQSi.js +1 -0
- pythinker_code/web/static/assets/mojo-B93PlW-d.js +1 -0
- pythinker_code/web/static/assets/monokai-D4h5O-jR.js +1 -0
- pythinker_code/web/static/assets/moonbit-Ba13S78F.js +1 -0
- pythinker_code/web/static/assets/move-Bu9oaDYs.js +1 -0
- pythinker_code/web/static/assets/narrat-DRg8JJMk.js +1 -0
- pythinker_code/web/static/assets/nextflow-BrzmwbiE.js +1 -0
- pythinker_code/web/static/assets/nginx-DknmC5AR.js +1 -0
- pythinker_code/web/static/assets/night-owl-C39BiMTA.js +1 -0
- pythinker_code/web/static/assets/nim-CVrawwO9.js +1 -0
- pythinker_code/web/static/assets/nix-CwoSXNpI.js +1 -0
- pythinker_code/web/static/assets/nord-Ddv68eIx.js +1 -0
- pythinker_code/web/static/assets/nushell-C-sUppwS.js +1 -0
- pythinker_code/web/static/assets/objective-c-DXmwc3jG.js +1 -0
- pythinker_code/web/static/assets/objective-cpp-CLxacb5B.js +1 -0
- pythinker_code/web/static/assets/ocaml-C0hk2d4L.js +1 -0
- pythinker_code/web/static/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- pythinker_code/web/static/assets/one-light-PoHY5YXO.js +1 -0
- pythinker_code/web/static/assets/openscad-C4EeE6gA.js +1 -0
- pythinker_code/web/static/assets/ordinal-Cboi1Yqb.js +1 -0
- pythinker_code/web/static/assets/pascal-D93ZcfNL.js +1 -0
- pythinker_code/web/static/assets/perl-C0TMdlhV.js +1 -0
- pythinker_code/web/static/assets/php-CDn_0X-4.js +1 -0
- pythinker_code/web/static/assets/pieDiagram-ADFJNKIX-DgxBKGz2.js +30 -0
- pythinker_code/web/static/assets/pkl-u5AG7uiY.js +1 -0
- pythinker_code/web/static/assets/plastic-3e1v2bzS.js +1 -0
- pythinker_code/web/static/assets/plsql-ChMvpjG-.js +1 -0
- pythinker_code/web/static/assets/po-BTJTHyun.js +1 -0
- pythinker_code/web/static/assets/poimandres-CS3Unz2-.js +1 -0
- pythinker_code/web/static/assets/polar-C0HS_06l.js +1 -0
- pythinker_code/web/static/assets/postcss-CXtECtnM.js +1 -0
- pythinker_code/web/static/assets/powerquery-CEu0bR-o.js +1 -0
- pythinker_code/web/static/assets/powershell-Dpen1YoG.js +1 -0
- pythinker_code/web/static/assets/prisma-Dd19v3D-.js +1 -0
- pythinker_code/web/static/assets/prolog-CbFg5uaA.js +1 -0
- pythinker_code/web/static/assets/proto-C7zT0LnQ.js +1 -0
- pythinker_code/web/static/assets/pug-CGlum2m_.js +1 -0
- pythinker_code/web/static/assets/puppet-BMWR74SV.js +1 -0
- pythinker_code/web/static/assets/purescript-CklMAg4u.js +1 -0
- pythinker_code/web/static/assets/python-B6aJPvgy.js +1 -0
- pythinker_code/web/static/assets/qml-3beO22l8.js +1 -0
- pythinker_code/web/static/assets/qmldir-C8lEn-DE.js +1 -0
- pythinker_code/web/static/assets/qss-IeuSbFQv.js +1 -0
- pythinker_code/web/static/assets/quadrantDiagram-AYHSOK5B-DSpe_dqk.js +7 -0
- pythinker_code/web/static/assets/r-Dspwwk_N.js +1 -0
- pythinker_code/web/static/assets/racket-BqYA7rlc.js +1 -0
- pythinker_code/web/static/assets/raku-DXvB9xmW.js +1 -0
- pythinker_code/web/static/assets/razor-C1TweQQi.js +1 -0
- pythinker_code/web/static/assets/red-bN70gL4F.js +1 -0
- pythinker_code/web/static/assets/reg-C-SQnVFl.js +1 -0
- pythinker_code/web/static/assets/regexp-CDVJQ6XC.js +1 -0
- pythinker_code/web/static/assets/rel-C3B-1QV4.js +1 -0
- pythinker_code/web/static/assets/requirementDiagram-UZGBJVZJ-8o9hozL-.js +64 -0
- pythinker_code/web/static/assets/riscv-BM1_JUlF.js +1 -0
- pythinker_code/web/static/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- pythinker_code/web/static/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- pythinker_code/web/static/assets/rose-pine-qdsjHGoJ.js +1 -0
- pythinker_code/web/static/assets/rosmsg-BJDFO7_C.js +1 -0
- pythinker_code/web/static/assets/rst-B0xPkSld.js +1 -0
- pythinker_code/web/static/assets/ruby-BvKwtOVI.js +1 -0
- pythinker_code/web/static/assets/rust-B1yitclQ.js +1 -0
- pythinker_code/web/static/assets/sankeyDiagram-TZEHDZUN-BLOSUixH.js +10 -0
- pythinker_code/web/static/assets/sas-cz2c8ADy.js +1 -0
- pythinker_code/web/static/assets/sass-Cj5Yp3dK.js +1 -0
- pythinker_code/web/static/assets/scala-C151Ov-r.js +1 -0
- pythinker_code/web/static/assets/scheme-C98Dy4si.js +1 -0
- pythinker_code/web/static/assets/scss-OYdSNvt2.js +1 -0
- pythinker_code/web/static/assets/sdbl-DVxCFoDh.js +1 -0
- pythinker_code/web/static/assets/sequenceDiagram-WL72ISMW-6F2G8JTU.js +145 -0
- pythinker_code/web/static/assets/shaderlab-Dg9Lc6iA.js +1 -0
- pythinker_code/web/static/assets/shellscript-Yzrsuije.js +1 -0
- pythinker_code/web/static/assets/shellsession-BADoaaVG.js +1 -0
- pythinker_code/web/static/assets/slack-dark-BthQWCQV.js +1 -0
- pythinker_code/web/static/assets/slack-ochin-DqwNpetd.js +1 -0
- pythinker_code/web/static/assets/smalltalk-BERRCDM3.js +1 -0
- pythinker_code/web/static/assets/snazzy-light-Bw305WKR.js +1 -0
- pythinker_code/web/static/assets/solarized-dark-DXbdFlpD.js +1 -0
- pythinker_code/web/static/assets/solarized-light-L9t79GZl.js +1 -0
- pythinker_code/web/static/assets/solidity-rGO070M0.js +1 -0
- pythinker_code/web/static/assets/soy-Brmx7dQM.js +1 -0
- pythinker_code/web/static/assets/sparql-rVzFXLq3.js +1 -0
- pythinker_code/web/static/assets/splunk-BtCnVYZw.js +1 -0
- pythinker_code/web/static/assets/sql-BLtJtn59.js +1 -0
- pythinker_code/web/static/assets/ssh-config-_ykCGR6B.js +1 -0
- pythinker_code/web/static/assets/stata-BH5u7GGu.js +1 -0
- pythinker_code/web/static/assets/stateDiagram-FKZM4ZOC-DP8xP0iJ.js +1 -0
- pythinker_code/web/static/assets/stateDiagram-v2-4FDKWEC3-1l6-EZNX.js +1 -0
- pythinker_code/web/static/assets/stylus-BEDo0Tqx.js +1 -0
- pythinker_code/web/static/assets/svelte-zxCyuUbr.js +1 -0
- pythinker_code/web/static/assets/swift-Dg5xB15N.js +1 -0
- pythinker_code/web/static/assets/synthwave-84-CbfX1IO0.js +1 -0
- pythinker_code/web/static/assets/system-verilog-CnnmHF94.js +1 -0
- pythinker_code/web/static/assets/systemd-4A_iFExJ.js +1 -0
- pythinker_code/web/static/assets/talonscript-CkByrt1z.js +1 -0
- pythinker_code/web/static/assets/tasl-QIJgUcNo.js +1 -0
- pythinker_code/web/static/assets/tcl-dwOrl1Do.js +1 -0
- pythinker_code/web/static/assets/templ-W15q3VgB.js +1 -0
- pythinker_code/web/static/assets/terraform-BETggiCN.js +1 -0
- pythinker_code/web/static/assets/tex-CvyZ59Mk.js +1 -0
- pythinker_code/web/static/assets/timeline-definition-IT6M3QCI-DMgruDfK.js +61 -0
- pythinker_code/web/static/assets/tokyo-night-hegEt444.js +1 -0
- pythinker_code/web/static/assets/toml-vGWfd6FD.js +1 -0
- pythinker_code/web/static/assets/treemap-KMMF4GRG-Bo9ZkrAK.js +128 -0
- pythinker_code/web/static/assets/ts-tags-zn1MmPIZ.js +1 -0
- pythinker_code/web/static/assets/tsv-B_m7g4N7.js +1 -0
- pythinker_code/web/static/assets/tsx-COt5Ahok.js +1 -0
- pythinker_code/web/static/assets/turtle-BsS91CYL.js +1 -0
- pythinker_code/web/static/assets/twig-CO9l9SDP.js +1 -0
- pythinker_code/web/static/assets/typescript-BPQ3VLAy.js +1 -0
- pythinker_code/web/static/assets/typespec-BGHnOYBU.js +1 -0
- pythinker_code/web/static/assets/typst-DHCkPAjA.js +1 -0
- pythinker_code/web/static/assets/v-BcVCzyr7.js +1 -0
- pythinker_code/web/static/assets/vala-CsfeWuGM.js +1 -0
- pythinker_code/web/static/assets/vb-D17OF-Vu.js +1 -0
- pythinker_code/web/static/assets/verilog-BQ8w6xss.js +1 -0
- pythinker_code/web/static/assets/vesper-DU1UobuO.js +1 -0
- pythinker_code/web/static/assets/vhdl-CeAyd5Ju.js +1 -0
- pythinker_code/web/static/assets/viml-CJc9bBzg.js +1 -0
- pythinker_code/web/static/assets/vitesse-black-Bkuqu6BP.js +1 -0
- pythinker_code/web/static/assets/vitesse-dark-D0r3Knsf.js +1 -0
- pythinker_code/web/static/assets/vitesse-light-CVO1_9PV.js +1 -0
- pythinker_code/web/static/assets/vue-DN_0RTcg.js +1 -0
- pythinker_code/web/static/assets/vue-html-AaS7Mt5G.js +1 -0
- pythinker_code/web/static/assets/vue-vine-CQOfvN7w.js +1 -0
- pythinker_code/web/static/assets/vyper-CDx5xZoG.js +1 -0
- pythinker_code/web/static/assets/wasm-CG6Dc4jp.js +1 -0
- pythinker_code/web/static/assets/wasm-MzD3tlZU.js +1 -0
- pythinker_code/web/static/assets/wenyan-BV7otONQ.js +1 -0
- pythinker_code/web/static/assets/wgsl-Dx-B1_4e.js +1 -0
- pythinker_code/web/static/assets/wikitext-BhOHFoWU.js +1 -0
- pythinker_code/web/static/assets/wit-5i3qLPDT.js +1 -0
- pythinker_code/web/static/assets/wolfram-lXgVvXCa.js +1 -0
- pythinker_code/web/static/assets/xml-sdJ4AIDG.js +1 -0
- pythinker_code/web/static/assets/xsl-CtQFsRM5.js +1 -0
- pythinker_code/web/static/assets/xychartDiagram-PRI3JC2R-GeF2johi.js +7 -0
- pythinker_code/web/static/assets/yaml-Buea-lGh.js +1 -0
- pythinker_code/web/static/assets/zenscript-DVFEvuxE.js +1 -0
- pythinker_code/web/static/assets/zig-VOosw3JB.js +1 -0
- pythinker_code/web/static/brand/apple-touch-icon.png +0 -0
- pythinker_code/web/static/brand/arctecture.webp +0 -0
- pythinker_code/web/static/brand/bimi-logo.svg +46 -0
- pythinker_code/web/static/brand/favicon.ico +0 -0
- pythinker_code/web/static/brand/fonts/dm-sans-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/dm-sans-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-sans-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-sans-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-serif-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-serif-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-italic-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-italic-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/roboto-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/roboto-latin.woff2 +0 -0
- pythinker_code/web/static/brand/icon-192.png +0 -0
- pythinker_code/web/static/brand/icon-512.png +0 -0
- pythinker_code/web/static/brand/icon.svg +1 -0
- pythinker_code/web/static/brand/logo.png +0 -0
- pythinker_code/web/static/brand/pythinker_animated.svg +79 -0
- pythinker_code/web/static/brand/robots.txt +4 -0
- pythinker_code/web/static/index.html +15 -0
- pythinker_code/web/static/logo.png +0 -0
- pythinker_code/web/store/__init__.py +1 -0
- pythinker_code/web/store/sessions.py +432 -0
- pythinker_code/wire/__init__.py +148 -0
- pythinker_code/wire/file.py +151 -0
- pythinker_code/wire/jsonrpc.py +263 -0
- pythinker_code/wire/protocol.py +2 -0
- pythinker_code/wire/root_hub.py +27 -0
- pythinker_code/wire/serde.py +26 -0
- pythinker_code/wire/server.py +1069 -0
- pythinker_code/wire/types.py +698 -0
- pythinker_code-2.0.0.dist-info/METADATA +660 -0
- pythinker_code-2.0.0.dist-info/RECORD +731 -0
- pythinker_code-2.0.0.dist-info/WHEEL +4 -0
- pythinker_code-2.0.0.dist-info/entry_points.txt +4 -0
- pythinker_code-2.0.0.dist-info/licenses/LICENSE +202 -0
- pythinker_code-2.0.0.dist-info/licenses/NOTICE +14 -0
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from dataclasses import asdict, dataclass
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import TYPE_CHECKING, Any, Literal
|
|
8
|
+
|
|
9
|
+
import pydantic
|
|
10
|
+
from jinja2 import Environment as JinjaEnvironment
|
|
11
|
+
from jinja2 import FileSystemLoader, StrictUndefined, TemplateError, UndefinedError
|
|
12
|
+
from pythinker_core.tooling import Toolset
|
|
13
|
+
from pythinker_host.path import HostPath
|
|
14
|
+
|
|
15
|
+
from pythinker_code.agentspec import load_agent_spec
|
|
16
|
+
from pythinker_code.approval_runtime import ApprovalRuntime
|
|
17
|
+
from pythinker_code.auth.oauth import OAuthManager
|
|
18
|
+
from pythinker_code.background import BackgroundTaskManager
|
|
19
|
+
from pythinker_code.config import Config
|
|
20
|
+
from pythinker_code.exception import MCPConfigError, SystemPromptTemplateError
|
|
21
|
+
from pythinker_code.llm import LLM
|
|
22
|
+
from pythinker_code.notifications import NotificationManager
|
|
23
|
+
from pythinker_code.session import Session
|
|
24
|
+
from pythinker_code.skill import (
|
|
25
|
+
Skill,
|
|
26
|
+
discover_skills_from_roots,
|
|
27
|
+
format_skills_for_prompt,
|
|
28
|
+
index_skills,
|
|
29
|
+
resolve_skills_roots,
|
|
30
|
+
)
|
|
31
|
+
from pythinker_code.soul.approval import Approval, ApprovalState
|
|
32
|
+
from pythinker_code.soul.denwarenji import DenwaRenji
|
|
33
|
+
from pythinker_code.soul.toolset import PythinkerToolset
|
|
34
|
+
from pythinker_code.subagents.models import AgentTypeDefinition, ToolPolicy
|
|
35
|
+
from pythinker_code.subagents.registry import LaborMarket
|
|
36
|
+
from pythinker_code.subagents.store import SubagentStore
|
|
37
|
+
from pythinker_code.utils.environment import Environment
|
|
38
|
+
from pythinker_code.utils.logging import logger
|
|
39
|
+
from pythinker_code.utils.path import find_project_root, is_within_directory, list_directory
|
|
40
|
+
from pythinker_code.wire.root_hub import RootWireHub
|
|
41
|
+
|
|
42
|
+
if TYPE_CHECKING:
|
|
43
|
+
from fastmcp.mcp_config import MCPConfig
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@dataclass(frozen=True, slots=True, kw_only=True)
|
|
47
|
+
class BuiltinSystemPromptArgs:
|
|
48
|
+
"""Builtin system prompt arguments."""
|
|
49
|
+
|
|
50
|
+
PYTHINKER_NOW: str
|
|
51
|
+
"""The current datetime."""
|
|
52
|
+
PYTHINKER_WORK_DIR: HostPath
|
|
53
|
+
"""The absolute path of current working directory."""
|
|
54
|
+
PYTHINKER_WORK_DIR_LS: str
|
|
55
|
+
"""The directory listing of current working directory."""
|
|
56
|
+
PYTHINKER_AGENTS_MD: str # TODO: move to first message from system prompt
|
|
57
|
+
"""The merged content of AGENTS.md files (from project root to work_dir)."""
|
|
58
|
+
PYTHINKER_SKILLS: str
|
|
59
|
+
"""Formatted information about available skills."""
|
|
60
|
+
PYTHINKER_ADDITIONAL_DIRS_INFO: str
|
|
61
|
+
"""Formatted information about additional directories in the workspace."""
|
|
62
|
+
PYTHINKER_OS: str
|
|
63
|
+
"""The operating system kind, e.g. 'Windows', 'macOS', 'Linux'."""
|
|
64
|
+
PYTHINKER_SHELL: str
|
|
65
|
+
"""The shell executable used by the Shell tool, e.g. 'bash (`/bin/bash`)'."""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
_AGENTS_MD_MAX_BYTES = 32 * 1024 # 32 KiB
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
async def _dirs_root_to_leaf(work_dir: HostPath, project_root: HostPath) -> list[HostPath]:
|
|
72
|
+
"""Return the list of directories from *project_root* down to *work_dir* (inclusive)."""
|
|
73
|
+
dirs: list[HostPath] = []
|
|
74
|
+
current = work_dir
|
|
75
|
+
while True:
|
|
76
|
+
dirs.append(current)
|
|
77
|
+
if current == project_root:
|
|
78
|
+
break
|
|
79
|
+
parent = current.parent
|
|
80
|
+
if parent == current:
|
|
81
|
+
break
|
|
82
|
+
current = parent
|
|
83
|
+
dirs.reverse() # root → leaf
|
|
84
|
+
return dirs
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
async def load_agents_md(work_dir: HostPath) -> str | None:
|
|
88
|
+
"""Discover and merge ``AGENTS.md`` files from the project root down to *work_dir*.
|
|
89
|
+
|
|
90
|
+
For each directory on the path, the following candidates are checked in order:
|
|
91
|
+
|
|
92
|
+
1. ``.pythinker/AGENTS.md`` — project-local pythinker config (highest priority)
|
|
93
|
+
2. ``AGENTS.md`` — standard location
|
|
94
|
+
3. ``agents.md`` — lowercase variant (mutually exclusive with 2)
|
|
95
|
+
|
|
96
|
+
Within a single directory, ``.pythinker/AGENTS.md`` and ``AGENTS.md``/``agents.md``
|
|
97
|
+
are **both** loaded (with ``.pythinker/`` first), but ``AGENTS.md`` and ``agents.md``
|
|
98
|
+
are mutually exclusive (uppercase wins).
|
|
99
|
+
|
|
100
|
+
All discovered files are concatenated root→leaf, separated by ``\\n\\n``, with
|
|
101
|
+
source annotations. Total size is capped at :data:`_AGENTS_MD_MAX_BYTES`.
|
|
102
|
+
Budget is allocated leaf-first so deeper (more specific) files are never
|
|
103
|
+
truncated in favour of shallower ones.
|
|
104
|
+
"""
|
|
105
|
+
project_root = await find_project_root(work_dir)
|
|
106
|
+
dirs = await _dirs_root_to_leaf(work_dir, project_root)
|
|
107
|
+
|
|
108
|
+
# Phase 1: collect all candidate files (root → leaf order)
|
|
109
|
+
discovered: list[tuple[HostPath, str]] = [] # (path, content)
|
|
110
|
+
for d in dirs:
|
|
111
|
+
# .pythinker/AGENTS.md is always checked independently (can coexist with root-level file)
|
|
112
|
+
pythinker_path = d / ".pythinker" / "AGENTS.md"
|
|
113
|
+
# AGENTS.md and agents.md are mutually exclusive (uppercase wins)
|
|
114
|
+
root_candidates = [d / "AGENTS.md", d / "agents.md"]
|
|
115
|
+
|
|
116
|
+
candidates: list[HostPath] = []
|
|
117
|
+
if await pythinker_path.is_file():
|
|
118
|
+
candidates.append(pythinker_path)
|
|
119
|
+
for rc in root_candidates:
|
|
120
|
+
if await rc.is_file():
|
|
121
|
+
candidates.append(rc)
|
|
122
|
+
break
|
|
123
|
+
|
|
124
|
+
for path in candidates:
|
|
125
|
+
content = (await path.read_text(encoding="utf-8", errors="replace")).strip()
|
|
126
|
+
if content:
|
|
127
|
+
discovered.append((path, content))
|
|
128
|
+
logger.info("Loaded agents.md: {path}", path=path)
|
|
129
|
+
|
|
130
|
+
if not discovered:
|
|
131
|
+
logger.info(
|
|
132
|
+
"No AGENTS.md found from {root} to {cwd}",
|
|
133
|
+
root=project_root,
|
|
134
|
+
cwd=work_dir,
|
|
135
|
+
)
|
|
136
|
+
return None
|
|
137
|
+
|
|
138
|
+
# Phase 2: allocate budget leaf-first so deeper (more specific) files
|
|
139
|
+
# are never truncated in favour of shallower ones.
|
|
140
|
+
# The annotation overhead (<!-- From: ... -->\n and \n\n separators)
|
|
141
|
+
# is included in the budget so the final output never exceeds the limit.
|
|
142
|
+
remaining = _AGENTS_MD_MAX_BYTES
|
|
143
|
+
budgeted: list[tuple[HostPath, str]] = [None] * len(discovered) # type: ignore[list-item]
|
|
144
|
+
for i in reversed(range(len(discovered))):
|
|
145
|
+
path, content = discovered[i]
|
|
146
|
+
annotation = f"<!-- From: {path} -->\n"
|
|
147
|
+
# Reserve space for the annotation and the \n\n separator between parts
|
|
148
|
+
separator_cost = len(b"\n\n") if i < len(discovered) - 1 else 0
|
|
149
|
+
overhead = len(annotation.encode("utf-8")) + separator_cost
|
|
150
|
+
remaining -= overhead
|
|
151
|
+
if remaining <= 0:
|
|
152
|
+
budgeted[i] = (path, "")
|
|
153
|
+
remaining = 0
|
|
154
|
+
continue
|
|
155
|
+
encoded = content.encode("utf-8")
|
|
156
|
+
if len(encoded) > remaining:
|
|
157
|
+
content = encoded[:remaining].decode("utf-8", errors="ignore").strip()
|
|
158
|
+
logger.warning("AGENTS.md truncated due to size limit: {path}", path=path)
|
|
159
|
+
remaining -= len(content.encode("utf-8"))
|
|
160
|
+
budgeted[i] = (path, content)
|
|
161
|
+
|
|
162
|
+
# Phase 3: assemble in root → leaf order, skipping entries emptied by truncation
|
|
163
|
+
parts: list[str] = []
|
|
164
|
+
for path, content in budgeted:
|
|
165
|
+
if content:
|
|
166
|
+
parts.append(f"<!-- From: {path} -->\n{content}")
|
|
167
|
+
|
|
168
|
+
return "\n\n".join(parts) if parts else None
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
@dataclass(slots=True, kw_only=True)
|
|
172
|
+
class Runtime:
|
|
173
|
+
"""Agent runtime."""
|
|
174
|
+
|
|
175
|
+
config: Config
|
|
176
|
+
oauth: OAuthManager
|
|
177
|
+
llm: LLM | None # we do not freeze the `Runtime` dataclass because LLM can be changed
|
|
178
|
+
session: Session
|
|
179
|
+
builtin_args: BuiltinSystemPromptArgs
|
|
180
|
+
denwa_renji: DenwaRenji
|
|
181
|
+
approval: Approval
|
|
182
|
+
labor_market: LaborMarket
|
|
183
|
+
environment: Environment
|
|
184
|
+
notifications: NotificationManager
|
|
185
|
+
background_tasks: BackgroundTaskManager
|
|
186
|
+
skills: dict[str, Skill]
|
|
187
|
+
additional_dirs: list[HostPath]
|
|
188
|
+
skills_dirs: list[HostPath]
|
|
189
|
+
subagent_store: SubagentStore | None = None
|
|
190
|
+
approval_runtime: ApprovalRuntime | None = None
|
|
191
|
+
root_wire_hub: RootWireHub | None = None
|
|
192
|
+
subagent_id: str | None = None
|
|
193
|
+
subagent_type: str | None = None
|
|
194
|
+
role: Literal["root", "subagent"] = "root"
|
|
195
|
+
ui_mode: str = "shell"
|
|
196
|
+
resumed: bool = False
|
|
197
|
+
hook_engine: Any = None
|
|
198
|
+
"""HookEngine instance, set by PythinkerCLI after soul creation."""
|
|
199
|
+
|
|
200
|
+
def __post_init__(self) -> None:
|
|
201
|
+
if self.subagent_store is None:
|
|
202
|
+
self.subagent_store = SubagentStore(self.session)
|
|
203
|
+
if self.root_wire_hub is None:
|
|
204
|
+
self.root_wire_hub = RootWireHub()
|
|
205
|
+
if self.approval_runtime is None:
|
|
206
|
+
self.approval_runtime = ApprovalRuntime()
|
|
207
|
+
self.approval_runtime.bind_root_wire_hub(self.root_wire_hub)
|
|
208
|
+
self.approval.set_runtime(self.approval_runtime)
|
|
209
|
+
self.background_tasks.bind_runtime(self)
|
|
210
|
+
|
|
211
|
+
@staticmethod
|
|
212
|
+
async def create(
|
|
213
|
+
config: Config,
|
|
214
|
+
oauth: OAuthManager,
|
|
215
|
+
llm: LLM | None,
|
|
216
|
+
session: Session,
|
|
217
|
+
yolo: bool,
|
|
218
|
+
auto: bool = False,
|
|
219
|
+
runtime_auto: bool = False,
|
|
220
|
+
skills_dirs: list[HostPath] | None = None,
|
|
221
|
+
) -> Runtime:
|
|
222
|
+
ls_output, agents_md, environment = await asyncio.gather(
|
|
223
|
+
list_directory(session.work_dir),
|
|
224
|
+
load_agents_md(session.work_dir),
|
|
225
|
+
Environment.detect(),
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
# Discover and format skills (grouped by scope for the system prompt).
|
|
229
|
+
scoped_roots = await resolve_skills_roots(
|
|
230
|
+
session.work_dir,
|
|
231
|
+
skills_dirs=skills_dirs,
|
|
232
|
+
merge_brands=config.merge_all_available_skills,
|
|
233
|
+
extra_skill_dirs=config.extra_skill_dirs or None,
|
|
234
|
+
)
|
|
235
|
+
# Canonicalize so symlinked skill directories match resolved paths
|
|
236
|
+
skills_roots_canonical = [s.root.canonical() for s in scoped_roots]
|
|
237
|
+
skills = await discover_skills_from_roots(scoped_roots)
|
|
238
|
+
skills_by_name = index_skills(skills)
|
|
239
|
+
logger.info("Discovered {count} skill(s)", count=len(skills))
|
|
240
|
+
skills_formatted = format_skills_for_prompt(skills)
|
|
241
|
+
|
|
242
|
+
# Restore additional directories from session state, pruning stale entries
|
|
243
|
+
additional_dirs: list[HostPath] = []
|
|
244
|
+
pruned = False
|
|
245
|
+
valid_dir_strs: list[str] = []
|
|
246
|
+
for dir_str in session.state.additional_dirs:
|
|
247
|
+
d = HostPath(dir_str).canonical()
|
|
248
|
+
if await d.is_dir():
|
|
249
|
+
additional_dirs.append(d)
|
|
250
|
+
valid_dir_strs.append(dir_str)
|
|
251
|
+
else:
|
|
252
|
+
logger.warning(
|
|
253
|
+
"Additional directory no longer exists, removing from state: {dir}",
|
|
254
|
+
dir=dir_str,
|
|
255
|
+
)
|
|
256
|
+
pruned = True
|
|
257
|
+
if pruned:
|
|
258
|
+
session.state.additional_dirs = valid_dir_strs
|
|
259
|
+
session.save_state()
|
|
260
|
+
|
|
261
|
+
# Format additional dirs info for system prompt
|
|
262
|
+
additional_dirs_info = ""
|
|
263
|
+
if additional_dirs:
|
|
264
|
+
parts: list[str] = []
|
|
265
|
+
for d in additional_dirs:
|
|
266
|
+
try:
|
|
267
|
+
dir_ls = await list_directory(d)
|
|
268
|
+
except OSError:
|
|
269
|
+
logger.warning(
|
|
270
|
+
"Cannot list additional directory, skipping listing: {dir}", dir=d
|
|
271
|
+
)
|
|
272
|
+
dir_ls = "[directory not readable]"
|
|
273
|
+
parts.append(f"### `{d}`\n\n```\n{dir_ls}\n```")
|
|
274
|
+
additional_dirs_info = "\n\n".join(parts)
|
|
275
|
+
|
|
276
|
+
# Merge invocation flags with persisted session state.
|
|
277
|
+
effective_yolo = yolo or session.state.approval.yolo
|
|
278
|
+
if auto and not session.state.approval.auto:
|
|
279
|
+
session.state.approval.auto = True
|
|
280
|
+
session.save_state()
|
|
281
|
+
saved_actions = set(session.state.approval.auto_approve_actions)
|
|
282
|
+
|
|
283
|
+
def _on_approval_change() -> None:
|
|
284
|
+
session.state.approval.yolo = approval_state.yolo
|
|
285
|
+
session.state.approval.auto = approval_state.auto
|
|
286
|
+
session.state.approval.auto_approve_actions = set(approval_state.auto_approve_actions)
|
|
287
|
+
session.save_state()
|
|
288
|
+
|
|
289
|
+
approval_state = ApprovalState(
|
|
290
|
+
yolo=effective_yolo,
|
|
291
|
+
auto=session.state.approval.auto,
|
|
292
|
+
runtime_auto=runtime_auto,
|
|
293
|
+
auto_approve_actions=saved_actions,
|
|
294
|
+
on_change=_on_approval_change,
|
|
295
|
+
)
|
|
296
|
+
notifications = NotificationManager(
|
|
297
|
+
session.context_file.parent / "notifications",
|
|
298
|
+
config.notifications,
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
return Runtime(
|
|
302
|
+
config=config,
|
|
303
|
+
oauth=oauth,
|
|
304
|
+
llm=llm,
|
|
305
|
+
session=session,
|
|
306
|
+
builtin_args=BuiltinSystemPromptArgs(
|
|
307
|
+
PYTHINKER_NOW=datetime.now().astimezone().isoformat(),
|
|
308
|
+
PYTHINKER_WORK_DIR=session.work_dir,
|
|
309
|
+
PYTHINKER_WORK_DIR_LS=ls_output,
|
|
310
|
+
PYTHINKER_AGENTS_MD=agents_md or "",
|
|
311
|
+
PYTHINKER_SKILLS=skills_formatted or "No skills found.",
|
|
312
|
+
PYTHINKER_ADDITIONAL_DIRS_INFO=additional_dirs_info,
|
|
313
|
+
PYTHINKER_OS=environment.os_kind,
|
|
314
|
+
PYTHINKER_SHELL=f"{environment.shell_name} (`{environment.shell_path}`)",
|
|
315
|
+
),
|
|
316
|
+
denwa_renji=DenwaRenji(),
|
|
317
|
+
approval=Approval(state=approval_state),
|
|
318
|
+
labor_market=LaborMarket(),
|
|
319
|
+
environment=environment,
|
|
320
|
+
notifications=notifications,
|
|
321
|
+
background_tasks=BackgroundTaskManager(
|
|
322
|
+
session,
|
|
323
|
+
config.background,
|
|
324
|
+
notifications=notifications,
|
|
325
|
+
),
|
|
326
|
+
skills=skills_by_name,
|
|
327
|
+
additional_dirs=additional_dirs,
|
|
328
|
+
# Only expose skills roots outside the workspace for Glob access;
|
|
329
|
+
# project-level roots are already within work_dir.
|
|
330
|
+
skills_dirs=[
|
|
331
|
+
r for r in skills_roots_canonical if not is_within_directory(r, session.work_dir)
|
|
332
|
+
],
|
|
333
|
+
subagent_store=SubagentStore(session),
|
|
334
|
+
approval_runtime=ApprovalRuntime(),
|
|
335
|
+
root_wire_hub=RootWireHub(),
|
|
336
|
+
role="root",
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
def copy_for_subagent(
|
|
340
|
+
self,
|
|
341
|
+
*,
|
|
342
|
+
agent_id: str,
|
|
343
|
+
subagent_type: str,
|
|
344
|
+
llm_override: LLM | None = None,
|
|
345
|
+
) -> Runtime:
|
|
346
|
+
"""Clone runtime for a subagent."""
|
|
347
|
+
return Runtime(
|
|
348
|
+
config=self.config,
|
|
349
|
+
oauth=self.oauth,
|
|
350
|
+
llm=llm_override if llm_override is not None else self.llm,
|
|
351
|
+
session=self.session,
|
|
352
|
+
builtin_args=self.builtin_args,
|
|
353
|
+
denwa_renji=DenwaRenji(), # subagent must have its own DenwaRenji
|
|
354
|
+
approval=self.approval.share(),
|
|
355
|
+
labor_market=self.labor_market,
|
|
356
|
+
environment=self.environment,
|
|
357
|
+
notifications=self.notifications,
|
|
358
|
+
background_tasks=self.background_tasks.copy_for_role("subagent"),
|
|
359
|
+
skills=self.skills,
|
|
360
|
+
# Share the same list reference so /add-dir mutations propagate to all agents
|
|
361
|
+
additional_dirs=self.additional_dirs,
|
|
362
|
+
skills_dirs=self.skills_dirs,
|
|
363
|
+
subagent_store=self.subagent_store,
|
|
364
|
+
approval_runtime=self.approval_runtime,
|
|
365
|
+
root_wire_hub=self.root_wire_hub,
|
|
366
|
+
subagent_id=agent_id,
|
|
367
|
+
subagent_type=subagent_type,
|
|
368
|
+
role="subagent",
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
@dataclass(frozen=True, slots=True, kw_only=True)
|
|
373
|
+
class Agent:
|
|
374
|
+
"""The loaded agent."""
|
|
375
|
+
|
|
376
|
+
name: str
|
|
377
|
+
system_prompt: str
|
|
378
|
+
toolset: Toolset
|
|
379
|
+
runtime: Runtime
|
|
380
|
+
"""Each agent has its own runtime, which should be derived from its main agent."""
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
async def load_agent(
|
|
384
|
+
agent_file: Path,
|
|
385
|
+
runtime: Runtime,
|
|
386
|
+
*,
|
|
387
|
+
mcp_configs: list[MCPConfig] | list[dict[str, Any]],
|
|
388
|
+
start_mcp_loading: bool = True,
|
|
389
|
+
) -> Agent:
|
|
390
|
+
"""
|
|
391
|
+
Load agent from specification file.
|
|
392
|
+
|
|
393
|
+
Raises:
|
|
394
|
+
FileNotFoundError: When the agent file is not found.
|
|
395
|
+
AgentSpecError(PythinkerCLIException, ValueError): When the agent specification is invalid.
|
|
396
|
+
SystemPromptTemplateError(PythinkerCLIException, ValueError): When the system prompt
|
|
397
|
+
template is invalid.
|
|
398
|
+
InvalidToolError(PythinkerCLIException, ValueError): When any tool cannot be loaded.
|
|
399
|
+
MCPConfigError(PythinkerCLIException, ValueError): When any MCP configuration is invalid.
|
|
400
|
+
MCPRuntimeError(PythinkerCLIException, RuntimeError): When any MCP server cannot be
|
|
401
|
+
connected.
|
|
402
|
+
"""
|
|
403
|
+
logger.info("Loading agent: {agent_file}", agent_file=agent_file)
|
|
404
|
+
agent_spec = load_agent_spec(agent_file)
|
|
405
|
+
|
|
406
|
+
system_prompt = _load_system_prompt(
|
|
407
|
+
agent_spec.system_prompt_path,
|
|
408
|
+
agent_spec.system_prompt_args,
|
|
409
|
+
runtime.builtin_args,
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
# Register built-in subagent types before loading tools because some tools render
|
|
413
|
+
# descriptions from the labor market on initialization.
|
|
414
|
+
for subagent_name, subagent_spec in agent_spec.subagents.items():
|
|
415
|
+
logger.debug(
|
|
416
|
+
"Registering builtin subagent type: {subagent_name}", subagent_name=subagent_name
|
|
417
|
+
)
|
|
418
|
+
builtin_spec = load_agent_spec(subagent_spec.path)
|
|
419
|
+
tool_policy = (
|
|
420
|
+
ToolPolicy(mode="allowlist", tools=tuple(builtin_spec.allowed_tools))
|
|
421
|
+
if builtin_spec.allowed_tools is not None
|
|
422
|
+
else ToolPolicy(mode="inherit")
|
|
423
|
+
)
|
|
424
|
+
runtime.labor_market.add_builtin_type(
|
|
425
|
+
AgentTypeDefinition(
|
|
426
|
+
name=subagent_name,
|
|
427
|
+
description=subagent_spec.description,
|
|
428
|
+
agent_file=subagent_spec.path,
|
|
429
|
+
when_to_use=builtin_spec.when_to_use,
|
|
430
|
+
default_model=builtin_spec.model,
|
|
431
|
+
tool_policy=tool_policy,
|
|
432
|
+
)
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
toolset = PythinkerToolset()
|
|
436
|
+
tool_deps = {
|
|
437
|
+
PythinkerToolset: toolset,
|
|
438
|
+
Runtime: runtime,
|
|
439
|
+
# TODO: remove all the following dependencies and use Runtime instead
|
|
440
|
+
Config: runtime.config,
|
|
441
|
+
BuiltinSystemPromptArgs: runtime.builtin_args,
|
|
442
|
+
Session: runtime.session,
|
|
443
|
+
DenwaRenji: runtime.denwa_renji,
|
|
444
|
+
Approval: runtime.approval,
|
|
445
|
+
LaborMarket: runtime.labor_market,
|
|
446
|
+
Environment: runtime.environment,
|
|
447
|
+
}
|
|
448
|
+
tools = agent_spec.allowed_tools if agent_spec.allowed_tools is not None else agent_spec.tools
|
|
449
|
+
if agent_spec.exclude_tools:
|
|
450
|
+
logger.debug("Excluding tools: {tools}", tools=agent_spec.exclude_tools)
|
|
451
|
+
tools = [tool for tool in tools if tool not in agent_spec.exclude_tools]
|
|
452
|
+
toolset.load_tools(tools, tool_deps)
|
|
453
|
+
|
|
454
|
+
# Load plugin tools
|
|
455
|
+
from pythinker_code.plugin.manager import get_plugins_dir
|
|
456
|
+
from pythinker_code.plugin.tool import load_plugin_tools
|
|
457
|
+
|
|
458
|
+
plugin_tools = load_plugin_tools(get_plugins_dir(), runtime.config, approval=runtime.approval)
|
|
459
|
+
for plugin_tool in plugin_tools:
|
|
460
|
+
if toolset.find(plugin_tool.name) is not None:
|
|
461
|
+
logger.warning(
|
|
462
|
+
"Plugin tool '{name}' conflicts with an existing tool, skipping",
|
|
463
|
+
name=plugin_tool.name,
|
|
464
|
+
)
|
|
465
|
+
continue
|
|
466
|
+
toolset.add(plugin_tool)
|
|
467
|
+
|
|
468
|
+
if mcp_configs:
|
|
469
|
+
validated_mcp_configs: list[MCPConfig] = []
|
|
470
|
+
if mcp_configs:
|
|
471
|
+
from fastmcp.mcp_config import MCPConfig
|
|
472
|
+
|
|
473
|
+
for mcp_config in mcp_configs:
|
|
474
|
+
try:
|
|
475
|
+
validated_mcp_configs.append(
|
|
476
|
+
mcp_config
|
|
477
|
+
if isinstance(mcp_config, MCPConfig)
|
|
478
|
+
else MCPConfig.model_validate(mcp_config)
|
|
479
|
+
)
|
|
480
|
+
except pydantic.ValidationError as e:
|
|
481
|
+
raise MCPConfigError(f"Invalid MCP config: {e}") from e
|
|
482
|
+
if start_mcp_loading:
|
|
483
|
+
await toolset.load_mcp_tools(validated_mcp_configs, runtime, in_background=True)
|
|
484
|
+
else:
|
|
485
|
+
toolset.defer_mcp_tool_loading(validated_mcp_configs, runtime)
|
|
486
|
+
|
|
487
|
+
return Agent(
|
|
488
|
+
name=agent_spec.name,
|
|
489
|
+
system_prompt=system_prompt,
|
|
490
|
+
toolset=toolset,
|
|
491
|
+
runtime=runtime,
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
def _load_system_prompt(
|
|
496
|
+
path: Path, args: dict[str, str], builtin_args: BuiltinSystemPromptArgs
|
|
497
|
+
) -> str:
|
|
498
|
+
logger.info("Loading system prompt: {path}", path=path)
|
|
499
|
+
system_prompt = path.read_text(encoding="utf-8").strip()
|
|
500
|
+
logger.debug(
|
|
501
|
+
"Substituting system prompt with builtin args: {builtin_args}, spec args: {spec_args}",
|
|
502
|
+
builtin_args=builtin_args,
|
|
503
|
+
spec_args=args,
|
|
504
|
+
)
|
|
505
|
+
env = JinjaEnvironment(
|
|
506
|
+
loader=FileSystemLoader(path.parent),
|
|
507
|
+
keep_trailing_newline=True,
|
|
508
|
+
lstrip_blocks=True,
|
|
509
|
+
trim_blocks=True,
|
|
510
|
+
variable_start_string="${",
|
|
511
|
+
variable_end_string="}",
|
|
512
|
+
undefined=StrictUndefined,
|
|
513
|
+
)
|
|
514
|
+
try:
|
|
515
|
+
template = env.from_string(system_prompt)
|
|
516
|
+
return template.render(asdict(builtin_args), **args)
|
|
517
|
+
except UndefinedError as exc:
|
|
518
|
+
raise SystemPromptTemplateError(f"Missing system prompt arg in {path}: {exc}") from exc
|
|
519
|
+
except TemplateError as exc:
|
|
520
|
+
raise SystemPromptTemplateError(f"Invalid system prompt template: {path}: {exc}") from exc
|