@celljs/ta 4.10.0 → 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 +1675 -51
- package/dist/gateway.mjs +167 -5
- package/dist/pi/CHANGELOG.md +23 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +166 -139
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- 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/package.json +1 -1
- package/dist/pi/packages/ta-bots/extension/index.mjs +31 -299
- package/dist/pi/packages/ta-bots/host/index.mjs +143 -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 +4 -3
- package/dist/pi/packages/ta-channels/README.md +4 -3
- package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
- package/dist/pi/packages/ta-channels/host/index.mjs +588 -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 +3 -1
- 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 +6 -0
- 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 +45 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +90 -0
- 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/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 +13 -2
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.js +132 -69
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +69 -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 +21 -16
- package/dist/pi/packages/ta-channels/lib/views.js +60 -31
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1507 -309
- package/dist/pi/packages/ta-computer-use/package.json +6 -1
- package/dist/pi/packages/ta-cron/README.en.md +4 -2
- package/dist/pi/packages/ta-cron/README.md +4 -2
- package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
- package/dist/pi/packages/ta-cron/host/index.mjs +24 -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 +5 -3
- 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 +18 -0
- package/dist/pi/packages/ta-cron/lib/i18n.js +36 -0
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +5 -1
- package/dist/pi/packages/ta-cron/lib/page.js +12 -0
- 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 +11 -13
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +20 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +6 -2
- 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 +661 -254
- package/dist/pi/packages/ta-extensions/README.en.md +1 -1
- package/dist/pi/packages/ta-extensions/README.md +1 -1
- 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 +13 -4
- 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/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 +12 -7
- 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/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +3 -2
- package/dist/pi/packages/ta-extensions/package.json +6 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +19 -8
- package/dist/pi/packages/ta-extensions/web/index.js +191 -22
- 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 +1 -1
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
- 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/editors.js +29 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +13 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.js +29 -7
- package/dist/pi/packages/ta-workspace/lib/index.js +2 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +10 -1
- package/dist/pi/packages/ta-workspace/lib/preview.js +136 -11
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +56 -40
- 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/preview.d.ts +27 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +74 -0
- 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 +823 -341
- package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-BmIko5tV.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-XgsdQ7ul.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW--sVhMS03.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-8f9b-9k2.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
- package/dist/public/assets/{browser-DOHZ0JCf.js → browser-WLpgVYno.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CwYQ0Jfy.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-7Y9ezehi.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CZIH4pWz.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-DsNATY2m.js → chunk-BG4553SI-D592E55X.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CoXkfYE-.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5OLqki8.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-DMHuYGEF.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BKeOttO1.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-D6zCwkk7.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-B5-QqcZg.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-DQrq3n0T.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-j6ZT7EDR.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-D5MXUO36.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DaBkw4dD.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-vXcRfGci.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-CIh6H4Y2.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-C_Vwv1FM.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-DccDWEJn.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-BX47lumZ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BE6WOGxW.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
- package/dist/public/assets/{d3-selection-ZcE6yRN5.js → d3-selection-CN9k6_B9.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-CE6SOOcN.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-xC8VtiYL.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-4dmcBbjL.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-D14Yn3sQ.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-GxSXIhsK.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-Cm7Prlpc.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-mkUnnKFu.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
- package/dist/public/assets/{dist-acJS-BlA.js → dist-DcBP8Cf6.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-m77ua3UQ.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
- package/dist/public/assets/{editor.api-CljTm-EQ.js → editor.api-Bz4sjRz_.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-DsQY1hw9.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-CV8gJM0P.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-C1pymbUr.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
- package/dist/public/assets/{freemarker2-DYJXaMHN.js → freemarker2-BLxfRHsw.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-CppxOWRh.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CrQrZhcP.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
- package/dist/public/assets/{handlebars-DZCnH9e2.js → handlebars-sNpu01kP.js} +1 -1
- package/dist/public/assets/{html-DuzouNES.js → html-C_tKd-uP.js} +1 -1
- package/dist/public/assets/{index-B7OYKvCE.js → index-Bn86rI4n.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-6pby19tQ.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Duf8c8rQ.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
- package/dist/public/assets/{javascript-2d_L6cVd.js → javascript-l3qKw0L-.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-Dvv-xzNo.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
- package/dist/public/assets/{jsonMode-CFadYXyI.js → jsonMode-5SQQn1EX.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-Dsk6F-TT.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
- package/dist/public/assets/{liquid-Din4CF34.js → liquid-BGyTIIUt.js} +1 -1
- package/dist/public/assets/{mdx-DivDuCWI.js → mdx-8tGjz4em.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BfCv4CYZ.js → mermaid-parser.core-CctN5b0z.js} +3 -3
- package/dist/public/assets/{mermaid.core-DC20ZwJj.js → mermaid.core-7ERSdZ4-.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DRZRrJU_.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-D1d6MOPe.js → monaco-B_9hlk78.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-DcGr3Tbk.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-GF7pu6ch.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
- package/dist/public/assets/{python-BQbTTTT5.js → python-e-JK0s5M.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-D-bcu7Ey.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-BiBHsI-K.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-zKjrfkHs.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-DKuVn0GT.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-Cyn-16mJ.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
- package/dist/public/assets/{razor-DiLk54O0.js → razor-DtSPwumi.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CwU2EBkW.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ajf00HyW.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DiX_OIAw.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-BGQKSlj7.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-DhQoApff.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-COQ1g-up.js → typescript-65jNyipU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CmLFzjie.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-DOa6JR5K.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BV7EEShp.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
- package/dist/public/assets/{xml-BbvtjuaG.js → xml-DWBejfu-.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-DtMpPbsq.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
- package/dist/public/assets/{yaml-Bw8NFga9.js → yaml-CwRCT7q1.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +5853 -2164
- package/package.json +32 -25
- package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +0 -1
- package/dist/public/assets/module-BAQaY56j.js +0 -1
- package/dist/public/assets/module-DxRGg3ED.js +0 -1947
- package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +0 -1
|
@@ -185,8 +185,64 @@ var TaPackageTextUtil;
|
|
|
185
185
|
var TaRelayServer = Symbol("TaRelayServer");
|
|
186
186
|
// ../ta-protocol/esm/common/remote-protocol.js
|
|
187
187
|
var TaRemoteServer = Symbol("TaRemoteServer");
|
|
188
|
+
// ../ta-protocol/esm/common/room-protocol.js
|
|
189
|
+
var TaRoomServer = Symbol("TaRoomServer");
|
|
190
|
+
var TaRoomWatchUtil;
|
|
191
|
+
(function(TaRoomWatchUtil2) {
|
|
192
|
+
function of(messages, state) {
|
|
193
|
+
const prefixes = Array.isArray(state) ? state.filter((prefix) => typeof prefix === "string" && prefix.length > 0) : [];
|
|
194
|
+
return { messages: messages !== false, state: [...new Set(prefixes)].sort() };
|
|
195
|
+
}
|
|
196
|
+
TaRoomWatchUtil2.of = of;
|
|
197
|
+
function union(watches) {
|
|
198
|
+
let messages = false;
|
|
199
|
+
const state = [];
|
|
200
|
+
for (const watch of watches) {
|
|
201
|
+
messages || (messages = watch.messages);
|
|
202
|
+
state.push(...watch.state);
|
|
203
|
+
}
|
|
204
|
+
return of(messages, messages ? [] : state);
|
|
205
|
+
}
|
|
206
|
+
TaRoomWatchUtil2.union = union;
|
|
207
|
+
function same(a, b) {
|
|
208
|
+
return a === b || !!a && !!b && a.messages === b.messages && a.state.join(`
|
|
209
|
+
`) === b.state.join(`
|
|
210
|
+
`);
|
|
211
|
+
}
|
|
212
|
+
TaRoomWatchUtil2.same = same;
|
|
213
|
+
function hears(watch, event) {
|
|
214
|
+
if (event.type === "message") {
|
|
215
|
+
return watch.messages;
|
|
216
|
+
}
|
|
217
|
+
if (event.type === "state") {
|
|
218
|
+
return watch.messages || watch.state.some((prefix) => event.key.startsWith(prefix));
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
TaRoomWatchUtil2.hears = hears;
|
|
223
|
+
})(TaRoomWatchUtil || (TaRoomWatchUtil = {}));
|
|
188
224
|
// ../ta-protocol/esm/common/settings-protocol.js
|
|
189
225
|
var TaSettingsServer = Symbol("TaSettingsServer");
|
|
226
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
227
|
+
var TA_HOST_EVENT = "ta:host";
|
|
228
|
+
var TaHostUtil;
|
|
229
|
+
(function(TaHostUtil2) {
|
|
230
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
231
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
232
|
+
return new Promise((resolve) => {
|
|
233
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
234
|
+
const request = {
|
|
235
|
+
name,
|
|
236
|
+
resolve: (answer) => {
|
|
237
|
+
clearTimeout(timer);
|
|
238
|
+
resolve(answer);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
events.emit(TA_HOST_EVENT, request);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
TaHostUtil2.reach = reach;
|
|
245
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
190
246
|
// ../ta-protocol/esm/common/ta-protocol.js
|
|
191
247
|
var TaServer = Symbol("TaServer");
|
|
192
248
|
var TaClient = Symbol("TaClient");
|
|
@@ -217,6 +273,15 @@ var TaErrorUtil;
|
|
|
217
273
|
}
|
|
218
274
|
TaErrorUtil2.code = code;
|
|
219
275
|
})(TaErrorUtil || (TaErrorUtil = {}));
|
|
276
|
+
var TaSlashCommandUtil;
|
|
277
|
+
(function(TaSlashCommandUtil2) {
|
|
278
|
+
function description(command, language) {
|
|
279
|
+
var _a, _b;
|
|
280
|
+
const { descriptions } = command;
|
|
281
|
+
return (_b = (_a = descriptions === null || descriptions === undefined ? undefined : descriptions[language]) !== null && _a !== undefined ? _a : descriptions === null || descriptions === undefined ? undefined : descriptions[language.split("-")[0]]) !== null && _b !== undefined ? _b : command.description;
|
|
282
|
+
}
|
|
283
|
+
TaSlashCommandUtil2.description = description;
|
|
284
|
+
})(TaSlashCommandUtil || (TaSlashCommandUtil = {}));
|
|
220
285
|
var TaMessageContext;
|
|
221
286
|
(function(TaMessageContext2) {
|
|
222
287
|
const BLOCK = /^<context>\n?[\s\S]*?\n?<\/context>\n?/;
|
|
@@ -247,6 +312,78 @@ var TaImageNote;
|
|
|
247
312
|
}
|
|
248
313
|
TaImageNote2.strip = strip;
|
|
249
314
|
})(TaImageNote || (TaImageNote = {}));
|
|
315
|
+
var TaImageSize;
|
|
316
|
+
(function(TaImageSize2) {
|
|
317
|
+
const JPEG_BYTES = 256 * 1024;
|
|
318
|
+
function of(base64) {
|
|
319
|
+
var _a, _b, _c;
|
|
320
|
+
let bytes;
|
|
321
|
+
try {
|
|
322
|
+
const binary = atob(base64.slice(0, Math.ceil(JPEG_BYTES * 4 / 3 / 4) * 4));
|
|
323
|
+
bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
324
|
+
} catch (_d) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
const size = (_c = (_b = (_a = png(bytes)) !== null && _a !== undefined ? _a : gif(bytes)) !== null && _b !== undefined ? _b : webp(bytes)) !== null && _c !== undefined ? _c : jpeg(bytes);
|
|
328
|
+
return size && size.width > 0 && size.height > 0 ? size : undefined;
|
|
329
|
+
}
|
|
330
|
+
TaImageSize2.of = of;
|
|
331
|
+
function u16be(bytes, at) {
|
|
332
|
+
return bytes[at] << 8 | bytes[at + 1];
|
|
333
|
+
}
|
|
334
|
+
function u16le(bytes, at) {
|
|
335
|
+
return bytes[at] | bytes[at + 1] << 8;
|
|
336
|
+
}
|
|
337
|
+
function u24le(bytes, at) {
|
|
338
|
+
return bytes[at] | bytes[at + 1] << 8 | bytes[at + 2] << 16;
|
|
339
|
+
}
|
|
340
|
+
function u32be(bytes, at) {
|
|
341
|
+
return (bytes[at] << 24 | bytes[at + 1] << 16 | bytes[at + 2] << 8 | bytes[at + 3]) >>> 0;
|
|
342
|
+
}
|
|
343
|
+
function text(bytes, at, length) {
|
|
344
|
+
return String.fromCharCode(...bytes.subarray(at, at + length));
|
|
345
|
+
}
|
|
346
|
+
function png(bytes) {
|
|
347
|
+
return bytes.length >= 24 && bytes[0] === 137 && text(bytes, 1, 3) === "PNG" ? { width: u32be(bytes, 16), height: u32be(bytes, 20) } : undefined;
|
|
348
|
+
}
|
|
349
|
+
function gif(bytes) {
|
|
350
|
+
return bytes.length >= 10 && text(bytes, 0, 3) === "GIF" ? { width: u16le(bytes, 6), height: u16le(bytes, 8) } : undefined;
|
|
351
|
+
}
|
|
352
|
+
function webp(bytes) {
|
|
353
|
+
if (bytes.length < 30 || text(bytes, 0, 4) !== "RIFF" || text(bytes, 8, 4) !== "WEBP") {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
switch (text(bytes, 12, 4)) {
|
|
357
|
+
case "VP8 ":
|
|
358
|
+
return { width: u16le(bytes, 26) & 16383, height: u16le(bytes, 28) & 16383 };
|
|
359
|
+
case "VP8L": {
|
|
360
|
+
const bits = bytes[21] | bytes[22] << 8 | bytes[23] << 16 | bytes[24] << 24;
|
|
361
|
+
return { width: (bits & 16383) + 1, height: (bits >> 14 & 16383) + 1 };
|
|
362
|
+
}
|
|
363
|
+
case "VP8X":
|
|
364
|
+
return { width: u24le(bytes, 24) + 1, height: u24le(bytes, 27) + 1 };
|
|
365
|
+
default:
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function jpeg(bytes) {
|
|
370
|
+
if (bytes[0] !== 255 || bytes[1] !== 216) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
let at = 2;
|
|
374
|
+
while (at + 9 < bytes.length) {
|
|
375
|
+
if (bytes[at] !== 255) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const marker = bytes[at + 1];
|
|
379
|
+
if (marker >= 192 && marker <= 207 && marker !== 196 && marker !== 200 && marker !== 204) {
|
|
380
|
+
return { width: u16be(bytes, at + 7), height: u16be(bytes, at + 5) };
|
|
381
|
+
}
|
|
382
|
+
at += 2 + u16be(bytes, at + 2);
|
|
383
|
+
}
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
})(TaImageSize || (TaImageSize = {}));
|
|
250
387
|
var TaAgentSummary;
|
|
251
388
|
(function(TaAgentSummary2) {
|
|
252
389
|
const START = /^\s*<conversation_history_summary>/;
|
|
@@ -296,6 +433,91 @@ var TaExcludedFiles;
|
|
|
296
433
|
TaExcludedFiles2.filter = filter;
|
|
297
434
|
})(TaExcludedFiles || (TaExcludedFiles = {}));
|
|
298
435
|
var TA_UPLOAD_PART_BYTES = 4 * 1024 * 1024;
|
|
436
|
+
// ../ta-protocol/esm/common/redactor.js
|
|
437
|
+
var REDACTED = "[redacted]";
|
|
438
|
+
var WHOLE = [
|
|
439
|
+
/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,
|
|
440
|
+
/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{20,}/g,
|
|
441
|
+
/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,
|
|
442
|
+
/\bgithub_pat_[A-Za-z0-9_]{40,}\b/g,
|
|
443
|
+
/\bglpat-[A-Za-z0-9_-]{20,}\b/g,
|
|
444
|
+
/\bxox[abprs]-[A-Za-z0-9-]{10,}\b/g,
|
|
445
|
+
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
|
|
446
|
+
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
447
|
+
/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/g
|
|
448
|
+
];
|
|
449
|
+
var NAMED = [
|
|
450
|
+
/(\bBearer\s+)[A-Za-z0-9._~+/-]{16,}=*/gi,
|
|
451
|
+
/(\b[A-Za-z0-9_.-]*(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key|private[_-]?key)[A-Za-z0-9_.-]*["']?\s*[:=]\s*["']?)([^\s"'`,;]{6,})/gi,
|
|
452
|
+
/(:\/\/[^\s:/@]+:)([^\s@/]{3,})(@)/g
|
|
453
|
+
];
|
|
454
|
+
|
|
455
|
+
class Redactor {
|
|
456
|
+
constructor() {
|
|
457
|
+
this.count = 0;
|
|
458
|
+
}
|
|
459
|
+
text(text) {
|
|
460
|
+
let out = text;
|
|
461
|
+
for (const pattern of WHOLE) {
|
|
462
|
+
out = out.replace(pattern, () => this.hide());
|
|
463
|
+
}
|
|
464
|
+
out = out.replace(NAMED[0], (_match, before) => before + this.hide());
|
|
465
|
+
out = out.replace(NAMED[1], (match, before, value) => Redactor.placeholder(value) ? match : before + this.hide());
|
|
466
|
+
out = out.replace(NAMED[2], (_match, before, _value, after) => before + this.hide() + after);
|
|
467
|
+
return out;
|
|
468
|
+
}
|
|
469
|
+
value(value, max) {
|
|
470
|
+
if (typeof value === "string") {
|
|
471
|
+
return Redactor.cut(this.text(value), max);
|
|
472
|
+
}
|
|
473
|
+
if (Array.isArray(value)) {
|
|
474
|
+
return value.map((item) => this.value(item, max));
|
|
475
|
+
}
|
|
476
|
+
if (value && typeof value === "object") {
|
|
477
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, this.value(item, max)]));
|
|
478
|
+
}
|
|
479
|
+
return value;
|
|
480
|
+
}
|
|
481
|
+
static cut(text, max) {
|
|
482
|
+
return text.length > max ? `${text.slice(0, max)}…` : text;
|
|
483
|
+
}
|
|
484
|
+
hide() {
|
|
485
|
+
this.count++;
|
|
486
|
+
return REDACTED;
|
|
487
|
+
}
|
|
488
|
+
static placeholder(value) {
|
|
489
|
+
return /^(?:\$|<|\{|\[redacted|process\.env|os\.environ|xxx|\*{3})/i.test(value) || /^(?:true|false|null|undefined|none|string|number)$/i.test(value);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// ../ta-relay/esm/common/relay-card.js
|
|
494
|
+
var RELAY_AGENT_KIND = "ta-agent";
|
|
495
|
+
var RelayAgentCards;
|
|
496
|
+
(function(RelayAgentCards2) {
|
|
497
|
+
const MAX_ROLE = 8000;
|
|
498
|
+
function parse(data) {
|
|
499
|
+
try {
|
|
500
|
+
const card = JSON.parse(typeof data === "string" ? data : new TextDecoder().decode(data));
|
|
501
|
+
if ((card === null || card === undefined ? undefined : card.v) !== 1 || typeof card.name !== "string" || !card.name.trim() || typeof card.role !== "string" || !card.role.trim()) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
const color = typeof card.color === "string" && /^#[0-9a-fA-F]{6}$/.test(card.color) ? card.color : undefined;
|
|
505
|
+
return {
|
|
506
|
+
v: 1,
|
|
507
|
+
name: card.name.trim().slice(0, 32),
|
|
508
|
+
role: card.role.trim().slice(0, MAX_ROLE),
|
|
509
|
+
mark: typeof card.mark === "string" && card.mark.trim() ? card.mark.trim().slice(0, 2) : card.name.trim().slice(0, 1).toUpperCase(),
|
|
510
|
+
...Number.isInteger(card.face) ? { face: card.face } : {},
|
|
511
|
+
...color ? { color } : {},
|
|
512
|
+
...typeof card.redacted === "number" && card.redacted > 0 ? { redacted: card.redacted } : {}
|
|
513
|
+
};
|
|
514
|
+
} catch (_a) {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
RelayAgentCards2.parse = parse;
|
|
519
|
+
})(RelayAgentCards || (RelayAgentCards = {}));
|
|
520
|
+
|
|
299
521
|
// web-src/channels-model.ts
|
|
300
522
|
var NAME = "@celljs/ta-channels";
|
|
301
523
|
var AGENT_MARK = "one of the agents of Ta";
|
|
@@ -306,12 +528,10 @@ var Keys;
|
|
|
306
528
|
Keys.QUEUE = "queue";
|
|
307
529
|
Keys.WORKING = "working";
|
|
308
530
|
Keys.FOCUS = "focus";
|
|
309
|
-
Keys.
|
|
310
|
-
Keys.
|
|
531
|
+
Keys.ANSWERED = "answered";
|
|
532
|
+
Keys.CARDS = "cards";
|
|
311
533
|
Keys.MESSAGES = "messages/";
|
|
312
534
|
Keys.messages = (channelId) => `${Keys.MESSAGES}${channelId}`;
|
|
313
|
-
Keys.request = (id) => `${Keys.REQUESTS}${id}`;
|
|
314
|
-
Keys.result = (id) => `${Keys.RESULTS}${id}`;
|
|
315
535
|
})(Keys ||= {});
|
|
316
536
|
var USER = "user";
|
|
317
537
|
var TA = "ta";
|
|
@@ -325,6 +545,9 @@ var FACES = 16;
|
|
|
325
545
|
var MAX_MEMBERS = 12;
|
|
326
546
|
var CONTEXT_MESSAGES = 12;
|
|
327
547
|
var MAX_NAME = 32;
|
|
548
|
+
var MAX_NOTICE = 2000;
|
|
549
|
+
var NOTICE_HEADINGS = { zh: ["决定", "约定", "待办"], en: ["Decisions", "Conventions", "To do"] };
|
|
550
|
+
var CARD_DAYS = 30;
|
|
328
551
|
|
|
329
552
|
// web-src/channels-util.ts
|
|
330
553
|
var ChannelsUtil;
|
|
@@ -581,8 +804,8 @@ var ChannelsUtil;
|
|
|
581
804
|
return team.channels.filter((channel) => channel.by !== "ta");
|
|
582
805
|
}
|
|
583
806
|
ChannelsUtil.ownChannels = ownChannels;
|
|
584
|
-
function pinnedFirst(
|
|
585
|
-
return [...
|
|
807
|
+
function pinnedFirst(items) {
|
|
808
|
+
return [...items.filter((item) => item.pinned), ...items.filter((item) => !item.pinned)];
|
|
586
809
|
}
|
|
587
810
|
ChannelsUtil.pinnedFirst = pinnedFirst;
|
|
588
811
|
function removeChannel(team, ref) {
|
|
@@ -630,6 +853,11 @@ var ChannelsUtil;
|
|
|
630
853
|
if (input.keep === true) {
|
|
631
854
|
delete agent.temporary;
|
|
632
855
|
}
|
|
856
|
+
if (input.pinned === true) {
|
|
857
|
+
agent.pinned = true;
|
|
858
|
+
} else if (input.pinned !== undefined) {
|
|
859
|
+
delete agent.pinned;
|
|
860
|
+
}
|
|
633
861
|
if (input.cwd !== undefined) {
|
|
634
862
|
const cwd = typeof input.cwd === "string" && input.cwd.trim() ? input.cwd.trim() : undefined;
|
|
635
863
|
if (cwd !== before.cwd) {
|
|
@@ -740,16 +968,39 @@ var ChannelsUtil;
|
|
|
740
968
|
`You are ${agent.name}, ${AGENT_MARK}. Your role: ${agent.role}`,
|
|
741
969
|
"You work with the user, Ta and other agents in channels. A message for you starts with a <context> block: the channel, its members, the recent messages and who speaks to you; answer what follows the block.",
|
|
742
970
|
"Do the part of the work your role covers with your tools, then answer in a few sentences: your answer is posted to the channel as it is.",
|
|
743
|
-
"To hand work to another member, write @ and their name in your answer; name nobody when the work is done or you need the user."
|
|
971
|
+
"To hand work to another member, write @ and their name in your answer; name nobody when the work is done or you need the user.",
|
|
972
|
+
NOTICE_RULE
|
|
744
973
|
].join(`
|
|
745
974
|
`);
|
|
746
975
|
}
|
|
747
976
|
ChannelsUtil.systemPrompt = systemPrompt;
|
|
977
|
+
function setNotice(team, input) {
|
|
978
|
+
const before = channelOf(team, input.channel);
|
|
979
|
+
const text = typeof input.text === "string" ? input.text.replace(/\r\n/g, `
|
|
980
|
+
`).trim() : "";
|
|
981
|
+
if (text.length > MAX_NOTICE) {
|
|
982
|
+
throw new Error(`The notice is too long (${text.length} characters, ${MAX_NOTICE} at most): keep it short, and drop to-dos done long ago.`);
|
|
983
|
+
}
|
|
984
|
+
if (text === (before.notice?.text ?? "")) {
|
|
985
|
+
return { team, channel: before, before, changed: false };
|
|
986
|
+
}
|
|
987
|
+
const channel = { ...before };
|
|
988
|
+
if (text) {
|
|
989
|
+
channel.notice = { text, at: input.at ?? Date.now(), by: input.by };
|
|
990
|
+
} else {
|
|
991
|
+
delete channel.notice;
|
|
992
|
+
}
|
|
993
|
+
return { team: { ...team, channels: team.channels.map((other) => other.id === channel.id ? channel : other) }, channel, before, changed: true };
|
|
994
|
+
}
|
|
995
|
+
ChannelsUtil.setNotice = setNotice;
|
|
748
996
|
function prompt(team, channel, history, message, agent) {
|
|
749
997
|
const labels = { user: "user", ta: "Ta" };
|
|
750
998
|
const members = channel.members.map((id) => team.agents.find((other) => other.id === id)).filter((other) => !!other).map((other) => `@${other.name}${other.id === agent.id ? " (you)" : ""}: ${firstLine(other.role)}`);
|
|
751
|
-
const before = history.filter((item) => item.id !== message.id && !item.failed).slice(-CONTEXT_MESSAGES);
|
|
999
|
+
const before = history.filter((item) => item.id !== message.id && !item.failed && !item.notice).slice(-CONTEXT_MESSAGES);
|
|
752
1000
|
const lines = [`[#${channel.name}]${channel.topic ? ` ${channel.topic}` : ""}`, "Members:", ...members.map((line) => `- ${line}`)];
|
|
1001
|
+
if (channel.notice) {
|
|
1002
|
+
lines.push("", "Notice of the channel (follow it; keep it with update_channel_notice):", channel.notice.text);
|
|
1003
|
+
}
|
|
753
1004
|
if (before.length > 0) {
|
|
754
1005
|
lines.push("", "Recent messages:", ...before.map((item) => `${authorName(team, item.author, labels)}: ${item.text}`));
|
|
755
1006
|
}
|
|
@@ -772,7 +1023,8 @@ ${message.text}`;
|
|
|
772
1023
|
}
|
|
773
1024
|
const name = (id) => team.agents.find((agent) => agent.id === id)?.name ?? id;
|
|
774
1025
|
const agents = team.agents.map((agent) => `- @${agent.name}: ${firstLine(agent.role)}`);
|
|
775
|
-
const channels = team.channels.map((channel) => `- #${channel.name}${channel.topic ? ` (${channel.topic})` : ""}: ${channel.members.map((id) => `@${name(id)}`).join(", ")}${channel.muted?.length ? `; muted by the user, answering nothing: ${channel.muted.map((id) => `@${name(id)}`).join(", ")}` : ""}`
|
|
1026
|
+
const channels = team.channels.map((channel) => `- #${channel.name}${channel.topic ? ` (${channel.topic})` : ""}: ${channel.members.map((id) => `@${name(id)}`).join(", ")}${channel.muted?.length ? `; muted by the user, answering nothing: ${channel.muted.map((id) => `@${name(id)}`).join(", ")}` : ""}${channel.notice ? `
|
|
1027
|
+
notice: ${channel.notice.text.replace(/\s+/g, " ").slice(0, 300)}` : ""}`);
|
|
776
1028
|
return ["Agents:", ...agents, "", "Channels:", ...channels.length > 0 ? channels : ["none yet"]].join(`
|
|
777
1029
|
`);
|
|
778
1030
|
}
|
|
@@ -822,6 +1074,206 @@ ${message.text}`;
|
|
|
822
1074
|
`)[0];
|
|
823
1075
|
}
|
|
824
1076
|
})(ChannelsUtil ||= {});
|
|
1077
|
+
var NOTICE_RULE = [
|
|
1078
|
+
"A channel may have a notice, in the <context> block: what its members decided, agreed and are to do. Follow it.",
|
|
1079
|
+
`When the talk settles a decision or a convention, or adds, assigns or finishes a to-do, update it with update_channel_notice: the whole notice, short, under the headings ### ${NOTICE_HEADINGS.zh.join(" / ")} (### ${NOTICE_HEADINGS.en.join(" / ")} in English), in the language of the channel, to-dos as - [ ] or - [x] with who does them. The lead keeps it most; leave it for small talk.`
|
|
1080
|
+
].join(`
|
|
1081
|
+
`);
|
|
1082
|
+
var NoticeUtil;
|
|
1083
|
+
((NoticeUtil) => {
|
|
1084
|
+
const PARTS = {
|
|
1085
|
+
决定: "decisions",
|
|
1086
|
+
decisions: "decisions",
|
|
1087
|
+
约定: "conventions",
|
|
1088
|
+
conventions: "conventions",
|
|
1089
|
+
待办: "todo",
|
|
1090
|
+
"to do": "todo",
|
|
1091
|
+
todo: "todo",
|
|
1092
|
+
"to-do": "todo"
|
|
1093
|
+
};
|
|
1094
|
+
function counts(text) {
|
|
1095
|
+
const counts2 = { decisions: 0, conventions: 0, todo: 0, done: 0 };
|
|
1096
|
+
let part;
|
|
1097
|
+
for (const line of text.split(/\r?\n/)) {
|
|
1098
|
+
const heading = /^\s*#{1,6}\s+(.+?)\s*#*\s*$/.exec(line) ?? /^\s*\*\*(.+?)\*\*\s*[::]?\s*$/.exec(line);
|
|
1099
|
+
if (heading) {
|
|
1100
|
+
part = PARTS[heading[1].replace(/[::]$/, "").trim().toLowerCase()];
|
|
1101
|
+
continue;
|
|
1102
|
+
}
|
|
1103
|
+
const item = /^\s*(?:[-*+]|\d+[.)])\s+(\[( |x|X)\]\s+)?\S/.exec(line);
|
|
1104
|
+
if (!part || !item) {
|
|
1105
|
+
continue;
|
|
1106
|
+
}
|
|
1107
|
+
if (part === "todo" && item[2] && item[2] !== " ") {
|
|
1108
|
+
counts2.done++;
|
|
1109
|
+
} else {
|
|
1110
|
+
counts2[part]++;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
return counts2;
|
|
1114
|
+
}
|
|
1115
|
+
NoticeUtil.counts = counts;
|
|
1116
|
+
function firstLine(text) {
|
|
1117
|
+
for (const line of text.split(/\r?\n/)) {
|
|
1118
|
+
const item = /^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?(.+)$/.exec(line);
|
|
1119
|
+
if (item) {
|
|
1120
|
+
return item[1].replace(/[*_`~]+/g, "").trim();
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
return text.split(/\r?\n/).find((line) => line.trim() && !/^\s*#/.test(line))?.trim() ?? "";
|
|
1124
|
+
}
|
|
1125
|
+
NoticeUtil.firstLine = firstLine;
|
|
1126
|
+
})(NoticeUtil ||= {});
|
|
1127
|
+
|
|
1128
|
+
// web-src/agent-cards.ts
|
|
1129
|
+
var AgentCards;
|
|
1130
|
+
((AgentCards) => {
|
|
1131
|
+
AgentCards.KIND = RELAY_AGENT_KIND;
|
|
1132
|
+
AgentCards.MARK = "[ta-channels:card]";
|
|
1133
|
+
function card(agent, color) {
|
|
1134
|
+
const redactor = new Redactor;
|
|
1135
|
+
const role = redactor.text(agent.role);
|
|
1136
|
+
return {
|
|
1137
|
+
v: 1,
|
|
1138
|
+
name: agent.name,
|
|
1139
|
+
role,
|
|
1140
|
+
mark: agent.mark,
|
|
1141
|
+
...agent.face !== undefined ? { face: agent.face } : {},
|
|
1142
|
+
...color && /^#[0-9a-fA-F]{6}$/.test(color) ? { color } : {},
|
|
1143
|
+
...redactor.count ? { redacted: redactor.count } : {}
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
AgentCards.card = card;
|
|
1147
|
+
function parse(data) {
|
|
1148
|
+
return RelayAgentCards.parse(data);
|
|
1149
|
+
}
|
|
1150
|
+
AgentCards.parse = parse;
|
|
1151
|
+
function freeName(team, name) {
|
|
1152
|
+
const base = (name.trim().replace(/\s+/g, "-") || "agent").slice(0, MAX_NAME - 3);
|
|
1153
|
+
if (!ChannelsUtil.findAgent(team, base)) {
|
|
1154
|
+
return base;
|
|
1155
|
+
}
|
|
1156
|
+
for (let n = 2;; n++) {
|
|
1157
|
+
if (!ChannelsUtil.findAgent(team, `${base}-${n}`)) {
|
|
1158
|
+
return `${base}-${n}`;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
AgentCards.freeName = freeName;
|
|
1163
|
+
function adapt(cwd, zh) {
|
|
1164
|
+
const context = [
|
|
1165
|
+
AgentCards.MARK,
|
|
1166
|
+
`You were just added to this Ta from a card someone shared: the role in your instructions is theirs, written for their own work. Fit it to the project of your directory (${cwd}): look at it first (its README, manifests such as package.json, its layout, how it builds and tests), then rewrite your role for it, keeping what you are for, and save it with update_my_role. Then tell the user in a few sentences, in ${zh ? "Chinese" : "English"}, what you changed and what you can do here. Change no files.`
|
|
1167
|
+
].join(`
|
|
1168
|
+
`);
|
|
1169
|
+
return `<context>
|
|
1170
|
+
${context}
|
|
1171
|
+
</context>
|
|
1172
|
+
${zh ? "看看这个项目,把你的职责调整得贴合这里" : "Look at this project and fit your role to it"}`;
|
|
1173
|
+
}
|
|
1174
|
+
AgentCards.adapt = adapt;
|
|
1175
|
+
})(AgentCards ||= {});
|
|
1176
|
+
|
|
1177
|
+
// web-src/handoff.ts
|
|
1178
|
+
var HandOff;
|
|
1179
|
+
((HandOff) => {
|
|
1180
|
+
HandOff.TOOL = "hand_off";
|
|
1181
|
+
HandOff.CARD = "ta-channels-handoff";
|
|
1182
|
+
HandOff.BLOCK = "ta-handoff";
|
|
1183
|
+
const MARK = /\[ta-handoff:([^\]\s]+)\]/;
|
|
1184
|
+
HandOff.DEFINITION = {
|
|
1185
|
+
name: HandOff.TOOL,
|
|
1186
|
+
label: "Hand off",
|
|
1187
|
+
description: "Hands the work of this conversation over to one of the user's agents (@name) or channels (#name), when the user says so (hand it to, give it to, 交给, 转给). The other side does not see this conversation: write the brief it needs to go on, in the user's language: the goal, what is done and decided, what is left or blocks, the files, branches, commands and links that matter. It works on it in its own conversation, which the user follows; you stop working on it here. list_channels lists the team. After the call, say in one line to whom it went.",
|
|
1188
|
+
promptSnippet: "Hand the work over to one of the user's agents or channels",
|
|
1189
|
+
parameters: {
|
|
1190
|
+
type: "object",
|
|
1191
|
+
properties: {
|
|
1192
|
+
to: { type: "string", description: "@name of an agent or #name of a channel." },
|
|
1193
|
+
brief: { type: "string", description: "Complete in itself: the receiver sees only this." }
|
|
1194
|
+
},
|
|
1195
|
+
required: ["to", "brief"]
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
function ref(target) {
|
|
1199
|
+
return `${target.kind === "agent" ? "@" : "#"}${target.name}`;
|
|
1200
|
+
}
|
|
1201
|
+
HandOff.ref = ref;
|
|
1202
|
+
function ask(language, to) {
|
|
1203
|
+
const fence = "```";
|
|
1204
|
+
const context = [
|
|
1205
|
+
`[ta-handoff:${to}]`,
|
|
1206
|
+
`The user hands the work of this conversation over to ${to}, which does not see this conversation.`,
|
|
1207
|
+
`- Write the brief it needs to go on: the goal, what is done and decided, what is left or blocks, the files, branches, commands and links that matter, in the user's language. Leave out what was only tried and dropped.`,
|
|
1208
|
+
`- With the tool ${HandOff.TOOL}, call it with to "${to}" and the brief, then say in one line that it went.`,
|
|
1209
|
+
`- Without it, say in one line what you hand over, then end your answer with the brief in a fenced block of the language ${HandOff.BLOCK}, which Ta reads to hand it over (a longer fence when the brief has one of its own):`,
|
|
1210
|
+
`${fence}${HandOff.BLOCK}`,
|
|
1211
|
+
"<the brief>",
|
|
1212
|
+
fence,
|
|
1213
|
+
`- When the conversation holds nothing to hand over yet, say so and ask what ${to} should do.`
|
|
1214
|
+
].join(`
|
|
1215
|
+
`);
|
|
1216
|
+
const line = language === "zh-CN" ? `把这件事交给 ${to}` : `Hand this over to ${to}`;
|
|
1217
|
+
return `<context>
|
|
1218
|
+
${context}
|
|
1219
|
+
</context>
|
|
1220
|
+
${line}`;
|
|
1221
|
+
}
|
|
1222
|
+
HandOff.ask = ask;
|
|
1223
|
+
function asked(text) {
|
|
1224
|
+
return MARK.exec(text)?.[1];
|
|
1225
|
+
}
|
|
1226
|
+
HandOff.asked = asked;
|
|
1227
|
+
function find(text) {
|
|
1228
|
+
const lines = text.split(/\r?\n/);
|
|
1229
|
+
let found;
|
|
1230
|
+
for (let index = 0;index < lines.length; index++) {
|
|
1231
|
+
const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
|
|
1232
|
+
if (open?.[2] !== HandOff.BLOCK) {
|
|
1233
|
+
continue;
|
|
1234
|
+
}
|
|
1235
|
+
const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
|
|
1236
|
+
const end = lines.findIndex((line, at) => at > index && close.test(line));
|
|
1237
|
+
found = lines.slice(index + 1, end < 0 ? lines.length : end);
|
|
1238
|
+
index = end < 0 ? lines.length : end;
|
|
1239
|
+
}
|
|
1240
|
+
const brief = found?.join(`
|
|
1241
|
+
`).trim();
|
|
1242
|
+
return brief || undefined;
|
|
1243
|
+
}
|
|
1244
|
+
HandOff.find = find;
|
|
1245
|
+
function message(origin, brief, language) {
|
|
1246
|
+
const title = origin.title?.trim() || (language === "zh-CN" ? "一个对话" : "a conversation");
|
|
1247
|
+
const head = language === "zh-CN" ? `(交接自“${title}”)` : `(Handed over from “${title}”)`;
|
|
1248
|
+
const context = [
|
|
1249
|
+
"The user handed you this work from another conversation of theirs, which you do not see; the brief below is all it says. Go on from there in this conversation, which the user follows; ask them when the brief leaves out something you need.",
|
|
1250
|
+
origin.sessionFile ? `That conversation is pi's session file ${origin.sessionFile}${origin.cwd ? `, working in ${origin.cwd}` : ""}: read it only when the brief is not enough.` : ""
|
|
1251
|
+
].filter(Boolean).join(`
|
|
1252
|
+
`);
|
|
1253
|
+
return `<context>
|
|
1254
|
+
${context}
|
|
1255
|
+
</context>
|
|
1256
|
+
${head}
|
|
1257
|
+
|
|
1258
|
+
${brief.trim()}`;
|
|
1259
|
+
}
|
|
1260
|
+
HandOff.message = message;
|
|
1261
|
+
function channelText(origin, brief, language) {
|
|
1262
|
+
const title = origin.title?.trim() || (language === "zh-CN" ? "一个对话" : "a conversation");
|
|
1263
|
+
return `${language === "zh-CN" ? `(交接自“${title}”)` : `(Handed over from “${title}”)`}
|
|
1264
|
+
|
|
1265
|
+
${brief.trim()}`;
|
|
1266
|
+
}
|
|
1267
|
+
HandOff.channelText = channelText;
|
|
1268
|
+
function serverLanguage(env = typeof process === "undefined" ? {} : process.env) {
|
|
1269
|
+
return /^zh/i.test(env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG || "") ? "zh-CN" : "en";
|
|
1270
|
+
}
|
|
1271
|
+
HandOff.serverLanguage = serverLanguage;
|
|
1272
|
+
function result(target) {
|
|
1273
|
+
return `Handed over to ${ref(target)}; it works on it in its own conversation, which the user follows. Do not go on with it here.`;
|
|
1274
|
+
}
|
|
1275
|
+
HandOff.result = result;
|
|
1276
|
+
})(HandOff ||= {});
|
|
825
1277
|
|
|
826
1278
|
// web-src/team.ts
|
|
827
1279
|
class TeamService {
|
|
@@ -829,20 +1281,19 @@ class TeamService {
|
|
|
829
1281
|
team = ChannelsUtil.emptyTeam();
|
|
830
1282
|
queue = { jobs: [], rounds: {} };
|
|
831
1283
|
working = {};
|
|
1284
|
+
answered;
|
|
832
1285
|
messages = new Map;
|
|
833
1286
|
reading = new Map;
|
|
834
1287
|
agents = new Map;
|
|
835
1288
|
started = new Set;
|
|
836
1289
|
waiting = new Map;
|
|
837
|
-
handling = new Set;
|
|
838
1290
|
opening = new Map;
|
|
839
1291
|
settling = new Set;
|
|
840
1292
|
options;
|
|
841
1293
|
disposed = false;
|
|
842
|
-
unlisten;
|
|
843
1294
|
constructor(host, options = {}) {
|
|
844
1295
|
this.host = host;
|
|
845
|
-
this.options = { pollMs: 300, timeoutMs: 15 * 60 * 1000,
|
|
1296
|
+
this.options = { pollMs: 300, timeoutMs: 15 * 60 * 1000, ...options };
|
|
846
1297
|
}
|
|
847
1298
|
get state() {
|
|
848
1299
|
return this.team;
|
|
@@ -852,11 +1303,6 @@ class TeamService {
|
|
|
852
1303
|
await this.pinDirectories();
|
|
853
1304
|
this.queue = await this.get(Keys.QUEUE) ?? { jobs: [], rounds: {} };
|
|
854
1305
|
await this.set(Keys.WORKING, null);
|
|
855
|
-
this.unlisten = this.host.onExtensionData((name, key) => {
|
|
856
|
-
if (name === NAME && key.startsWith(Keys.REQUESTS)) {
|
|
857
|
-
this.request(key.slice(Keys.REQUESTS.length));
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
1306
|
for (const job of this.queue.jobs) {
|
|
861
1307
|
this.run(job);
|
|
862
1308
|
}
|
|
@@ -866,7 +1312,6 @@ class TeamService {
|
|
|
866
1312
|
}
|
|
867
1313
|
dispose() {
|
|
868
1314
|
this.disposed = true;
|
|
869
|
-
this.unlisten?.();
|
|
870
1315
|
}
|
|
871
1316
|
async createAgent(input) {
|
|
872
1317
|
const cwd = ChannelsUtil.directory(input.cwd) ?? (await this.host.getServerInfo()).cwd;
|
|
@@ -916,6 +1361,85 @@ class TeamService {
|
|
|
916
1361
|
}
|
|
917
1362
|
return agent;
|
|
918
1363
|
}
|
|
1364
|
+
async setNotice(input) {
|
|
1365
|
+
const { team, channel, changed } = ChannelsUtil.setNotice(this.team, input);
|
|
1366
|
+
if (input.by !== USER && input.by !== TA && !channel.members.includes(input.by)) {
|
|
1367
|
+
throw new Error(`You are not in #${channel.name}: only its members keep its notice.`);
|
|
1368
|
+
}
|
|
1369
|
+
if (changed) {
|
|
1370
|
+
await this.saveTeam(team);
|
|
1371
|
+
await this.append(channel.id, {
|
|
1372
|
+
id: ChannelsUtil.newId("message"),
|
|
1373
|
+
author: input.by,
|
|
1374
|
+
text: "",
|
|
1375
|
+
at: Date.now(),
|
|
1376
|
+
notice: channel.notice ? "set" : "cleared"
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
return channel;
|
|
1380
|
+
}
|
|
1381
|
+
agentOf(sessionFile) {
|
|
1382
|
+
return sessionFile ? this.team.agents.find((agent) => agent.sessionFile === sessionFile) : undefined;
|
|
1383
|
+
}
|
|
1384
|
+
async shareAgent(ref, color) {
|
|
1385
|
+
const agent = ChannelsUtil.findAgent(this.team, String(ref ?? ""));
|
|
1386
|
+
if (!agent) {
|
|
1387
|
+
throw new Error(`No agent is ${String(ref)}.`);
|
|
1388
|
+
}
|
|
1389
|
+
const card = JSON.stringify(AgentCards.card(agent, typeof color === "string" ? color : undefined));
|
|
1390
|
+
const cards = await this.get(Keys.CARDS) ?? {};
|
|
1391
|
+
const kept = cards[agent.id];
|
|
1392
|
+
const live = kept ? (await this.host.shares.list()).find((share2) => share2.id === kept.share) : undefined;
|
|
1393
|
+
if (live && kept?.card === card) {
|
|
1394
|
+
return live;
|
|
1395
|
+
}
|
|
1396
|
+
if (live) {
|
|
1397
|
+
await this.host.shares.remove(live.id);
|
|
1398
|
+
}
|
|
1399
|
+
const share = await this.host.shares.create({
|
|
1400
|
+
kind: AgentCards.KIND,
|
|
1401
|
+
title: `@${agent.name}`,
|
|
1402
|
+
type: "application/json",
|
|
1403
|
+
data: new TextEncoder().encode(card),
|
|
1404
|
+
access: "link",
|
|
1405
|
+
days: CARD_DAYS,
|
|
1406
|
+
offline: true
|
|
1407
|
+
});
|
|
1408
|
+
await this.set(Keys.CARDS, { ...this.liveCards(cards), [agent.id]: { share: share.id, card } });
|
|
1409
|
+
return share;
|
|
1410
|
+
}
|
|
1411
|
+
async stopCard(ref) {
|
|
1412
|
+
const agent = ChannelsUtil.findAgent(this.team, String(ref ?? ""));
|
|
1413
|
+
const cards = await this.get(Keys.CARDS) ?? {};
|
|
1414
|
+
const kept = agent && cards[agent.id];
|
|
1415
|
+
if (!agent || !kept) {
|
|
1416
|
+
return false;
|
|
1417
|
+
}
|
|
1418
|
+
const { [agent.id]: _gone, ...rest } = cards;
|
|
1419
|
+
await this.set(Keys.CARDS, this.liveCards(rest));
|
|
1420
|
+
return this.host.shares.remove(kept.share);
|
|
1421
|
+
}
|
|
1422
|
+
liveCards(cards) {
|
|
1423
|
+
return Object.fromEntries(Object.entries(cards).filter(([id]) => this.team.agents.some((agent) => agent.id === id)));
|
|
1424
|
+
}
|
|
1425
|
+
async openCard(link, password) {
|
|
1426
|
+
const content = await this.host.shares.open(String(link ?? ""), typeof password === "string" && password ? password : undefined);
|
|
1427
|
+
const card = content.kind === AgentCards.KIND ? AgentCards.parse(content.data) : undefined;
|
|
1428
|
+
if (!card) {
|
|
1429
|
+
throw new Error("This link shares no card of an agent.");
|
|
1430
|
+
}
|
|
1431
|
+
return card;
|
|
1432
|
+
}
|
|
1433
|
+
async addFromCard(input, language = HandOff.serverLanguage()) {
|
|
1434
|
+
const card = await this.openCard(input.link, input.password);
|
|
1435
|
+
const agent = await this.createAgent({ name: AgentCards.freeName(this.team, card.name), role: card.role, cwd: input.cwd, face: card.face });
|
|
1436
|
+
const sessionId = await this.session(agent);
|
|
1437
|
+
await this.host.prompt(sessionId, {
|
|
1438
|
+
clientMessageId: ChannelsUtil.newId("card"),
|
|
1439
|
+
message: AgentCards.adapt(agent.cwd ?? (await this.host.getServerInfo()).cwd, language.startsWith("zh"))
|
|
1440
|
+
});
|
|
1441
|
+
return { agent, sessionId };
|
|
1442
|
+
}
|
|
919
1443
|
async deleteAgent(ref) {
|
|
920
1444
|
const { team, agent, channels } = ChannelsUtil.removeAgent(this.team, ref);
|
|
921
1445
|
await this.saveTeam(team);
|
|
@@ -967,34 +1491,37 @@ class TeamService {
|
|
|
967
1491
|
await this.settle(message.id);
|
|
968
1492
|
return { channel, message, done };
|
|
969
1493
|
}
|
|
970
|
-
async
|
|
971
|
-
|
|
972
|
-
|
|
1494
|
+
async handOff(to, brief, origin, language = HandOff.serverLanguage()) {
|
|
1495
|
+
const text = brief.trim();
|
|
1496
|
+
if (!text) {
|
|
1497
|
+
throw new Error("The brief is empty: write what the receiver needs to go on.");
|
|
1498
|
+
}
|
|
1499
|
+
const from = origin ? (await this.host.listSessions()).find((session) => session.sessionFile === origin) : undefined;
|
|
1500
|
+
const where = { title: from?.sessionName || from?.firstMessage, sessionFile: origin, cwd: from?.cwd };
|
|
1501
|
+
const agent = to.trim().startsWith("#") ? undefined : ChannelsUtil.findAgent(this.team, to);
|
|
1502
|
+
if (agent) {
|
|
1503
|
+
const sessionId = await this.session(agent);
|
|
1504
|
+
await this.host.prompt(sessionId, {
|
|
1505
|
+
clientMessageId: ChannelsUtil.newId("handoff"),
|
|
1506
|
+
message: HandOff.message(where, text, language),
|
|
1507
|
+
streamingBehavior: "followUp"
|
|
1508
|
+
});
|
|
1509
|
+
return { kind: "agent", id: agent.id, name: agent.name };
|
|
973
1510
|
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
return;
|
|
979
|
-
}
|
|
980
|
-
let result;
|
|
981
|
-
try {
|
|
982
|
-
result = { ok: true, value: await this.handle(request) };
|
|
983
|
-
} catch (error) {
|
|
984
|
-
result = { ok: false, error: error instanceof Error ? error.message : String(error) };
|
|
985
|
-
}
|
|
986
|
-
await this.set(Keys.result(id), result);
|
|
987
|
-
await this.set(Keys.request(id), null);
|
|
988
|
-
const timer = setTimeout(() => void this.set(Keys.result(id), null).catch(() => {
|
|
989
|
-
return;
|
|
990
|
-
}), this.options.resultMs);
|
|
991
|
-
timer.unref?.();
|
|
992
|
-
} finally {
|
|
993
|
-
this.handling.delete(id);
|
|
1511
|
+
const channel = to.trim().startsWith("@") ? undefined : ChannelsUtil.findChannel(this.team, to);
|
|
1512
|
+
if (!channel) {
|
|
1513
|
+
const known = [...this.team.agents.map((item) => `@${item.name}`), ...this.team.channels.map((item) => `#${item.name}`)].join(", ");
|
|
1514
|
+
throw new Error(`No agent or channel is named ${to}. The team: ${known || "nobody yet; create an agent first"}.`);
|
|
994
1515
|
}
|
|
1516
|
+
await this.post(channel.id, TA, HandOff.channelText(where, text, language));
|
|
1517
|
+
await this.focus(channel.id);
|
|
1518
|
+
return { kind: "channel", id: channel.id, name: channel.name };
|
|
995
1519
|
}
|
|
996
|
-
async
|
|
997
|
-
|
|
1520
|
+
async request(request) {
|
|
1521
|
+
if (this.disposed) {
|
|
1522
|
+
throw new Error("The team has stopped; the extension may have been turned off.");
|
|
1523
|
+
}
|
|
1524
|
+
switch (request?.kind) {
|
|
998
1525
|
case "createAgent":
|
|
999
1526
|
return this.createAgent({ name: request.name, role: request.role, cwd: request.cwd, face: request.face });
|
|
1000
1527
|
case "createChannel":
|
|
@@ -1015,6 +1542,16 @@ class TeamService {
|
|
|
1015
1542
|
return this.deleteAgent(request.agent);
|
|
1016
1543
|
case "post":
|
|
1017
1544
|
return (await this.post(String(request.channel ?? ""), USER, String(request.text ?? ""))).message;
|
|
1545
|
+
case "setNotice":
|
|
1546
|
+
return this.setNotice({ channel: request.channel, text: request.text, by: USER });
|
|
1547
|
+
case "shareAgent":
|
|
1548
|
+
return this.shareAgent(request.agent, request.color);
|
|
1549
|
+
case "stopCard":
|
|
1550
|
+
return this.stopCard(request.agent);
|
|
1551
|
+
case "openCard":
|
|
1552
|
+
return this.openCard(request.link, request.password);
|
|
1553
|
+
case "addFromCard":
|
|
1554
|
+
return this.addFromCard(request);
|
|
1018
1555
|
case "openAgent": {
|
|
1019
1556
|
const agent = ChannelsUtil.findAgent(this.team, String(request.agent ?? ""));
|
|
1020
1557
|
if (!agent) {
|
|
@@ -1132,10 +1669,18 @@ class TeamService {
|
|
|
1132
1669
|
text = error instanceof Error ? error.message : String(error);
|
|
1133
1670
|
failed = true;
|
|
1134
1671
|
} finally {
|
|
1672
|
+
await this.setAnswered(agentId, Date.now());
|
|
1135
1673
|
await this.setWorking(channel.id, agentId, false);
|
|
1136
1674
|
}
|
|
1137
1675
|
return this.append(channel.id, { id: ChannelsUtil.newId("message"), author: agentId, text, at: Date.now(), replyTo: message.id, failed });
|
|
1138
1676
|
}
|
|
1677
|
+
async setAnswered(agentId, at) {
|
|
1678
|
+
this.answered ??= await this.get(Keys.ANSWERED) ?? {};
|
|
1679
|
+
const known = new Set(this.team.agents.map((agent) => agent.id));
|
|
1680
|
+
const kept = Object.fromEntries(Object.entries(this.answered).filter(([id]) => known.has(id)));
|
|
1681
|
+
this.answered = { ...kept, [agentId]: at };
|
|
1682
|
+
await this.set(Keys.ANSWERED, this.answered);
|
|
1683
|
+
}
|
|
1139
1684
|
async ask(channel, message, agentId) {
|
|
1140
1685
|
const agent = this.team.agents.find((candidate) => candidate.id === agentId);
|
|
1141
1686
|
if (!agent) {
|