@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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const brief_card_1 = require("./brief-card");
|
|
5
|
+
const brief_home_1 = require("./brief-home");
|
|
6
|
+
const chat_icons_1 = require("./chat-icons");
|
|
7
|
+
const composer_1 = require("./composer");
|
|
8
|
+
const i18n_1 = require("./i18n");
|
|
9
|
+
const react_1 = require("./react");
|
|
10
|
+
const recall_protocol_1 = require("./recall-protocol");
|
|
11
|
+
const search_source_1 = require("./search-source");
|
|
12
|
+
const settings_1 = require("./settings");
|
|
13
|
+
const skill_card_1 = require("./skill-card");
|
|
14
|
+
const style_1 = require("./style");
|
|
15
|
+
const tool_line_1 = require("./tool-line");
|
|
16
|
+
/**
|
|
17
|
+
* The page side of Recall: the card of a draft skill and Keep as a skill in the +, Ask Ta in the search of Quick
|
|
18
|
+
* open, the daily brief under the double and on the board, and its section of the settings (links to session files open
|
|
19
|
+
* their conversations in Ta Web itself). The host reads the
|
|
20
|
+
* conversations and writes skills and briefs (host.ts); the pi extension of each session searches (extension.ts).
|
|
21
|
+
*/
|
|
22
|
+
function activate(pi) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
(0, react_1.bind)(pi.React);
|
|
25
|
+
const removeStyle = (0, style_1.injectStyle)();
|
|
26
|
+
pi.registerSettings((0, settings_1.recallSettings)(pi));
|
|
27
|
+
pi.registerMessageRenderer(recall_protocol_1.SKILL_TYPE, (0, skill_card_1.skillCard)(pi));
|
|
28
|
+
pi.registerComposerAddon((0, composer_1.composerAddon)(pi));
|
|
29
|
+
pi.registerSearch((0, search_source_1.recallSearch)(pi));
|
|
30
|
+
// An older app draws them with the letter of their directory.
|
|
31
|
+
(_a = pi.registerChatIcon) === null || _a === void 0 ? void 0 : _a.call(pi, (0, chat_icons_1.chatIcons)(pi));
|
|
32
|
+
const brief = new brief_home_1.BriefStore(pi);
|
|
33
|
+
(_b = pi.registerHomeItems) === null || _b === void 0 ? void 0 : _b.call(pi, (0, brief_home_1.briefHome)(pi, brief));
|
|
34
|
+
// On the board after the double's tasks.
|
|
35
|
+
pi.registerView('brief', {
|
|
36
|
+
title: () => i18n_1.RecallWords.of(pi.ui.language).briefLabel,
|
|
37
|
+
icon: pi.ui.icons.ScrollText,
|
|
38
|
+
location: 'board',
|
|
39
|
+
order: 5,
|
|
40
|
+
render: (0, brief_card_1.briefCard)(pi, brief),
|
|
41
|
+
});
|
|
42
|
+
tool_line_1.RecallToolLine.register(pi, key => i18n_1.RecallWords.of(pi.ui.language)[key]);
|
|
43
|
+
return removeStyle;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WebExtensionUI as WebUI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
import type * as ReactModule from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The React of the page, which a web extension cannot import: `activate` binds it before anything
|
|
5
|
+
* renders. The JSX of this package compiles to `React.createElement` (tsconfig.json).
|
|
6
|
+
*/
|
|
7
|
+
export declare let React: typeof ReactModule;
|
|
8
|
+
export declare function bind(react: typeof ReactModule): void;
|
|
9
|
+
/** A React hook: `ui.useBusy` of the page, so that what waits on ta serve says so (a spinner once it took a moment). */
|
|
10
|
+
export declare function useBusy(ui: WebUI): ReturnType<WebUI['useBusy']>;
|
|
11
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.React = void 0;
|
|
4
|
+
exports.bind = bind;
|
|
5
|
+
exports.useBusy = useBusy;
|
|
6
|
+
function bind(react) {
|
|
7
|
+
exports.React = react;
|
|
8
|
+
}
|
|
9
|
+
/** In a Ta app older than `ui.useBusy`: never busy. */
|
|
10
|
+
const idle = () => [false, async (action) => await action()];
|
|
11
|
+
/** A React hook: `ui.useBusy` of the page, so that what waits on ta serve says so (a spinner once it took a moment). */
|
|
12
|
+
function useBusy(ui) {
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = ui.useBusy) !== null && _a !== void 0 ? _a : idle)();
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/** The name of the package: of its data and its host. */
|
|
2
|
+
export declare const NAME = "@celljs/ta-recall";
|
|
3
|
+
/** Ta's tool to search the conversations of before (tool.ts); the page draws its calls (tool-line.ts). */
|
|
4
|
+
export declare const TOOL_NAME = "search_conversations";
|
|
5
|
+
/** Ta's tool to offer a skill: its draft becomes a card the user saves (extension.ts). */
|
|
6
|
+
export declare const PROPOSE_TOOL = "propose_skill";
|
|
7
|
+
/** The card of a draft skill, in its conversation: shown, never read by the model. */
|
|
8
|
+
export declare const SKILL_TYPE = "ta-recall-skill";
|
|
9
|
+
/** The language of the fenced block in which Ta writes a draft skill; the pi extension finds it there. */
|
|
10
|
+
export declare const SKILL_BLOCK = "ta-skill";
|
|
11
|
+
/** One thing said in a conversation: by the user (without the context of its message) or by Ta (its text). */
|
|
12
|
+
export interface Said {
|
|
13
|
+
role: 'user' | 'assistant';
|
|
14
|
+
text: string;
|
|
15
|
+
/** `Date.now()` time. */
|
|
16
|
+
at: number;
|
|
17
|
+
/** A message of the user that came with a context for the model: one a button or a package sent, not typed. */
|
|
18
|
+
framed?: true;
|
|
19
|
+
}
|
|
20
|
+
/** A conversation of a session file, as the index reads it: what was said, not what the tools did. */
|
|
21
|
+
export interface Conversation {
|
|
22
|
+
file: string;
|
|
23
|
+
/** Where it works, as clients name it: a path, or an `ssh://` location. */
|
|
24
|
+
cwd: string;
|
|
25
|
+
/** Its name, else the first line of the first message of the user. */
|
|
26
|
+
title: string;
|
|
27
|
+
createdAt: number;
|
|
28
|
+
updatedAt: number;
|
|
29
|
+
/** The package that opened it for a role of its own (an agent of a channel, a run of a schedule). */
|
|
30
|
+
group?: string;
|
|
31
|
+
said: Said[];
|
|
32
|
+
}
|
|
33
|
+
export interface SearchQuery {
|
|
34
|
+
/** Words separated by spaces: a conversation that has more of them comes first. */
|
|
35
|
+
query: string;
|
|
36
|
+
/** Only conversations updated in these days; default SEARCH_DAYS. */
|
|
37
|
+
days?: number;
|
|
38
|
+
/** Only conversations of this directory. */
|
|
39
|
+
cwd?: string;
|
|
40
|
+
/** Left out: the conversation that asks. */
|
|
41
|
+
exclude?: string;
|
|
42
|
+
/** Every word in one message: what a search box asks. */
|
|
43
|
+
all?: boolean;
|
|
44
|
+
limit?: number;
|
|
45
|
+
}
|
|
46
|
+
/** A conversation that has words of a search, with the places where. */
|
|
47
|
+
export interface SearchHit {
|
|
48
|
+
file: string;
|
|
49
|
+
cwd: string;
|
|
50
|
+
title: string;
|
|
51
|
+
updatedAt: number;
|
|
52
|
+
/** How many of the words it has. */
|
|
53
|
+
matched: number;
|
|
54
|
+
snippets: {
|
|
55
|
+
role: Said['role'];
|
|
56
|
+
at: number;
|
|
57
|
+
text: string;
|
|
58
|
+
}[];
|
|
59
|
+
}
|
|
60
|
+
/** A request of the user in another conversation much like the one of now. */
|
|
61
|
+
export interface SimilarAsk {
|
|
62
|
+
file: string;
|
|
63
|
+
title: string;
|
|
64
|
+
text: string;
|
|
65
|
+
at: number;
|
|
66
|
+
}
|
|
67
|
+
/** A skill as Ta drafted it: the name of its directory, the line that says when to use it, and its body. */
|
|
68
|
+
export interface SkillDraft {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
body: string;
|
|
72
|
+
}
|
|
73
|
+
/** The card of a draft, in `details` of its SKILL_TYPE message. */
|
|
74
|
+
export interface SkillCard {
|
|
75
|
+
/** Unique: what the user decided about it is kept by it (Keys.DECIDED). */
|
|
76
|
+
key: string;
|
|
77
|
+
draft: SkillDraft;
|
|
78
|
+
/** The request that made Ta draft it, kept when the user says no, so that one like it is not asked again. */
|
|
79
|
+
ask?: string;
|
|
80
|
+
}
|
|
81
|
+
/** What the user decided about a card: saved (and where) or not wanted. */
|
|
82
|
+
export type SkillDecision = {
|
|
83
|
+
saved: string;
|
|
84
|
+
name: string;
|
|
85
|
+
} | {
|
|
86
|
+
declined: true;
|
|
87
|
+
};
|
|
88
|
+
/** The last brief as the double's home shows it: how many lines each part has, and the first that waits. */
|
|
89
|
+
export interface BriefSummary {
|
|
90
|
+
/** `Date.now()` time it was written. */
|
|
91
|
+
at: number;
|
|
92
|
+
/** The session file of its conversation. */
|
|
93
|
+
file: string;
|
|
94
|
+
done: number;
|
|
95
|
+
waiting: number;
|
|
96
|
+
next: number;
|
|
97
|
+
/** The first line of Waiting for you, as plain text. */
|
|
98
|
+
top?: string;
|
|
99
|
+
/** The first lines of Waiting for you (Limits.BRIEF_ITEMS), which the card of the board lists to act on. */
|
|
100
|
+
items?: BriefItem[];
|
|
101
|
+
}
|
|
102
|
+
/** A line of Waiting for you: its text, and the conversation it links, where the user decides. */
|
|
103
|
+
export interface BriefItem {
|
|
104
|
+
text: string;
|
|
105
|
+
/** The session file its line links. */
|
|
106
|
+
file?: string;
|
|
107
|
+
}
|
|
108
|
+
/** The lines of Waiting for you the user ticked off, by their place in BriefSummary.items of the brief of `at`. */
|
|
109
|
+
export interface BriefHandled {
|
|
110
|
+
at: number;
|
|
111
|
+
done: number[];
|
|
112
|
+
}
|
|
113
|
+
/** When the daily brief is written. */
|
|
114
|
+
export interface BriefSettings {
|
|
115
|
+
enabled: boolean;
|
|
116
|
+
/** `HH:MM`, local time. */
|
|
117
|
+
time: string;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace Keys {
|
|
120
|
+
/** boolean: Ta offers to keep a request asked again as a skill; default true. */
|
|
121
|
+
const SUGGEST = "suggest";
|
|
122
|
+
/** BriefSettings. */
|
|
123
|
+
const BRIEF = "brief";
|
|
124
|
+
/** The session file of the conversation of the briefs. */
|
|
125
|
+
const BRIEF_FILE = "briefFile";
|
|
126
|
+
/** `Date.now()` time of the last brief, or of the last check that found nothing to tell. */
|
|
127
|
+
const BRIEF_LAST = "briefLast";
|
|
128
|
+
/** The session files of the conversations that asked Ta from Quick open, newest last. */
|
|
129
|
+
const ASKED = "asked";
|
|
130
|
+
/** BriefSummary of the last brief written. */
|
|
131
|
+
const BRIEF_SUMMARY = "briefSummary";
|
|
132
|
+
/** The `at` of the brief the user saw last: the double's home no longer shows it. */
|
|
133
|
+
const BRIEF_SEEN = "briefSeen";
|
|
134
|
+
/** The session file of the conversation of the briefs the page pinned once: unpinned by the user, it stays so. */
|
|
135
|
+
const BRIEF_PINNED = "briefPinned";
|
|
136
|
+
/** BriefHandled: of the last brief only. */
|
|
137
|
+
const BRIEF_HANDLED = "briefHandled";
|
|
138
|
+
/** Record<card key, SkillDecision>. */
|
|
139
|
+
const DECIDED = "decided";
|
|
140
|
+
/** Requests the user did not want kept as a skill, newest last. */
|
|
141
|
+
const DECLINED = "declined";
|
|
142
|
+
}
|
|
143
|
+
export declare namespace Limits {
|
|
144
|
+
const SEARCH_DAYS = 30;
|
|
145
|
+
const SEARCH_HITS = 8;
|
|
146
|
+
const SNIPPETS = 3;
|
|
147
|
+
const SNIPPET_CHARS = 240;
|
|
148
|
+
/** Requests of other conversations compared with the one of now. */
|
|
149
|
+
const SIMILAR_DAYS = 60;
|
|
150
|
+
/** The shortest request compared, in characters. */
|
|
151
|
+
const SIMILAR_MIN_CHARS = 16;
|
|
152
|
+
/** The Dice coefficient of the pairs of characters from which two requests are alike. */
|
|
153
|
+
const SIMILAR_SCORE = 0.5;
|
|
154
|
+
const DECLINED_KEPT = 100;
|
|
155
|
+
const ASKED_KEPT = 200;
|
|
156
|
+
/** The conversations a brief tells of at most. */
|
|
157
|
+
const BRIEF_CONVERSATIONS = 30;
|
|
158
|
+
/** The lines of Waiting for you a BriefSummary keeps. */
|
|
159
|
+
const BRIEF_ITEMS = 5;
|
|
160
|
+
/** A conversation that asked Ta from Quick open is archived once not updated for so many days (WebChatIcon.archiveDays). */
|
|
161
|
+
const ASKED_ARCHIVE_DAYS = 7;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The host of the package in the Ta service (`pi.host`): it reads the conversations of every session file, writes
|
|
165
|
+
* the skills the user keeps and the daily brief. Its pi extension calls it in the process, its web extension with
|
|
166
|
+
* `callHost`.
|
|
167
|
+
*/
|
|
168
|
+
export interface RecallService {
|
|
169
|
+
search(query: SearchQuery): Promise<SearchHit[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Requests of other conversations much like `text`, of the session `piSessionId`: none when the user turned the
|
|
172
|
+
* suggestions off, for a session of a package, or when it is like one the user did not want kept.
|
|
173
|
+
*/
|
|
174
|
+
similar(text: string, piSessionId?: string): Promise<SimilarAsk[]>;
|
|
175
|
+
/** Writes the skill of a card into the skills of the user; resolves with the path of its SKILL.md. */
|
|
176
|
+
saveSkill(key: string, draft: SkillDraft): Promise<string>;
|
|
177
|
+
/** The user did not want the draft of a card. */
|
|
178
|
+
declineSkill(key: string, ask?: string): Promise<void>;
|
|
179
|
+
/** Keeps the session file of a conversation that asks Ta about earlier work: it has the icon of the questions. */
|
|
180
|
+
keepAsked(file: string): Promise<void>;
|
|
181
|
+
/** The answer of a brief turn, in the conversation of the briefs: kept as its BriefSummary. */
|
|
182
|
+
keepBrief(file: string, text: string): Promise<BriefSummary | undefined>;
|
|
183
|
+
/** Writes a brief now, whatever the time; resolves with the session file of the briefs, or undefined when nothing happened. */
|
|
184
|
+
briefNow(): Promise<string | undefined>;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=recall-protocol.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Limits = exports.Keys = exports.SKILL_BLOCK = exports.SKILL_TYPE = exports.PROPOSE_TOOL = exports.TOOL_NAME = exports.NAME = void 0;
|
|
4
|
+
/** The name of the package: of its data and its host. */
|
|
5
|
+
exports.NAME = '@celljs/ta-recall';
|
|
6
|
+
/** Ta's tool to search the conversations of before (tool.ts); the page draws its calls (tool-line.ts). */
|
|
7
|
+
exports.TOOL_NAME = 'search_conversations';
|
|
8
|
+
/** Ta's tool to offer a skill: its draft becomes a card the user saves (extension.ts). */
|
|
9
|
+
exports.PROPOSE_TOOL = 'propose_skill';
|
|
10
|
+
/** The card of a draft skill, in its conversation: shown, never read by the model. */
|
|
11
|
+
exports.SKILL_TYPE = 'ta-recall-skill';
|
|
12
|
+
/** The language of the fenced block in which Ta writes a draft skill; the pi extension finds it there. */
|
|
13
|
+
exports.SKILL_BLOCK = 'ta-skill';
|
|
14
|
+
var Keys;
|
|
15
|
+
(function (Keys) {
|
|
16
|
+
/** boolean: Ta offers to keep a request asked again as a skill; default true. */
|
|
17
|
+
Keys.SUGGEST = 'suggest';
|
|
18
|
+
/** BriefSettings. */
|
|
19
|
+
Keys.BRIEF = 'brief';
|
|
20
|
+
/** The session file of the conversation of the briefs. */
|
|
21
|
+
Keys.BRIEF_FILE = 'briefFile';
|
|
22
|
+
/** `Date.now()` time of the last brief, or of the last check that found nothing to tell. */
|
|
23
|
+
Keys.BRIEF_LAST = 'briefLast';
|
|
24
|
+
/** The session files of the conversations that asked Ta from Quick open, newest last. */
|
|
25
|
+
Keys.ASKED = 'asked';
|
|
26
|
+
/** BriefSummary of the last brief written. */
|
|
27
|
+
Keys.BRIEF_SUMMARY = 'briefSummary';
|
|
28
|
+
/** The `at` of the brief the user saw last: the double's home no longer shows it. */
|
|
29
|
+
Keys.BRIEF_SEEN = 'briefSeen';
|
|
30
|
+
/** The session file of the conversation of the briefs the page pinned once: unpinned by the user, it stays so. */
|
|
31
|
+
Keys.BRIEF_PINNED = 'briefPinned';
|
|
32
|
+
/** BriefHandled: of the last brief only. */
|
|
33
|
+
Keys.BRIEF_HANDLED = 'briefHandled';
|
|
34
|
+
/** Record<card key, SkillDecision>. */
|
|
35
|
+
Keys.DECIDED = 'decided';
|
|
36
|
+
/** Requests the user did not want kept as a skill, newest last. */
|
|
37
|
+
Keys.DECLINED = 'declined';
|
|
38
|
+
})(Keys || (exports.Keys = Keys = {}));
|
|
39
|
+
var Limits;
|
|
40
|
+
(function (Limits) {
|
|
41
|
+
Limits.SEARCH_DAYS = 30;
|
|
42
|
+
Limits.SEARCH_HITS = 8;
|
|
43
|
+
Limits.SNIPPETS = 3;
|
|
44
|
+
Limits.SNIPPET_CHARS = 240;
|
|
45
|
+
/** Requests of other conversations compared with the one of now. */
|
|
46
|
+
Limits.SIMILAR_DAYS = 60;
|
|
47
|
+
/** The shortest request compared, in characters. */
|
|
48
|
+
Limits.SIMILAR_MIN_CHARS = 16;
|
|
49
|
+
/** The Dice coefficient of the pairs of characters from which two requests are alike. */
|
|
50
|
+
Limits.SIMILAR_SCORE = 0.5;
|
|
51
|
+
Limits.DECLINED_KEPT = 100;
|
|
52
|
+
Limits.ASKED_KEPT = 200;
|
|
53
|
+
/** The conversations a brief tells of at most. */
|
|
54
|
+
Limits.BRIEF_CONVERSATIONS = 30;
|
|
55
|
+
/** The lines of Waiting for you a BriefSummary keeps. */
|
|
56
|
+
Limits.BRIEF_ITEMS = 5;
|
|
57
|
+
/** A conversation that asked Ta from Quick open is archived once not updated for so many days (WebChatIcon.archiveDays). */
|
|
58
|
+
Limits.ASKED_ARCHIVE_DAYS = 7;
|
|
59
|
+
})(Limits || (exports.Limits = Limits = {}));
|
|
60
|
+
//# sourceMappingURL=recall-protocol.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { TaExtensionHost, TaPackageService, TaSessionInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import { type BriefNotice, type BriefRun } from './brief-util';
|
|
3
|
+
import { ConversationIndex } from './conversation-index';
|
|
4
|
+
import { type BriefSummary, type RecallService, type SearchHit, type SearchQuery, type SimilarAsk, type SkillDecision, type SkillDraft } from './recall-protocol';
|
|
5
|
+
/**
|
|
6
|
+
* The host of the package in the Ta service: one index of the conversations for the search, the requests asked
|
|
7
|
+
* again and the brief; the only writer of the skills the user keeps and of the data of the package.
|
|
8
|
+
*/
|
|
9
|
+
export declare class RecallHost implements RecallService, TaPackageService {
|
|
10
|
+
protected readonly host: TaExtensionHost;
|
|
11
|
+
protected readonly now: () => number;
|
|
12
|
+
readonly index: ConversationIndex;
|
|
13
|
+
protected queue: Promise<unknown>;
|
|
14
|
+
protected timers: ReturnType<typeof setTimeout>[];
|
|
15
|
+
protected briefing: Promise<string | undefined> | undefined;
|
|
16
|
+
constructor(host: TaExtensionHost, now?: () => number);
|
|
17
|
+
/** Reads the conversations once, so that the first search is quick, and checks the time of the brief from now on. */
|
|
18
|
+
start(): void;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
search(query: SearchQuery): Promise<SearchHit[]>;
|
|
21
|
+
similar(text: string, piSessionId?: string): Promise<SimilarAsk[]>;
|
|
22
|
+
saveSkill(key: string, draft: SkillDraft): Promise<string>;
|
|
23
|
+
declineSkill(key: string, ask?: string): Promise<void>;
|
|
24
|
+
keepAsked(file: string): Promise<void>;
|
|
25
|
+
keepBrief(file: string, text: string): Promise<BriefSummary | undefined>;
|
|
26
|
+
briefNow(): Promise<string | undefined>;
|
|
27
|
+
/** A brief when its time came. */
|
|
28
|
+
checkBrief(): Promise<void>;
|
|
29
|
+
/** One at a time: the material since the last one, given to Ta in the conversation of the briefs. */
|
|
30
|
+
protected brief(force: boolean): Promise<string | undefined>;
|
|
31
|
+
protected writeBrief(force: boolean): Promise<string | undefined>;
|
|
32
|
+
/** The conversation of the briefs: open, opened again from its file, or a new one named for it. */
|
|
33
|
+
protected briefSession(sessions: TaSessionInfo[], file: string | undefined): Promise<TaSessionInfo>;
|
|
34
|
+
/** The notices of ta-notify, when it is there. */
|
|
35
|
+
protected notices(): Promise<BriefNotice[]>;
|
|
36
|
+
/** The tasks of ta-cron that ran since, with the summary of their last run, when it is there. */
|
|
37
|
+
protected runs(since: number): Promise<BriefRun[]>;
|
|
38
|
+
protected decide(key: string, decision: SkillDecision): Promise<void>;
|
|
39
|
+
protected read(key: string): Promise<unknown>;
|
|
40
|
+
protected serial<T>(work: () => Promise<T>): Promise<T>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=recall-service.d.ts.map
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecallHost = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const promises_1 = require("node:fs/promises");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const brief_util_1 = require("./brief-util");
|
|
8
|
+
const conversation_index_1 = require("./conversation-index");
|
|
9
|
+
const recall_protocol_1 = require("./recall-protocol");
|
|
10
|
+
const search_util_1 = require("./search-util");
|
|
11
|
+
const server_texts_1 = require("./server-texts");
|
|
12
|
+
const skill_util_1 = require("./skill-util");
|
|
13
|
+
const NOTIFY = '@celljs/ta-notify';
|
|
14
|
+
const CRON = '@celljs/ta-cron';
|
|
15
|
+
/** How often the time of the brief is checked. */
|
|
16
|
+
const CHECK_MS = 60000;
|
|
17
|
+
/** The first check, once the service has started its sessions. */
|
|
18
|
+
const FIRST_CHECK_MS = 20000;
|
|
19
|
+
/**
|
|
20
|
+
* The host of the package in the Ta service: one index of the conversations for the search, the requests asked
|
|
21
|
+
* again and the brief; the only writer of the skills the user keeps and of the data of the package.
|
|
22
|
+
*/
|
|
23
|
+
class RecallHost {
|
|
24
|
+
constructor(host, now = Date.now) {
|
|
25
|
+
this.host = host;
|
|
26
|
+
this.now = now;
|
|
27
|
+
this.queue = Promise.resolve();
|
|
28
|
+
this.timers = [];
|
|
29
|
+
this.index = new conversation_index_1.ConversationIndex(host.agentDir);
|
|
30
|
+
}
|
|
31
|
+
/** Reads the conversations once, so that the first search is quick, and checks the time of the brief from now on. */
|
|
32
|
+
start() {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
void this.index.all().catch(() => undefined);
|
|
35
|
+
const first = setTimeout(() => void this.checkBrief(), FIRST_CHECK_MS);
|
|
36
|
+
const every = setInterval(() => void this.checkBrief(), CHECK_MS);
|
|
37
|
+
(_a = first.unref) === null || _a === void 0 ? void 0 : _a.call(first);
|
|
38
|
+
(_b = every.unref) === null || _b === void 0 ? void 0 : _b.call(every);
|
|
39
|
+
this.timers.push(first, every);
|
|
40
|
+
}
|
|
41
|
+
dispose() {
|
|
42
|
+
for (const timer of this.timers) {
|
|
43
|
+
clearTimeout(timer);
|
|
44
|
+
clearInterval(timer);
|
|
45
|
+
}
|
|
46
|
+
this.timers = [];
|
|
47
|
+
}
|
|
48
|
+
async search(query) {
|
|
49
|
+
if (typeof (query === null || query === void 0 ? void 0 : query.query) !== 'string') {
|
|
50
|
+
throw new Error('Say what to search for in query.');
|
|
51
|
+
}
|
|
52
|
+
const briefFile = await this.read(recall_protocol_1.Keys.BRIEF_FILE);
|
|
53
|
+
// The briefs tell again what other conversations say.
|
|
54
|
+
const conversations = (await this.index.all()).filter(conversation => conversation.file !== briefFile);
|
|
55
|
+
return search_util_1.SearchUtil.search(conversations, query, this.now());
|
|
56
|
+
}
|
|
57
|
+
async similar(text, piSessionId) {
|
|
58
|
+
if (typeof text !== 'string' || !search_util_1.SimilarUtil.comparable(text) || (await this.read(recall_protocol_1.Keys.SUGGEST)) === false) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
const session = piSessionId ? (await this.host.listSessions()).find(info => info.piSessionId === piSessionId) : undefined;
|
|
62
|
+
if (session === null || session === void 0 ? void 0 : session.group) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const [declined, briefFile] = await Promise.all([this.read(recall_protocol_1.Keys.DECLINED), this.read(recall_protocol_1.Keys.BRIEF_FILE)]);
|
|
66
|
+
return search_util_1.SimilarUtil.find(text, await this.index.all(), {
|
|
67
|
+
exclude: [session === null || session === void 0 ? void 0 : session.sessionFile, typeof briefFile === 'string' ? briefFile : undefined].filter((file) => !!file),
|
|
68
|
+
declined: strings(declined),
|
|
69
|
+
now: this.now(),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
saveSkill(key, draft) {
|
|
73
|
+
return this.serial(async () => {
|
|
74
|
+
const checked = skill_util_1.SkillUtil.check(draft);
|
|
75
|
+
const root = (0, node_path_1.join)(this.host.agentDir, 'skills');
|
|
76
|
+
let name = checked.name;
|
|
77
|
+
for (let count = 2; (0, node_fs_1.existsSync)((0, node_path_1.join)(root, name)); count++) {
|
|
78
|
+
name = `${checked.name.slice(0, 60)}-${count}`;
|
|
79
|
+
}
|
|
80
|
+
const file = (0, node_path_1.join)(root, name, 'SKILL.md');
|
|
81
|
+
await (0, promises_1.mkdir)((0, node_path_1.join)(root, name), { recursive: true });
|
|
82
|
+
await (0, promises_1.writeFile)(file, skill_util_1.SkillUtil.markdown({ ...checked, name }), 'utf8');
|
|
83
|
+
await this.decide(key, { saved: file, name });
|
|
84
|
+
return file;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
declineSkill(key, ask) {
|
|
88
|
+
return this.serial(async () => {
|
|
89
|
+
await this.decide(key, { declined: true });
|
|
90
|
+
if (typeof ask === 'string' && search_util_1.SimilarUtil.comparable(ask)) {
|
|
91
|
+
const declined = [...strings(await this.read(recall_protocol_1.Keys.DECLINED)), ask.slice(0, 1000)].slice(-recall_protocol_1.Limits.DECLINED_KEPT);
|
|
92
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.DECLINED, declined);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
keepAsked(file) {
|
|
97
|
+
return this.serial(async () => {
|
|
98
|
+
if (typeof file !== 'string' || !file) {
|
|
99
|
+
throw new Error('Say the session file of the conversation.');
|
|
100
|
+
}
|
|
101
|
+
const asked = strings(await this.read(recall_protocol_1.Keys.ASKED)).filter(item => item !== file);
|
|
102
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.ASKED, [...asked, file].slice(-recall_protocol_1.Limits.ASKED_KEPT));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
keepBrief(file, text) {
|
|
106
|
+
return this.serial(async () => {
|
|
107
|
+
const summary = typeof file === 'string' && typeof text === 'string' ? brief_util_1.BriefUtil.summary(text, file, this.now()) : undefined;
|
|
108
|
+
if (summary) {
|
|
109
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.BRIEF_SUMMARY, summary);
|
|
110
|
+
}
|
|
111
|
+
return summary;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
briefNow() {
|
|
115
|
+
return this.brief(true);
|
|
116
|
+
}
|
|
117
|
+
/** A brief when its time came. */
|
|
118
|
+
async checkBrief() {
|
|
119
|
+
try {
|
|
120
|
+
const [settings, last] = await Promise.all([this.read(recall_protocol_1.Keys.BRIEF), this.read(recall_protocol_1.Keys.BRIEF_LAST)]);
|
|
121
|
+
// The first time the package runs: the first brief at its time to come, not at once.
|
|
122
|
+
if (last === undefined) {
|
|
123
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.BRIEF_LAST, this.now());
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (brief_util_1.BriefUtil.due(brief_util_1.BriefUtil.settings(settings), typeof last === 'number' ? last : undefined, this.now())) {
|
|
127
|
+
await this.brief(false);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
console.error('ta-recall could not write the daily brief:', error);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/** One at a time: the material since the last one, given to Ta in the conversation of the briefs. */
|
|
135
|
+
brief(force) {
|
|
136
|
+
var _a;
|
|
137
|
+
(_a = this.briefing) !== null && _a !== void 0 ? _a : (this.briefing = this.writeBrief(force).finally(() => {
|
|
138
|
+
this.briefing = undefined;
|
|
139
|
+
}));
|
|
140
|
+
return this.briefing;
|
|
141
|
+
}
|
|
142
|
+
async writeBrief(force) {
|
|
143
|
+
var _a;
|
|
144
|
+
var _b;
|
|
145
|
+
const now = this.now();
|
|
146
|
+
const [last, file] = await Promise.all([this.read(recall_protocol_1.Keys.BRIEF_LAST), this.read(recall_protocol_1.Keys.BRIEF_FILE)]);
|
|
147
|
+
const briefFile = typeof file === 'string' && file ? file : undefined;
|
|
148
|
+
const since = brief_util_1.BriefUtil.since(typeof last === 'number' ? last : undefined, now);
|
|
149
|
+
const sessions = await this.host.listSessions();
|
|
150
|
+
const states = new Map(sessions.flatMap(info => (info.sessionFile ? [[info.sessionFile, { streaming: info.isStreaming, waiting: info.waiting }]] : [])));
|
|
151
|
+
const material = brief_util_1.BriefUtil.material({
|
|
152
|
+
since,
|
|
153
|
+
conversations: await this.index.all(),
|
|
154
|
+
briefFile,
|
|
155
|
+
notices: await this.notices(),
|
|
156
|
+
runs: await this.runs(since),
|
|
157
|
+
states,
|
|
158
|
+
});
|
|
159
|
+
if (!material) {
|
|
160
|
+
if (!force) {
|
|
161
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.BRIEF_LAST, now);
|
|
162
|
+
}
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
const session = await this.briefSession(sessions, briefFile);
|
|
166
|
+
await this.host.prompt(session.sessionId, {
|
|
167
|
+
message: brief_util_1.BriefUtil.message(material, since, server_texts_1.RecallServerTexts.zh()),
|
|
168
|
+
clientMessageId: `ta-recall-brief:${now}`,
|
|
169
|
+
streamingBehavior: 'followUp',
|
|
170
|
+
});
|
|
171
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.BRIEF_LAST, now);
|
|
172
|
+
const opened = (_b = session.sessionFile) !== null && _b !== void 0 ? _b : (_a = (await this.host.listSessions()).find(info => info.sessionId === session.sessionId)) === null || _a === void 0 ? void 0 : _a.sessionFile;
|
|
173
|
+
if (opened && opened !== briefFile) {
|
|
174
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.BRIEF_FILE, opened);
|
|
175
|
+
}
|
|
176
|
+
return opened;
|
|
177
|
+
}
|
|
178
|
+
/** The conversation of the briefs: open, opened again from its file, or a new one named for it. */
|
|
179
|
+
async briefSession(sessions, file) {
|
|
180
|
+
var _a;
|
|
181
|
+
const open = file ? sessions.find(info => info.sessionFile === file) : undefined;
|
|
182
|
+
if (open) {
|
|
183
|
+
return open;
|
|
184
|
+
}
|
|
185
|
+
const { cwd } = await this.host.getServerInfo();
|
|
186
|
+
if (file && (0, node_fs_1.existsSync)(file)) {
|
|
187
|
+
return this.host.openSession({ cwd: (_a = (await this.host.sessionCwd(file))) !== null && _a !== void 0 ? _a : cwd, sessionFile: file });
|
|
188
|
+
}
|
|
189
|
+
const created = await this.host.openSession({ cwd });
|
|
190
|
+
await this.host.setSessionName(created.sessionId, server_texts_1.RecallServerTexts.briefTitle());
|
|
191
|
+
return created;
|
|
192
|
+
}
|
|
193
|
+
/** The notices of ta-notify, when it is there. */
|
|
194
|
+
async notices() {
|
|
195
|
+
const value = await this.host.getExtensionData(NOTIFY, 'notices').catch(() => undefined);
|
|
196
|
+
return Array.isArray(value)
|
|
197
|
+
? value.filter((notice) => !!notice && typeof notice.at === 'number' && typeof notice.text === 'string')
|
|
198
|
+
: [];
|
|
199
|
+
}
|
|
200
|
+
/** The tasks of ta-cron that ran since, with the summary of their last run, when it is there. */
|
|
201
|
+
async runs(since) {
|
|
202
|
+
const tasks = await this.host.getExtensionData(CRON, 'tasks').catch(() => undefined);
|
|
203
|
+
if (!Array.isArray(tasks)) {
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
const ran = tasks.filter(task => { var _a; return task && typeof task.id === 'string' && Date.parse((_a = task.lastRunAt) !== null && _a !== void 0 ? _a : '') >= since; });
|
|
207
|
+
return Promise.all(ran.map(async (task) => {
|
|
208
|
+
var _a;
|
|
209
|
+
const runs = await this.host.getExtensionData(CRON, `runs/${task.id}`).catch(() => undefined);
|
|
210
|
+
const run = Array.isArray(runs) ? runs[0] : undefined;
|
|
211
|
+
return {
|
|
212
|
+
name: String((_a = task.name) !== null && _a !== void 0 ? _a : task.id),
|
|
213
|
+
at: Date.parse(task.lastRunAt),
|
|
214
|
+
status: typeof task.lastStatus === 'string' ? task.lastStatus : undefined,
|
|
215
|
+
summary: typeof (run === null || run === void 0 ? void 0 : run.summary) === 'string' ? run.summary : typeof (run === null || run === void 0 ? void 0 : run.error) === 'string' ? run.error : undefined,
|
|
216
|
+
};
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
async decide(key, decision) {
|
|
220
|
+
if (typeof key !== 'string' || !key) {
|
|
221
|
+
throw new Error('A card needs its key.');
|
|
222
|
+
}
|
|
223
|
+
const stored = await this.read(recall_protocol_1.Keys.DECIDED);
|
|
224
|
+
const decided = stored && typeof stored === 'object' ? { ...stored } : {};
|
|
225
|
+
decided[key] = decision;
|
|
226
|
+
await this.host.setExtensionData(recall_protocol_1.NAME, recall_protocol_1.Keys.DECIDED, decided);
|
|
227
|
+
}
|
|
228
|
+
read(key) {
|
|
229
|
+
return this.host.getExtensionData(recall_protocol_1.NAME, key).catch(() => undefined);
|
|
230
|
+
}
|
|
231
|
+
serial(work) {
|
|
232
|
+
const next = this.queue.then(work, work);
|
|
233
|
+
this.queue = next.catch(() => undefined);
|
|
234
|
+
return next;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.RecallHost = RecallHost;
|
|
238
|
+
function strings(value) {
|
|
239
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=recall-service.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WebExtensionAPI, WebSearchSource } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
/**
|
|
3
|
+
* Ask Ta, a section of the search of Quick open once something is typed: first a row that asks Ta in a new
|
|
4
|
+
* conversation, then the conversations that have every word, a tap opening one.
|
|
5
|
+
*/
|
|
6
|
+
export declare function recallSearch(pi: WebExtensionAPI): WebSearchSource;
|
|
7
|
+
//# sourceMappingURL=search-source.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recallSearch = recallSearch;
|
|
4
|
+
const conversations_1 = require("./conversations");
|
|
5
|
+
const i18n_1 = require("./i18n");
|
|
6
|
+
/** The days the box of Quick open looks back. */
|
|
7
|
+
const DAYS = 90;
|
|
8
|
+
const HITS = 6;
|
|
9
|
+
/**
|
|
10
|
+
* Ask Ta, a section of the search of Quick open once something is typed: first a row that asks Ta in a new
|
|
11
|
+
* conversation, then the conversations that have every word, a tap opening one.
|
|
12
|
+
*/
|
|
13
|
+
function recallSearch(pi) {
|
|
14
|
+
const words = () => i18n_1.RecallWords.of(pi.ui.language);
|
|
15
|
+
const notify = (error) => pi.ui.notify(i18n_1.RecallWords.format(words().failed, { message: error instanceof Error ? error.message : String(error) }), 'error');
|
|
16
|
+
return {
|
|
17
|
+
key: 'ta-recall',
|
|
18
|
+
title: () => words().searchTitle,
|
|
19
|
+
order: 40,
|
|
20
|
+
remote: true,
|
|
21
|
+
async search(query, offset) {
|
|
22
|
+
const text = query.trim();
|
|
23
|
+
if (!text || offset > 0) {
|
|
24
|
+
return { items: [] };
|
|
25
|
+
}
|
|
26
|
+
const ask = {
|
|
27
|
+
key: 'ask',
|
|
28
|
+
title: i18n_1.RecallWords.format(words().searchAsk, { query: text }),
|
|
29
|
+
detail: words().searchAskDetail,
|
|
30
|
+
icon: pi.ui.icons.Sparkles,
|
|
31
|
+
open: () => conversations_1.RecallConversations.ask(pi, text).catch(notify),
|
|
32
|
+
};
|
|
33
|
+
const hits = await pi.callHost('search', { query: text, all: true, days: DAYS, limit: HITS }).catch(() => []);
|
|
34
|
+
return {
|
|
35
|
+
items: [
|
|
36
|
+
ask,
|
|
37
|
+
...hits.map(hit => { var _a; return ({
|
|
38
|
+
key: hit.file,
|
|
39
|
+
title: hit.title || hit.file.split('/').pop() || hit.file,
|
|
40
|
+
detail: (_a = hit.snippets.at(-1)) === null || _a === void 0 ? void 0 : _a.text,
|
|
41
|
+
icon: pi.ui.icons.MessageSquareText,
|
|
42
|
+
open: () => conversations_1.RecallConversations.open(pi, hit.file).catch(notify),
|
|
43
|
+
}); }),
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=search-source.js.map
|