@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
|
@@ -135,6 +135,21 @@ var TaLocation;
|
|
|
135
135
|
return name || (remote === null || remote === undefined ? undefined : remote.host) || location;
|
|
136
136
|
}
|
|
137
137
|
TaLocation2.basename = basename;
|
|
138
|
+
function homeRelative(location) {
|
|
139
|
+
var _a;
|
|
140
|
+
const remote = parse(location);
|
|
141
|
+
const path2 = remote ? remote.path ? remote.path.slice(1) : "~" : location;
|
|
142
|
+
const match = /^~(?:[\\/]+(.*))?$/.exec(path2);
|
|
143
|
+
return match ? ((_a = match[1]) !== null && _a !== undefined ? _a : "").replace(/[\\/]+$/, "") : undefined;
|
|
144
|
+
}
|
|
145
|
+
TaLocation2.homeRelative = homeRelative;
|
|
146
|
+
function isAbsolute(location) {
|
|
147
|
+
if (homeRelative(location) !== undefined) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
return isRemote(location) || /^([\\/]|[A-Za-z]:)/.test(location);
|
|
151
|
+
}
|
|
152
|
+
TaLocation2.isAbsolute = isAbsolute;
|
|
138
153
|
function parentPath(path2) {
|
|
139
154
|
const trimmed = path2.replace(/[\\/]+$/, "");
|
|
140
155
|
const at = Math.max(trimmed.lastIndexOf("/"), trimmed.lastIndexOf("\\"));
|
|
@@ -170,8 +185,64 @@ var TaPackageTextUtil;
|
|
|
170
185
|
var TaRelayServer = Symbol("TaRelayServer");
|
|
171
186
|
// ../ta-protocol/esm/common/remote-protocol.js
|
|
172
187
|
var TaRemoteServer = Symbol("TaRemoteServer");
|
|
188
|
+
// ../ta-protocol/esm/common/room-protocol.js
|
|
189
|
+
var TaRoomServer = Symbol("TaRoomServer");
|
|
190
|
+
var TaRoomWatchUtil;
|
|
191
|
+
(function(TaRoomWatchUtil2) {
|
|
192
|
+
function of(messages, state) {
|
|
193
|
+
const prefixes = Array.isArray(state) ? state.filter((prefix) => typeof prefix === "string" && prefix.length > 0) : [];
|
|
194
|
+
return { messages: messages !== false, state: [...new Set(prefixes)].sort() };
|
|
195
|
+
}
|
|
196
|
+
TaRoomWatchUtil2.of = of;
|
|
197
|
+
function union(watches) {
|
|
198
|
+
let messages = false;
|
|
199
|
+
const state = [];
|
|
200
|
+
for (const watch of watches) {
|
|
201
|
+
messages || (messages = watch.messages);
|
|
202
|
+
state.push(...watch.state);
|
|
203
|
+
}
|
|
204
|
+
return of(messages, messages ? [] : state);
|
|
205
|
+
}
|
|
206
|
+
TaRoomWatchUtil2.union = union;
|
|
207
|
+
function same(a, b) {
|
|
208
|
+
return a === b || !!a && !!b && a.messages === b.messages && a.state.join(`
|
|
209
|
+
`) === b.state.join(`
|
|
210
|
+
`);
|
|
211
|
+
}
|
|
212
|
+
TaRoomWatchUtil2.same = same;
|
|
213
|
+
function hears(watch, event) {
|
|
214
|
+
if (event.type === "message") {
|
|
215
|
+
return watch.messages;
|
|
216
|
+
}
|
|
217
|
+
if (event.type === "state") {
|
|
218
|
+
return watch.messages || watch.state.some((prefix) => event.key.startsWith(prefix));
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
TaRoomWatchUtil2.hears = hears;
|
|
223
|
+
})(TaRoomWatchUtil || (TaRoomWatchUtil = {}));
|
|
173
224
|
// ../ta-protocol/esm/common/settings-protocol.js
|
|
174
225
|
var TaSettingsServer = Symbol("TaSettingsServer");
|
|
226
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
227
|
+
var TA_HOST_EVENT = "ta:host";
|
|
228
|
+
var TaHostUtil;
|
|
229
|
+
(function(TaHostUtil2) {
|
|
230
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
231
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
232
|
+
return new Promise((resolve) => {
|
|
233
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
234
|
+
const request = {
|
|
235
|
+
name,
|
|
236
|
+
resolve: (answer) => {
|
|
237
|
+
clearTimeout(timer);
|
|
238
|
+
resolve(answer);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
events.emit(TA_HOST_EVENT, request);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
TaHostUtil2.reach = reach;
|
|
245
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
175
246
|
// ../ta-protocol/esm/common/ta-protocol.js
|
|
176
247
|
var TaServer = Symbol("TaServer");
|
|
177
248
|
var TaClient = Symbol("TaClient");
|
|
@@ -183,6 +254,10 @@ var TaErrorCode = {
|
|
|
183
254
|
MODEL_NOT_FOUND: "CELL_TA_MODEL_NOT_FOUND",
|
|
184
255
|
INVALID_ARGUMENT: "CELL_TA_INVALID_ARGUMENT",
|
|
185
256
|
COMMAND_FAILED: "CELL_TA_COMMAND_FAILED",
|
|
257
|
+
NOTHING_TO_COMPACT: "CELL_TA_NOTHING_TO_COMPACT",
|
|
258
|
+
ALREADY_COMPACTED: "CELL_TA_ALREADY_COMPACTED",
|
|
259
|
+
SESSION_BUSY: "CELL_TA_SESSION_BUSY",
|
|
260
|
+
CANCELLED: "CELL_TA_CANCELLED",
|
|
186
261
|
NOT_SIGNED_IN: "CELL_TA_NOT_SIGNED_IN",
|
|
187
262
|
ENVIRONMENT_FAILED: "CELL_TA_ENVIRONMENT_FAILED",
|
|
188
263
|
CONNECTION_LOST: "CELL_TA_CONNECTION_LOST"
|
|
@@ -198,6 +273,15 @@ var TaErrorUtil;
|
|
|
198
273
|
}
|
|
199
274
|
TaErrorUtil2.code = code;
|
|
200
275
|
})(TaErrorUtil || (TaErrorUtil = {}));
|
|
276
|
+
var TaSlashCommandUtil;
|
|
277
|
+
(function(TaSlashCommandUtil2) {
|
|
278
|
+
function description(command, language) {
|
|
279
|
+
var _a, _b;
|
|
280
|
+
const { descriptions } = command;
|
|
281
|
+
return (_b = (_a = descriptions === null || descriptions === undefined ? undefined : descriptions[language]) !== null && _a !== undefined ? _a : descriptions === null || descriptions === undefined ? undefined : descriptions[language.split("-")[0]]) !== null && _b !== undefined ? _b : command.description;
|
|
282
|
+
}
|
|
283
|
+
TaSlashCommandUtil2.description = description;
|
|
284
|
+
})(TaSlashCommandUtil || (TaSlashCommandUtil = {}));
|
|
201
285
|
var TaMessageContext;
|
|
202
286
|
(function(TaMessageContext2) {
|
|
203
287
|
const BLOCK = /^<context>\n?[\s\S]*?\n?<\/context>\n?/;
|
|
@@ -213,6 +297,109 @@ ${message}`;
|
|
|
213
297
|
}
|
|
214
298
|
TaMessageContext2.strip = strip;
|
|
215
299
|
})(TaMessageContext || (TaMessageContext = {}));
|
|
300
|
+
var TaImageNote;
|
|
301
|
+
(function(TaImageNote2) {
|
|
302
|
+
const NOTE = /^\[Image: original \d+x\d+, displayed at \d+x\d+\. Multiply coordinates by [\d.]+ to map to original image\.\]$|^\[Image converted from [^\]]+ to [^\]]+\.\]$/;
|
|
303
|
+
function strip(text) {
|
|
304
|
+
const lines = text.split(`
|
|
305
|
+
`);
|
|
306
|
+
const kept = lines.filter((line) => !NOTE.test(line.trim()));
|
|
307
|
+
if (kept.length === lines.length) {
|
|
308
|
+
return text;
|
|
309
|
+
}
|
|
310
|
+
return kept.join(`
|
|
311
|
+
`).replace(/\n+$/, "").replace(/^\n+/, "");
|
|
312
|
+
}
|
|
313
|
+
TaImageNote2.strip = strip;
|
|
314
|
+
})(TaImageNote || (TaImageNote = {}));
|
|
315
|
+
var TaImageSize;
|
|
316
|
+
(function(TaImageSize2) {
|
|
317
|
+
const JPEG_BYTES = 256 * 1024;
|
|
318
|
+
function of(base64) {
|
|
319
|
+
var _a, _b, _c;
|
|
320
|
+
let bytes;
|
|
321
|
+
try {
|
|
322
|
+
const binary = atob(base64.slice(0, Math.ceil(JPEG_BYTES * 4 / 3 / 4) * 4));
|
|
323
|
+
bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
324
|
+
} catch (_d) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
const size = (_c = (_b = (_a = png(bytes)) !== null && _a !== undefined ? _a : gif(bytes)) !== null && _b !== undefined ? _b : webp(bytes)) !== null && _c !== undefined ? _c : jpeg(bytes);
|
|
328
|
+
return size && size.width > 0 && size.height > 0 ? size : undefined;
|
|
329
|
+
}
|
|
330
|
+
TaImageSize2.of = of;
|
|
331
|
+
function u16be(bytes, at) {
|
|
332
|
+
return bytes[at] << 8 | bytes[at + 1];
|
|
333
|
+
}
|
|
334
|
+
function u16le(bytes, at) {
|
|
335
|
+
return bytes[at] | bytes[at + 1] << 8;
|
|
336
|
+
}
|
|
337
|
+
function u24le(bytes, at) {
|
|
338
|
+
return bytes[at] | bytes[at + 1] << 8 | bytes[at + 2] << 16;
|
|
339
|
+
}
|
|
340
|
+
function u32be(bytes, at) {
|
|
341
|
+
return (bytes[at] << 24 | bytes[at + 1] << 16 | bytes[at + 2] << 8 | bytes[at + 3]) >>> 0;
|
|
342
|
+
}
|
|
343
|
+
function text(bytes, at, length) {
|
|
344
|
+
return String.fromCharCode(...bytes.subarray(at, at + length));
|
|
345
|
+
}
|
|
346
|
+
function png(bytes) {
|
|
347
|
+
return bytes.length >= 24 && bytes[0] === 137 && text(bytes, 1, 3) === "PNG" ? { width: u32be(bytes, 16), height: u32be(bytes, 20) } : undefined;
|
|
348
|
+
}
|
|
349
|
+
function gif(bytes) {
|
|
350
|
+
return bytes.length >= 10 && text(bytes, 0, 3) === "GIF" ? { width: u16le(bytes, 6), height: u16le(bytes, 8) } : undefined;
|
|
351
|
+
}
|
|
352
|
+
function webp(bytes) {
|
|
353
|
+
if (bytes.length < 30 || text(bytes, 0, 4) !== "RIFF" || text(bytes, 8, 4) !== "WEBP") {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
switch (text(bytes, 12, 4)) {
|
|
357
|
+
case "VP8 ":
|
|
358
|
+
return { width: u16le(bytes, 26) & 16383, height: u16le(bytes, 28) & 16383 };
|
|
359
|
+
case "VP8L": {
|
|
360
|
+
const bits = bytes[21] | bytes[22] << 8 | bytes[23] << 16 | bytes[24] << 24;
|
|
361
|
+
return { width: (bits & 16383) + 1, height: (bits >> 14 & 16383) + 1 };
|
|
362
|
+
}
|
|
363
|
+
case "VP8X":
|
|
364
|
+
return { width: u24le(bytes, 24) + 1, height: u24le(bytes, 27) + 1 };
|
|
365
|
+
default:
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function jpeg(bytes) {
|
|
370
|
+
if (bytes[0] !== 255 || bytes[1] !== 216) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
let at = 2;
|
|
374
|
+
while (at + 9 < bytes.length) {
|
|
375
|
+
if (bytes[at] !== 255) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const marker = bytes[at + 1];
|
|
379
|
+
if (marker >= 192 && marker <= 207 && marker !== 196 && marker !== 200 && marker !== 204) {
|
|
380
|
+
return { width: u16be(bytes, at + 7), height: u16be(bytes, at + 5) };
|
|
381
|
+
}
|
|
382
|
+
at += 2 + u16be(bytes, at + 2);
|
|
383
|
+
}
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
})(TaImageSize || (TaImageSize = {}));
|
|
387
|
+
var TaAgentSummary;
|
|
388
|
+
(function(TaAgentSummary2) {
|
|
389
|
+
const START = /^\s*<conversation_history_summary>/;
|
|
390
|
+
const BLOCK = /^\s*<conversation_history_summary>[\s\S]*?(?:<\/conversation_history_summary>\s*|$)/;
|
|
391
|
+
function read(text) {
|
|
392
|
+
if (!START.test(text)) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
return text.replace(/<\/?(?:conversation_history_summary|summary)>/g, "").replace(/<\/?\w*$/, "").trim();
|
|
396
|
+
}
|
|
397
|
+
TaAgentSummary2.read = read;
|
|
398
|
+
function strip(text) {
|
|
399
|
+
return text.replace(BLOCK, "");
|
|
400
|
+
}
|
|
401
|
+
TaAgentSummary2.strip = strip;
|
|
402
|
+
})(TaAgentSummary || (TaAgentSummary = {}));
|
|
216
403
|
var TaSkillUse;
|
|
217
404
|
(function(TaSkillUse2) {
|
|
218
405
|
const BLOCK = /^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/;
|
|
@@ -246,6 +433,91 @@ var TaExcludedFiles;
|
|
|
246
433
|
TaExcludedFiles2.filter = filter;
|
|
247
434
|
})(TaExcludedFiles || (TaExcludedFiles = {}));
|
|
248
435
|
var TA_UPLOAD_PART_BYTES = 4 * 1024 * 1024;
|
|
436
|
+
// ../ta-protocol/esm/common/redactor.js
|
|
437
|
+
var REDACTED = "[redacted]";
|
|
438
|
+
var WHOLE = [
|
|
439
|
+
/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,
|
|
440
|
+
/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{20,}/g,
|
|
441
|
+
/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,
|
|
442
|
+
/\bgithub_pat_[A-Za-z0-9_]{40,}\b/g,
|
|
443
|
+
/\bglpat-[A-Za-z0-9_-]{20,}\b/g,
|
|
444
|
+
/\bxox[abprs]-[A-Za-z0-9-]{10,}\b/g,
|
|
445
|
+
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
|
|
446
|
+
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
447
|
+
/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/g
|
|
448
|
+
];
|
|
449
|
+
var NAMED = [
|
|
450
|
+
/(\bBearer\s+)[A-Za-z0-9._~+/-]{16,}=*/gi,
|
|
451
|
+
/(\b[A-Za-z0-9_.-]*(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key|private[_-]?key)[A-Za-z0-9_.-]*["']?\s*[:=]\s*["']?)([^\s"'`,;]{6,})/gi,
|
|
452
|
+
/(:\/\/[^\s:/@]+:)([^\s@/]{3,})(@)/g
|
|
453
|
+
];
|
|
454
|
+
|
|
455
|
+
class Redactor {
|
|
456
|
+
constructor() {
|
|
457
|
+
this.count = 0;
|
|
458
|
+
}
|
|
459
|
+
text(text) {
|
|
460
|
+
let out = text;
|
|
461
|
+
for (const pattern of WHOLE) {
|
|
462
|
+
out = out.replace(pattern, () => this.hide());
|
|
463
|
+
}
|
|
464
|
+
out = out.replace(NAMED[0], (_match, before) => before + this.hide());
|
|
465
|
+
out = out.replace(NAMED[1], (match, before, value) => Redactor.placeholder(value) ? match : before + this.hide());
|
|
466
|
+
out = out.replace(NAMED[2], (_match, before, _value, after) => before + this.hide() + after);
|
|
467
|
+
return out;
|
|
468
|
+
}
|
|
469
|
+
value(value, max) {
|
|
470
|
+
if (typeof value === "string") {
|
|
471
|
+
return Redactor.cut(this.text(value), max);
|
|
472
|
+
}
|
|
473
|
+
if (Array.isArray(value)) {
|
|
474
|
+
return value.map((item) => this.value(item, max));
|
|
475
|
+
}
|
|
476
|
+
if (value && typeof value === "object") {
|
|
477
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, this.value(item, max)]));
|
|
478
|
+
}
|
|
479
|
+
return value;
|
|
480
|
+
}
|
|
481
|
+
static cut(text, max) {
|
|
482
|
+
return text.length > max ? `${text.slice(0, max)}…` : text;
|
|
483
|
+
}
|
|
484
|
+
hide() {
|
|
485
|
+
this.count++;
|
|
486
|
+
return REDACTED;
|
|
487
|
+
}
|
|
488
|
+
static placeholder(value) {
|
|
489
|
+
return /^(?:\$|<|\{|\[redacted|process\.env|os\.environ|xxx|\*{3})/i.test(value) || /^(?:true|false|null|undefined|none|string|number)$/i.test(value);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// ../ta-relay/esm/common/relay-card.js
|
|
494
|
+
var RELAY_AGENT_KIND = "ta-agent";
|
|
495
|
+
var RelayAgentCards;
|
|
496
|
+
(function(RelayAgentCards2) {
|
|
497
|
+
const MAX_ROLE = 8000;
|
|
498
|
+
function parse(data) {
|
|
499
|
+
try {
|
|
500
|
+
const card = JSON.parse(typeof data === "string" ? data : new TextDecoder().decode(data));
|
|
501
|
+
if ((card === null || card === undefined ? undefined : card.v) !== 1 || typeof card.name !== "string" || !card.name.trim() || typeof card.role !== "string" || !card.role.trim()) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
const color = typeof card.color === "string" && /^#[0-9a-fA-F]{6}$/.test(card.color) ? card.color : undefined;
|
|
505
|
+
return {
|
|
506
|
+
v: 1,
|
|
507
|
+
name: card.name.trim().slice(0, 32),
|
|
508
|
+
role: card.role.trim().slice(0, MAX_ROLE),
|
|
509
|
+
mark: typeof card.mark === "string" && card.mark.trim() ? card.mark.trim().slice(0, 2) : card.name.trim().slice(0, 1).toUpperCase(),
|
|
510
|
+
...Number.isInteger(card.face) ? { face: card.face } : {},
|
|
511
|
+
...color ? { color } : {},
|
|
512
|
+
...typeof card.redacted === "number" && card.redacted > 0 ? { redacted: card.redacted } : {}
|
|
513
|
+
};
|
|
514
|
+
} catch (_a) {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
RelayAgentCards2.parse = parse;
|
|
519
|
+
})(RelayAgentCards || (RelayAgentCards = {}));
|
|
520
|
+
|
|
249
521
|
// web-src/channels-model.ts
|
|
250
522
|
var NAME = "@celljs/ta-channels";
|
|
251
523
|
var AGENT_MARK = "one of the agents of Ta";
|
|
@@ -256,12 +528,10 @@ var Keys;
|
|
|
256
528
|
Keys.QUEUE = "queue";
|
|
257
529
|
Keys.WORKING = "working";
|
|
258
530
|
Keys.FOCUS = "focus";
|
|
259
|
-
Keys.
|
|
260
|
-
Keys.
|
|
531
|
+
Keys.ANSWERED = "answered";
|
|
532
|
+
Keys.CARDS = "cards";
|
|
261
533
|
Keys.MESSAGES = "messages/";
|
|
262
534
|
Keys.messages = (channelId) => `${Keys.MESSAGES}${channelId}`;
|
|
263
|
-
Keys.request = (id) => `${Keys.REQUESTS}${id}`;
|
|
264
|
-
Keys.result = (id) => `${Keys.RESULTS}${id}`;
|
|
265
535
|
})(Keys ||= {});
|
|
266
536
|
var USER = "user";
|
|
267
537
|
var TA = "ta";
|
|
@@ -275,6 +545,9 @@ var FACES = 16;
|
|
|
275
545
|
var MAX_MEMBERS = 12;
|
|
276
546
|
var CONTEXT_MESSAGES = 12;
|
|
277
547
|
var MAX_NAME = 32;
|
|
548
|
+
var MAX_NOTICE = 2000;
|
|
549
|
+
var NOTICE_HEADINGS = { zh: ["决定", "约定", "待办"], en: ["Decisions", "Conventions", "To do"] };
|
|
550
|
+
var CARD_DAYS = 30;
|
|
278
551
|
|
|
279
552
|
// web-src/channels-util.ts
|
|
280
553
|
var ChannelsUtil;
|
|
@@ -531,8 +804,8 @@ var ChannelsUtil;
|
|
|
531
804
|
return team.channels.filter((channel) => channel.by !== "ta");
|
|
532
805
|
}
|
|
533
806
|
ChannelsUtil.ownChannels = ownChannels;
|
|
534
|
-
function pinnedFirst(
|
|
535
|
-
return [...
|
|
807
|
+
function pinnedFirst(items) {
|
|
808
|
+
return [...items.filter((item) => item.pinned), ...items.filter((item) => !item.pinned)];
|
|
536
809
|
}
|
|
537
810
|
ChannelsUtil.pinnedFirst = pinnedFirst;
|
|
538
811
|
function removeChannel(team, ref) {
|
|
@@ -580,6 +853,11 @@ var ChannelsUtil;
|
|
|
580
853
|
if (input.keep === true) {
|
|
581
854
|
delete agent.temporary;
|
|
582
855
|
}
|
|
856
|
+
if (input.pinned === true) {
|
|
857
|
+
agent.pinned = true;
|
|
858
|
+
} else if (input.pinned !== undefined) {
|
|
859
|
+
delete agent.pinned;
|
|
860
|
+
}
|
|
583
861
|
if (input.cwd !== undefined) {
|
|
584
862
|
const cwd = typeof input.cwd === "string" && input.cwd.trim() ? input.cwd.trim() : undefined;
|
|
585
863
|
if (cwd !== before.cwd) {
|
|
@@ -690,16 +968,39 @@ var ChannelsUtil;
|
|
|
690
968
|
`You are ${agent.name}, ${AGENT_MARK}. Your role: ${agent.role}`,
|
|
691
969
|
"You work with the user, Ta and other agents in channels. A message for you starts with a <context> block: the channel, its members, the recent messages and who speaks to you; answer what follows the block.",
|
|
692
970
|
"Do the part of the work your role covers with your tools, then answer in a few sentences: your answer is posted to the channel as it is.",
|
|
693
|
-
"To hand work to another member, write @ and their name in your answer; name nobody when the work is done or you need the user."
|
|
971
|
+
"To hand work to another member, write @ and their name in your answer; name nobody when the work is done or you need the user.",
|
|
972
|
+
NOTICE_RULE
|
|
694
973
|
].join(`
|
|
695
974
|
`);
|
|
696
975
|
}
|
|
697
976
|
ChannelsUtil.systemPrompt = systemPrompt;
|
|
977
|
+
function setNotice(team, input) {
|
|
978
|
+
const before = channelOf(team, input.channel);
|
|
979
|
+
const text = typeof input.text === "string" ? input.text.replace(/\r\n/g, `
|
|
980
|
+
`).trim() : "";
|
|
981
|
+
if (text.length > MAX_NOTICE) {
|
|
982
|
+
throw new Error(`The notice is too long (${text.length} characters, ${MAX_NOTICE} at most): keep it short, and drop to-dos done long ago.`);
|
|
983
|
+
}
|
|
984
|
+
if (text === (before.notice?.text ?? "")) {
|
|
985
|
+
return { team, channel: before, before, changed: false };
|
|
986
|
+
}
|
|
987
|
+
const channel = { ...before };
|
|
988
|
+
if (text) {
|
|
989
|
+
channel.notice = { text, at: input.at ?? Date.now(), by: input.by };
|
|
990
|
+
} else {
|
|
991
|
+
delete channel.notice;
|
|
992
|
+
}
|
|
993
|
+
return { team: { ...team, channels: team.channels.map((other) => other.id === channel.id ? channel : other) }, channel, before, changed: true };
|
|
994
|
+
}
|
|
995
|
+
ChannelsUtil.setNotice = setNotice;
|
|
698
996
|
function prompt(team, channel, history, message, agent) {
|
|
699
997
|
const labels = { user: "user", ta: "Ta" };
|
|
700
998
|
const members = channel.members.map((id) => team.agents.find((other) => other.id === id)).filter((other) => !!other).map((other) => `@${other.name}${other.id === agent.id ? " (you)" : ""}: ${firstLine(other.role)}`);
|
|
701
|
-
const before = history.filter((item) => item.id !== message.id && !item.failed).slice(-CONTEXT_MESSAGES);
|
|
999
|
+
const before = history.filter((item) => item.id !== message.id && !item.failed && !item.notice).slice(-CONTEXT_MESSAGES);
|
|
702
1000
|
const lines = [`[#${channel.name}]${channel.topic ? ` ${channel.topic}` : ""}`, "Members:", ...members.map((line) => `- ${line}`)];
|
|
1001
|
+
if (channel.notice) {
|
|
1002
|
+
lines.push("", "Notice of the channel (follow it; keep it with update_channel_notice):", channel.notice.text);
|
|
1003
|
+
}
|
|
703
1004
|
if (before.length > 0) {
|
|
704
1005
|
lines.push("", "Recent messages:", ...before.map((item) => `${authorName(team, item.author, labels)}: ${item.text}`));
|
|
705
1006
|
}
|
|
@@ -722,7 +1023,8 @@ ${message.text}`;
|
|
|
722
1023
|
}
|
|
723
1024
|
const name = (id) => team.agents.find((agent) => agent.id === id)?.name ?? id;
|
|
724
1025
|
const agents = team.agents.map((agent) => `- @${agent.name}: ${firstLine(agent.role)}`);
|
|
725
|
-
const channels = team.channels.map((channel) => `- #${channel.name}${channel.topic ? ` (${channel.topic})` : ""}: ${channel.members.map((id) => `@${name(id)}`).join(", ")}${channel.muted?.length ? `; muted by the user, answering nothing: ${channel.muted.map((id) => `@${name(id)}`).join(", ")}` : ""}`
|
|
1026
|
+
const channels = team.channels.map((channel) => `- #${channel.name}${channel.topic ? ` (${channel.topic})` : ""}: ${channel.members.map((id) => `@${name(id)}`).join(", ")}${channel.muted?.length ? `; muted by the user, answering nothing: ${channel.muted.map((id) => `@${name(id)}`).join(", ")}` : ""}${channel.notice ? `
|
|
1027
|
+
notice: ${channel.notice.text.replace(/\s+/g, " ").slice(0, 300)}` : ""}`);
|
|
726
1028
|
return ["Agents:", ...agents, "", "Channels:", ...channels.length > 0 ? channels : ["none yet"]].join(`
|
|
727
1029
|
`);
|
|
728
1030
|
}
|
|
@@ -772,6 +1074,206 @@ ${message.text}`;
|
|
|
772
1074
|
`)[0];
|
|
773
1075
|
}
|
|
774
1076
|
})(ChannelsUtil ||= {});
|
|
1077
|
+
var NOTICE_RULE = [
|
|
1078
|
+
"A channel may have a notice, in the <context> block: what its members decided, agreed and are to do. Follow it.",
|
|
1079
|
+
`When the talk settles a decision or a convention, or adds, assigns or finishes a to-do, update it with update_channel_notice: the whole notice, short, under the headings ### ${NOTICE_HEADINGS.zh.join(" / ")} (### ${NOTICE_HEADINGS.en.join(" / ")} in English), in the language of the channel, to-dos as - [ ] or - [x] with who does them. The lead keeps it most; leave it for small talk.`
|
|
1080
|
+
].join(`
|
|
1081
|
+
`);
|
|
1082
|
+
var NoticeUtil;
|
|
1083
|
+
((NoticeUtil) => {
|
|
1084
|
+
const PARTS = {
|
|
1085
|
+
决定: "decisions",
|
|
1086
|
+
decisions: "decisions",
|
|
1087
|
+
约定: "conventions",
|
|
1088
|
+
conventions: "conventions",
|
|
1089
|
+
待办: "todo",
|
|
1090
|
+
"to do": "todo",
|
|
1091
|
+
todo: "todo",
|
|
1092
|
+
"to-do": "todo"
|
|
1093
|
+
};
|
|
1094
|
+
function counts(text) {
|
|
1095
|
+
const counts2 = { decisions: 0, conventions: 0, todo: 0, done: 0 };
|
|
1096
|
+
let part;
|
|
1097
|
+
for (const line of text.split(/\r?\n/)) {
|
|
1098
|
+
const heading = /^\s*#{1,6}\s+(.+?)\s*#*\s*$/.exec(line) ?? /^\s*\*\*(.+?)\*\*\s*[::]?\s*$/.exec(line);
|
|
1099
|
+
if (heading) {
|
|
1100
|
+
part = PARTS[heading[1].replace(/[::]$/, "").trim().toLowerCase()];
|
|
1101
|
+
continue;
|
|
1102
|
+
}
|
|
1103
|
+
const item = /^\s*(?:[-*+]|\d+[.)])\s+(\[( |x|X)\]\s+)?\S/.exec(line);
|
|
1104
|
+
if (!part || !item) {
|
|
1105
|
+
continue;
|
|
1106
|
+
}
|
|
1107
|
+
if (part === "todo" && item[2] && item[2] !== " ") {
|
|
1108
|
+
counts2.done++;
|
|
1109
|
+
} else {
|
|
1110
|
+
counts2[part]++;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
return counts2;
|
|
1114
|
+
}
|
|
1115
|
+
NoticeUtil.counts = counts;
|
|
1116
|
+
function firstLine(text) {
|
|
1117
|
+
for (const line of text.split(/\r?\n/)) {
|
|
1118
|
+
const item = /^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?(.+)$/.exec(line);
|
|
1119
|
+
if (item) {
|
|
1120
|
+
return item[1].replace(/[*_`~]+/g, "").trim();
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
return text.split(/\r?\n/).find((line) => line.trim() && !/^\s*#/.test(line))?.trim() ?? "";
|
|
1124
|
+
}
|
|
1125
|
+
NoticeUtil.firstLine = firstLine;
|
|
1126
|
+
})(NoticeUtil ||= {});
|
|
1127
|
+
|
|
1128
|
+
// web-src/agent-cards.ts
|
|
1129
|
+
var AgentCards;
|
|
1130
|
+
((AgentCards) => {
|
|
1131
|
+
AgentCards.KIND = RELAY_AGENT_KIND;
|
|
1132
|
+
AgentCards.MARK = "[ta-channels:card]";
|
|
1133
|
+
function card(agent, color) {
|
|
1134
|
+
const redactor = new Redactor;
|
|
1135
|
+
const role = redactor.text(agent.role);
|
|
1136
|
+
return {
|
|
1137
|
+
v: 1,
|
|
1138
|
+
name: agent.name,
|
|
1139
|
+
role,
|
|
1140
|
+
mark: agent.mark,
|
|
1141
|
+
...agent.face !== undefined ? { face: agent.face } : {},
|
|
1142
|
+
...color && /^#[0-9a-fA-F]{6}$/.test(color) ? { color } : {},
|
|
1143
|
+
...redactor.count ? { redacted: redactor.count } : {}
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
AgentCards.card = card;
|
|
1147
|
+
function parse(data) {
|
|
1148
|
+
return RelayAgentCards.parse(data);
|
|
1149
|
+
}
|
|
1150
|
+
AgentCards.parse = parse;
|
|
1151
|
+
function freeName(team, name) {
|
|
1152
|
+
const base = (name.trim().replace(/\s+/g, "-") || "agent").slice(0, MAX_NAME - 3);
|
|
1153
|
+
if (!ChannelsUtil.findAgent(team, base)) {
|
|
1154
|
+
return base;
|
|
1155
|
+
}
|
|
1156
|
+
for (let n = 2;; n++) {
|
|
1157
|
+
if (!ChannelsUtil.findAgent(team, `${base}-${n}`)) {
|
|
1158
|
+
return `${base}-${n}`;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
AgentCards.freeName = freeName;
|
|
1163
|
+
function adapt(cwd, zh) {
|
|
1164
|
+
const context = [
|
|
1165
|
+
AgentCards.MARK,
|
|
1166
|
+
`You were just added to this Ta from a card someone shared: the role in your instructions is theirs, written for their own work. Fit it to the project of your directory (${cwd}): look at it first (its README, manifests such as package.json, its layout, how it builds and tests), then rewrite your role for it, keeping what you are for, and save it with update_my_role. Then tell the user in a few sentences, in ${zh ? "Chinese" : "English"}, what you changed and what you can do here. Change no files.`
|
|
1167
|
+
].join(`
|
|
1168
|
+
`);
|
|
1169
|
+
return `<context>
|
|
1170
|
+
${context}
|
|
1171
|
+
</context>
|
|
1172
|
+
${zh ? "看看这个项目,把你的职责调整得贴合这里" : "Look at this project and fit your role to it"}`;
|
|
1173
|
+
}
|
|
1174
|
+
AgentCards.adapt = adapt;
|
|
1175
|
+
})(AgentCards ||= {});
|
|
1176
|
+
|
|
1177
|
+
// web-src/handoff.ts
|
|
1178
|
+
var HandOff;
|
|
1179
|
+
((HandOff) => {
|
|
1180
|
+
HandOff.TOOL = "hand_off";
|
|
1181
|
+
HandOff.CARD = "ta-channels-handoff";
|
|
1182
|
+
HandOff.BLOCK = "ta-handoff";
|
|
1183
|
+
const MARK = /\[ta-handoff:([^\]\s]+)\]/;
|
|
1184
|
+
HandOff.DEFINITION = {
|
|
1185
|
+
name: HandOff.TOOL,
|
|
1186
|
+
label: "Hand off",
|
|
1187
|
+
description: "Hands the work of this conversation over to one of the user's agents (@name) or channels (#name), when the user says so (hand it to, give it to, 交给, 转给). The other side does not see this conversation: write the brief it needs to go on, in the user's language: the goal, what is done and decided, what is left or blocks, the files, branches, commands and links that matter. It works on it in its own conversation, which the user follows; you stop working on it here. list_channels lists the team. After the call, say in one line to whom it went.",
|
|
1188
|
+
promptSnippet: "Hand the work over to one of the user's agents or channels",
|
|
1189
|
+
parameters: {
|
|
1190
|
+
type: "object",
|
|
1191
|
+
properties: {
|
|
1192
|
+
to: { type: "string", description: "@name of an agent or #name of a channel." },
|
|
1193
|
+
brief: { type: "string", description: "Complete in itself: the receiver sees only this." }
|
|
1194
|
+
},
|
|
1195
|
+
required: ["to", "brief"]
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
function ref(target) {
|
|
1199
|
+
return `${target.kind === "agent" ? "@" : "#"}${target.name}`;
|
|
1200
|
+
}
|
|
1201
|
+
HandOff.ref = ref;
|
|
1202
|
+
function ask(language, to) {
|
|
1203
|
+
const fence = "```";
|
|
1204
|
+
const context = [
|
|
1205
|
+
`[ta-handoff:${to}]`,
|
|
1206
|
+
`The user hands the work of this conversation over to ${to}, which does not see this conversation.`,
|
|
1207
|
+
`- Write the brief it needs to go on: the goal, what is done and decided, what is left or blocks, the files, branches, commands and links that matter, in the user's language. Leave out what was only tried and dropped.`,
|
|
1208
|
+
`- With the tool ${HandOff.TOOL}, call it with to "${to}" and the brief, then say in one line that it went.`,
|
|
1209
|
+
`- Without it, say in one line what you hand over, then end your answer with the brief in a fenced block of the language ${HandOff.BLOCK}, which Ta reads to hand it over (a longer fence when the brief has one of its own):`,
|
|
1210
|
+
`${fence}${HandOff.BLOCK}`,
|
|
1211
|
+
"<the brief>",
|
|
1212
|
+
fence,
|
|
1213
|
+
`- When the conversation holds nothing to hand over yet, say so and ask what ${to} should do.`
|
|
1214
|
+
].join(`
|
|
1215
|
+
`);
|
|
1216
|
+
const line = language === "zh-CN" ? `把这件事交给 ${to}` : `Hand this over to ${to}`;
|
|
1217
|
+
return `<context>
|
|
1218
|
+
${context}
|
|
1219
|
+
</context>
|
|
1220
|
+
${line}`;
|
|
1221
|
+
}
|
|
1222
|
+
HandOff.ask = ask;
|
|
1223
|
+
function asked(text) {
|
|
1224
|
+
return MARK.exec(text)?.[1];
|
|
1225
|
+
}
|
|
1226
|
+
HandOff.asked = asked;
|
|
1227
|
+
function find(text) {
|
|
1228
|
+
const lines = text.split(/\r?\n/);
|
|
1229
|
+
let found;
|
|
1230
|
+
for (let index = 0;index < lines.length; index++) {
|
|
1231
|
+
const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
|
|
1232
|
+
if (open?.[2] !== HandOff.BLOCK) {
|
|
1233
|
+
continue;
|
|
1234
|
+
}
|
|
1235
|
+
const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
|
|
1236
|
+
const end = lines.findIndex((line, at) => at > index && close.test(line));
|
|
1237
|
+
found = lines.slice(index + 1, end < 0 ? lines.length : end);
|
|
1238
|
+
index = end < 0 ? lines.length : end;
|
|
1239
|
+
}
|
|
1240
|
+
const brief = found?.join(`
|
|
1241
|
+
`).trim();
|
|
1242
|
+
return brief || undefined;
|
|
1243
|
+
}
|
|
1244
|
+
HandOff.find = find;
|
|
1245
|
+
function message(origin, brief, language) {
|
|
1246
|
+
const title = origin.title?.trim() || (language === "zh-CN" ? "一个对话" : "a conversation");
|
|
1247
|
+
const head = language === "zh-CN" ? `(交接自“${title}”)` : `(Handed over from “${title}”)`;
|
|
1248
|
+
const context = [
|
|
1249
|
+
"The user handed you this work from another conversation of theirs, which you do not see; the brief below is all it says. Go on from there in this conversation, which the user follows; ask them when the brief leaves out something you need.",
|
|
1250
|
+
origin.sessionFile ? `That conversation is pi's session file ${origin.sessionFile}${origin.cwd ? `, working in ${origin.cwd}` : ""}: read it only when the brief is not enough.` : ""
|
|
1251
|
+
].filter(Boolean).join(`
|
|
1252
|
+
`);
|
|
1253
|
+
return `<context>
|
|
1254
|
+
${context}
|
|
1255
|
+
</context>
|
|
1256
|
+
${head}
|
|
1257
|
+
|
|
1258
|
+
${brief.trim()}`;
|
|
1259
|
+
}
|
|
1260
|
+
HandOff.message = message;
|
|
1261
|
+
function channelText(origin, brief, language) {
|
|
1262
|
+
const title = origin.title?.trim() || (language === "zh-CN" ? "一个对话" : "a conversation");
|
|
1263
|
+
return `${language === "zh-CN" ? `(交接自“${title}”)` : `(Handed over from “${title}”)`}
|
|
1264
|
+
|
|
1265
|
+
${brief.trim()}`;
|
|
1266
|
+
}
|
|
1267
|
+
HandOff.channelText = channelText;
|
|
1268
|
+
function serverLanguage(env = typeof process === "undefined" ? {} : process.env) {
|
|
1269
|
+
return /^zh/i.test(env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG || "") ? "zh-CN" : "en";
|
|
1270
|
+
}
|
|
1271
|
+
HandOff.serverLanguage = serverLanguage;
|
|
1272
|
+
function result(target) {
|
|
1273
|
+
return `Handed over to ${ref(target)}; it works on it in its own conversation, which the user follows. Do not go on with it here.`;
|
|
1274
|
+
}
|
|
1275
|
+
HandOff.result = result;
|
|
1276
|
+
})(HandOff ||= {});
|
|
775
1277
|
|
|
776
1278
|
// web-src/team.ts
|
|
777
1279
|
class TeamService {
|
|
@@ -779,20 +1281,19 @@ class TeamService {
|
|
|
779
1281
|
team = ChannelsUtil.emptyTeam();
|
|
780
1282
|
queue = { jobs: [], rounds: {} };
|
|
781
1283
|
working = {};
|
|
1284
|
+
answered;
|
|
782
1285
|
messages = new Map;
|
|
783
1286
|
reading = new Map;
|
|
784
1287
|
agents = new Map;
|
|
785
1288
|
started = new Set;
|
|
786
1289
|
waiting = new Map;
|
|
787
|
-
handling = new Set;
|
|
788
1290
|
opening = new Map;
|
|
789
1291
|
settling = new Set;
|
|
790
1292
|
options;
|
|
791
1293
|
disposed = false;
|
|
792
|
-
unlisten;
|
|
793
1294
|
constructor(host, options = {}) {
|
|
794
1295
|
this.host = host;
|
|
795
|
-
this.options = { pollMs: 300, timeoutMs: 15 * 60 * 1000,
|
|
1296
|
+
this.options = { pollMs: 300, timeoutMs: 15 * 60 * 1000, ...options };
|
|
796
1297
|
}
|
|
797
1298
|
get state() {
|
|
798
1299
|
return this.team;
|
|
@@ -802,11 +1303,6 @@ class TeamService {
|
|
|
802
1303
|
await this.pinDirectories();
|
|
803
1304
|
this.queue = await this.get(Keys.QUEUE) ?? { jobs: [], rounds: {} };
|
|
804
1305
|
await this.set(Keys.WORKING, null);
|
|
805
|
-
this.unlisten = this.host.onExtensionData((name, key) => {
|
|
806
|
-
if (name === NAME && key.startsWith(Keys.REQUESTS)) {
|
|
807
|
-
this.request(key.slice(Keys.REQUESTS.length));
|
|
808
|
-
}
|
|
809
|
-
});
|
|
810
1306
|
for (const job of this.queue.jobs) {
|
|
811
1307
|
this.run(job);
|
|
812
1308
|
}
|
|
@@ -816,7 +1312,6 @@ class TeamService {
|
|
|
816
1312
|
}
|
|
817
1313
|
dispose() {
|
|
818
1314
|
this.disposed = true;
|
|
819
|
-
this.unlisten?.();
|
|
820
1315
|
}
|
|
821
1316
|
async createAgent(input) {
|
|
822
1317
|
const cwd = ChannelsUtil.directory(input.cwd) ?? (await this.host.getServerInfo()).cwd;
|
|
@@ -866,6 +1361,85 @@ class TeamService {
|
|
|
866
1361
|
}
|
|
867
1362
|
return agent;
|
|
868
1363
|
}
|
|
1364
|
+
async setNotice(input) {
|
|
1365
|
+
const { team, channel, changed } = ChannelsUtil.setNotice(this.team, input);
|
|
1366
|
+
if (input.by !== USER && input.by !== TA && !channel.members.includes(input.by)) {
|
|
1367
|
+
throw new Error(`You are not in #${channel.name}: only its members keep its notice.`);
|
|
1368
|
+
}
|
|
1369
|
+
if (changed) {
|
|
1370
|
+
await this.saveTeam(team);
|
|
1371
|
+
await this.append(channel.id, {
|
|
1372
|
+
id: ChannelsUtil.newId("message"),
|
|
1373
|
+
author: input.by,
|
|
1374
|
+
text: "",
|
|
1375
|
+
at: Date.now(),
|
|
1376
|
+
notice: channel.notice ? "set" : "cleared"
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
return channel;
|
|
1380
|
+
}
|
|
1381
|
+
agentOf(sessionFile) {
|
|
1382
|
+
return sessionFile ? this.team.agents.find((agent) => agent.sessionFile === sessionFile) : undefined;
|
|
1383
|
+
}
|
|
1384
|
+
async shareAgent(ref, color) {
|
|
1385
|
+
const agent = ChannelsUtil.findAgent(this.team, String(ref ?? ""));
|
|
1386
|
+
if (!agent) {
|
|
1387
|
+
throw new Error(`No agent is ${String(ref)}.`);
|
|
1388
|
+
}
|
|
1389
|
+
const card = JSON.stringify(AgentCards.card(agent, typeof color === "string" ? color : undefined));
|
|
1390
|
+
const cards = await this.get(Keys.CARDS) ?? {};
|
|
1391
|
+
const kept = cards[agent.id];
|
|
1392
|
+
const live = kept ? (await this.host.shares.list()).find((share2) => share2.id === kept.share) : undefined;
|
|
1393
|
+
if (live && kept?.card === card) {
|
|
1394
|
+
return live;
|
|
1395
|
+
}
|
|
1396
|
+
if (live) {
|
|
1397
|
+
await this.host.shares.remove(live.id);
|
|
1398
|
+
}
|
|
1399
|
+
const share = await this.host.shares.create({
|
|
1400
|
+
kind: AgentCards.KIND,
|
|
1401
|
+
title: `@${agent.name}`,
|
|
1402
|
+
type: "application/json",
|
|
1403
|
+
data: new TextEncoder().encode(card),
|
|
1404
|
+
access: "link",
|
|
1405
|
+
days: CARD_DAYS,
|
|
1406
|
+
offline: true
|
|
1407
|
+
});
|
|
1408
|
+
await this.set(Keys.CARDS, { ...this.liveCards(cards), [agent.id]: { share: share.id, card } });
|
|
1409
|
+
return share;
|
|
1410
|
+
}
|
|
1411
|
+
async stopCard(ref) {
|
|
1412
|
+
const agent = ChannelsUtil.findAgent(this.team, String(ref ?? ""));
|
|
1413
|
+
const cards = await this.get(Keys.CARDS) ?? {};
|
|
1414
|
+
const kept = agent && cards[agent.id];
|
|
1415
|
+
if (!agent || !kept) {
|
|
1416
|
+
return false;
|
|
1417
|
+
}
|
|
1418
|
+
const { [agent.id]: _gone, ...rest } = cards;
|
|
1419
|
+
await this.set(Keys.CARDS, this.liveCards(rest));
|
|
1420
|
+
return this.host.shares.remove(kept.share);
|
|
1421
|
+
}
|
|
1422
|
+
liveCards(cards) {
|
|
1423
|
+
return Object.fromEntries(Object.entries(cards).filter(([id]) => this.team.agents.some((agent) => agent.id === id)));
|
|
1424
|
+
}
|
|
1425
|
+
async openCard(link, password) {
|
|
1426
|
+
const content = await this.host.shares.open(String(link ?? ""), typeof password === "string" && password ? password : undefined);
|
|
1427
|
+
const card = content.kind === AgentCards.KIND ? AgentCards.parse(content.data) : undefined;
|
|
1428
|
+
if (!card) {
|
|
1429
|
+
throw new Error("This link shares no card of an agent.");
|
|
1430
|
+
}
|
|
1431
|
+
return card;
|
|
1432
|
+
}
|
|
1433
|
+
async addFromCard(input, language = HandOff.serverLanguage()) {
|
|
1434
|
+
const card = await this.openCard(input.link, input.password);
|
|
1435
|
+
const agent = await this.createAgent({ name: AgentCards.freeName(this.team, card.name), role: card.role, cwd: input.cwd, face: card.face });
|
|
1436
|
+
const sessionId = await this.session(agent);
|
|
1437
|
+
await this.host.prompt(sessionId, {
|
|
1438
|
+
clientMessageId: ChannelsUtil.newId("card"),
|
|
1439
|
+
message: AgentCards.adapt(agent.cwd ?? (await this.host.getServerInfo()).cwd, language.startsWith("zh"))
|
|
1440
|
+
});
|
|
1441
|
+
return { agent, sessionId };
|
|
1442
|
+
}
|
|
869
1443
|
async deleteAgent(ref) {
|
|
870
1444
|
const { team, agent, channels } = ChannelsUtil.removeAgent(this.team, ref);
|
|
871
1445
|
await this.saveTeam(team);
|
|
@@ -917,34 +1491,37 @@ class TeamService {
|
|
|
917
1491
|
await this.settle(message.id);
|
|
918
1492
|
return { channel, message, done };
|
|
919
1493
|
}
|
|
920
|
-
async
|
|
921
|
-
|
|
922
|
-
|
|
1494
|
+
async handOff(to, brief, origin, language = HandOff.serverLanguage()) {
|
|
1495
|
+
const text = brief.trim();
|
|
1496
|
+
if (!text) {
|
|
1497
|
+
throw new Error("The brief is empty: write what the receiver needs to go on.");
|
|
1498
|
+
}
|
|
1499
|
+
const from = origin ? (await this.host.listSessions()).find((session) => session.sessionFile === origin) : undefined;
|
|
1500
|
+
const where = { title: from?.sessionName || from?.firstMessage, sessionFile: origin, cwd: from?.cwd };
|
|
1501
|
+
const agent = to.trim().startsWith("#") ? undefined : ChannelsUtil.findAgent(this.team, to);
|
|
1502
|
+
if (agent) {
|
|
1503
|
+
const sessionId = await this.session(agent);
|
|
1504
|
+
await this.host.prompt(sessionId, {
|
|
1505
|
+
clientMessageId: ChannelsUtil.newId("handoff"),
|
|
1506
|
+
message: HandOff.message(where, text, language),
|
|
1507
|
+
streamingBehavior: "followUp"
|
|
1508
|
+
});
|
|
1509
|
+
return { kind: "agent", id: agent.id, name: agent.name };
|
|
923
1510
|
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
return;
|
|
929
|
-
}
|
|
930
|
-
let result;
|
|
931
|
-
try {
|
|
932
|
-
result = { ok: true, value: await this.handle(request) };
|
|
933
|
-
} catch (error) {
|
|
934
|
-
result = { ok: false, error: error instanceof Error ? error.message : String(error) };
|
|
935
|
-
}
|
|
936
|
-
await this.set(Keys.result(id), result);
|
|
937
|
-
await this.set(Keys.request(id), null);
|
|
938
|
-
const timer = setTimeout(() => void this.set(Keys.result(id), null).catch(() => {
|
|
939
|
-
return;
|
|
940
|
-
}), this.options.resultMs);
|
|
941
|
-
timer.unref?.();
|
|
942
|
-
} finally {
|
|
943
|
-
this.handling.delete(id);
|
|
1511
|
+
const channel = to.trim().startsWith("@") ? undefined : ChannelsUtil.findChannel(this.team, to);
|
|
1512
|
+
if (!channel) {
|
|
1513
|
+
const known = [...this.team.agents.map((item) => `@${item.name}`), ...this.team.channels.map((item) => `#${item.name}`)].join(", ");
|
|
1514
|
+
throw new Error(`No agent or channel is named ${to}. The team: ${known || "nobody yet; create an agent first"}.`);
|
|
944
1515
|
}
|
|
1516
|
+
await this.post(channel.id, TA, HandOff.channelText(where, text, language));
|
|
1517
|
+
await this.focus(channel.id);
|
|
1518
|
+
return { kind: "channel", id: channel.id, name: channel.name };
|
|
945
1519
|
}
|
|
946
|
-
async
|
|
947
|
-
|
|
1520
|
+
async request(request) {
|
|
1521
|
+
if (this.disposed) {
|
|
1522
|
+
throw new Error("The team has stopped; the extension may have been turned off.");
|
|
1523
|
+
}
|
|
1524
|
+
switch (request?.kind) {
|
|
948
1525
|
case "createAgent":
|
|
949
1526
|
return this.createAgent({ name: request.name, role: request.role, cwd: request.cwd, face: request.face });
|
|
950
1527
|
case "createChannel":
|
|
@@ -965,6 +1542,16 @@ class TeamService {
|
|
|
965
1542
|
return this.deleteAgent(request.agent);
|
|
966
1543
|
case "post":
|
|
967
1544
|
return (await this.post(String(request.channel ?? ""), USER, String(request.text ?? ""))).message;
|
|
1545
|
+
case "setNotice":
|
|
1546
|
+
return this.setNotice({ channel: request.channel, text: request.text, by: USER });
|
|
1547
|
+
case "shareAgent":
|
|
1548
|
+
return this.shareAgent(request.agent, request.color);
|
|
1549
|
+
case "stopCard":
|
|
1550
|
+
return this.stopCard(request.agent);
|
|
1551
|
+
case "openCard":
|
|
1552
|
+
return this.openCard(request.link, request.password);
|
|
1553
|
+
case "addFromCard":
|
|
1554
|
+
return this.addFromCard(request);
|
|
968
1555
|
case "openAgent": {
|
|
969
1556
|
const agent = ChannelsUtil.findAgent(this.team, String(request.agent ?? ""));
|
|
970
1557
|
if (!agent) {
|
|
@@ -1082,10 +1669,18 @@ class TeamService {
|
|
|
1082
1669
|
text = error instanceof Error ? error.message : String(error);
|
|
1083
1670
|
failed = true;
|
|
1084
1671
|
} finally {
|
|
1672
|
+
await this.setAnswered(agentId, Date.now());
|
|
1085
1673
|
await this.setWorking(channel.id, agentId, false);
|
|
1086
1674
|
}
|
|
1087
1675
|
return this.append(channel.id, { id: ChannelsUtil.newId("message"), author: agentId, text, at: Date.now(), replyTo: message.id, failed });
|
|
1088
1676
|
}
|
|
1677
|
+
async setAnswered(agentId, at) {
|
|
1678
|
+
this.answered ??= await this.get(Keys.ANSWERED) ?? {};
|
|
1679
|
+
const known = new Set(this.team.agents.map((agent) => agent.id));
|
|
1680
|
+
const kept = Object.fromEntries(Object.entries(this.answered).filter(([id]) => known.has(id)));
|
|
1681
|
+
this.answered = { ...kept, [agentId]: at };
|
|
1682
|
+
await this.set(Keys.ANSWERED, this.answered);
|
|
1683
|
+
}
|
|
1089
1684
|
async ask(channel, message, agentId) {
|
|
1090
1685
|
const agent = this.team.agents.find((candidate) => candidate.id === agentId);
|
|
1091
1686
|
if (!agent) {
|