@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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Cell - Ta Share
|
|
2
|
+
|
|
3
|
+
A pi package that comes with Ta (on by default; Settings → Extensions turns it off): share a conversation, a page or a file by a link, and open or import what others share. Design notes: [docs/design/ta-link.md](../../docs/design/ta-link.md).
|
|
4
|
+
|
|
5
|
+
## Use
|
|
6
|
+
|
|
7
|
+
- **Share a conversation**: Share conversation… in the + of the message box, or Share… in the menu of its row in a list. The dialog first shows what goes (the first messages, how many things that look like secrets are hidden, whether the outputs of tools go), then who may open it, for how long, with the outputs or not, and whether it opens while this computer is off; then the link and its QR code.
|
|
8
|
+
- **Ask Ta**: "make a link of report.html" calls the tool `share_link`, which asks the user every time (what, to whom, for how long); the user types the password, Ta never knows it. Without a page to ask in (`ta -p`) it refuses.
|
|
9
|
+
- **My shares**: under Discover, the shares still on, to copy, show the QR code again or stop (the link stops working at once, and the copy on the relay is deleted).
|
|
10
|
+
- **Open a link**: clicked in a reply, scanned or pasted in Quick open, it opens in the workbench; a conversation can be imported as one of your own (into the directory shown, or another) and goes on. Without Ta, a browser opens it in the viewer of the relay, which decrypts it on the page.
|
|
11
|
+
|
|
12
|
+
## Who may open it
|
|
13
|
+
|
|
14
|
+
| Access | Who |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Anyone with the link | Anyone who has the link |
|
|
17
|
+
| With a password | Who has the link and the password; the password is not in the link, and the key of the content is derived from both |
|
|
18
|
+
| Ta friends | The Ta friends chosen, in their own Ta only: the link holds no key, the key of the content is agreed between the two identities (ECDH), and neither the relay nor anyone else learns who opens it; while this computer runs Ta |
|
|
19
|
+
| Only me | Only the Ta of the one who shared it (this computer and its paired devices) |
|
|
20
|
+
|
|
21
|
+
It works for 1, 7 or 30 days, or until stopped; "opens while this computer is off" keeps a sealed copy on the relay, 30 days at most.
|
|
22
|
+
|
|
23
|
+
## Parts
|
|
24
|
+
|
|
25
|
+
- **Server side** (`pi.host`, `web-src/host.ts`): `ShareService`. The snapshot of a conversation (`ConversationSnapshot`: the user's messages, the replies and the calls of tools of the branch shown; no thinking, images or cards of extensions; the outputs of tools if asked, 4 KB each) and `Redactor`; links made, listed, stopped and opened by `TaExtensionHost.shares`; imports by `TaExtensionHost.createSession` (ssh:// directories too).
|
|
26
|
+
- **pi extension** (`web-src/extension.ts`): the tool `share_link`.
|
|
27
|
+
- **Web extension** (`web-src/index.tsx`): the + of the message box, the menu of a conversation (`registerSessionMenu`), the dialog (`ui.custom`), My shares, and a tab of the workbench for links (`registerOpener(…, { specific: true })`).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Cell - Ta Share
|
|
2
|
+
|
|
3
|
+
Ta 自带的 pi 包(默认开启,可在 设置 → 扩展 关闭):把对话、网页或文件生成链接分享出去,也能打开、导入别人分享的对话。设计记录见 [docs/design/ta-link.md](../../docs/design/ta-link.md)。
|
|
4
|
+
|
|
5
|
+
## 怎么用
|
|
6
|
+
|
|
7
|
+
- **分享对话**:输入框 + 菜单里的"分享对话…",或对话列表某一行的右键/长按菜单"分享…"。弹窗先列出将分享的内容(前几条消息、隐去了几处疑似密钥、是否含工具输出),选好谁能打开、有效期、是否附工具输出、电脑关机能否打开,再生成链接和二维码。
|
|
8
|
+
- **让 Ta 分享**:说"把 report.html 生成分享链接",Ta 调用工具 `share_link`;每次都先弹框请你确认(分享什么、给谁、多久),口令由你填,Ta 不知道口令。没有界面(`ta -p`)时拒绝。
|
|
9
|
+
- **我的分享**:发现 → 我的分享,列出还在有效期内的分享,可以复制链接、再看二维码、停止分享(链接立即失效,中继上的副本同时删除)。
|
|
10
|
+
- **打开链接**:在对话里点、扫码、在快捷打开里粘贴,都在右侧工作台打开查看;对话可以"导入为我的对话"(默认当前目录,可更换),导入后接着聊。没装 Ta 的人用浏览器打开,中继的查看页在本地解密后显示。
|
|
11
|
+
|
|
12
|
+
## 访问方式
|
|
13
|
+
|
|
14
|
+
| 方式 | 谁能打开 |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| 拿到链接的人 | 任何拿到链接的人 |
|
|
17
|
+
| 凭口令 | 拿到链接并且知道口令的人;口令不在链接里,内容密钥由链接密钥和口令共同派生 |
|
|
18
|
+
| 指定的好友 | 选定的几位 Ta 好友,只能在他们自己的 Ta 里打开:链接里没有密钥,内容密钥由双方身份密钥协商(ECDH)得出,中继和别人都不知道是谁在看;只在这台电脑运行 Ta 时可打开 |
|
|
19
|
+
| 仅自己 | 只在分享者自己的 Ta(这台电脑和配对过的设备)里打开 |
|
|
20
|
+
|
|
21
|
+
有效期 1 / 7 / 30 天或不过期;"电脑关机也能打开"会把加密副本放到中继上,最长 30 天。
|
|
22
|
+
|
|
23
|
+
## 组成
|
|
24
|
+
|
|
25
|
+
- **服务端**(`pi.host`,`web-src/host.ts`):`ShareService`。对话快照(`ConversationSnapshot`:当前分支的用户消息、回复文字、工具调用;不含思考、图片、扩展卡片,工具输出可选、每条最多 4 KB)与脱敏(`Redactor`),经 `TaExtensionHost.shares` 生成、列出、停止、打开链接;导入经 `TaExtensionHost.createSession`(ssh:// 目录同样适用)。
|
|
26
|
+
- **pi 扩展**(`web-src/extension.ts`):工具 `share_link`。
|
|
27
|
+
- **Web 扩展**(`web-src/index.tsx`):输入框 + 菜单、会话菜单(`registerSessionMenu`)、分享弹窗(`ui.custom`)、"我的分享"页、打开链接的工作台标签(`registerOpener(…, { specific: true })`)。
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
2
|
+
var TA_HOST_EVENT = "ta:host";
|
|
3
|
+
var TaHostUtil;
|
|
4
|
+
(function(TaHostUtil2) {
|
|
5
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
6
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
7
|
+
return new Promise((resolve) => {
|
|
8
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
9
|
+
const request = {
|
|
10
|
+
name,
|
|
11
|
+
resolve: (answer) => {
|
|
12
|
+
clearTimeout(timer);
|
|
13
|
+
resolve(answer);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
events.emit(TA_HOST_EVENT, request);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
TaHostUtil2.reach = reach;
|
|
20
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
21
|
+
|
|
22
|
+
// web-src/server-texts.ts
|
|
23
|
+
var ShareServerTexts;
|
|
24
|
+
((ShareServerTexts) => {
|
|
25
|
+
function zh(env = process.env) {
|
|
26
|
+
return /^zh/i.test(env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG || "");
|
|
27
|
+
}
|
|
28
|
+
ShareServerTexts.zh = zh;
|
|
29
|
+
function access(access2) {
|
|
30
|
+
if (zh()) {
|
|
31
|
+
return access2 === "password" ? "知道口令的人" : access2 === "self" ? "只有你自己" : "拿到链接的任何人";
|
|
32
|
+
}
|
|
33
|
+
return access2 === "password" ? "whoever has the password" : access2 === "self" ? "only you" : "anyone with the link";
|
|
34
|
+
}
|
|
35
|
+
function days(days2) {
|
|
36
|
+
if (zh()) {
|
|
37
|
+
return days2 > 0 ? `${days2} 天内有效` : "停止分享前一直有效";
|
|
38
|
+
}
|
|
39
|
+
return days2 > 0 ? `for ${days2} day${days2 === 1 ? "" : "s"}` : "until you stop it";
|
|
40
|
+
}
|
|
41
|
+
function confirm(what, options) {
|
|
42
|
+
const offline = options.offline ? zh() ? "另在中继上存一份加密副本,电脑关机也能看。" : "A sealed copy is kept on the relay, to open while this computer is off." : zh() ? "只在这台电脑运行 Ta 时能打开。" : "It opens while this computer runs Ta.";
|
|
43
|
+
return zh() ? [
|
|
44
|
+
`分享“${what}”?`,
|
|
45
|
+
`${access(options.access)}可以查看,${days(options.days)}。${offline}看起来像密钥的内容会被隐去。可以在“发现 → 我的分享”里随时停止。`
|
|
46
|
+
] : [
|
|
47
|
+
`Share ${what}?`,
|
|
48
|
+
`${access(options.access)} can see it, ${days(options.days)}. ${offline} What looks like a secret is hidden. Stop it any time in Discover → My shares.`
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
ShareServerTexts.confirm = confirm;
|
|
52
|
+
function password() {
|
|
53
|
+
return zh() ? "设置查看口令" : "A password to open it";
|
|
54
|
+
}
|
|
55
|
+
ShareServerTexts.password = password;
|
|
56
|
+
function conversation() {
|
|
57
|
+
return zh() ? "这段对话" : "this conversation";
|
|
58
|
+
}
|
|
59
|
+
ShareServerTexts.conversation = conversation;
|
|
60
|
+
})(ShareServerTexts ||= {});
|
|
61
|
+
|
|
62
|
+
// web-src/share-protocol.ts
|
|
63
|
+
var NAME = "@celljs/ta-share";
|
|
64
|
+
var SHARE_TOOL = "share_link";
|
|
65
|
+
var CONVERSATION_KIND = "ta-conversation";
|
|
66
|
+
var FILE_KIND = "file";
|
|
67
|
+
var ShareLink;
|
|
68
|
+
((ShareLink) => {
|
|
69
|
+
const LINK = /^https?:\/\/[^/\s#?]+\/s#v=1&\S+$/i;
|
|
70
|
+
function is(text) {
|
|
71
|
+
const kind = LINK.test(text.trim()) ? fragment(text).get("c") : "none";
|
|
72
|
+
return kind === null || kind === CONVERSATION_KIND || kind === FILE_KIND;
|
|
73
|
+
}
|
|
74
|
+
ShareLink.is = is;
|
|
75
|
+
function fragment(text) {
|
|
76
|
+
return new URLSearchParams(text.slice(text.indexOf("#") + 1));
|
|
77
|
+
}
|
|
78
|
+
function needsPassword(text) {
|
|
79
|
+
return fragment(text).get("p") === "1";
|
|
80
|
+
}
|
|
81
|
+
ShareLink.needsPassword = needsPassword;
|
|
82
|
+
})(ShareLink ||= {});
|
|
83
|
+
|
|
84
|
+
// web-src/extension.ts
|
|
85
|
+
var TYPES = {
|
|
86
|
+
html: "text/html",
|
|
87
|
+
htm: "text/html",
|
|
88
|
+
md: "text/markdown",
|
|
89
|
+
markdown: "text/markdown",
|
|
90
|
+
txt: "text/plain",
|
|
91
|
+
json: "application/json",
|
|
92
|
+
csv: "text/csv",
|
|
93
|
+
svg: "image/svg+xml",
|
|
94
|
+
png: "image/png",
|
|
95
|
+
jpg: "image/jpeg",
|
|
96
|
+
jpeg: "image/jpeg",
|
|
97
|
+
gif: "image/gif",
|
|
98
|
+
webp: "image/webp",
|
|
99
|
+
pdf: "application/pdf",
|
|
100
|
+
mp4: "video/mp4",
|
|
101
|
+
mp3: "audio/mpeg"
|
|
102
|
+
};
|
|
103
|
+
function typeOf(name) {
|
|
104
|
+
const extension = name.split(".").pop()?.toLowerCase() ?? "";
|
|
105
|
+
return TYPES[extension] ?? (/^(?:ts|tsx|js|jsx|py|go|rs|java|c|cpp|h|sh|yml|yaml|toml|css|xml|log)$/.test(extension) ? "text/plain" : "application/octet-stream");
|
|
106
|
+
}
|
|
107
|
+
function activate(pi) {
|
|
108
|
+
let reached;
|
|
109
|
+
const reach = () => reached ??= TaHostUtil.reach(pi.events, NAME).then((found) => found?.service ? { service: found.service, files: found.files } : undefined);
|
|
110
|
+
pi.registerTool({
|
|
111
|
+
name: SHARE_TOOL,
|
|
112
|
+
label: "Share by a link",
|
|
113
|
+
description: "Make a link to share this conversation or a file (an HTML report, a page, a picture, a document) with others: they open it in a browser, or in Ta, where a conversation can be imported. Only when the user asks to share; the user confirms in a dialog before anything goes out, and gives the password themselves when it has one. Answer with the link.",
|
|
114
|
+
promptSnippet: "Share this conversation or a file by a link, when the user asks",
|
|
115
|
+
parameters: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
what: { type: "string", enum: ["conversation", "file"], description: "This conversation, or the file at path." },
|
|
119
|
+
path: { type: "string", description: "For a file: its path, relative to the working directory or absolute." },
|
|
120
|
+
title: { type: "string", description: "What the link is called; default the name of the conversation or of the file." },
|
|
121
|
+
access: {
|
|
122
|
+
type: "string",
|
|
123
|
+
enum: ["link", "password", "self"],
|
|
124
|
+
description: "link (default): anyone with the link; password: also the password the user gives; self: only the user, in their own Ta."
|
|
125
|
+
},
|
|
126
|
+
days: { type: "number", description: "How long it works: 1, 7 (default) or 30 days; 0 until stopped." },
|
|
127
|
+
offline: { type: "boolean", description: "Keep a sealed copy on the relay so that it opens while this computer is off (30 days at most)." }
|
|
128
|
+
},
|
|
129
|
+
required: ["what"]
|
|
130
|
+
},
|
|
131
|
+
execute: async (_id, params, _signal, _update, ctx) => {
|
|
132
|
+
const found = await reach();
|
|
133
|
+
if (!found) {
|
|
134
|
+
throw new Error("Sharing by a link needs the Ta service.");
|
|
135
|
+
}
|
|
136
|
+
if (!ctx.hasUI) {
|
|
137
|
+
throw new Error("Sharing needs the user to confirm it in Ta; there is no one to ask here.");
|
|
138
|
+
}
|
|
139
|
+
const access = params.access === "password" || params.access === "self" ? params.access : "link";
|
|
140
|
+
const days = typeof params.days === "number" && params.days >= 0 ? Math.round(params.days) : 7;
|
|
141
|
+
const offline = params.offline === true && access !== "self";
|
|
142
|
+
const title = typeof params.title === "string" ? params.title.trim() : "";
|
|
143
|
+
const file = params.what === "file";
|
|
144
|
+
const path = typeof params.path === "string" ? params.path.trim() : "";
|
|
145
|
+
if (file && !path) {
|
|
146
|
+
throw new Error("Give the path of the file.");
|
|
147
|
+
}
|
|
148
|
+
const name = file ? path.split(/[\\/]/).pop() || path : title || ShareServerTexts.conversation();
|
|
149
|
+
if (!await ctx.ui.confirm(...ShareServerTexts.confirm(name, { access, days, offline })).catch(() => false)) {
|
|
150
|
+
throw new Error("The user did not want to share it.");
|
|
151
|
+
}
|
|
152
|
+
let password;
|
|
153
|
+
if (access === "password") {
|
|
154
|
+
password = (await ctx.ui.input(ShareServerTexts.password()).catch(() => {
|
|
155
|
+
return;
|
|
156
|
+
}))?.trim();
|
|
157
|
+
if (!password) {
|
|
158
|
+
throw new Error("The user gave no password; nothing was shared.");
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const options = { access, password, days, offline };
|
|
162
|
+
let link;
|
|
163
|
+
if (file) {
|
|
164
|
+
const data = await found.files.read(found.files.resolve(path));
|
|
165
|
+
if (!data) {
|
|
166
|
+
throw new Error(`There is no file at ${path}.`);
|
|
167
|
+
}
|
|
168
|
+
link = (await found.service.shareBytes(title || name, typeOf(name), data, options)).link;
|
|
169
|
+
} else {
|
|
170
|
+
const sessionFile = ctx.sessionManager.getSessionFile();
|
|
171
|
+
if (!sessionFile) {
|
|
172
|
+
throw new Error("This conversation is not kept in a file, so it cannot be shared.");
|
|
173
|
+
}
|
|
174
|
+
link = (await found.service.shareConversation(sessionFile, { ...options, title: title || undefined })).share.link;
|
|
175
|
+
}
|
|
176
|
+
const how = access === "password" ? " It asks for the password the user set (you do not know it)." : access === "self" ? " It opens only in the user’s own Ta." : "";
|
|
177
|
+
return { content: [{ type: "text", text: `Shared: ${link}${how}` }], details: { link } };
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
export {
|
|
182
|
+
typeOf,
|
|
183
|
+
activate as default
|
|
184
|
+
};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
// web-src/share-service.ts
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { isAbsolute } from "node:path";
|
|
4
|
+
|
|
5
|
+
// web-src/share-protocol.ts
|
|
6
|
+
var CONVERSATION_KIND = "ta-conversation";
|
|
7
|
+
var FILE_KIND = "file";
|
|
8
|
+
var ShareLink;
|
|
9
|
+
((ShareLink) => {
|
|
10
|
+
const LINK = /^https?:\/\/[^/\s#?]+\/s#v=1&\S+$/i;
|
|
11
|
+
function is(text) {
|
|
12
|
+
const kind = LINK.test(text.trim()) ? fragment(text).get("c") : "none";
|
|
13
|
+
return kind === null || kind === CONVERSATION_KIND || kind === FILE_KIND;
|
|
14
|
+
}
|
|
15
|
+
ShareLink.is = is;
|
|
16
|
+
function fragment(text) {
|
|
17
|
+
return new URLSearchParams(text.slice(text.indexOf("#") + 1));
|
|
18
|
+
}
|
|
19
|
+
function needsPassword(text) {
|
|
20
|
+
return fragment(text).get("p") === "1";
|
|
21
|
+
}
|
|
22
|
+
ShareLink.needsPassword = needsPassword;
|
|
23
|
+
})(ShareLink ||= {});
|
|
24
|
+
|
|
25
|
+
// ../ta-protocol/esm/common/redactor.js
|
|
26
|
+
var REDACTED = "[redacted]";
|
|
27
|
+
var WHOLE = [
|
|
28
|
+
/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,
|
|
29
|
+
/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{20,}/g,
|
|
30
|
+
/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,
|
|
31
|
+
/\bgithub_pat_[A-Za-z0-9_]{40,}\b/g,
|
|
32
|
+
/\bglpat-[A-Za-z0-9_-]{20,}\b/g,
|
|
33
|
+
/\bxox[abprs]-[A-Za-z0-9-]{10,}\b/g,
|
|
34
|
+
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
|
|
35
|
+
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
36
|
+
/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/g
|
|
37
|
+
];
|
|
38
|
+
var NAMED = [
|
|
39
|
+
/(\bBearer\s+)[A-Za-z0-9._~+/-]{16,}=*/gi,
|
|
40
|
+
/(\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,
|
|
41
|
+
/(:\/\/[^\s:/@]+:)([^\s@/]{3,})(@)/g
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
class Redactor {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.count = 0;
|
|
47
|
+
}
|
|
48
|
+
text(text) {
|
|
49
|
+
let out = text;
|
|
50
|
+
for (const pattern of WHOLE) {
|
|
51
|
+
out = out.replace(pattern, () => this.hide());
|
|
52
|
+
}
|
|
53
|
+
out = out.replace(NAMED[0], (_match, before) => before + this.hide());
|
|
54
|
+
out = out.replace(NAMED[1], (match, before, value) => Redactor.placeholder(value) ? match : before + this.hide());
|
|
55
|
+
out = out.replace(NAMED[2], (_match, before, _value, after) => before + this.hide() + after);
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
value(value, max) {
|
|
59
|
+
if (typeof value === "string") {
|
|
60
|
+
return Redactor.cut(this.text(value), max);
|
|
61
|
+
}
|
|
62
|
+
if (Array.isArray(value)) {
|
|
63
|
+
return value.map((item) => this.value(item, max));
|
|
64
|
+
}
|
|
65
|
+
if (value && typeof value === "object") {
|
|
66
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, this.value(item, max)]));
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
static cut(text, max) {
|
|
71
|
+
return text.length > max ? `${text.slice(0, max)}…` : text;
|
|
72
|
+
}
|
|
73
|
+
hide() {
|
|
74
|
+
this.count++;
|
|
75
|
+
return REDACTED;
|
|
76
|
+
}
|
|
77
|
+
static placeholder(value) {
|
|
78
|
+
return /^(?:\$|<|\{|\[redacted|process\.env|os\.environ|xxx|\*{3})/i.test(value) || /^(?:true|false|null|undefined|none|string|number)$/i.test(value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// web-src/snapshot.ts
|
|
83
|
+
var MAX_TEXT = 4000;
|
|
84
|
+
var ConversationSnapshot;
|
|
85
|
+
((ConversationSnapshot) => {
|
|
86
|
+
function of(jsonl, options = {}) {
|
|
87
|
+
const entries = parse(jsonl);
|
|
88
|
+
const header = entries[0];
|
|
89
|
+
if (header?.type !== "session") {
|
|
90
|
+
throw new Error("Not a session file of pi.");
|
|
91
|
+
}
|
|
92
|
+
const redactor = new Redactor;
|
|
93
|
+
let images = 0;
|
|
94
|
+
const messages = [];
|
|
95
|
+
for (const entry of branch(entries)) {
|
|
96
|
+
const message = entry.message;
|
|
97
|
+
const role = message?.role;
|
|
98
|
+
if (entry.type !== "message" || !message || role !== "user" && role !== "assistant" && role !== "toolResult") {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const parts = (content) => {
|
|
102
|
+
if (typeof content === "string") {
|
|
103
|
+
return [{ type: "text", text: redactor.text(content) }];
|
|
104
|
+
}
|
|
105
|
+
const kept = [];
|
|
106
|
+
for (const part of Array.isArray(content) ? content : []) {
|
|
107
|
+
if (part.type === "text" && typeof part.text === "string") {
|
|
108
|
+
kept.push({ type: "text", text: redactor.text(part.text) });
|
|
109
|
+
} else if (part.type === "toolCall" && typeof part.name === "string") {
|
|
110
|
+
const args = redactor.value(part.arguments ?? {}, MAX_TEXT);
|
|
111
|
+
kept.push({ type: "toolCall", id: String(part.id), name: part.name, arguments: args });
|
|
112
|
+
} else if (part.type === "image") {
|
|
113
|
+
images++;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return kept;
|
|
117
|
+
};
|
|
118
|
+
const timestamp = typeof message.timestamp === "number" ? message.timestamp : Date.parse(entry.timestamp ?? "") || undefined;
|
|
119
|
+
if (role === "user") {
|
|
120
|
+
const content = parts(message.content);
|
|
121
|
+
if (content.length > 0) {
|
|
122
|
+
messages.push({ role, content, timestamp });
|
|
123
|
+
}
|
|
124
|
+
} else if (role === "assistant") {
|
|
125
|
+
messages.push({
|
|
126
|
+
role,
|
|
127
|
+
content: parts(message.content),
|
|
128
|
+
...typeof message.model === "string" ? { model: message.model } : {},
|
|
129
|
+
...typeof message.provider === "string" ? { provider: message.provider } : {},
|
|
130
|
+
...typeof message.stopReason === "string" ? { stopReason: message.stopReason } : {},
|
|
131
|
+
...typeof message.errorMessage === "string" ? { errorMessage: redactor.text(message.errorMessage) } : {},
|
|
132
|
+
timestamp
|
|
133
|
+
});
|
|
134
|
+
} else {
|
|
135
|
+
const output = options.outputs ? parts(message.content).flatMap((part) => part.type === "text" ? [{ type: "text", text: Redactor.cut(part.text, MAX_TEXT) }] : []) : [];
|
|
136
|
+
messages.push({
|
|
137
|
+
role,
|
|
138
|
+
toolCallId: String(message.toolCallId),
|
|
139
|
+
toolName: String(message.toolName),
|
|
140
|
+
content: output,
|
|
141
|
+
...message.isError ? { isError: true } : {},
|
|
142
|
+
timestamp
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const named = [...entries].reverse().find((entry) => entry.type === "session_info" && entry.name)?.name;
|
|
147
|
+
const conversation = {
|
|
148
|
+
v: 1,
|
|
149
|
+
title: options.title?.trim() || named || firstWords(messages) || "Conversation",
|
|
150
|
+
...header.cwd ? { place: basename(header.cwd) } : {},
|
|
151
|
+
messages,
|
|
152
|
+
...images || !options.outputs ? { omitted: { ...options.outputs ? {} : { outputs: true }, ...images ? { images } : {} } } : {},
|
|
153
|
+
...redactor.count ? { redacted: redactor.count } : {}
|
|
154
|
+
};
|
|
155
|
+
return { conversation, stats: { messages: messages.filter((message) => message.role !== "toolResult").length, redacted: redactor.count, images } };
|
|
156
|
+
}
|
|
157
|
+
ConversationSnapshot.of = of;
|
|
158
|
+
function branch(entries) {
|
|
159
|
+
const byId = new Map(entries.filter((entry) => entry.id).map((entry) => [entry.id, entry]));
|
|
160
|
+
const path = [];
|
|
161
|
+
let at = entries.length > 1 ? entries[entries.length - 1] : undefined;
|
|
162
|
+
const seen = new Set;
|
|
163
|
+
while (at && !seen.has(at.id ?? "")) {
|
|
164
|
+
seen.add(at.id ?? "");
|
|
165
|
+
path.push(at);
|
|
166
|
+
at = at.parentId ? byId.get(at.parentId) : undefined;
|
|
167
|
+
}
|
|
168
|
+
return path.reverse();
|
|
169
|
+
}
|
|
170
|
+
function parse(jsonl) {
|
|
171
|
+
const entries = [];
|
|
172
|
+
for (const line of jsonl.split(`
|
|
173
|
+
`)) {
|
|
174
|
+
if (line.trim()) {
|
|
175
|
+
try {
|
|
176
|
+
entries.push(JSON.parse(line));
|
|
177
|
+
} catch {}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return entries;
|
|
181
|
+
}
|
|
182
|
+
function firstWords(messages) {
|
|
183
|
+
const first = messages.find((message) => message.role === "user");
|
|
184
|
+
const text = first && first.content.find((part) => part.type === "text");
|
|
185
|
+
return text && text.type === "text" ? Redactor.cut(text.text.split(`
|
|
186
|
+
`)[0].trim(), 60) : undefined;
|
|
187
|
+
}
|
|
188
|
+
function basename(path) {
|
|
189
|
+
return path.replace(/[\\/]+$/, "").split(/[\\/]/).pop() || path;
|
|
190
|
+
}
|
|
191
|
+
})(ConversationSnapshot ||= {});
|
|
192
|
+
var NO_OUTPUT = "(The output of this call was not shared.)";
|
|
193
|
+
var ConversationImport;
|
|
194
|
+
((ConversationImport) => {
|
|
195
|
+
function messages(conversation, now = Date.now()) {
|
|
196
|
+
const out = [];
|
|
197
|
+
const append = (entry) => out.push(entry.message);
|
|
198
|
+
const answered = new Set(conversation.messages.flatMap((message) => message.role === "toolResult" ? [message.toolCallId] : []));
|
|
199
|
+
for (const message of conversation.messages) {
|
|
200
|
+
const timestamp = message.timestamp ?? now;
|
|
201
|
+
if (message.role === "user") {
|
|
202
|
+
append({ message: { role: "user", content: message.content, timestamp } });
|
|
203
|
+
} else if (message.role === "assistant") {
|
|
204
|
+
append({
|
|
205
|
+
message: {
|
|
206
|
+
role: "assistant",
|
|
207
|
+
content: message.content,
|
|
208
|
+
api: "imported",
|
|
209
|
+
provider: message.provider ?? "imported",
|
|
210
|
+
model: message.model ?? "imported",
|
|
211
|
+
usage: {
|
|
212
|
+
input: 0,
|
|
213
|
+
output: 0,
|
|
214
|
+
cacheRead: 0,
|
|
215
|
+
cacheWrite: 0,
|
|
216
|
+
totalTokens: 0,
|
|
217
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }
|
|
218
|
+
},
|
|
219
|
+
stopReason: message.stopReason ?? "stop",
|
|
220
|
+
...message.errorMessage ? { errorMessage: message.errorMessage } : {},
|
|
221
|
+
timestamp
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
for (const part of message.content) {
|
|
225
|
+
if (part.type === "toolCall" && !answered.has(part.id)) {
|
|
226
|
+
append({ message: result(part.id, part.name, [], false, timestamp) });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
} else {
|
|
230
|
+
append({ message: result(message.toolCallId, message.toolName, message.content, !!message.isError, timestamp) });
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return out;
|
|
234
|
+
}
|
|
235
|
+
ConversationImport.messages = messages;
|
|
236
|
+
function result(toolCallId, toolName, content, isError, timestamp) {
|
|
237
|
+
const text = content.filter((part) => part.type === "text");
|
|
238
|
+
return { role: "toolResult", toolCallId, toolName, content: text.length > 0 ? text : [{ type: "text", text: NO_OUTPUT }], isError, timestamp };
|
|
239
|
+
}
|
|
240
|
+
})(ConversationImport ||= {});
|
|
241
|
+
|
|
242
|
+
// web-src/share-service.ts
|
|
243
|
+
var encoder = new TextEncoder;
|
|
244
|
+
var decoder = new TextDecoder;
|
|
245
|
+
var FAILURES = new Set(["password", "wrong", "busy", "gone", "offline", "self", "people", "invalid", "timeout", "large"]);
|
|
246
|
+
|
|
247
|
+
class ShareService {
|
|
248
|
+
host;
|
|
249
|
+
constructor(host) {
|
|
250
|
+
this.host = host;
|
|
251
|
+
}
|
|
252
|
+
dispose() {}
|
|
253
|
+
async preview(sessionFile, options = {}) {
|
|
254
|
+
const { conversation, stats } = await this.snapshot(sessionFile, options);
|
|
255
|
+
const calls = conversation.messages.flatMap((message) => message.role === "assistant" ? message.content.filter((part) => part.type === "toolCall") : []);
|
|
256
|
+
const outputs = conversation.messages.filter((message) => message.role === "toolResult" && message.content.length > 0).length;
|
|
257
|
+
return { json: JSON.stringify(conversation), stats: { ...stats, tools: calls.length, outputs } };
|
|
258
|
+
}
|
|
259
|
+
async shareConversation(sessionFile, options) {
|
|
260
|
+
const { conversation, stats } = await this.snapshot(sessionFile, options);
|
|
261
|
+
if (stats.messages === 0) {
|
|
262
|
+
throw new Error("The conversation has nothing to share yet.");
|
|
263
|
+
}
|
|
264
|
+
const share = await this.host.shares.create({
|
|
265
|
+
kind: CONVERSATION_KIND,
|
|
266
|
+
title: conversation.title,
|
|
267
|
+
type: "application/json",
|
|
268
|
+
data: encoder.encode(JSON.stringify(conversation)),
|
|
269
|
+
...ShareService.input(options)
|
|
270
|
+
});
|
|
271
|
+
return { share, stats };
|
|
272
|
+
}
|
|
273
|
+
async shareFile(title, type, data, options) {
|
|
274
|
+
return { share: await this.shareBytes(title, type, ShareService.fromBase64(data), options) };
|
|
275
|
+
}
|
|
276
|
+
shareBytes(title, type, data, options) {
|
|
277
|
+
return this.host.shares.create({
|
|
278
|
+
kind: FILE_KIND,
|
|
279
|
+
title: String(title).slice(0, 200) || "File",
|
|
280
|
+
type: String(type || "application/octet-stream"),
|
|
281
|
+
data,
|
|
282
|
+
...ShareService.input(options)
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
list() {
|
|
286
|
+
return this.host.shares.list();
|
|
287
|
+
}
|
|
288
|
+
remove(id) {
|
|
289
|
+
return this.host.shares.remove(String(id));
|
|
290
|
+
}
|
|
291
|
+
async open(link, password) {
|
|
292
|
+
const opened = await this.fetch(link, password);
|
|
293
|
+
if (!opened.ok) {
|
|
294
|
+
return opened;
|
|
295
|
+
}
|
|
296
|
+
const { kind, title, type, createdAt, data } = opened.content;
|
|
297
|
+
return { ok: true, content: { kind, title, ...type ? { type } : {}, createdAt, data: ShareService.toBase64(data) } };
|
|
298
|
+
}
|
|
299
|
+
async importConversation(link, password, cwd) {
|
|
300
|
+
if (typeof cwd !== "string" || !cwd) {
|
|
301
|
+
throw new Error("Import into a directory.");
|
|
302
|
+
}
|
|
303
|
+
const opened = await this.fetch(link, password);
|
|
304
|
+
if (!opened.ok) {
|
|
305
|
+
return opened;
|
|
306
|
+
}
|
|
307
|
+
if (opened.content.kind !== CONVERSATION_KIND) {
|
|
308
|
+
throw new Error("This link shares a file, not a conversation.");
|
|
309
|
+
}
|
|
310
|
+
const conversation = JSON.parse(decoder.decode(opened.content.data));
|
|
311
|
+
if (conversation?.v !== 1 || !Array.isArray(conversation.messages)) {
|
|
312
|
+
throw new Error("Not a conversation shared from Ta.");
|
|
313
|
+
}
|
|
314
|
+
const sessionFile = await this.host.createSession(cwd, ConversationImport.messages(conversation), conversation.title);
|
|
315
|
+
return { ok: true, sessionFile };
|
|
316
|
+
}
|
|
317
|
+
async snapshot(sessionFile, options) {
|
|
318
|
+
if (typeof sessionFile !== "string" || !isAbsolute(sessionFile) || !sessionFile.endsWith(".jsonl")) {
|
|
319
|
+
throw new Error("Share a conversation by its session file.");
|
|
320
|
+
}
|
|
321
|
+
return ConversationSnapshot.of(await readFile(sessionFile, "utf8"), { title: options?.title, outputs: options?.outputs });
|
|
322
|
+
}
|
|
323
|
+
async fetch(link, password) {
|
|
324
|
+
try {
|
|
325
|
+
return { ok: true, content: await this.host.shares.open(String(link), password || undefined) };
|
|
326
|
+
} catch (error) {
|
|
327
|
+
const reason = error.reason;
|
|
328
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
329
|
+
return { ok: false, reason: reason && FAILURES.has(reason) ? reason : "offline", message };
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
static input(options) {
|
|
333
|
+
const access = options?.access === "password" || options?.access === "self" || options?.access === "people" ? options.access : "link";
|
|
334
|
+
if (access === "password" && !options.password) {
|
|
335
|
+
throw new Error("Give the password.");
|
|
336
|
+
}
|
|
337
|
+
const people = access === "people" && Array.isArray(options.people) ? options.people.filter((id) => typeof id === "string") : [];
|
|
338
|
+
if (access === "people" && people.length === 0) {
|
|
339
|
+
throw new Error("Choose the Ta friends to share it with.");
|
|
340
|
+
}
|
|
341
|
+
const days = Number(options?.days) || 0;
|
|
342
|
+
return {
|
|
343
|
+
access,
|
|
344
|
+
...access === "password" ? { password: String(options.password) } : {},
|
|
345
|
+
...access === "people" ? { people } : {},
|
|
346
|
+
days: days > 0 ? Math.min(days, 365) : 0,
|
|
347
|
+
offline: !!options?.offline && access !== "self" && access !== "people"
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
static toBase64(bytes) {
|
|
351
|
+
return Buffer.from(bytes).toString("base64url");
|
|
352
|
+
}
|
|
353
|
+
static fromBase64(text) {
|
|
354
|
+
return new Uint8Array(Buffer.from(String(text), "base64url"));
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// web-src/host.ts
|
|
359
|
+
function activate(host) {
|
|
360
|
+
return new ShareService(host);
|
|
361
|
+
}
|
|
362
|
+
export {
|
|
363
|
+
activate as default
|
|
364
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Pi {
|
|
2
|
+
events: {
|
|
3
|
+
emit(event: string, data: unknown): void;
|
|
4
|
+
};
|
|
5
|
+
registerTool(tool: never): unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare function typeOf(name: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* The tool share_link: the model makes a link of this conversation or of a file (a report it wrote) when the user
|
|
10
|
+
* asks. It never shares without the user saying yes in a dialog (what, to whom, for how long), and a password is
|
|
11
|
+
* asked of the user, never of the model; without a page to ask in (`ta -p`) it refuses. docs/design/ta-link.md 2.8.
|
|
12
|
+
*/
|
|
13
|
+
export default function activate(pi: Pi): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=extension.d.ts.map
|