@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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Cell - Ta Games
|
|
2
|
+
|
|
3
|
+
A pi package that comes with Ta (on by default; Settings → Extensions turns it off): games. Ta's web page has two game engines, Phaser 4 for 2D (`pi.ui.Game`) and Three.js for 3D (`pi.ui.Game3D`); on them, this package has:
|
|
4
|
+
|
|
5
|
+
- **The Games page**, under Discover and in Quick open (started on open: loaded only when opened). At the top, every extension that is a game (a package whose `package.json` says `"pi": { "category": "game" }`: the examples, those Ta made, those of the market), opened with a tap (its package says `"lists": ["game"]`, so the games themselves are not under Discover or in the navigation, only here and in Quick open); below, "Have Ta make one": Snake, Breakout, a 3D maze, the scheduled tasks drawn as a little world, each opening a new conversation in which Ta makes it.
|
|
6
|
+
- **Two example games**: Dino Run (2D, Phaser: a pixel dinosaur jumps cacti that come faster and faster, with space or a tap) and Stack (3D, Three.js: a tap drops the block that slides over the tower, what hangs over is cut off). They are ordinary extensions, each one `web.js` of plain JavaScript as Ta writes games, in `skills/ta-game/examples/`. The first time the Games page opens they are copied to `~/.ta/agent/extensions/`, and are then the user's own: turned off, deleted, shared or changed by Ta each on its own; one deleted is not put back by itself, "Install the examples" at the top right of the Games page does. Each keeps its best score in its package data, the same on every device.
|
|
7
|
+
- **The `ta-game` skill**, which teaches Ta to write games and extensions that play like games (a pet in a card of the board, a widget that moves, scores and rewards) with `pi.ui.Game` and `pi.ui.Game3D`: no import and no engine of its own, one code for touch and mouse, the colors of the theme, asleep out of sight, best scores in `pi.storage`, and what most often differs from Phaser 3 to 4 and from older Three.js to r187. Saying "make a Snake game" in a conversation uses it too.
|
|
8
|
+
- **Phaser's topics**: the 28 topics the npm package of Phaser 4 writes for coding agents (scenes, input, tweens, physics, particles...), copied at build time to `skills/ta-game/phaser/` (`scripts/phaser-skills.mjs`). Under the directory of a skill, pi does not take them for skills: they cost nothing in every conversation, and Ta reads them when needed.
|
|
9
|
+
|
|
10
|
+
The least a game with `pi.ui.Game` takes:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
export default function (pi) {
|
|
14
|
+
const h = pi.React.createElement;
|
|
15
|
+
function Page() {
|
|
16
|
+
const config = pi.React.useCallback((Phaser, page) => ({
|
|
17
|
+
width: 480,
|
|
18
|
+
height: 270,
|
|
19
|
+
scene: { create() { this.add.circle(240, 135, 14, page.colors.green); } },
|
|
20
|
+
}), []);
|
|
21
|
+
return h('div', { style: { display: 'flex', flexDirection: 'column', height: '100%' } }, h(pi.ui.Game, { config }));
|
|
22
|
+
}
|
|
23
|
+
pi.registerView('ball', { title: 'Ball', render: Page });
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The least a 3D game takes:
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
const setup = ({ THREE, scene, camera, page }) => {
|
|
31
|
+
camera.position.set(3, 3, 5);
|
|
32
|
+
camera.lookAt(0, 0, 0);
|
|
33
|
+
scene.add(new THREE.HemisphereLight(0xffffff, 0x707070, 1.8));
|
|
34
|
+
const cube = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), new THREE.MeshLambertMaterial({ color: page.colors.green }));
|
|
35
|
+
scene.add(cube);
|
|
36
|
+
return { update(seconds) { cube.rotation.y += seconds; } };
|
|
37
|
+
};
|
|
38
|
+
// h(pi.ui.Game3D, { setup })
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The choice of the engines and the design: docs/design/ta-games.md. The package holds a web extension (`pi.web`), skills (`pi.skills`) and a server side (`pi.host`, which copies the examples), and uses only the public `WebExtensionAPI` and `TaExtensionHost`. The rules of the examples (`DinoRules`, `StackRules`) are apart from what draws them, tested by `web-src/examples.spec.ts`, which loads their `web.js`.
|
|
42
|
+
|
|
43
|
+
## Limits
|
|
44
|
+
|
|
45
|
+
- 3D is Three.js itself and OrbitControls: no loader of models, post-processing or physics.
|
|
46
|
+
- Browsers allow a few WebGL contexts at once (Chrome some 16): with many games shown at once, the first ones lose their picture.
|
|
47
|
+
- Other coding agents (`@celljs/ta-agents`) do not see pi's skills: the message of "Have Ta make one" names the files of both SKILL.md; when asking in a conversation, tell it to read them.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Cell - Ta Games
|
|
2
|
+
|
|
3
|
+
Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展 关闭):游戏。Ta Web 的页面自带两个游戏引擎:2D 的 Phaser 4(`pi.ui.Game`)和 3D 的 Three.js(`pi.ui.Game3D`),这个包在它们之上提供:
|
|
4
|
+
|
|
5
|
+
- **"游戏"页**:在"发现"和快捷打开里(按需启动:点开才加载)。上面列出所有游戏扩展(`package.json` 里写了 `"pi": { "category": "game" }` 的包:示例、Ta 做的、市场装的),点一下打开(包里的 `"lists": ["game"]` 认领这一类,各个游戏不再出现在"发现"和导航栏里,只在这一页和快捷打开里);下面是"让 Ta 做一个":贪吃蛇、打砖块、3D 迷宫、把定时任务画成小世界,点一下就开一个新对话让 Ta 做。
|
|
6
|
+
- **两个示例游戏**:恐龙快跑(2D,Phaser:像素恐龙跳过越来越快的仙人掌,空格键或轻点起跳)和叠方块(3D,Three.js:轻点放下在塔顶滑动的方块,伸出去的部分被切掉)。它们是普通的扩展,只有一个纯 JavaScript 的 `web.js`,和 Ta 写出来的游戏一样,放在 `skills/ta-game/examples/`。第一次打开"游戏"页时复制到 `~/.ta/agent/extensions/`,之后就是用户自己的扩展,可以单独关掉、删除、分享,或让 Ta 修改;删掉的不会再自动装回,"游戏"页右上角的"安装示例游戏"可以重新装。最高分存各自的包数据,各设备同步。
|
|
7
|
+
- **`ta-game` 技能**:教 Ta 用 `pi.ui.Game` 和 `pi.ui.Game3D` 写游戏和游戏风格的扩展(看板卡片里的宠物、会动的小组件、积分与奖励):不 import、不自带引擎、触摸与鼠标一套、跟随主题、看不见时休眠、最高分存 `pi.storage`,以及 Phaser 3 到 4、旧版 Three.js 到 r187 的常见差异。直接在对话里说"做一个贪吃蛇"也会用到它。
|
|
8
|
+
- **Phaser 的主题文档**:Phaser 4 的 npm 包给 coding agent 写的 28 个主题(场景、输入、补间、物理、粒子……),构建时复制到 `skills/ta-game/phaser/`(`scripts/phaser-skills.mjs`)。它们在技能目录下面,pi 不把它们当作技能,不占每次对话的提示,Ta 需要时去读。
|
|
9
|
+
|
|
10
|
+
用 `pi.ui.Game` 的最小写法:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
export default function (pi) {
|
|
14
|
+
const h = pi.React.createElement;
|
|
15
|
+
function Page() {
|
|
16
|
+
const config = pi.React.useCallback((Phaser, page) => ({
|
|
17
|
+
width: 480,
|
|
18
|
+
height: 270,
|
|
19
|
+
scene: { create() { this.add.circle(240, 135, 14, page.colors.green); } },
|
|
20
|
+
}), []);
|
|
21
|
+
return h('div', { style: { display: 'flex', flexDirection: 'column', height: '100%' } }, h(pi.ui.Game, { config }));
|
|
22
|
+
}
|
|
23
|
+
pi.registerView('ball', { title: 'Ball', render: Page });
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
3D 的最小写法:
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
const setup = ({ THREE, scene, camera, page }) => {
|
|
31
|
+
camera.position.set(3, 3, 5);
|
|
32
|
+
camera.lookAt(0, 0, 0);
|
|
33
|
+
scene.add(new THREE.HemisphereLight(0xffffff, 0x707070, 1.8));
|
|
34
|
+
const cube = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), new THREE.MeshLambertMaterial({ color: page.colors.green }));
|
|
35
|
+
scene.add(cube);
|
|
36
|
+
return { update(seconds) { cube.rotation.y += seconds; } };
|
|
37
|
+
};
|
|
38
|
+
// h(pi.ui.Game3D, { setup })
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
选型和设计见 docs/design/ta-games.md。包里有 Web 扩展(`pi.web`)、技能(`pi.skills`)和服务端(`pi.host`,复制示例),只用公开的 `WebExtensionAPI` 和 `TaExtensionHost`。示例的规则(`DinoRules`、`StackRules`)与绘制分开,由 `web-src/examples.spec.ts` 直接加载 `web.js` 来测。
|
|
42
|
+
|
|
43
|
+
## 限制
|
|
44
|
+
|
|
45
|
+
- 3D 只有 Three.js 本体和 OrbitControls:没有模型加载器、后期处理和物理引擎。
|
|
46
|
+
- 浏览器同时能用的 WebGL 上下文有限(Chrome 约 16 个),同时显示很多游戏时最早的会丢失画面。
|
|
47
|
+
- 外部 Agent(`@celljs/ta-agents`)看不到 pi 的技能:"让 Ta 做一个"的消息里写明了两份 SKILL.md 的路径;在对话里直接说时,可以提醒它读这两份文件。
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// web-src/host.ts
|
|
2
|
+
import { cpSync, existsSync, readdirSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
var NAME = "@celljs/ta-games";
|
|
5
|
+
var OFFERED = "examplesOffered";
|
|
6
|
+
|
|
7
|
+
class GamesService {
|
|
8
|
+
host;
|
|
9
|
+
examplesDir;
|
|
10
|
+
constructor(host, examplesDir) {
|
|
11
|
+
this.host = host;
|
|
12
|
+
this.examplesDir = examplesDir;
|
|
13
|
+
}
|
|
14
|
+
dispose() {}
|
|
15
|
+
async examples() {
|
|
16
|
+
const from = await this.from();
|
|
17
|
+
return this.names(from).map((name) => ({ name, installed: existsSync(this.target(name)) }));
|
|
18
|
+
}
|
|
19
|
+
async offerExamples() {
|
|
20
|
+
const from = await this.from();
|
|
21
|
+
const offered = new Set(await this.host.getExtensionData(NAME, OFFERED) ?? []);
|
|
22
|
+
const copied = this.names(from).filter((name) => !offered.has(name) && this.copy(from, name));
|
|
23
|
+
const names = this.names(from);
|
|
24
|
+
if (names.some((name) => !offered.has(name))) {
|
|
25
|
+
await this.host.setExtensionData(NAME, OFFERED, [...new Set([...offered, ...names])]);
|
|
26
|
+
}
|
|
27
|
+
return copied;
|
|
28
|
+
}
|
|
29
|
+
async installExamples() {
|
|
30
|
+
const from = await this.from();
|
|
31
|
+
return this.names(from).filter((name) => this.copy(from, name));
|
|
32
|
+
}
|
|
33
|
+
copy(from, name) {
|
|
34
|
+
const target = this.target(name);
|
|
35
|
+
if (existsSync(target)) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
cpSync(join(from, name), target, { recursive: true });
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
target(name) {
|
|
42
|
+
return join(this.host.agentDir, "extensions", name);
|
|
43
|
+
}
|
|
44
|
+
names(from) {
|
|
45
|
+
return existsSync(from) ? readdirSync(from, { withFileTypes: true }).filter((entry) => entry.isDirectory() && existsSync(join(from, entry.name, "package.json"))).map((entry) => entry.name).sort() : [];
|
|
46
|
+
}
|
|
47
|
+
async from() {
|
|
48
|
+
if (this.examplesDir) {
|
|
49
|
+
return this.examplesDir;
|
|
50
|
+
}
|
|
51
|
+
const root = (await this.host.listPackages()).find((info) => info.name === NAME)?.root;
|
|
52
|
+
if (!root) {
|
|
53
|
+
throw new Error(`${NAME} is not loaded.`);
|
|
54
|
+
}
|
|
55
|
+
return join(root, "skills/ta-game/examples");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function activate(host) {
|
|
59
|
+
return new GamesService(host);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
activate as default,
|
|
63
|
+
NAME,
|
|
64
|
+
GamesService
|
|
65
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WebExtensionAPI, WebPageInfo } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
/** What a package says it is to be listed here: `"pi": { "category": "game" }` of its package.json. */
|
|
3
|
+
export declare const GAME_CATEGORY = "game";
|
|
4
|
+
export declare namespace GamesUtil {
|
|
5
|
+
/** The games among the pages, those played last first, then by title. */
|
|
6
|
+
function games(pages: readonly WebPageInfo[]): WebPageInfo[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The Games page: every extension that is a game (the examples of the ta-game skill, those Ta made, those of
|
|
10
|
+
* the market), each opened as its page, and ideas for Ta to make. The first time it opens, the server copies
|
|
11
|
+
* the examples into the user's extensions (GamesService.offerExamples).
|
|
12
|
+
*/
|
|
13
|
+
export declare function GamesView({ pi }: {
|
|
14
|
+
pi: WebExtensionAPI;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=games-view.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GamesUtil = exports.GAME_CATEGORY = void 0;
|
|
4
|
+
exports.GamesView = GamesView;
|
|
5
|
+
const i18n_1 = require("./i18n");
|
|
6
|
+
const ideas_1 = require("./ideas");
|
|
7
|
+
const react_1 = require("./react");
|
|
8
|
+
/** What a package says it is to be listed here: `"pi": { "category": "game" }` of its package.json. */
|
|
9
|
+
exports.GAME_CATEGORY = 'game';
|
|
10
|
+
var GamesUtil;
|
|
11
|
+
(function (GamesUtil) {
|
|
12
|
+
/** The games among the pages, those played last first, then by title. */
|
|
13
|
+
function games(pages) {
|
|
14
|
+
return pages.filter(page => page.category === exports.GAME_CATEGORY).sort((a, b) => { var _a, _b; return ((_a = b.usedAt) !== null && _a !== void 0 ? _a : 0) - ((_b = a.usedAt) !== null && _b !== void 0 ? _b : 0) || a.title.localeCompare(b.title); });
|
|
15
|
+
}
|
|
16
|
+
GamesUtil.games = games;
|
|
17
|
+
})(GamesUtil || (exports.GamesUtil = GamesUtil = {}));
|
|
18
|
+
/**
|
|
19
|
+
* The Games page: every extension that is a game (the examples of the ta-game skill, those Ta made, those of
|
|
20
|
+
* the market), each opened as its page, and ideas for Ta to make. The first time it opens, the server copies
|
|
21
|
+
* the examples into the user's extensions (GamesService.offerExamples).
|
|
22
|
+
*/
|
|
23
|
+
function GamesView({ pi }) {
|
|
24
|
+
var _a;
|
|
25
|
+
const words = i18n_1.GamesText.of(pi.ui.language);
|
|
26
|
+
const games = GamesUtil.games(pi.ui.usePages());
|
|
27
|
+
const [examples, setExamples] = react_1.React.useState();
|
|
28
|
+
const read = react_1.React.useCallback(() => pi.callHost('examples').then(setExamples, () => undefined), [pi]);
|
|
29
|
+
react_1.React.useEffect(() => {
|
|
30
|
+
pi.callHost('offerExamples').then(async (copied) => {
|
|
31
|
+
if (copied.length > 0) {
|
|
32
|
+
await pi.reloadExtensions();
|
|
33
|
+
}
|
|
34
|
+
await read();
|
|
35
|
+
}, () => read());
|
|
36
|
+
}, [pi, read]);
|
|
37
|
+
const missing = (_a = examples === null || examples === void 0 ? void 0 : examples.filter(example => !example.installed)) !== null && _a !== void 0 ? _a : [];
|
|
38
|
+
const [installing, run] = (0, react_1.useBusy)(pi.ui);
|
|
39
|
+
const install = async () => {
|
|
40
|
+
try {
|
|
41
|
+
if ((await pi.callHost('installExamples')).length > 0) {
|
|
42
|
+
await pi.reloadExtensions();
|
|
43
|
+
}
|
|
44
|
+
await read();
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
pi.ui.notify(i18n_1.GamesText.format(words.failed, { message: error instanceof Error ? error.message : String(error) }), 'error');
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return (react_1.React.createElement("div", { className: "tgm-scroll" },
|
|
51
|
+
react_1.React.createElement("div", { className: "tgm" },
|
|
52
|
+
react_1.React.createElement("section", null,
|
|
53
|
+
react_1.React.createElement("div", { className: "tgm-head" },
|
|
54
|
+
react_1.React.createElement("div", { className: "tgm-title" }, words.games),
|
|
55
|
+
missing.length > 0 ? (react_1.React.createElement("button", { type: "button", className: installing ? 'tgm-link ta-busy' : 'tgm-link', "aria-busy": installing || undefined, onClick: () => void run(install) },
|
|
56
|
+
words.installExamples,
|
|
57
|
+
installing && react_1.React.createElement("span", { className: "ta-spinner ta-busy-mark" }))) : null),
|
|
58
|
+
games.length > 0 ? (react_1.React.createElement("div", { className: "tgm-grid" }, games.map(game => (react_1.React.createElement(GameTile, { key: game.id, pi: pi, game: game }))))) : (react_1.React.createElement("div", { className: "tgm-empty" },
|
|
59
|
+
react_1.React.createElement(pi.ui.Empty, { title: words.noGames, hint: words.noGamesHint, compact: true })))),
|
|
60
|
+
react_1.React.createElement(ideas_1.IdeasSection, { pi: pi }))));
|
|
61
|
+
}
|
|
62
|
+
function GameTile({ pi, game }) {
|
|
63
|
+
var _a;
|
|
64
|
+
const Icon = (_a = game.icon) !== null && _a !== void 0 ? _a : pi.ui.icons.Gamepad2;
|
|
65
|
+
// Its tint from its name, one of the nine of the theme (--ta-tint-<n>), the same on every device.
|
|
66
|
+
const tint = [...game.extension].reduce((sum, char) => (sum * 31 + char.charCodeAt(0)) % 9, 7);
|
|
67
|
+
const running = game.state === 'background' || game.state === 'running';
|
|
68
|
+
// The first time, its code loads and starts before its page shows: the tile turns meanwhile.
|
|
69
|
+
const [opening, run] = (0, react_1.useBusy)(pi.ui);
|
|
70
|
+
return (react_1.React.createElement("button", { type: "button", className: "tgm-tile", style: { '--tgm-tint': `var(--ta-tint-${tint})`, '--tgm-ink': `var(--ta-tint-ink-${tint})` }, "aria-busy": opening || undefined, onClick: () => void run(() => pi.ui.showView(game.id)) },
|
|
71
|
+
react_1.React.createElement("span", { className: opening ? 'tgm-icon ta-busy' : 'tgm-icon' },
|
|
72
|
+
Icon ? react_1.React.createElement(Icon, { size: 24 }) : null,
|
|
73
|
+
running ? react_1.React.createElement("span", { className: "tgm-dot" }) : null,
|
|
74
|
+
opening && react_1.React.createElement("span", { className: "ta-spinner ta-busy-mark" })),
|
|
75
|
+
react_1.React.createElement("span", { className: "tgm-name" }, game.title)));
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=games-view.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { TaExtensionHost, TaPackageService } from '@celljs/ta-protocol';
|
|
2
|
+
export declare const NAME = "@celljs/ta-games";
|
|
3
|
+
export interface GameExample {
|
|
4
|
+
/** Its directory, in the examples of the skill and in `extensions/`. */
|
|
5
|
+
name: string;
|
|
6
|
+
installed: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The server side of ta-games: the example games of the ta-game skill (`skills/ta-game/examples/`), each an
|
|
10
|
+
* ordinary web extension, copied into `extensions/` of the agent directory, where pi finds them as the
|
|
11
|
+
* user's own: to play, to change, to hand on.
|
|
12
|
+
*/
|
|
13
|
+
export declare class GamesService implements TaPackageService {
|
|
14
|
+
protected readonly host: TaExtensionHost;
|
|
15
|
+
/** Default: those of the package where ta serve has it. */
|
|
16
|
+
protected readonly examplesDir?: string | undefined;
|
|
17
|
+
constructor(host: TaExtensionHost,
|
|
18
|
+
/** Default: those of the package where ta serve has it. */
|
|
19
|
+
examplesDir?: string | undefined);
|
|
20
|
+
dispose(): void;
|
|
21
|
+
examples(): Promise<GameExample[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Copies the examples never offered yet, the first time the Games page opens: one the user deleted is not
|
|
24
|
+
* copied again, one of the same name already there is left as it is. Resolves with those copied.
|
|
25
|
+
*/
|
|
26
|
+
offerExamples(): Promise<string[]>;
|
|
27
|
+
/** Copies again the examples that are not there ("Install the examples" of the Games page). */
|
|
28
|
+
installExamples(): Promise<string[]>;
|
|
29
|
+
protected copy(from: string, name: string): boolean;
|
|
30
|
+
protected target(name: string): string;
|
|
31
|
+
protected names(from: string): string[];
|
|
32
|
+
protected from(): Promise<string>;
|
|
33
|
+
}
|
|
34
|
+
/** `pi.host` of the package: ta serve runs it once. */
|
|
35
|
+
export default function activate(host: TaExtensionHost): TaPackageService;
|
|
36
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GamesService = exports.NAME = void 0;
|
|
4
|
+
exports.default = activate;
|
|
5
|
+
const node_fs_1 = require("node:fs");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
exports.NAME = '@celljs/ta-games';
|
|
8
|
+
/** The key of the package data that lists the examples once put in `extensions/`: one deleted stays deleted. */
|
|
9
|
+
const OFFERED = 'examplesOffered';
|
|
10
|
+
/**
|
|
11
|
+
* The server side of ta-games: the example games of the ta-game skill (`skills/ta-game/examples/`), each an
|
|
12
|
+
* ordinary web extension, copied into `extensions/` of the agent directory, where pi finds them as the
|
|
13
|
+
* user's own: to play, to change, to hand on.
|
|
14
|
+
*/
|
|
15
|
+
class GamesService {
|
|
16
|
+
constructor(host,
|
|
17
|
+
/** Default: those of the package where ta serve has it. */
|
|
18
|
+
examplesDir) {
|
|
19
|
+
this.host = host;
|
|
20
|
+
this.examplesDir = examplesDir;
|
|
21
|
+
}
|
|
22
|
+
dispose() { }
|
|
23
|
+
async examples() {
|
|
24
|
+
const from = await this.from();
|
|
25
|
+
return this.names(from).map(name => ({ name, installed: (0, node_fs_1.existsSync)(this.target(name)) }));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Copies the examples never offered yet, the first time the Games page opens: one the user deleted is not
|
|
29
|
+
* copied again, one of the same name already there is left as it is. Resolves with those copied.
|
|
30
|
+
*/
|
|
31
|
+
async offerExamples() {
|
|
32
|
+
var _a;
|
|
33
|
+
const from = await this.from();
|
|
34
|
+
const offered = new Set((_a = (await this.host.getExtensionData(exports.NAME, OFFERED))) !== null && _a !== void 0 ? _a : []);
|
|
35
|
+
const copied = this.names(from).filter(name => !offered.has(name) && this.copy(from, name));
|
|
36
|
+
const names = this.names(from);
|
|
37
|
+
if (names.some(name => !offered.has(name))) {
|
|
38
|
+
await this.host.setExtensionData(exports.NAME, OFFERED, [...new Set([...offered, ...names])]);
|
|
39
|
+
}
|
|
40
|
+
return copied;
|
|
41
|
+
}
|
|
42
|
+
/** Copies again the examples that are not there ("Install the examples" of the Games page). */
|
|
43
|
+
async installExamples() {
|
|
44
|
+
const from = await this.from();
|
|
45
|
+
return this.names(from).filter(name => this.copy(from, name));
|
|
46
|
+
}
|
|
47
|
+
copy(from, name) {
|
|
48
|
+
const target = this.target(name);
|
|
49
|
+
if ((0, node_fs_1.existsSync)(target)) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
(0, node_fs_1.cpSync)((0, node_path_1.join)(from, name), target, { recursive: true });
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
target(name) {
|
|
56
|
+
return (0, node_path_1.join)(this.host.agentDir, 'extensions', name);
|
|
57
|
+
}
|
|
58
|
+
names(from) {
|
|
59
|
+
return (0, node_fs_1.existsSync)(from)
|
|
60
|
+
? (0, node_fs_1.readdirSync)(from, { withFileTypes: true })
|
|
61
|
+
.filter(entry => entry.isDirectory() && (0, node_fs_1.existsSync)((0, node_path_1.join)(from, entry.name, 'package.json')))
|
|
62
|
+
.map(entry => entry.name)
|
|
63
|
+
.sort()
|
|
64
|
+
: [];
|
|
65
|
+
}
|
|
66
|
+
async from() {
|
|
67
|
+
var _a;
|
|
68
|
+
if (this.examplesDir) {
|
|
69
|
+
return this.examplesDir;
|
|
70
|
+
}
|
|
71
|
+
const root = (_a = (await this.host.listPackages()).find(info => info.name === exports.NAME)) === null || _a === void 0 ? void 0 : _a.root;
|
|
72
|
+
if (!root) {
|
|
73
|
+
throw new Error(`${exports.NAME} is not loaded.`);
|
|
74
|
+
}
|
|
75
|
+
return (0, node_path_1.join)(root, 'skills/ta-game/examples');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.GamesService = GamesService;
|
|
79
|
+
/** `pi.host` of the package: ta serve runs it once. */
|
|
80
|
+
function activate(host) {
|
|
81
|
+
return new GamesService(host);
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const EN: {
|
|
2
|
+
page: string;
|
|
3
|
+
games: string;
|
|
4
|
+
installExamples: string;
|
|
5
|
+
noGames: string;
|
|
6
|
+
noGamesHint: string;
|
|
7
|
+
makeTitle: string;
|
|
8
|
+
makeHint: string;
|
|
9
|
+
snake: string;
|
|
10
|
+
snakeHint: string;
|
|
11
|
+
snakeAsk: string;
|
|
12
|
+
breakout: string;
|
|
13
|
+
breakoutHint: string;
|
|
14
|
+
breakoutAsk: string;
|
|
15
|
+
board: string;
|
|
16
|
+
boardHint: string;
|
|
17
|
+
boardAsk: string;
|
|
18
|
+
maze: string;
|
|
19
|
+
mazeHint: string;
|
|
20
|
+
mazeAsk: string;
|
|
21
|
+
making: string;
|
|
22
|
+
makeTitleOf: string;
|
|
23
|
+
makeAgainTitle: string;
|
|
24
|
+
madeBefore: string;
|
|
25
|
+
startMaking: string;
|
|
26
|
+
makeAnother: string;
|
|
27
|
+
failed: string;
|
|
28
|
+
};
|
|
29
|
+
export type GamesWords = typeof EN;
|
|
30
|
+
export declare namespace GamesText {
|
|
31
|
+
function of(language: string): GamesWords;
|
|
32
|
+
function format(text: string, values: Record<string, string | number>): string;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GamesText = void 0;
|
|
4
|
+
const EN = {
|
|
5
|
+
page: 'Games',
|
|
6
|
+
games: 'Your games',
|
|
7
|
+
installExamples: 'Install the examples',
|
|
8
|
+
noGames: 'No games yet',
|
|
9
|
+
noGamesHint: 'Have Ta make one below, or install one from the market',
|
|
10
|
+
makeTitle: 'Have Ta make one',
|
|
11
|
+
makeHint: 'Or just say what you want to play in a conversation',
|
|
12
|
+
snake: 'Snake',
|
|
13
|
+
snakeHint: 'Arrow keys or swipes',
|
|
14
|
+
snakeAsk: 'Make a Snake game as an extension of Ta: arrow keys on a computer, swipes on a phone, and the best score kept.',
|
|
15
|
+
breakout: 'Breakout',
|
|
16
|
+
breakoutHint: 'A paddle under your finger',
|
|
17
|
+
breakoutAsk: 'Make a Breakout game as an extension of Ta: the paddle follows the mouse or the finger, and the bricks take the colors of the theme.',
|
|
18
|
+
board: 'Dinos at work',
|
|
19
|
+
boardHint: 'Scheduled tasks as a little world',
|
|
20
|
+
boardAsk: 'Make a card of the board that shows my scheduled tasks as a little pixel world: each task a dinosaur on the grass, running while it runs, lying down when its last run failed.',
|
|
21
|
+
maze: '3D maze',
|
|
22
|
+
mazeHint: 'Roll a ball through it',
|
|
23
|
+
mazeAsk: 'Make a 3D maze game as an extension of Ta, with ui.Game3D: tilt the maze with the arrow keys or by dragging, roll the ball to the exit, a new maze each round, and the best time kept.',
|
|
24
|
+
making: 'Make a game',
|
|
25
|
+
makeTitleOf: 'Have Ta make {name}?',
|
|
26
|
+
makeAgainTitle: 'Make {name} again?',
|
|
27
|
+
madeBefore: 'Ta was asked to make it before. This opens another conversation.',
|
|
28
|
+
startMaking: 'Make it',
|
|
29
|
+
makeAnother: 'Make another',
|
|
30
|
+
failed: 'Could not start: {message}',
|
|
31
|
+
};
|
|
32
|
+
const ZH = {
|
|
33
|
+
page: '游戏',
|
|
34
|
+
games: '我的游戏',
|
|
35
|
+
installExamples: '安装示例游戏',
|
|
36
|
+
noGames: '还没有游戏',
|
|
37
|
+
noGamesHint: '在下面让 Ta 做一个,或者去市场装一个',
|
|
38
|
+
makeTitle: '让 Ta 做一个',
|
|
39
|
+
makeHint: '也可以直接在对话里说想玩什么',
|
|
40
|
+
snake: '贪吃蛇',
|
|
41
|
+
snakeHint: '方向键或滑动操作',
|
|
42
|
+
snakeAsk: '做一个贪吃蛇小游戏扩展:电脑上用方向键,手机上滑动操作,记下最高分。',
|
|
43
|
+
breakout: '打砖块',
|
|
44
|
+
breakoutHint: '挡板跟着手指走',
|
|
45
|
+
breakoutAsk: '做一个打砖块小游戏扩展:挡板跟随鼠标或手指移动,砖块用 Ta 主题的颜色。',
|
|
46
|
+
board: '干活的恐龙',
|
|
47
|
+
boardHint: '把定时任务变成小世界',
|
|
48
|
+
boardAsk: '做一张看板卡片,把我的定时任务画成一个像素小世界:每个任务是草地上的一只小恐龙,正在运行时奔跑,上次运行失败时趴下。',
|
|
49
|
+
maze: '3D 迷宫',
|
|
50
|
+
mazeHint: '滚着小球找出口',
|
|
51
|
+
mazeAsk: '用 ui.Game3D 做一个 3D 迷宫小游戏扩展:方向键或拖动倾斜迷宫,让小球滚到出口,每局一个新迷宫,记下最快用时。',
|
|
52
|
+
making: '做游戏',
|
|
53
|
+
makeTitleOf: '让 Ta 做{name}?',
|
|
54
|
+
makeAgainTitle: '再做一个{name}?',
|
|
55
|
+
madeBefore: '之前已经让 Ta 做过,这会再开一个新对话。',
|
|
56
|
+
startMaking: '开始做',
|
|
57
|
+
makeAnother: '再做一个',
|
|
58
|
+
failed: '没能开始:{message}',
|
|
59
|
+
};
|
|
60
|
+
var GamesText;
|
|
61
|
+
(function (GamesText) {
|
|
62
|
+
function of(language) {
|
|
63
|
+
return language.startsWith('zh') ? ZH : EN;
|
|
64
|
+
}
|
|
65
|
+
GamesText.of = of;
|
|
66
|
+
function format(text, values) {
|
|
67
|
+
return text.replace(/\{(\w+)\}/g, (all, name) => (name in values ? String(values[name]) : all));
|
|
68
|
+
}
|
|
69
|
+
GamesText.format = format;
|
|
70
|
+
})(GamesText || (exports.GamesText = GamesText = {}));
|
|
71
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
/** "Have Ta make one": each card, once the user said so, opens a conversation in which Ta makes it with the ta-game skill. */
|
|
3
|
+
export declare function IdeasSection({ pi }: {
|
|
4
|
+
pi: WebExtensionAPI;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ideas.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdeasSection = IdeasSection;
|
|
4
|
+
const i18n_1 = require("./i18n");
|
|
5
|
+
const make_game_1 = require("./make-game");
|
|
6
|
+
// biome-ignore lint/correctness/noUnusedImports: the JSX below compiles to React.createElement (jsxFactory)
|
|
7
|
+
const react_1 = require("./react");
|
|
8
|
+
/** Ideas the user can hand to Ta, each a picture and what Ta is asked. */
|
|
9
|
+
const IDEAS = [
|
|
10
|
+
{ key: 'snake', label: 'snake', hint: 'snakeHint', ask: 'snakeAsk' },
|
|
11
|
+
{ key: 'breakout', label: 'breakout', hint: 'breakoutHint', ask: 'breakoutAsk' },
|
|
12
|
+
{ key: 'maze', label: 'maze', hint: 'mazeHint', ask: 'mazeAsk' },
|
|
13
|
+
{ key: 'board', label: 'board', hint: 'boardHint', ask: 'boardAsk' },
|
|
14
|
+
];
|
|
15
|
+
/** "Have Ta make one": each card, once the user said so, opens a conversation in which Ta makes it with the ta-game skill. */
|
|
16
|
+
function IdeasSection({ pi }) {
|
|
17
|
+
const words = i18n_1.GamesText.of(pi.ui.language);
|
|
18
|
+
return (react_1.React.createElement("section", null,
|
|
19
|
+
react_1.React.createElement("div", { className: "tgm-label" }, words.makeTitle),
|
|
20
|
+
react_1.React.createElement("div", { className: "tgm-note" }, words.makeHint),
|
|
21
|
+
react_1.React.createElement(pi.ui.PictureCards, { columns: 4, compactColumns: 2, cards: IDEAS.map(idea => ({
|
|
22
|
+
key: idea.key,
|
|
23
|
+
picture: react_1.React.createElement(IdeaPicture, { pi: pi, idea: idea.key }),
|
|
24
|
+
label: words[idea.label],
|
|
25
|
+
hint: words[idea.hint],
|
|
26
|
+
onPick: () => void make_game_1.MakeGame.pick(pi, { key: idea.key, label: words[idea.label], ask: words[idea.ask] }),
|
|
27
|
+
})) })));
|
|
28
|
+
}
|
|
29
|
+
/** What each idea looks like, drawn with the classes of Ta's pictures so that it follows the theme. */
|
|
30
|
+
function IdeaPicture({ pi, idea }) {
|
|
31
|
+
if (idea === 'snake') {
|
|
32
|
+
return (react_1.React.createElement(pi.ui.Picture, null,
|
|
33
|
+
react_1.React.createElement("rect", { className: "ta-pic-pane", x: "20", y: "14", width: "120", height: "68", rx: "8" }),
|
|
34
|
+
react_1.React.createElement("path", { className: "ta-pic-stroke", d: "M40 64 H76 V36 H112", fill: "none", strokeWidth: "8", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
35
|
+
react_1.React.createElement("circle", { className: "ta-pic-mark", cx: "112", cy: "36", r: "5" }),
|
|
36
|
+
react_1.React.createElement("circle", { className: "ta-pic-bad", cx: "122", cy: "62", r: "4" })));
|
|
37
|
+
}
|
|
38
|
+
if (idea === 'breakout') {
|
|
39
|
+
return (react_1.React.createElement(pi.ui.Picture, null,
|
|
40
|
+
react_1.React.createElement("rect", { className: "ta-pic-pane", x: "20", y: "14", width: "120", height: "68", rx: "8" }),
|
|
41
|
+
[0, 1, 2, 3].map(column => (react_1.React.createElement("rect", { key: column, className: column === 1 ? 'ta-pic-accent' : 'ta-pic-line', x: 30 + column * 26, y: "24", width: "22", height: "8", rx: "2" }))),
|
|
42
|
+
[0, 1, 2].map(column => (react_1.React.createElement("rect", { key: column, className: "ta-pic-soft", x: 43 + column * 26, y: "36", width: "22", height: "8", rx: "2" }))),
|
|
43
|
+
react_1.React.createElement("circle", { className: "ta-pic-mark", cx: "92", cy: "58", r: "4" }),
|
|
44
|
+
react_1.React.createElement("rect", { className: "ta-pic-accent", x: "62", y: "70", width: "36", height: "5", rx: "2.5" })));
|
|
45
|
+
}
|
|
46
|
+
if (idea === 'maze') {
|
|
47
|
+
return (react_1.React.createElement(pi.ui.Picture, null,
|
|
48
|
+
react_1.React.createElement("path", { className: "ta-pic-pane", d: "M80 12 L140 42 L80 72 L20 42 Z" }),
|
|
49
|
+
react_1.React.createElement("path", { className: "ta-pic-soft", d: "M20 42 L80 72 L80 86 L20 56 Z" }),
|
|
50
|
+
react_1.React.createElement("path", { className: "ta-pic-line", d: "M80 72 L140 42 L140 56 L80 86 Z" }),
|
|
51
|
+
react_1.React.createElement("path", { className: "ta-pic-path", d: "M50 42 L80 27 L110 42 L80 57", fill: "none" }),
|
|
52
|
+
react_1.React.createElement("circle", { className: "ta-pic-mark", cx: "80", cy: "57", r: "5" })));
|
|
53
|
+
}
|
|
54
|
+
return (react_1.React.createElement(pi.ui.Picture, null,
|
|
55
|
+
react_1.React.createElement("rect", { className: "ta-pic-pane", x: "20", y: "14", width: "120", height: "68", rx: "8" }),
|
|
56
|
+
react_1.React.createElement("rect", { className: "ta-pic-soft", x: "20", y: "62", width: "120", height: "20", rx: "0" }),
|
|
57
|
+
react_1.React.createElement("rect", { className: "ta-pic-mark", x: "38", y: "46", width: "14", height: "16", rx: "3" }),
|
|
58
|
+
react_1.React.createElement("rect", { className: "ta-pic-mark", x: "72", y: "40", width: "14", height: "16", rx: "3" }),
|
|
59
|
+
react_1.React.createElement("rect", { className: "ta-pic-bad", x: "104", y: "54", width: "18", height: "8", rx: "3" }),
|
|
60
|
+
react_1.React.createElement("path", { className: "ta-pic-path", d: "M30 30 H130" })));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=ideas.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
/**
|
|
3
|
+
* The Games page (docs/design/ta-games.md): the extensions that are games, the examples of the ta-game skill
|
|
4
|
+
* among them, and ideas that ask Ta to make one with that skill. It starts when it is opened.
|
|
5
|
+
*/
|
|
6
|
+
export default function activate(pi: WebExtensionAPI): () => void;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const games_view_1 = require("./games-view");
|
|
5
|
+
const i18n_1 = require("./i18n");
|
|
6
|
+
// biome-ignore lint/correctness/noUnusedImports: the JSX below compiles to React.createElement (jsxFactory)
|
|
7
|
+
const react_1 = require("./react");
|
|
8
|
+
const style_1 = require("./style");
|
|
9
|
+
/**
|
|
10
|
+
* The Games page (docs/design/ta-games.md): the extensions that are games, the examples of the ta-game skill
|
|
11
|
+
* among them, and ideas that ask Ta to make one with that skill. It starts when it is opened.
|
|
12
|
+
*/
|
|
13
|
+
function activate(pi) {
|
|
14
|
+
(0, react_1.bind)(pi.React);
|
|
15
|
+
const removeStyle = (0, style_1.injectStyle)();
|
|
16
|
+
pi.registerView('games', {
|
|
17
|
+
title: () => i18n_1.GamesText.of(pi.ui.language).page,
|
|
18
|
+
icon: pi.ui.icons.Gamepad2,
|
|
19
|
+
location: 'page',
|
|
20
|
+
render: () => react_1.React.createElement(games_view_1.GamesView, { pi: pi }),
|
|
21
|
+
});
|
|
22
|
+
return removeStyle;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TaPackageInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
3
|
+
/** An idea of the page: what it is called and what Ta is asked. */
|
|
4
|
+
export interface GameIdea {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
ask: string;
|
|
8
|
+
}
|
|
9
|
+
export declare namespace MakeGame {
|
|
10
|
+
/**
|
|
11
|
+
* What Ta is asked: the user's words, then where the two skills are. Another coding agent as the model
|
|
12
|
+
* (ta-agents) does not see pi's skills, so their files are named rather than only the skills.
|
|
13
|
+
*/
|
|
14
|
+
function message(ask: string, packages: readonly TaPackageInfo[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* A card of the page tapped: a conversation is started only once the user said so, for a tap is easily
|
|
17
|
+
* made by mistake on a phone, and an idea made before says so; a tap while one is asked does nothing.
|
|
18
|
+
*/
|
|
19
|
+
function pick(pi: WebExtensionAPI, idea: GameIdea): Promise<void>;
|
|
20
|
+
/** A new conversation, shown at once, in which Ta makes the game asked for, in the directory of the Ta service; false when it could not start. */
|
|
21
|
+
function start(pi: WebExtensionAPI, ask: string): Promise<boolean>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=make-game.d.ts.map
|