@celljs/ta 4.9.1 → 4.11.0
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.
- package/README.en.md +3 -1
- package/README.md +3 -1
- package/dist/cli.mjs +1753 -75
- package/dist/gateway.mjs +311 -25
- package/dist/pi/CHANGELOG.md +30 -0
- package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
- package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
- package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
- package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
- package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
- package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
- package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
- package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
- package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
- package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
- package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
- package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
- package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
- package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
- package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
- package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
- package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
- package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
- package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
- package/dist/pi/dist/bundle/cli-runtime.js +1 -1
- package/dist/pi/dist/bundle/index.js +1 -1
- package/dist/pi/dist/bundle/rpc-entry.js +1 -1
- package/dist/pi/docs/cli.md +14 -1
- package/dist/pi/docs/extensions.md +27 -7
- package/dist/pi/docs/keybindings.md +1 -1
- package/dist/pi/docs/llama-cpp.md +5 -8
- package/dist/pi/docs/models-configuration.md +6 -1
- package/dist/pi/docs/models.md +2 -1
- package/dist/pi/docs/prompt-templates.md +1 -1
- package/dist/pi/docs/providers.md +1 -1
- package/dist/pi/docs/rpc.md +4 -2
- package/dist/pi/docs/sessions.md +7 -1
- package/dist/pi/docs/settings.md +1 -1
- package/dist/pi/docs/tui.md +1 -1
- package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
- package/dist/pi/examples/extensions/gondolin/package.json +1 -1
- package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
- package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
- package/dist/pi/examples/extensions/subagent/README.md +14 -11
- package/dist/pi/examples/extensions/subagent/index.ts +392 -171
- package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
- package/dist/pi/examples/extensions/with-deps/package.json +1 -1
- package/dist/pi/examples/tsconfig.json +63 -35
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +185 -140
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +4 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -2
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +4 -4
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +19 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +3 -2
- package/dist/pi/packages/ta-agents/lib/extension.js +15 -1
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
- package/dist/pi/packages/ta-agents/package.json +3 -3
- package/dist/pi/packages/ta-bots/extension/index.mjs +31 -253
- package/dist/pi/packages/ta-bots/host/index.mjs +189 -1
- package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-bots/lib/bots-protocol.js +3 -1
- package/dist/pi/packages/ta-bots/lib/bots-view.js +24 -12
- package/dist/pi/packages/ta-bots/lib/composer.js +1 -0
- package/dist/pi/packages/ta-bots/lib/extension.js +10 -17
- package/dist/pi/packages/ta-bots/lib/i18n.d.ts +1 -0
- package/dist/pi/packages/ta-bots/lib/i18n.js +2 -0
- package/dist/pi/packages/ta-bots/lib/index.js +2 -0
- package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-bots/lib/style.js +1 -0
- package/dist/pi/packages/ta-bots/lib/text-util.js +8 -1
- package/dist/pi/packages/ta-bots/lib/tool-line.d.ts +8 -0
- package/dist/pi/packages/ta-bots/lib/tool-line.js +19 -0
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-bots/web/index.js +47 -16
- package/dist/pi/packages/ta-changes/extension/index.mjs +23 -13
- package/dist/pi/packages/ta-changes/lib/card.js +18 -4
- package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +0 -4
- package/dist/pi/packages/ta-changes/lib/changes-protocol.js +1 -5
- package/dist/pi/packages/ta-changes/lib/extension.js +5 -13
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-changes/web/index.js +16 -3
- package/dist/pi/packages/ta-channels/README.en.md +6 -5
- package/dist/pi/packages/ta-channels/README.md +6 -5
- package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
- package/dist/pi/packages/ta-channels/host/index.mjs +638 -43
- package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/agent-cards.js +58 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -2
- package/dist/pi/packages/ta-channels/lib/agent-menu.js +20 -6
- package/dist/pi/packages/ta-channels/lib/card.d.ts +27 -0
- package/dist/pi/packages/ta-channels/lib/card.js +178 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +65 -13
- package/dist/pi/packages/ta-channels/lib/channels-model.js +15 -6
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +31 -2
- package/dist/pi/packages/ta-channels/lib/channels-util.js +100 -6
- package/dist/pi/packages/ta-channels/lib/channels.d.ts +28 -18
- package/dist/pi/packages/ta-channels/lib/channels.js +65 -65
- package/dist/pi/packages/ta-channels/lib/create.js +14 -4
- package/dist/pi/packages/ta-channels/lib/extension.d.ts +8 -0
- package/dist/pi/packages/ta-channels/lib/extension.js +104 -18
- package/dist/pi/packages/ta-channels/lib/faces.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/faces.js +7 -1
- package/dist/pi/packages/ta-channels/lib/handoff-view.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/handoff-view.js +113 -0
- package/dist/pi/packages/ta-channels/lib/handoff.d.ts +67 -0
- package/dist/pi/packages/ta-channels/lib/handoff.js +114 -0
- package/dist/pi/packages/ta-channels/lib/host.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/host.js +1 -1
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +49 -8
- package/dist/pi/packages/ta-channels/lib/i18n.js +98 -16
- package/dist/pi/packages/ta-channels/lib/index.js +10 -1
- package/dist/pi/packages/ta-channels/lib/member-tools.d.ts +23 -0
- package/dist/pi/packages/ta-channels/lib/member-tools.js +56 -0
- package/dist/pi/packages/ta-channels/lib/members.js +6 -2
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +3 -2
- package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
- package/dist/pi/packages/ta-channels/lib/notice.d.ts +25 -0
- package/dist/pi/packages/ta-channels/lib/notice.js +101 -0
- package/dist/pi/packages/ta-channels/lib/room.js +26 -10
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.js +257 -84
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +151 -40
- package/dist/pi/packages/ta-channels/lib/tasks.js +3 -4
- package/dist/pi/packages/ta-channels/lib/team.d.ts +58 -10
- package/dist/pi/packages/ta-channels/lib/team.js +159 -38
- package/dist/pi/packages/ta-channels/lib/tool-lines.d.ts +22 -0
- package/dist/pi/packages/ta-channels/lib/tool-lines.js +113 -0
- package/dist/pi/packages/ta-channels/lib/views.d.ts +54 -1
- package/dist/pi/packages/ta-channels/lib/views.js +129 -1
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1792 -439
- package/dist/pi/packages/ta-computer-use/package.json +7 -2
- package/dist/pi/packages/ta-cron/README.en.md +6 -4
- package/dist/pi/packages/ta-cron/README.md +6 -4
- package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
- package/dist/pi/packages/ta-cron/host/index.mjs +30 -3
- package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +48 -0
- package/dist/pi/packages/ta-cron/lib/chat-task.js +133 -0
- package/dist/pi/packages/ta-cron/lib/commands.d.ts +2 -1
- package/dist/pi/packages/ta-cron/lib/commands.js +10 -4
- package/dist/pi/packages/ta-cron/lib/composer.d.ts +11 -0
- package/dist/pi/packages/ta-cron/lib/composer.js +58 -0
- package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +10 -3
- package/dist/pi/packages/ta-cron/lib/cron-protocol.js +6 -3
- package/dist/pi/packages/ta-cron/lib/editor.js +65 -30
- package/dist/pi/packages/ta-cron/lib/extension.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/extension.js +33 -13
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +30 -1
- package/dist/pi/packages/ta-cron/lib/i18n.js +60 -2
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +38 -4
- package/dist/pi/packages/ta-cron/lib/page.js +131 -4
- package/dist/pi/packages/ta-cron/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-cron/lib/react.js +8 -0
- package/dist/pi/packages/ta-cron/lib/scheduler.js +3 -2
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +168 -50
- package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
- package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +4 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +31 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +107 -67
- package/dist/pi/packages/ta-cron/lib/tool-line.d.ts +9 -0
- package/dist/pi/packages/ta-cron/lib/tool-line.js +40 -0
- package/dist/pi/packages/ta-cron/lib/tool.d.ts +5 -1
- package/dist/pi/packages/ta-cron/lib/tool.js +6 -3
- package/dist/pi/packages/ta-cron/package.json +12 -1
- package/dist/pi/packages/ta-cron/web/index.js +1346 -415
- package/dist/pi/packages/ta-extensions/README.en.md +4 -2
- package/dist/pi/packages/ta-extensions/README.md +4 -2
- package/dist/pi/packages/ta-extensions/host/index.mjs +3 -2
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/actions.js +16 -5
- package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
- package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts +5 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.js +10 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +9 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
- package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -0
- package/dist/pi/packages/ta-extensions/lib/market-parts.js +8 -2
- package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/market-style.js +4 -5
- package/dist/pi/packages/ta-extensions/lib/market-util.d.ts +2 -2
- package/dist/pi/packages/ta-extensions/lib/market-util.js +2 -2
- package/dist/pi/packages/ta-extensions/lib/page.js +52 -23
- package/dist/pi/packages/ta-extensions/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
- package/dist/pi/packages/ta-extensions/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +13 -6
- package/dist/pi/packages/ta-extensions/package.json +6 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +25 -10
- package/dist/pi/packages/ta-extensions/web/index.js +459 -47
- package/dist/pi/packages/ta-games/README.en.md +47 -0
- package/dist/pi/packages/ta-games/README.md +47 -0
- package/dist/pi/packages/ta-games/host/index.mjs +65 -0
- package/dist/pi/packages/ta-games/lib/games-view.d.ts +16 -0
- package/dist/pi/packages/ta-games/lib/games-view.js +77 -0
- package/dist/pi/packages/ta-games/lib/host.d.ts +36 -0
- package/dist/pi/packages/ta-games/lib/host.js +83 -0
- package/dist/pi/packages/ta-games/lib/i18n.d.ts +35 -0
- package/dist/pi/packages/ta-games/lib/i18n.js +71 -0
- package/dist/pi/packages/ta-games/lib/ideas.d.ts +6 -0
- package/dist/pi/packages/ta-games/lib/ideas.js +62 -0
- package/dist/pi/packages/ta-games/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-games/lib/index.js +24 -0
- package/dist/pi/packages/ta-games/lib/make-game.d.ts +23 -0
- package/dist/pi/packages/ta-games/lib/make-game.js +67 -0
- package/dist/pi/packages/ta-games/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-games/lib/react.js +16 -0
- package/dist/pi/packages/ta-games/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-games/lib/style.js +33 -0
- package/dist/pi/packages/ta-games/package.json +60 -0
- package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +127 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/package.json +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/web.js +389 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/package.json +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/web.js +423 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/LICENSE.md +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/actions-and-utilities/SKILL.md +343 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/animations/SKILL.md +481 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/audio-and-sound/SKILL.md +453 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/references/REFERENCE.md +128 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/curves-and-paths/SKILL.md +359 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/data-manager/SKILL.md +406 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/events-system/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/filters-and-postfx/SKILL.md +449 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/SKILL.md +478 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/references/REFERENCE.md +76 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-setup-and-config/SKILL.md +485 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/geometry-and-math/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/graphics-and-shapes/SKILL.md +473 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/groups-and-containers/SKILL.md +418 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/SKILL.md +500 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/references/REFERENCE.md +372 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/SKILL.md +474 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/references/REFERENCE.md +148 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/SKILL.md +499 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/references/REFERENCE.md +17 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-arcade/SKILL.md +468 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-matter/SKILL.md +499 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/render-textures/SKILL.md +441 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scale-and-responsive/SKILL.md +371 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/SKILL.md +450 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/references/REFERENCE.md +78 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/SKILL.md +417 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/references/REFERENCE.md +160 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/text-and-bitmaptext/SKILL.md +460 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/tilemaps/SKILL.md +440 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/time-and-timers/SKILL.md +496 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/tweens/SKILL.md +414 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v3-to-v4-migration/SKILL.md +430 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/SKILL.md +384 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/references/REFERENCE.md +69 -0
- package/dist/pi/packages/ta-games/web/index.js +431 -0
- package/dist/pi/packages/ta-glance/README.en.md +11 -0
- package/dist/pi/packages/ta-glance/README.md +11 -0
- package/dist/pi/packages/ta-glance/extension/index.mjs +67 -0
- package/dist/pi/packages/ta-glance/lib/card.d.ts +8 -0
- package/dist/pi/packages/ta-glance/lib/card.js +268 -0
- package/dist/pi/packages/ta-glance/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-glance/lib/extension.js +24 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +9 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.js +85 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +34 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +98 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.js +8 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +6 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +204 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +3 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.js +12 -0
- package/dist/pi/packages/ta-glance/lib/i18n.d.ts +22 -0
- package/dist/pi/packages/ta-glance/lib/i18n.js +41 -0
- package/dist/pi/packages/ta-glance/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/index.js +22 -0
- package/dist/pi/packages/ta-glance/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-glance/lib/react.js +8 -0
- package/dist/pi/packages/ta-glance/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-glance/lib/style.js +164 -0
- package/dist/pi/packages/ta-glance/package.json +53 -0
- package/dist/pi/packages/ta-glance/web/index.js +933 -0
- package/dist/pi/packages/ta-launcher/lib/actions.d.ts +4 -4
- package/dist/pi/packages/ta-launcher/lib/actions.js +7 -3
- package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +7 -7
- package/dist/pi/packages/ta-launcher/lib/launcher-util.js +11 -8
- package/dist/pi/packages/ta-launcher/lib/launcher-view.js +13 -7
- package/dist/pi/packages/ta-launcher/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
- package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-launcher/lib/style.js +6 -4
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-launcher/web/index.js +34 -17
- package/dist/pi/packages/ta-manual/README.en.md +10 -0
- package/dist/pi/packages/ta-manual/README.md +10 -0
- package/dist/pi/packages/ta-manual/lib/i18n.d.ts +15 -0
- package/dist/pi/packages/ta-manual/lib/i18n.js +31 -0
- package/dist/pi/packages/ta-manual/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-manual/lib/index.js +24 -0
- package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +18 -0
- package/dist/pi/packages/ta-manual/lib/manual-util.js +40 -0
- package/dist/pi/packages/ta-manual/lib/manual-view.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/manual-view.js +81 -0
- package/dist/pi/packages/ta-manual/lib/pictures-a.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-a.js +263 -0
- package/dist/pi/packages/ta-manual/lib/pictures-b.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-b.js +216 -0
- package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/pictures.js +16 -0
- package/dist/pi/packages/ta-manual/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-manual/lib/react.js +8 -0
- package/dist/pi/packages/ta-manual/lib/scene.d.ts +68 -0
- package/dist/pi/packages/ta-manual/lib/scene.js +115 -0
- package/dist/pi/packages/ta-manual/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-manual/lib/style.js +47 -0
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +42 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +354 -0
- package/dist/pi/packages/ta-manual/package.json +54 -0
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +119 -0
- package/dist/pi/packages/ta-manual/web/index.js +2223 -0
- package/dist/pi/packages/ta-notify/README.en.md +29 -0
- package/dist/pi/packages/ta-notify/README.md +29 -0
- package/dist/pi/packages/ta-notify/extension/index.mjs +259 -0
- package/dist/pi/packages/ta-notify/host/index.mjs +163 -0
- package/dist/pi/packages/ta-notify/lib/ask-card.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/ask-card.js +40 -0
- package/dist/pi/packages/ta-notify/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-notify/lib/extension.js +102 -0
- package/dist/pi/packages/ta-notify/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-notify/lib/host.js +9 -0
- package/dist/pi/packages/ta-notify/lib/i18n.d.ts +31 -0
- package/dist/pi/packages/ta-notify/lib/i18n.js +63 -0
- package/dist/pi/packages/ta-notify/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/index.js +29 -0
- package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +74 -0
- package/dist/pi/packages/ta-notify/lib/notify-protocol.js +23 -0
- package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +21 -0
- package/dist/pi/packages/ta-notify/lib/notify-service.js +75 -0
- package/dist/pi/packages/ta-notify/lib/notify-util.d.ts +39 -0
- package/dist/pi/packages/ta-notify/lib/notify-util.js +119 -0
- package/dist/pi/packages/ta-notify/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/react.js +8 -0
- package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/server-texts.js +22 -0
- package/dist/pi/packages/ta-notify/lib/settings.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/settings.js +85 -0
- package/dist/pi/packages/ta-notify/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-notify/lib/style.js +29 -0
- package/dist/pi/packages/ta-notify/lib/tool-line.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/tool-line.js +20 -0
- package/dist/pi/packages/ta-notify/lib/tool.d.ts +37 -0
- package/dist/pi/packages/ta-notify/lib/tool.js +46 -0
- package/dist/pi/packages/ta-notify/lib/watcher.d.ts +15 -0
- package/dist/pi/packages/ta-notify/lib/watcher.js +81 -0
- package/dist/pi/packages/ta-notify/package.json +55 -0
- package/dist/pi/packages/ta-notify/web/index.js +436 -0
- package/dist/pi/packages/ta-recall/README.en.md +19 -0
- package/dist/pi/packages/ta-recall/README.md +19 -0
- package/dist/pi/packages/ta-recall/extension/index.mjs +614 -0
- package/dist/pi/packages/ta-recall/host/index.mjs +820 -0
- package/dist/pi/packages/ta-recall/lib/brief-card.d.ts +21 -0
- package/dist/pi/packages/ta-recall/lib/brief-card.js +67 -0
- package/dist/pi/packages/ta-recall/lib/brief-home.d.ts +49 -0
- package/dist/pi/packages/ta-recall/lib/brief-home.js +143 -0
- package/dist/pi/packages/ta-recall/lib/brief-seen.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/brief-seen.js +26 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +64 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.js +179 -0
- package/dist/pi/packages/ta-recall/lib/chat-icons.d.ts +8 -0
- package/dist/pi/packages/ta-recall/lib/chat-icons.js +56 -0
- package/dist/pi/packages/ta-recall/lib/composer.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/composer.js +38 -0
- package/dist/pi/packages/ta-recall/lib/conversation-index.d.ts +25 -0
- package/dist/pi/packages/ta-recall/lib/conversation-index.js +72 -0
- package/dist/pi/packages/ta-recall/lib/conversation-util.d.ts +16 -0
- package/dist/pi/packages/ta-recall/lib/conversation-util.js +109 -0
- package/dist/pi/packages/ta-recall/lib/conversations.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/conversations.js +46 -0
- package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-recall/lib/extension.js +131 -0
- package/dist/pi/packages/ta-recall/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/host.js +11 -0
- package/dist/pi/packages/ta-recall/lib/i18n.d.ts +41 -0
- package/dist/pi/packages/ta-recall/lib/i18n.js +83 -0
- package/dist/pi/packages/ta-recall/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/index.js +45 -0
- package/dist/pi/packages/ta-recall/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/react.js +16 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +186 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.js +60 -0
- package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +42 -0
- package/dist/pi/packages/ta-recall/lib/recall-service.js +241 -0
- package/dist/pi/packages/ta-recall/lib/search-source.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/search-source.js +49 -0
- package/dist/pi/packages/ta-recall/lib/search-util.d.ts +30 -0
- package/dist/pi/packages/ta-recall/lib/search-util.js +167 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.js +17 -0
- package/dist/pi/packages/ta-recall/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/settings.js +77 -0
- package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/skill-card.js +51 -0
- package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +19 -0
- package/dist/pi/packages/ta-recall/lib/skill-util.js +110 -0
- package/dist/pi/packages/ta-recall/lib/stored.d.ts +5 -0
- package/dist/pi/packages/ta-recall/lib/stored.js +28 -0
- package/dist/pi/packages/ta-recall/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/style.js +48 -0
- package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +10 -0
- package/dist/pi/packages/ta-recall/lib/tool-line.js +23 -0
- package/dist/pi/packages/ta-recall/lib/tool.d.ts +63 -0
- package/dist/pi/packages/ta-recall/lib/tool.js +71 -0
- package/dist/pi/packages/ta-recall/package.json +55 -0
- package/dist/pi/packages/ta-recall/web/index.js +1038 -0
- package/dist/pi/packages/ta-rooms/README.en.md +23 -0
- package/dist/pi/packages/ta-rooms/README.md +23 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.d.ts +39 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.js +235 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +101 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +203 -0
- package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-rooms/lib/index.js +85 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.js +64 -0
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +105 -0
- package/dist/pi/packages/ta-rooms/lib/page.js +306 -0
- package/dist/pi/packages/ta-rooms/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/react.js +8 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +17 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.js +150 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +174 -0
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-rooms/lib/style.js +154 -0
- package/dist/pi/packages/ta-rooms/package.json +50 -0
- package/dist/pi/packages/ta-rooms/web/index.js +1932 -0
- package/dist/pi/packages/ta-share/README.en.md +27 -0
- package/dist/pi/packages/ta-share/README.md +27 -0
- package/dist/pi/packages/ta-share/extension/index.mjs +184 -0
- package/dist/pi/packages/ta-share/host/index.mjs +364 -0
- package/dist/pi/packages/ta-share/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-share/lib/extension.js +115 -0
- package/dist/pi/packages/ta-share/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-share/lib/host.js +9 -0
- package/dist/pi/packages/ta-share/lib/i18n.d.ts +106 -0
- package/dist/pi/packages/ta-share/lib/i18n.js +213 -0
- package/dist/pi/packages/ta-share/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-share/lib/index.js +77 -0
- package/dist/pi/packages/ta-share/lib/page.d.ts +48 -0
- package/dist/pi/packages/ta-share/lib/page.js +105 -0
- package/dist/pi/packages/ta-share/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-share/lib/react.js +8 -0
- package/dist/pi/packages/ta-share/lib/server-texts.d.ts +14 -0
- package/dist/pi/packages/ta-share/lib/server-texts.js +52 -0
- package/dist/pi/packages/ta-share/lib/share-dialog.d.ts +18 -0
- package/dist/pi/packages/ta-share/lib/share-dialog.js +233 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +86 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.js +30 -0
- package/dist/pi/packages/ta-share/lib/share-service.d.ts +50 -0
- package/dist/pi/packages/ta-share/lib/share-service.js +130 -0
- package/dist/pi/packages/ta-share/lib/shared-view.d.ts +18 -0
- package/dist/pi/packages/ta-share/lib/shared-view.js +225 -0
- package/dist/pi/packages/ta-share/lib/shares-page.d.ts +3 -0
- package/dist/pi/packages/ta-share/lib/shares-page.js +54 -0
- package/dist/pi/packages/ta-share/lib/snapshot.d.ts +30 -0
- package/dist/pi/packages/ta-share/lib/snapshot.js +195 -0
- package/dist/pi/packages/ta-share/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-share/lib/style.js +111 -0
- package/dist/pi/packages/ta-share/package.json +56 -0
- package/dist/pi/packages/ta-share/web/index.js +1197 -0
- package/dist/pi/packages/ta-workspace/README.md +2 -2
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +2 -2
- package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/browser-common.js +29 -30
- package/dist/pi/packages/ta-workspace/lib/browser-tool-line.d.ts +15 -0
- package/dist/pi/packages/ta-workspace/lib/browser-tool-line.js +70 -0
- package/dist/pi/packages/ta-workspace/lib/bytes.d.ts +11 -0
- package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
- package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
- package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
- package/dist/pi/packages/ta-workspace/lib/editors.js +40 -4
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +14 -4
- package/dist/pi/packages/ta-workspace/lib/i18n.js +31 -11
- package/dist/pi/packages/ta-workspace/lib/index.js +17 -0
- package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +22 -3
- package/dist/pi/packages/ta-workspace/lib/preview.js +150 -22
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +70 -41
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +15 -4
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +31 -9
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +3 -2
- package/dist/pi/packages/ta-workspace/lib/terminal.js +51 -21
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +18 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +46 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +106 -1
- package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +5 -0
- package/dist/pi/packages/ta-workspace/lib/util/terminal.js +14 -0
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +1032 -382
- package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-EVMX_yOb.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-CDgbgZ_o.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-dHreaCWz.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-D6FhzBDq.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
- package/dist/public/assets/browser-WLpgVYno.js +12 -0
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-BFpcr8Cs.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-BczXkMV-.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CjJsv3jB.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-FBaleaLz.js → chunk-BG4553SI-D592E55X.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-BFdXY5sX.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5cwK-Fg.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-BUek3IRk.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BxsYBzt6.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-Bdcwz9fS.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-kkpP5oug.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-CFhQgxmD.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-BVXqu0eC.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-B7SUqqLI.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-B3abfbnH.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-C9NqnUav.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BeLfETDx.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-DXai1i8p.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-Zj6ne_tC.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-C0-TjqfJ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BnqxfzPa.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
- package/dist/public/assets/{d3-selection-DfFLTR9d.js → d3-selection-CN9k6_B9.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-kI17e5cH.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-DgPjeLA5.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-CRhPfa0I.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-ExuTg12b.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-Dgx5xNiY.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BuifkUTl.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-CFEaBo7z.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
- package/dist/public/assets/{dist-C-iJHcSK.js → dist-DcBP8Cf6.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D-hp5yNt.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
- package/dist/public/assets/{editor.api-BopUWpqY.js → editor.api-Bz4sjRz_.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-CBbk_IpU.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-B02R_WWE.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-aCZfYnCI.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
- package/dist/public/assets/{freemarker2-DMN60LeK.js → freemarker2-BLxfRHsw.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-DioU8TlD.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW--q3ctg6y.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
- package/dist/public/assets/{handlebars-B_-qdvpB.js → handlebars-sNpu01kP.js} +1 -1
- package/dist/public/assets/{html-BN8Ah3Js.js → html-C_tKd-uP.js} +1 -1
- package/dist/public/assets/{index-B3A--ac8.js → index-Bn86rI4n.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-CGXteYo9.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DM2LmOAc.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
- package/dist/public/assets/{javascript-BlizGb0q.js → javascript-l3qKw0L-.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-CNITRtGl.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
- package/dist/public/assets/{jsonMode-CEUmT5sN.js → jsonMode-5SQQn1EX.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-BPUuS9um.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
- package/dist/public/assets/{liquid-BbyLjUbE.js → liquid-BGyTIIUt.js} +1 -1
- package/dist/public/assets/{mdx-DiQz7Q35.js → mdx-8tGjz4em.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Dum100hC.js → mermaid-parser.core-CctN5b0z.js} +3 -3
- package/dist/public/assets/{mermaid.core-BWmWf6XO.js → mermaid.core-7ERSdZ4-.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-L8HyYUDY.js → mindmap-definition-I2QAS2VK-D-GOUwW1.js} +1 -1
- package/dist/public/assets/module-DEqsdd00.js +1 -0
- package/dist/public/assets/module-TWc52XwT.js +2244 -0
- package/dist/public/assets/{monaco-zOOyBmxy.js → monaco-B_9hlk78.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-CTZKPo0Z.js → pegDiagram-FD4XPPHP-Dmy1fWB3.js} +1 -1
- package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
- package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-DAeT3dFi.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
- package/dist/public/assets/{python-C984gt98.js → python-e-JK0s5M.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2--PXxwV1Z.js → quadrantDiagram-XTYBLID2-RQvEpGWO.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-BYcFfrCa.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-Cd33qxAm.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-C5TpzaU8.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-DlWwjbhH.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
- package/dist/public/assets/{razor-BBqMR1Qn.js → razor-DtSPwumi.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CsYBy9HS.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-Baxyb5p9.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-Cq6VeBT_.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-O60WKaE7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-C2nf1-Cc.js → swimlanes-UMQ2AFYF-DWhlPvKs.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +8 -0
- package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DEfUG6YH.js → timeline-definition-SEUHKTQE-CMdocOui.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +1 -0
- package/dist/public/assets/{typescript-Gtq7f0aU.js → typescript-65jNyipU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-Gw9DyJcx.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-Clb3MLWF.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BrTRpwu2.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
- package/dist/public/assets/{xml-Bx3nk7iG.js → xml-DWBejfu-.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-BfjTcIsb.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
- package/dist/public/assets/{yaml-dFLE_rSl.js → yaml-CwRCT7q1.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/launch.svg +46 -42
- package/dist/serve/index.mjs +8244 -3756
- package/package.json +33 -26
- package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
- package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
- package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
- package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
- package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
- package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
- package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
- package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
- package/dist/public/assets/browser-y6EDNUmc.js +0 -12
- package/dist/public/assets/cynefin-EF2NZ3EQ-CoY4CrZu.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-CATkJShO.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-g4yHXXxx.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CKADJjz4.js +0 -1
- package/dist/public/assets/module-CH7IXa5L.js +0 -1781
- package/dist/public/assets/module-DNAasuMC.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-CpKMhX4K.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CW-zGDRd.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Cg8W433p.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-DriMt2PQ.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-B46JxqS8.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-1LhEWwC9.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-D3t3N7nS.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-D3sAsd8p.js +0 -1
|
@@ -1,3 +1,279 @@
|
|
|
1
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
2
|
+
var TA_HOST_EVENT = "ta:host";
|
|
3
|
+
var TaHostUtil;
|
|
4
|
+
(function(TaHostUtil2) {
|
|
5
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
6
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
7
|
+
return new Promise((resolve) => {
|
|
8
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
9
|
+
const request = {
|
|
10
|
+
name,
|
|
11
|
+
resolve: (answer) => {
|
|
12
|
+
clearTimeout(timer);
|
|
13
|
+
resolve(answer);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
events.emit(TA_HOST_EVENT, request);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
TaHostUtil2.reach = reach;
|
|
20
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
21
|
+
|
|
22
|
+
// web-src/cron-protocol.ts
|
|
23
|
+
var NAME = "@celljs/ta-cron";
|
|
24
|
+
var REPLY_TYPE = "ta-cron";
|
|
25
|
+
var TOOL_NAME = "schedule_task";
|
|
26
|
+
var RUN_MARK = "<ta-cron-run>";
|
|
27
|
+
var Keys;
|
|
28
|
+
((Keys) => {
|
|
29
|
+
Keys.TASKS = "tasks";
|
|
30
|
+
Keys.LATEST = "latest";
|
|
31
|
+
function runs(taskId) {
|
|
32
|
+
return `runs/${taskId}`;
|
|
33
|
+
}
|
|
34
|
+
Keys.runs = runs;
|
|
35
|
+
})(Keys ||= {});
|
|
36
|
+
var Limits;
|
|
37
|
+
((Limits) => {
|
|
38
|
+
Limits.RUNS_KEPT = 20;
|
|
39
|
+
Limits.SUMMARY_MAX = 4000;
|
|
40
|
+
Limits.MIN_INTERVAL_MS = 60000;
|
|
41
|
+
Limits.RUN_TIMEOUT_MS = 30 * 60000;
|
|
42
|
+
Limits.RUN_TIMEOUT_MIN_MS = 5 * 60000;
|
|
43
|
+
Limits.RUN_TIMEOUT_MAX_MS = 4 * 60 * 60000;
|
|
44
|
+
Limits.GRACE_MS = 5 * 60000;
|
|
45
|
+
Limits.PARALLEL_RUNS = 3;
|
|
46
|
+
})(Limits ||= {});
|
|
47
|
+
|
|
48
|
+
// web-src/i18n.ts
|
|
49
|
+
var EN = {
|
|
50
|
+
title: "Scheduled",
|
|
51
|
+
cardTitle: "Next up",
|
|
52
|
+
cardEmpty: "Nothing scheduled",
|
|
53
|
+
newTask: "New task",
|
|
54
|
+
editTask: "Edit task",
|
|
55
|
+
count: "{count} tasks",
|
|
56
|
+
runningCount: "{count} running",
|
|
57
|
+
emptyTitle: "Let Ta work on a schedule",
|
|
58
|
+
emptyHint: "Each run is a new conversation; you get the summary.",
|
|
59
|
+
example1: "Sum up yesterday’s commits",
|
|
60
|
+
example2: "Check that CI passes",
|
|
61
|
+
example3: "Write the daily report",
|
|
62
|
+
next: "in {time}",
|
|
63
|
+
nextAt: "Next {time}",
|
|
64
|
+
running: "Running…",
|
|
65
|
+
paused: "Paused",
|
|
66
|
+
done: "Done",
|
|
67
|
+
runNow: "Run now",
|
|
68
|
+
edit: "Edit",
|
|
69
|
+
delete: "Delete",
|
|
70
|
+
confirmDelete: "Delete {name}?",
|
|
71
|
+
confirmDeleteMessage: "Its runs go too; their conversations stay.",
|
|
72
|
+
enable: "On",
|
|
73
|
+
prompt: "What should Ta do?",
|
|
74
|
+
promptPlaceholder: "For example: check whether CI on main passes; if not, find out why",
|
|
75
|
+
name: "Name",
|
|
76
|
+
namePlaceholder: "Optional",
|
|
77
|
+
when: "When",
|
|
78
|
+
once: "Once",
|
|
79
|
+
every: "Every",
|
|
80
|
+
daily: "Daily",
|
|
81
|
+
weekdays: "Weekdays",
|
|
82
|
+
weekly: "Weekly",
|
|
83
|
+
custom: "Cron",
|
|
84
|
+
minutes: "minutes",
|
|
85
|
+
hours: "hours",
|
|
86
|
+
days: "days",
|
|
87
|
+
directory: "Directory",
|
|
88
|
+
notify: "Tell me",
|
|
89
|
+
notifyDefault: "Default",
|
|
90
|
+
notifyAlways: "Every run",
|
|
91
|
+
notifyError: "When it fails",
|
|
92
|
+
notifyNever: "Never",
|
|
93
|
+
model: "Model",
|
|
94
|
+
thinking: "Thinking",
|
|
95
|
+
more: "More",
|
|
96
|
+
cancel: "Cancel",
|
|
97
|
+
save: "Save",
|
|
98
|
+
create: "Create",
|
|
99
|
+
preview: "Next run {time}",
|
|
100
|
+
noNext: "No next run",
|
|
101
|
+
runs: "Runs",
|
|
102
|
+
noRuns: "No runs yet",
|
|
103
|
+
byHand: "by hand",
|
|
104
|
+
openChat: "Open conversation",
|
|
105
|
+
noChat: "This run has no conversation.",
|
|
106
|
+
success: "Done",
|
|
107
|
+
error: "Failed",
|
|
108
|
+
missed: "Missed",
|
|
109
|
+
interrupted: "The Ta service stopped during the run.",
|
|
110
|
+
timeout: "The run took too long and was stopped.",
|
|
111
|
+
missedText: "The Ta service was not running at its time.",
|
|
112
|
+
started: "Started {name}",
|
|
113
|
+
finished: "{name} is done",
|
|
114
|
+
failed: "{name} failed",
|
|
115
|
+
created: "Scheduled",
|
|
116
|
+
updated: "Updated",
|
|
117
|
+
enabled: "Turned on",
|
|
118
|
+
disabled: "Turned off",
|
|
119
|
+
removed: "Removed {names}",
|
|
120
|
+
removedNone: "Nothing removed",
|
|
121
|
+
noTasks: "No scheduled tasks yet. Try /loop 30m <prompt>.",
|
|
122
|
+
show: "Show",
|
|
123
|
+
failedAction: "Could not do it: {message}",
|
|
124
|
+
help: "Scheduled tasks",
|
|
125
|
+
serviceNeeded: "Scheduled tasks run in the Ta service.",
|
|
126
|
+
makeExtension: "Make an extension",
|
|
127
|
+
makeExtensionHint: "Ta makes a page of its own for what this task finds",
|
|
128
|
+
extensionAsk: 'Make the scheduled task "{name}" an extension that shows its results',
|
|
129
|
+
promptLabel: "What Ta does",
|
|
130
|
+
showAll: "Show all",
|
|
131
|
+
showLess: "Show less",
|
|
132
|
+
stats: "Ran {runs} times",
|
|
133
|
+
statsFailed: "Ran {runs} times · {fails} failed",
|
|
134
|
+
lastRun: "Last {time}",
|
|
135
|
+
moreOptions: "More options",
|
|
136
|
+
shortcut: "{key} + Enter to {action}",
|
|
137
|
+
modelFailed: "The model for making extensions ({model}) cannot be used, so the default one is: {message}",
|
|
138
|
+
fromChat: "Make a scheduled task",
|
|
139
|
+
fromChatDetail: "Do this again on a schedule",
|
|
140
|
+
fromChatWhen: "How often",
|
|
141
|
+
fromChatOther: "Another time",
|
|
142
|
+
fromChatOtherDetail: "Ta asks you",
|
|
143
|
+
fromChatAsk: "Make what this conversation did a scheduled task: {when}",
|
|
144
|
+
fromChatAskWhen: "Make what this conversation did a scheduled task; ask me how often first",
|
|
145
|
+
toolAdd: "Schedule",
|
|
146
|
+
toolUpdate: "Change scheduled task",
|
|
147
|
+
toolList: "List scheduled tasks",
|
|
148
|
+
toolShow: "Look at scheduled task",
|
|
149
|
+
toolEnable: "Turn on scheduled task",
|
|
150
|
+
toolDisable: "Pause scheduled task",
|
|
151
|
+
toolDelete: "Delete scheduled task",
|
|
152
|
+
toolRun: "Run scheduled task",
|
|
153
|
+
toolRuns: "Look at the runs of",
|
|
154
|
+
toolClear: "Clear scheduled tasks",
|
|
155
|
+
toolOther: "Scheduled tasks"
|
|
156
|
+
};
|
|
157
|
+
var ZH = {
|
|
158
|
+
title: "定时任务",
|
|
159
|
+
cardTitle: "接下来",
|
|
160
|
+
cardEmpty: "没有排着的任务",
|
|
161
|
+
newTask: "新建任务",
|
|
162
|
+
editTask: "编辑任务",
|
|
163
|
+
count: "{count} 个任务",
|
|
164
|
+
runningCount: "{count} 个运行中",
|
|
165
|
+
emptyTitle: "让 Ta 按时干活",
|
|
166
|
+
emptyHint: "每次运行都是一个新对话,结束后给你看总结。",
|
|
167
|
+
example1: "汇总昨天的提交",
|
|
168
|
+
example2: "检查 CI 是否通过",
|
|
169
|
+
example3: "写今天的日报",
|
|
170
|
+
next: "{time}后",
|
|
171
|
+
nextAt: "下次 {time}",
|
|
172
|
+
running: "运行中…",
|
|
173
|
+
paused: "已暂停",
|
|
174
|
+
done: "已完成",
|
|
175
|
+
runNow: "立即运行",
|
|
176
|
+
edit: "编辑",
|
|
177
|
+
delete: "删除",
|
|
178
|
+
confirmDelete: "删除“{name}”?",
|
|
179
|
+
confirmDeleteMessage: "它的运行记录一起删除;对话保留。",
|
|
180
|
+
enable: "启用",
|
|
181
|
+
prompt: "要 Ta 做什么?",
|
|
182
|
+
promptPlaceholder: "例如:检查 main 分支的 CI 是否通过,没通过就查明原因",
|
|
183
|
+
name: "名字",
|
|
184
|
+
namePlaceholder: "可不填",
|
|
185
|
+
when: "时间",
|
|
186
|
+
once: "一次",
|
|
187
|
+
every: "每隔",
|
|
188
|
+
daily: "每天",
|
|
189
|
+
weekdays: "工作日",
|
|
190
|
+
weekly: "每周",
|
|
191
|
+
custom: "Cron",
|
|
192
|
+
minutes: "分钟",
|
|
193
|
+
hours: "小时",
|
|
194
|
+
days: "天",
|
|
195
|
+
directory: "目录",
|
|
196
|
+
notify: "通知我",
|
|
197
|
+
notifyDefault: "默认",
|
|
198
|
+
notifyAlways: "每次运行",
|
|
199
|
+
notifyError: "失败时",
|
|
200
|
+
notifyNever: "不通知",
|
|
201
|
+
model: "模型",
|
|
202
|
+
thinking: "思考级别",
|
|
203
|
+
more: "更多",
|
|
204
|
+
cancel: "取消",
|
|
205
|
+
save: "保存",
|
|
206
|
+
create: "创建",
|
|
207
|
+
preview: "下次运行 {time}",
|
|
208
|
+
noNext: "没有下次运行",
|
|
209
|
+
runs: "运行记录",
|
|
210
|
+
noRuns: "还没有运行过",
|
|
211
|
+
byHand: "手动",
|
|
212
|
+
openChat: "打开对话",
|
|
213
|
+
noChat: "这次运行没有对话。",
|
|
214
|
+
success: "完成",
|
|
215
|
+
error: "失败",
|
|
216
|
+
missed: "错过",
|
|
217
|
+
interrupted: "Ta 服务在运行中途停止了。",
|
|
218
|
+
timeout: "运行时间太长,已停止。",
|
|
219
|
+
missedText: "到点时 Ta 服务没有运行。",
|
|
220
|
+
started: "已开始运行“{name}”",
|
|
221
|
+
finished: "“{name}”已完成",
|
|
222
|
+
failed: "“{name}”运行失败",
|
|
223
|
+
created: "已创建定时任务",
|
|
224
|
+
updated: "已更新",
|
|
225
|
+
enabled: "已启用",
|
|
226
|
+
disabled: "已暂停",
|
|
227
|
+
removed: "已删除 {names}",
|
|
228
|
+
removedNone: "没有删除任何任务",
|
|
229
|
+
noTasks: "还没有定时任务。试试 /loop 30m <要做的事>。",
|
|
230
|
+
show: "查看",
|
|
231
|
+
failedAction: "操作失败:{message}",
|
|
232
|
+
help: "定时任务",
|
|
233
|
+
serviceNeeded: "定时任务在 Ta 服务里运行。",
|
|
234
|
+
makeExtension: "做成扩展",
|
|
235
|
+
makeExtensionHint: "让 Ta 为这个任务的结果做一个专属页面",
|
|
236
|
+
extensionAsk: "把定时任务“{name}”做成扩展,用专属页面呈现它的运行结果",
|
|
237
|
+
promptLabel: "Ta 要做的事",
|
|
238
|
+
showAll: "展开全文",
|
|
239
|
+
showLess: "收起",
|
|
240
|
+
stats: "已运行 {runs} 次",
|
|
241
|
+
statsFailed: "已运行 {runs} 次 · 失败 {fails} 次",
|
|
242
|
+
lastRun: "上次 {time}",
|
|
243
|
+
moreOptions: "更多选项",
|
|
244
|
+
shortcut: "{key} + 回车{action}",
|
|
245
|
+
modelFailed: "做扩展的模型({model})现在用不了,已改用默认模型:{message}",
|
|
246
|
+
fromChat: "做成定时任务",
|
|
247
|
+
fromChatDetail: "定期再做一遍这次的事",
|
|
248
|
+
fromChatWhen: "多久运行一次",
|
|
249
|
+
fromChatOther: "其他时间",
|
|
250
|
+
fromChatOtherDetail: "让 Ta 问我",
|
|
251
|
+
fromChatAsk: "把这次对话做的事做成定时任务,{when} 运行",
|
|
252
|
+
fromChatAskWhen: "把这次对话做的事做成定时任务,先问我多久运行一次",
|
|
253
|
+
toolAdd: "新建定时任务",
|
|
254
|
+
toolUpdate: "修改定时任务",
|
|
255
|
+
toolList: "查看定时任务",
|
|
256
|
+
toolShow: "查看定时任务",
|
|
257
|
+
toolEnable: "开启定时任务",
|
|
258
|
+
toolDisable: "暂停定时任务",
|
|
259
|
+
toolDelete: "删除定时任务",
|
|
260
|
+
toolRun: "立即运行定时任务",
|
|
261
|
+
toolRuns: "查看运行记录",
|
|
262
|
+
toolClear: "清空定时任务",
|
|
263
|
+
toolOther: "定时任务"
|
|
264
|
+
};
|
|
265
|
+
var CronWords;
|
|
266
|
+
((CronWords) => {
|
|
267
|
+
function of(language) {
|
|
268
|
+
return language === "zh-CN" ? ZH : EN;
|
|
269
|
+
}
|
|
270
|
+
CronWords.of = of;
|
|
271
|
+
function format(text, values) {
|
|
272
|
+
return text.replace(/\{(\w+)\}/g, (whole, key) => (key in values) ? String(values[key]) : whole);
|
|
273
|
+
}
|
|
274
|
+
CronWords.format = format;
|
|
275
|
+
})(CronWords ||= {});
|
|
276
|
+
|
|
1
277
|
// web-src/cron-expression.ts
|
|
2
278
|
var FIELDS = [
|
|
3
279
|
{ name: "minute", min: 0, max: 59 },
|
|
@@ -127,30 +403,6 @@ class CronExpression {
|
|
|
127
403
|
}
|
|
128
404
|
}
|
|
129
405
|
|
|
130
|
-
// web-src/cron-protocol.ts
|
|
131
|
-
var NAME = "@celljs/ta-cron";
|
|
132
|
-
var TA_HOST_EVENT = "ta:host";
|
|
133
|
-
var REPLY_TYPE = "ta-cron";
|
|
134
|
-
var RUN_MARK = "<ta-cron-run>";
|
|
135
|
-
var Keys;
|
|
136
|
-
((Keys) => {
|
|
137
|
-
Keys.TASKS = "tasks";
|
|
138
|
-
Keys.LATEST = "latest";
|
|
139
|
-
function runs(taskId) {
|
|
140
|
-
return `runs/${taskId}`;
|
|
141
|
-
}
|
|
142
|
-
Keys.runs = runs;
|
|
143
|
-
})(Keys ||= {});
|
|
144
|
-
var Limits;
|
|
145
|
-
((Limits) => {
|
|
146
|
-
Limits.RUNS_KEPT = 20;
|
|
147
|
-
Limits.SUMMARY_MAX = 4000;
|
|
148
|
-
Limits.MIN_INTERVAL_MS = 60000;
|
|
149
|
-
Limits.RUN_TIMEOUT_MS = 30 * 60000;
|
|
150
|
-
Limits.GRACE_MS = 5 * 60000;
|
|
151
|
-
Limits.PARALLEL_RUNS = 3;
|
|
152
|
-
})(Limits ||= {});
|
|
153
|
-
|
|
154
406
|
// web-src/schedule-util.ts
|
|
155
407
|
var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
156
408
|
var NOTIFY_LEVELS = ["always", "error", "never"];
|
|
@@ -357,7 +609,7 @@ var ScheduleUtil;
|
|
|
357
609
|
})(ScheduleUtil ||= {});
|
|
358
610
|
|
|
359
611
|
// web-src/commands.ts
|
|
360
|
-
var FLAG_NAMES = ["name", "notify", "model", "thinking", "cwd"];
|
|
612
|
+
var FLAG_NAMES = ["name", "notify", "model", "thinking", "cwd", "timeout"];
|
|
361
613
|
var TRAILING_FLAG = new RegExp(`(?:^|\\s)--(${FLAG_NAMES.join("|")})(?:=|\\s+)("[^"]*"|'[^']*'|\\S*)\\s*$`);
|
|
362
614
|
var ACTIONS = ["add", "list", "show", "runs", "run", "enable", "disable", "set", "remove", "clear", "help"];
|
|
363
615
|
var HELP = `Scheduled tasks: each run is a conversation of its own in the Ta service, which runs them while it runs.
|
|
@@ -375,7 +627,8 @@ var HELP = `Scheduled tasks: each run is a conversation of its own in the Ta ser
|
|
|
375
627
|
/schedule clear remove the tasks of this directory
|
|
376
628
|
|
|
377
629
|
A task is its id, the start of it, or its name. Flags at the end of a prompt:
|
|
378
|
-
--name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory
|
|
630
|
+
--name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>
|
|
631
|
+
--timeout <duration> how long a run may take before it is stopped, 5m to 4h; default 30m`;
|
|
379
632
|
var CommandParser;
|
|
380
633
|
((CommandParser) => {
|
|
381
634
|
function splitFlags(text) {
|
|
@@ -450,8 +703,11 @@ var CommandParser;
|
|
|
450
703
|
if (flags.notify !== undefined) {
|
|
451
704
|
patch2.notify = value(flags.notify);
|
|
452
705
|
}
|
|
706
|
+
if (flags.timeout !== undefined) {
|
|
707
|
+
patch2.timeout = value(flags.timeout);
|
|
708
|
+
}
|
|
453
709
|
if (Object.keys(patch2).length === 0) {
|
|
454
|
-
throw new Error("Say what changes: --name, --notify, --model, --thinking or --
|
|
710
|
+
throw new Error("Say what changes: --name, --notify, --model, --thinking, --cwd or --timeout.");
|
|
455
711
|
}
|
|
456
712
|
return { ref: rest, patch: patch2 };
|
|
457
713
|
}
|
|
@@ -515,7 +771,8 @@ var CommandParser;
|
|
|
515
771
|
...flags.cwd ? { cwd: flags.cwd } : {},
|
|
516
772
|
...flags.model ? { model: flags.model } : {},
|
|
517
773
|
...flags.thinking ? { thinking: flags.thinking } : {},
|
|
518
|
-
...flags.notify ? { notify: flags.notify } : {}
|
|
774
|
+
...flags.notify ? { notify: flags.notify } : {},
|
|
775
|
+
...flags.timeout ? { timeout: flags.timeout } : {}
|
|
519
776
|
};
|
|
520
777
|
}
|
|
521
778
|
function unquote(value) {
|
|
@@ -546,7 +803,8 @@ var CronText;
|
|
|
546
803
|
function task(task2, now = new Date) {
|
|
547
804
|
const state = !task2.enabled ? "off" : task2.lastStatus === "running" ? "running" : task2.nextRunAt ? `next ${ScheduleUtil.clock(new Date(task2.nextRunAt), now)}` : "done";
|
|
548
805
|
const last = task2.lastStatus && task2.lastStatus !== "running" ? `, last ${task2.lastStatus}` : "";
|
|
549
|
-
|
|
806
|
+
const timeout = task2.timeout ? `, stops after ${task2.timeout}` : "";
|
|
807
|
+
return `${task2.id} ${task2.name} (${ScheduleUtil.describe(task2.schedule, "en", now)}; ${state}${last}${timeout}) in ${task2.cwd}`;
|
|
550
808
|
}
|
|
551
809
|
CronText.task = task;
|
|
552
810
|
function run(run2, now = new Date) {
|
|
@@ -619,11 +877,11 @@ var SCHEDULE = {
|
|
|
619
877
|
};
|
|
620
878
|
var CronTool;
|
|
621
879
|
((CronTool) => {
|
|
622
|
-
CronTool.NAME =
|
|
880
|
+
CronTool.NAME = TOOL_NAME;
|
|
623
881
|
CronTool.DEFINITION = {
|
|
624
882
|
name: CronTool.NAME,
|
|
625
883
|
label: "Schedule task",
|
|
626
|
-
description: `Schedules a prompt for Ta to run later, once or again and again (reminders, checks, reports), and manages those tasks. Each run is a new conversation of its own in the Ta service, in the task's directory, with no user watching; its last answer is the summary the user sees. Actions: add (prompt and schedule; name, cwd, model, thinking, notify optional), update (id and the fields to change; "" clears model, thinking or
|
|
884
|
+
description: `Schedules a prompt for Ta to run later, once or again and again (reminders, checks, reports), and manages those tasks. Each run is a new conversation of its own in the Ta service, in the task's directory, with no user watching; its last answer is the summary the user sees. Actions: add (prompt and schedule; name, cwd, model, thinking, notify, timeout optional), update (id and the fields to change; "" clears model, thinking, notify or timeout), list, show (with its last runs), enable, disable, delete, run (now, by hand), runs, clear (the tasks of this directory). Deleting and clearing ask the user first.`,
|
|
627
885
|
parameters: {
|
|
628
886
|
type: "object",
|
|
629
887
|
properties: {
|
|
@@ -640,6 +898,7 @@ var CronTool;
|
|
|
640
898
|
enum: [...NOTIFY_LEVELS, ""],
|
|
641
899
|
description: "When the pages of Ta tell the user a run ended; default always for once, error for repeating."
|
|
642
900
|
},
|
|
901
|
+
timeout: { type: "string", description: "How long a run may take before it is stopped, as 90m or 2h (5m to 4h); default 30m." },
|
|
643
902
|
enabled: { type: "boolean" },
|
|
644
903
|
limit: { type: "number", description: "How many runs to list; default 10." }
|
|
645
904
|
},
|
|
@@ -659,13 +918,14 @@ var CronTool;
|
|
|
659
918
|
model: optional(params.model),
|
|
660
919
|
thinking: optional(params.thinking),
|
|
661
920
|
notify: optional(params.notify),
|
|
921
|
+
timeout: optional(params.timeout),
|
|
662
922
|
enabled: params.enabled === false ? false : undefined
|
|
663
923
|
});
|
|
664
924
|
return `Scheduled: ${CronText.task(task)}`;
|
|
665
925
|
}
|
|
666
926
|
case "update": {
|
|
667
927
|
const patch = {};
|
|
668
|
-
for (const key of ["name", "prompt", "cwd", "model", "thinking", "notify"]) {
|
|
928
|
+
for (const key of ["name", "prompt", "cwd", "model", "thinking", "notify", "timeout"]) {
|
|
669
929
|
if (typeof params[key] === "string") {
|
|
670
930
|
patch[key] = params[key];
|
|
671
931
|
}
|
|
@@ -726,23 +986,119 @@ var CronTool;
|
|
|
726
986
|
}
|
|
727
987
|
})(CronTool ||= {});
|
|
728
988
|
|
|
989
|
+
// web-src/chat-task.ts
|
|
990
|
+
var TASK_BLOCK = "ta-cron-task";
|
|
991
|
+
var MARK = /\[ta-cron:from-chat(?: (\{[^}]*\}))?\]/;
|
|
992
|
+
var ChatTask;
|
|
993
|
+
((ChatTask) => {
|
|
994
|
+
function message(language, schedule2) {
|
|
995
|
+
const words = CronWords.of(language);
|
|
996
|
+
const ask = schedule2 ? CronWords.format(words.fromChatAsk, { when: ScheduleUtil.describe(schedule2, language) }) : words.fromChatAskWhen;
|
|
997
|
+
return `<context>
|
|
998
|
+
${context(schedule2)}
|
|
999
|
+
</context>
|
|
1000
|
+
${ask}`;
|
|
1001
|
+
}
|
|
1002
|
+
ChatTask.message = message;
|
|
1003
|
+
function context(schedule2) {
|
|
1004
|
+
const fence = "```";
|
|
1005
|
+
return [
|
|
1006
|
+
schedule2 ? `[ta-cron:from-chat ${JSON.stringify(schedule2)}]` : "[ta-cron:from-chat]",
|
|
1007
|
+
schedule2 ? `The user wants what was done in this conversation made a scheduled task of Ta that does it again and again, ${ScheduleUtil.describe(schedule2, "en-US")}.` : "The user wants what was done in this conversation made a scheduled task of Ta that does it again and again, and has not said how often: unless the conversation says it, ask, with two or three choices that suit the work, and write the task once you know.",
|
|
1008
|
+
"- Each run is a new conversation in this directory with nobody watching, and it does not see this one: write a prompt complete in itself, with the goal, the repository, branch, files, commands, links and other specifics found here, the steps that worked, and what its last answer should report (short: what it found, what changed since the run before, what needs the user).",
|
|
1009
|
+
'- Leave out what was only tried and dropped, and what holds only this once: say "since the last run" or "yesterday" rather than a date.',
|
|
1010
|
+
`- Say in a line or two what the task does, then end your answer with it in a fenced block of the language ${TASK_BLOCK}, which Ta reads to create the task: do not create it with ${CronTool.NAME} or a command. A longer fence when the prompt has one of its own:`,
|
|
1011
|
+
`${fence}${TASK_BLOCK}`,
|
|
1012
|
+
"name: <short, for the list>",
|
|
1013
|
+
schedule2 ? "when: <only when the user asked for another time since: 30m, 2h, @daily, or five fields of cron>" : "when: <30m, 2h, @daily, or five fields of cron, as 0 9 * * 1-5>",
|
|
1014
|
+
"---",
|
|
1015
|
+
"<the prompt>",
|
|
1016
|
+
fence,
|
|
1017
|
+
"- When the conversation holds nothing worth doing again, say so, ask what the task should do, and leave the block out until you know."
|
|
1018
|
+
].join(`
|
|
1019
|
+
`);
|
|
1020
|
+
}
|
|
1021
|
+
ChatTask.context = context;
|
|
1022
|
+
function find(text2) {
|
|
1023
|
+
const lines = text2.split(/\r?\n/);
|
|
1024
|
+
let found;
|
|
1025
|
+
for (let index = 0;index < lines.length; index++) {
|
|
1026
|
+
const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
|
|
1027
|
+
if (open?.[2] !== TASK_BLOCK) {
|
|
1028
|
+
continue;
|
|
1029
|
+
}
|
|
1030
|
+
const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
|
|
1031
|
+
const end = lines.findIndex((line, at) => at > index && close.test(line));
|
|
1032
|
+
found = lines.slice(index + 1, end < 0 ? lines.length : end);
|
|
1033
|
+
index = end < 0 ? lines.length : end;
|
|
1034
|
+
}
|
|
1035
|
+
return found && parse(found);
|
|
1036
|
+
}
|
|
1037
|
+
ChatTask.find = find;
|
|
1038
|
+
function parse(lines) {
|
|
1039
|
+
const rule = lines.findIndex((line) => line.trim() === "---");
|
|
1040
|
+
const head = rule < 0 ? [] : lines.slice(0, rule);
|
|
1041
|
+
const prompt = lines.slice(rule + 1).join(`
|
|
1042
|
+
`).trim();
|
|
1043
|
+
if (!prompt) {
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
const field = (key) => head.map((line) => new RegExp(`^\\s*${key}\\s*:\\s*(.*)$`, "i").exec(line)?.[1].trim()).find((value) => value !== undefined);
|
|
1047
|
+
const name = field("name") ?? "";
|
|
1048
|
+
const when = field("when");
|
|
1049
|
+
return { name, prompt, schedule: when ? schedule(when) : undefined };
|
|
1050
|
+
}
|
|
1051
|
+
function schedule(text2) {
|
|
1052
|
+
const when = text2.replace(/^["'`]|["'`]$/g, "").trim();
|
|
1053
|
+
if (Duration.parse(when) !== undefined) {
|
|
1054
|
+
return ScheduleUtil.check({ kind: "interval", every: when });
|
|
1055
|
+
}
|
|
1056
|
+
return ScheduleUtil.check({ kind: "cron", expression: when });
|
|
1057
|
+
}
|
|
1058
|
+
ChatTask.schedule = schedule;
|
|
1059
|
+
function pending(entries) {
|
|
1060
|
+
for (let index = entries.length - 1;index >= 0; index--) {
|
|
1061
|
+
const entry = entries[index];
|
|
1062
|
+
const custom = entry.type === "custom_message" ? entry : entry.message?.role === "custom" ? entry.message : undefined;
|
|
1063
|
+
if (custom?.customType === REPLY_TYPE && created(custom.details)) {
|
|
1064
|
+
return;
|
|
1065
|
+
}
|
|
1066
|
+
if (entry.type !== "message" || entry.message?.role !== "user") {
|
|
1067
|
+
continue;
|
|
1068
|
+
}
|
|
1069
|
+
const mark = MARK.exec(text(entry.message.content));
|
|
1070
|
+
if (mark) {
|
|
1071
|
+
return { schedule: mark[1] ? ScheduleUtil.check(JSON.parse(mark[1])) : undefined };
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
ChatTask.pending = pending;
|
|
1077
|
+
function text(content) {
|
|
1078
|
+
if (typeof content === "string") {
|
|
1079
|
+
return content;
|
|
1080
|
+
}
|
|
1081
|
+
return Array.isArray(content) ? content.filter((part) => part?.type === "text" && typeof part.text === "string").map((part) => part.text).join(`
|
|
1082
|
+
`) : "";
|
|
1083
|
+
}
|
|
1084
|
+
ChatTask.text = text;
|
|
1085
|
+
function created(details) {
|
|
1086
|
+
const reply = details;
|
|
1087
|
+
return reply?.kind === "task" && reply.event === "created";
|
|
1088
|
+
}
|
|
1089
|
+
})(ChatTask ||= {});
|
|
1090
|
+
|
|
729
1091
|
// web-src/extension.ts
|
|
730
|
-
var HOST_WAIT_MS = 1000;
|
|
731
1092
|
var NO_SERVER = "Scheduled tasks need the Ta service, which runs them: start it with `ta serve` (or open Ta Desktop) and talk to Ta in its page.";
|
|
732
1093
|
var NO_SCHEDULER = "The scheduler did not start in the Ta service; its log says why.";
|
|
733
1094
|
var NOT_IN_RUN = "This is a scheduled run: it does not schedule more work. Say in your summary what should be scheduled.";
|
|
734
1095
|
function activate(pi) {
|
|
735
1096
|
let reached;
|
|
736
|
-
const reach = () => reached ??=
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
clearTimeout(timer);
|
|
742
|
-
resolve({ answered: true, host: answer.host, scheduler: answer.service });
|
|
743
|
-
}
|
|
744
|
-
});
|
|
745
|
-
});
|
|
1097
|
+
const reach = () => reached ??= TaHostUtil.reach(pi.events, NAME).then((answer) => ({
|
|
1098
|
+
answered: !!answer,
|
|
1099
|
+
host: answer?.host,
|
|
1100
|
+
scheduler: answer?.service
|
|
1101
|
+
}));
|
|
746
1102
|
const isRun = (ctx) => ctx.getSystemPrompt().includes(RUN_MARK);
|
|
747
1103
|
const scheduler = async (ctx) => {
|
|
748
1104
|
if (isRun(ctx)) {
|
|
@@ -779,7 +1135,7 @@ function activate(pi) {
|
|
|
779
1135
|
return { content: [{ type: "text", text }], details: undefined };
|
|
780
1136
|
}
|
|
781
1137
|
});
|
|
782
|
-
const reply = (answer) => pi.sendMessage({ customType: REPLY_TYPE, content: CronText.reply(answer), display: true, details: answer });
|
|
1138
|
+
const reply = (answer, options) => pi.sendMessage({ customType: REPLY_TYPE, content: CronText.reply(answer), display: true, details: answer }, options);
|
|
783
1139
|
const command = (name, description, handle, completions) => pi.registerCommand(name, {
|
|
784
1140
|
description,
|
|
785
1141
|
getArgumentCompletions: completions,
|
|
@@ -795,6 +1151,22 @@ function activate(pi) {
|
|
|
795
1151
|
const cwd = input.cwd ?? await found.cwd();
|
|
796
1152
|
return { kind: "task", event: "created", task: await found.scheduler.add({ ...input, ...cwd ? { cwd } : {} }) };
|
|
797
1153
|
};
|
|
1154
|
+
pi.on("agent_end", async (event, ctx) => {
|
|
1155
|
+
if (isRun(ctx)) {
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
try {
|
|
1159
|
+
const draft = [...event.messages].reverse().filter((message) => message.role === "assistant").map((message) => ChatTask.find(ChatTask.text(message.content))).find((found) => found !== undefined);
|
|
1160
|
+
const ask = draft && ChatTask.pending(ctx.sessionManager.getBranch());
|
|
1161
|
+
const schedule = draft?.schedule ?? ask?.schedule;
|
|
1162
|
+
if (!draft || !ask || !schedule) {
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
reply(await create({ name: draft.name || undefined, prompt: draft.prompt, schedule }, await scheduler(ctx)), { triggerTurn: false });
|
|
1166
|
+
} catch (error) {
|
|
1167
|
+
reply({ kind: "error", message: error instanceof Error ? error.message : String(error) }, { triggerTurn: false });
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
798
1170
|
command("loop", 'Run a prompt on a schedule: /loop 30m <prompt>, /loop @daily <prompt>, /loop "0 9 * * 1-5" <prompt>', (args, found) => create(CommandParser.repeating(args), found), (prefix) => CommandParser.loopCompletions(prefix));
|
|
799
1171
|
command("remind", "Run a prompt once: /remind in 45m <prompt>, /remind at 15:30 <prompt>", (args, found) => create(CommandParser.reminder(args, new Date), found));
|
|
800
1172
|
let known = [];
|
|
@@ -16,6 +16,8 @@ var Limits;
|
|
|
16
16
|
Limits.SUMMARY_MAX = 4000;
|
|
17
17
|
Limits.MIN_INTERVAL_MS = 60000;
|
|
18
18
|
Limits.RUN_TIMEOUT_MS = 30 * 60000;
|
|
19
|
+
Limits.RUN_TIMEOUT_MIN_MS = 5 * 60000;
|
|
20
|
+
Limits.RUN_TIMEOUT_MAX_MS = 4 * 60 * 60000;
|
|
19
21
|
Limits.GRACE_MS = 5 * 60000;
|
|
20
22
|
Limits.PARALLEL_RUNS = 3;
|
|
21
23
|
})(Limits ||= {});
|
|
@@ -508,7 +510,10 @@ var TaskUtil;
|
|
|
508
510
|
if (input.notify !== undefined) {
|
|
509
511
|
task.notify = checkNotify(input.notify);
|
|
510
512
|
}
|
|
511
|
-
|
|
513
|
+
if (input.timeout !== undefined) {
|
|
514
|
+
task.timeout = checkTimeout(input.timeout);
|
|
515
|
+
}
|
|
516
|
+
for (const key of ["model", "thinking", "notify", "timeout"]) {
|
|
512
517
|
if (task[key] === undefined) {
|
|
513
518
|
delete task[key];
|
|
514
519
|
}
|
|
@@ -547,6 +552,21 @@ var TaskUtil;
|
|
|
547
552
|
}
|
|
548
553
|
return level || undefined;
|
|
549
554
|
}
|
|
555
|
+
function timeoutMs(task, fallback) {
|
|
556
|
+
return task.timeout && Duration.parse(task.timeout) || fallback;
|
|
557
|
+
}
|
|
558
|
+
TaskUtil.timeoutMs = timeoutMs;
|
|
559
|
+
function checkTimeout(value) {
|
|
560
|
+
const text = typeof value === "string" ? value.trim() : "";
|
|
561
|
+
if (!text) {
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
const ms = Duration.parse(text);
|
|
565
|
+
if (ms === undefined || ms < Limits.RUN_TIMEOUT_MIN_MS || ms > Limits.RUN_TIMEOUT_MAX_MS) {
|
|
566
|
+
throw new Error(`A timeout is a duration from 5m to 4h, as 90m or 2h; not ${JSON.stringify(text)}.`);
|
|
567
|
+
}
|
|
568
|
+
return Duration.format(ms);
|
|
569
|
+
}
|
|
550
570
|
function checkNotify(value) {
|
|
551
571
|
if (value === "" || value === null) {
|
|
552
572
|
return;
|
|
@@ -556,6 +576,12 @@ var TaskUtil;
|
|
|
556
576
|
}
|
|
557
577
|
return value;
|
|
558
578
|
}
|
|
579
|
+
function firstLine(text) {
|
|
580
|
+
const line = text.split(`
|
|
581
|
+
`).find((candidate) => candidate.trim()) ?? "";
|
|
582
|
+
return line.replace(/^\s*(?:#{1,6}\s+|[-*+]\s+|>\s*|\d+[.)]\s+)/, "").replace(/\*\*|__|`/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").trim();
|
|
583
|
+
}
|
|
584
|
+
TaskUtil.firstLine = firstLine;
|
|
559
585
|
function missed(task, now) {
|
|
560
586
|
return task.schedule.kind === "once" && !!task.nextRunAt && now.getTime() - new Date(task.nextRunAt).getTime() > Limits.GRACE_MS;
|
|
561
587
|
}
|
|
@@ -757,11 +783,12 @@ class CronScheduler {
|
|
|
757
783
|
if (!state.isStreaming && state.pendingMessageCount === 0 && state.messageCount > before) {
|
|
758
784
|
return;
|
|
759
785
|
}
|
|
760
|
-
|
|
786
|
+
const timeoutMs = TaskUtil.timeoutMs(active.task, this.options.timeoutMs);
|
|
787
|
+
if (Date.now() - start > timeoutMs) {
|
|
761
788
|
await this.host.abort(sessionId).catch(() => {
|
|
762
789
|
return;
|
|
763
790
|
});
|
|
764
|
-
throw new TimeoutError(`The run took longer than ${Math.round(
|
|
791
|
+
throw new TimeoutError(`The run took longer than ${Math.round(timeoutMs / 60000)} minutes and was stopped.`);
|
|
765
792
|
}
|
|
766
793
|
await new Promise((resolve) => setTimeout(resolve, this.options.pollMs));
|
|
767
794
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type Schedule } from './cron-protocol';
|
|
2
|
+
/** The language of the fenced block in which Ta writes the task; the pi extension creates it from there. */
|
|
3
|
+
export declare const TASK_BLOCK = "ta-cron-task";
|
|
4
|
+
/** What a conversation holds, as the pi extension reads it (its entries on the branch, oldest first). */
|
|
5
|
+
interface Entry {
|
|
6
|
+
type: string;
|
|
7
|
+
customType?: string;
|
|
8
|
+
details?: unknown;
|
|
9
|
+
message?: {
|
|
10
|
+
role: string;
|
|
11
|
+
content?: unknown;
|
|
12
|
+
customType?: string;
|
|
13
|
+
details?: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** The task Ta wrote: its name, the prompt of each run, and the schedule, when it said one. */
|
|
17
|
+
export interface DraftTask {
|
|
18
|
+
name: string;
|
|
19
|
+
prompt: string;
|
|
20
|
+
schedule?: Schedule;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Making what a conversation did a scheduled task, from the + of its message box. The page asks Ta in that
|
|
24
|
+
* conversation: a line in the user's language, which the conversation shows, after a `<context>` block for
|
|
25
|
+
* the model, which the pages of Ta leave out (TaMessageContext of @celljs/ta-protocol, not bundled here).
|
|
26
|
+
* Ta answers with the task in a `ta-cron-task` block, and the pi extension creates it (extension.ts): so it
|
|
27
|
+
* works with any model, another coding agent too, which has no tool schedule_task.
|
|
28
|
+
*/
|
|
29
|
+
export declare namespace ChatTask {
|
|
30
|
+
function message(language: string, schedule?: Schedule): string;
|
|
31
|
+
function context(schedule?: Schedule): string;
|
|
32
|
+
/** The last `ta-cron-task` block of an answer; undefined when it has none or it says no prompt. Throws on a schedule it cannot read. */
|
|
33
|
+
function find(text: string): DraftTask | undefined;
|
|
34
|
+
/** `30m` is an interval; `@daily` or five fields, cron. */
|
|
35
|
+
function schedule(text: string): Schedule;
|
|
36
|
+
/**
|
|
37
|
+
* The ask a turn that wrote a task answers: the latest one on the branch with no task created since, and
|
|
38
|
+
* the schedule it picked; undefined when there is none. Its answer may come turns later, once the user
|
|
39
|
+
* said how often.
|
|
40
|
+
*/
|
|
41
|
+
function pending(entries: readonly Entry[]): {
|
|
42
|
+
schedule?: Schedule;
|
|
43
|
+
} | undefined;
|
|
44
|
+
/** The text of a message, as pi keeps it: a string, or parts of which some are text. */
|
|
45
|
+
function text(content: unknown): string;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=chat-task.d.ts.map
|