@celljs/ta 4.11.0 → 4.13.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 +2 -2
- package/README.md +2 -2
- package/dist/cli.mjs +1006 -164
- package/dist/gateway.mjs +161 -2
- package/dist/pi/CHANGELOG.md +15 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/README.en.md +1 -1
- package/dist/pi/packages/ta-agents/README.md +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +266 -25
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +7 -2
- package/dist/pi/packages/ta-agents/lib/acp-protocol.js +5 -2
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +8 -3
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +12 -4
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +72 -2
- package/dist/pi/packages/ta-agents/lib/agent-session.js +183 -18
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +16 -2
- package/dist/pi/packages/ta-agents/lib/agent-tool.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +45 -4
- package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +17 -1
- package/dist/pi/packages/ta-agents/lib/agent-turn.js +51 -3
- package/dist/pi/packages/ta-agents/lib/extension.js +7 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +12 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +12 -0
- package/dist/pi/packages/ta-agents/package.json +1 -1
- package/dist/pi/packages/ta-bots/extension/index.mjs +51 -0
- package/dist/pi/packages/ta-bots/host/index.mjs +157 -0
- package/dist/pi/packages/ta-bots/package.json +7 -2
- package/dist/pi/packages/ta-changes/extension/index.mjs +51 -0
- package/dist/pi/packages/ta-changes/package.json +8 -2
- package/dist/pi/packages/ta-channels/README.en.md +3 -1
- package/dist/pi/packages/ta-channels/README.md +3 -1
- package/dist/pi/packages/ta-channels/extension/index.mjs +55 -2
- package/dist/pi/packages/ta-channels/host/index.mjs +268 -8
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +25 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.js +8 -2
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +1 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +2 -0
- package/dist/pi/packages/ta-channels/lib/room.d.ts +0 -4
- package/dist/pi/packages/ta-channels/lib/room.js +31 -5
- package/dist/pi/packages/ta-channels/lib/sidebar.js +31 -13
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +10 -13
- package/dist/pi/packages/ta-channels/lib/team-view.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/team-view.js +45 -0
- package/dist/pi/packages/ta-channels/lib/team.d.ts +20 -4
- package/dist/pi/packages/ta-channels/lib/team.js +87 -6
- package/dist/pi/packages/ta-channels/lib/views.d.ts +12 -0
- package/dist/pi/packages/ta-channels/lib/views.js +19 -0
- package/dist/pi/packages/ta-channels/package.json +26 -2
- package/dist/pi/packages/ta-channels/web/index.js +191 -36
- package/dist/pi/packages/ta-computer-use/package.json +1 -1
- package/dist/pi/packages/ta-cron/README.en.md +2 -2
- package/dist/pi/packages/ta-cron/README.md +2 -2
- package/dist/pi/packages/ta-cron/extension/index.mjs +91 -257
- package/dist/pi/packages/ta-cron/host/index.mjs +9 -0
- package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +16 -15
- package/dist/pi/packages/ta-cron/lib/chat-task.js +45 -36
- package/dist/pi/packages/ta-cron/lib/extension.js +11 -7
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +5 -7
- package/dist/pi/packages/ta-cron/lib/i18n.js +10 -14
- package/dist/pi/packages/ta-cron/lib/index.js +0 -2
- package/dist/pi/packages/ta-cron/lib/page.d.ts +5 -0
- package/dist/pi/packages/ta-cron/lib/page.js +24 -0
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +8 -0
- package/dist/pi/packages/ta-cron/lib/task-change.d.ts +11 -0
- package/dist/pi/packages/ta-cron/lib/task-change.js +43 -0
- package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +3 -0
- package/dist/pi/packages/ta-cron/lib/task-extension.js +2 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +5 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +13 -0
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +26 -2
- package/dist/pi/packages/ta-cron/package.json +10 -2
- package/dist/pi/packages/ta-cron/web/index.js +607 -784
- package/dist/pi/packages/ta-extensions/README.en.md +1 -2
- package/dist/pi/packages/ta-extensions/README.md +1 -2
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +0 -4
- package/dist/pi/packages/ta-extensions/lib/i18n.js +2 -10
- package/dist/pi/packages/ta-extensions/lib/index.js +0 -2
- package/dist/pi/packages/ta-extensions/package.json +10 -2
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +16 -11
- package/dist/pi/packages/ta-extensions/web/index.js +176 -97
- package/dist/pi/packages/ta-games/package.json +8 -2
- package/dist/pi/packages/ta-glance/README.en.md +1 -0
- package/dist/pi/packages/ta-glance/README.md +1 -0
- package/dist/pi/packages/ta-glance/extension/index.mjs +425 -3
- package/dist/pi/packages/ta-glance/lib/card.js +42 -15
- package/dist/pi/packages/ta-glance/lib/extension.d.ts +3 -0
- package/dist/pi/packages/ta-glance/lib/extension.js +10 -0
- package/dist/pi/packages/ta-glance/lib/glance-ask.d.ts +15 -0
- package/dist/pi/packages/ta-glance/lib/glance-ask.js +97 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +3 -3
- package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.js +3 -1
- package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +7 -1
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +45 -9
- package/dist/pi/packages/ta-glance/lib/i18n.d.ts +5 -0
- package/dist/pi/packages/ta-glance/lib/i18n.js +9 -0
- package/dist/pi/packages/ta-glance/lib/index.js +4 -1
- package/dist/pi/packages/ta-glance/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/style.js +187 -102
- package/dist/pi/packages/ta-glance/package.json +1 -1
- package/dist/pi/packages/ta-glance/web/index.js +272 -124
- package/dist/pi/packages/ta-initiative/README.en.md +66 -0
- package/dist/pi/packages/ta-initiative/README.md +66 -0
- package/dist/pi/packages/ta-initiative/extension/index.mjs +720 -0
- package/dist/pi/packages/ta-initiative/host/index.mjs +1169 -0
- package/dist/pi/packages/ta-initiative/lib/chat-kinds.d.ts +4 -0
- package/dist/pi/packages/ta-initiative/lib/chat-kinds.js +17 -0
- package/dist/pi/packages/ta-initiative/lib/chat-proposals.d.ts +28 -0
- package/dist/pi/packages/ta-initiative/lib/chat-proposals.js +79 -0
- package/dist/pi/packages/ta-initiative/lib/conversation.d.ts +4 -0
- package/dist/pi/packages/ta-initiative/lib/conversation.js +27 -0
- package/dist/pi/packages/ta-initiative/lib/cron-proposals.d.ts +23 -0
- package/dist/pi/packages/ta-initiative/lib/cron-proposals.js +94 -0
- package/dist/pi/packages/ta-initiative/lib/event-proposals.d.ts +13 -0
- package/dist/pi/packages/ta-initiative/lib/event-proposals.js +76 -0
- package/dist/pi/packages/ta-initiative/lib/extension.d.ts +30 -0
- package/dist/pi/packages/ta-initiative/lib/extension.js +238 -0
- package/dist/pi/packages/ta-initiative/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-initiative/lib/host.js +11 -0
- package/dist/pi/packages/ta-initiative/lib/i18n.d.ts +79 -0
- package/dist/pi/packages/ta-initiative/lib/i18n.js +159 -0
- package/dist/pi/packages/ta-initiative/lib/inbox-util.d.ts +19 -0
- package/dist/pi/packages/ta-initiative/lib/inbox-util.js +45 -0
- package/dist/pi/packages/ta-initiative/lib/inbox.d.ts +23 -0
- package/dist/pi/packages/ta-initiative/lib/inbox.js +142 -0
- package/dist/pi/packages/ta-initiative/lib/index.d.ts +10 -0
- package/dist/pi/packages/ta-initiative/lib/index.js +121 -0
- package/dist/pi/packages/ta-initiative/lib/initiative-protocol.d.ts +320 -0
- package/dist/pi/packages/ta-initiative/lib/initiative-protocol.js +96 -0
- package/dist/pi/packages/ta-initiative/lib/initiative-service.d.ts +37 -0
- package/dist/pi/packages/ta-initiative/lib/initiative-service.js +104 -0
- package/dist/pi/packages/ta-initiative/lib/initiative-store.d.ts +44 -0
- package/dist/pi/packages/ta-initiative/lib/initiative-store.js +112 -0
- package/dist/pi/packages/ta-initiative/lib/level-util.d.ts +22 -0
- package/dist/pi/packages/ta-initiative/lib/level-util.js +86 -0
- package/dist/pi/packages/ta-initiative/lib/material-util.d.ts +34 -0
- package/dist/pi/packages/ta-initiative/lib/material-util.js +155 -0
- package/dist/pi/packages/ta-initiative/lib/notices.d.ts +13 -0
- package/dist/pi/packages/ta-initiative/lib/notices.js +65 -0
- package/dist/pi/packages/ta-initiative/lib/notify-util.d.ts +25 -0
- package/dist/pi/packages/ta-initiative/lib/notify-util.js +60 -0
- package/dist/pi/packages/ta-initiative/lib/pace-util.d.ts +21 -0
- package/dist/pi/packages/ta-initiative/lib/pace-util.js +60 -0
- package/dist/pi/packages/ta-initiative/lib/page-initiative.d.ts +9 -0
- package/dist/pi/packages/ta-initiative/lib/page-initiative.js +40 -0
- package/dist/pi/packages/ta-initiative/lib/proposal-book.d.ts +61 -0
- package/dist/pi/packages/ta-initiative/lib/proposal-book.js +397 -0
- package/dist/pi/packages/ta-initiative/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-initiative/lib/react.js +16 -0
- package/dist/pi/packages/ta-initiative/lib/review-service.d.ts +32 -0
- package/dist/pi/packages/ta-initiative/lib/review-service.js +155 -0
- package/dist/pi/packages/ta-initiative/lib/server-texts.d.ts +7 -0
- package/dist/pi/packages/ta-initiative/lib/server-texts.js +17 -0
- package/dist/pi/packages/ta-initiative/lib/settings.d.ts +10 -0
- package/dist/pi/packages/ta-initiative/lib/settings.js +226 -0
- package/dist/pi/packages/ta-initiative/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-initiative/lib/style.js +56 -0
- package/dist/pi/packages/ta-initiative/lib/tool.d.ts +106 -0
- package/dist/pi/packages/ta-initiative/lib/tool.js +98 -0
- package/dist/pi/packages/ta-initiative/package.json +63 -0
- package/dist/pi/packages/ta-initiative/web/index.js +1226 -0
- package/dist/pi/packages/ta-launcher/README.en.md +2 -1
- package/dist/pi/packages/ta-launcher/README.md +2 -1
- package/dist/pi/packages/ta-launcher/lib/i18n.d.ts +2 -0
- package/dist/pi/packages/ta-launcher/lib/i18n.js +4 -0
- package/dist/pi/packages/ta-launcher/lib/launcher-view.js +32 -0
- package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-launcher/lib/style.js +11 -0
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-launcher/web/index.js +58 -1
- package/dist/pi/packages/ta-manual/lib/pictures-b.js +29 -0
- package/dist/pi/packages/ta-manual/lib/pictures-c.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-c.js +160 -0
- package/dist/pi/packages/ta-manual/lib/pictures.js +2 -1
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +5 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +155 -9
- package/dist/pi/packages/ta-manual/package.json +1 -1
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +54 -8
- package/dist/pi/packages/ta-manual/web/index.js +750 -10
- package/dist/pi/packages/ta-moments/README.en.md +29 -0
- package/dist/pi/packages/ta-moments/README.md +29 -0
- package/dist/pi/packages/ta-moments/extension/index.mjs +1766 -0
- package/dist/pi/packages/ta-moments/host/index.mjs +2394 -0
- package/dist/pi/packages/ta-moments/lib/brief-util.d.ts +30 -0
- package/dist/pi/packages/ta-moments/lib/brief-util.js +92 -0
- package/dist/pi/packages/ta-moments/lib/context.d.ts +18 -0
- package/dist/pi/packages/ta-moments/lib/context.js +35 -0
- package/dist/pi/packages/ta-moments/lib/draft-card.d.ts +6 -0
- package/dist/pi/packages/ta-moments/lib/draft-card.js +60 -0
- package/dist/pi/packages/ta-moments/lib/editor.d.ts +16 -0
- package/dist/pi/packages/ta-moments/lib/editor.js +126 -0
- package/dist/pi/packages/ta-moments/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-moments/lib/extension.js +136 -0
- package/dist/pi/packages/ta-moments/lib/friends.d.ts +13 -0
- package/dist/pi/packages/ta-moments/lib/friends.js +27 -0
- package/dist/pi/packages/ta-moments/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-moments/lib/host.js +11 -0
- package/dist/pi/packages/ta-moments/lib/i18n.d.ts +92 -0
- package/dist/pi/packages/ta-moments/lib/i18n.js +201 -0
- package/dist/pi/packages/ta-moments/lib/image-util.d.ts +18 -0
- package/dist/pi/packages/ta-moments/lib/image-util.js +71 -0
- package/dist/pi/packages/ta-moments/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-moments/lib/index.js +50 -0
- package/dist/pi/packages/ta-moments/lib/moments-host.d.ts +133 -0
- package/dist/pi/packages/ta-moments/lib/moments-host.js +821 -0
- package/dist/pi/packages/ta-moments/lib/moments-protocol.d.ts +334 -0
- package/dist/pi/packages/ta-moments/lib/moments-protocol.js +99 -0
- package/dist/pi/packages/ta-moments/lib/page.d.ts +7 -0
- package/dist/pi/packages/ta-moments/lib/page.js +307 -0
- package/dist/pi/packages/ta-moments/lib/post-util.d.ts +31 -0
- package/dist/pi/packages/ta-moments/lib/post-util.js +205 -0
- package/dist/pi/packages/ta-moments/lib/server-texts.d.ts +29 -0
- package/dist/pi/packages/ta-moments/lib/server-texts.js +104 -0
- package/dist/pi/packages/ta-moments/lib/store.d.ts +33 -0
- package/dist/pi/packages/ta-moments/lib/store.js +108 -0
- package/dist/pi/packages/ta-moments/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-moments/lib/style.js +155 -0
- package/dist/pi/packages/ta-moments/lib/talk-host.d.ts +112 -0
- package/dist/pi/packages/ta-moments/lib/talk-host.js +582 -0
- package/dist/pi/packages/ta-moments/lib/talk-util.d.ts +26 -0
- package/dist/pi/packages/ta-moments/lib/talk-util.js +145 -0
- package/dist/pi/packages/ta-moments/lib/tool.d.ts +48 -0
- package/dist/pi/packages/ta-moments/lib/tool.js +56 -0
- package/dist/pi/packages/ta-moments/package.json +61 -0
- package/dist/pi/packages/ta-moments/web/index.js +1987 -0
- package/dist/pi/packages/ta-nearby/README.en.md +33 -0
- package/dist/pi/packages/ta-nearby/README.md +33 -0
- package/dist/pi/packages/ta-nearby/extension/index.mjs +389 -0
- package/dist/pi/packages/ta-nearby/host/index.mjs +1859 -0
- package/dist/pi/packages/ta-nearby/lib/extension.d.ts +27 -0
- package/dist/pi/packages/ta-nearby/lib/extension.js +190 -0
- package/dist/pi/packages/ta-nearby/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-nearby/lib/host.js +20 -0
- package/dist/pi/packages/ta-nearby/lib/i18n.d.ts +92 -0
- package/dist/pi/packages/ta-nearby/lib/i18n.js +183 -0
- package/dist/pi/packages/ta-nearby/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-nearby/lib/index.js +38 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-crypto.d.ts +31 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-crypto.js +59 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-meet.d.ts +35 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-meet.js +93 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-net.d.ts +59 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-net.js +253 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-protocol.d.ts +274 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-protocol.js +31 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service.d.ts +199 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service.js +1012 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-spot.d.ts +50 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-spot.js +167 -0
- package/dist/pi/packages/ta-nearby/lib/page.d.ts +52 -0
- package/dist/pi/packages/ta-nearby/lib/page.js +588 -0
- package/dist/pi/packages/ta-nearby/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-nearby/lib/react.js +8 -0
- package/dist/pi/packages/ta-nearby/lib/server-texts.d.ts +45 -0
- package/dist/pi/packages/ta-nearby/lib/server-texts.js +148 -0
- package/dist/pi/packages/ta-nearby/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-nearby/lib/style.js +92 -0
- package/dist/pi/packages/ta-nearby/package.json +65 -0
- package/dist/pi/packages/ta-nearby/web/index.js +1055 -0
- package/dist/pi/packages/ta-notify/README.en.md +3 -1
- package/dist/pi/packages/ta-notify/README.md +3 -1
- package/dist/pi/packages/ta-notify/extension/index.mjs +64 -0
- package/dist/pi/packages/ta-notify/host/index.mjs +24 -1
- package/dist/pi/packages/ta-notify/lib/extension.d.ts +4 -1
- package/dist/pi/packages/ta-notify/lib/extension.js +20 -1
- package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +23 -3
- package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +4 -2
- package/dist/pi/packages/ta-notify/lib/notify-service.js +27 -2
- package/dist/pi/packages/ta-notify/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-notify/lib/style.js +1 -1
- package/dist/pi/packages/ta-notify/lib/watcher.js +2 -1
- package/dist/pi/packages/ta-notify/package.json +7 -2
- package/dist/pi/packages/ta-notify/web/index.js +3 -2
- package/dist/pi/packages/ta-recall/README.en.md +15 -6
- package/dist/pi/packages/ta-recall/README.md +15 -6
- package/dist/pi/packages/ta-recall/extension/index.mjs +291 -134
- package/dist/pi/packages/ta-recall/host/index.mjs +451 -116
- package/dist/pi/packages/ta-recall/lib/block-util.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/block-util.js +43 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +25 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.js +38 -1
- package/dist/pi/packages/ta-recall/lib/composer.d.ts +3 -2
- package/dist/pi/packages/ta-recall/lib/composer.js +9 -8
- package/dist/pi/packages/ta-recall/lib/conversations.js +6 -0
- package/dist/pi/packages/ta-recall/lib/extension-util.d.ts +21 -0
- package/dist/pi/packages/ta-recall/lib/extension-util.js +104 -0
- package/dist/pi/packages/ta-recall/lib/extension.d.ts +3 -3
- package/dist/pi/packages/ta-recall/lib/extension.js +35 -26
- package/dist/pi/packages/ta-recall/lib/i18n.d.ts +18 -10
- package/dist/pi/packages/ta-recall/lib/i18n.js +40 -24
- package/dist/pi/packages/ta-recall/lib/index.d.ts +2 -2
- package/dist/pi/packages/ta-recall/lib/index.js +5 -4
- package/dist/pi/packages/ta-recall/lib/keep-card.d.ts +10 -0
- package/dist/pi/packages/ta-recall/lib/keep-card.js +83 -0
- package/dist/pi/packages/ta-recall/lib/keep-util.d.ts +15 -0
- package/dist/pi/packages/ta-recall/lib/keep-util.js +55 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +92 -18
- package/dist/pi/packages/ta-recall/lib/recall-protocol.js +19 -9
- package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +16 -6
- package/dist/pi/packages/ta-recall/lib/recall-service.js +101 -11
- package/dist/pi/packages/ta-recall/lib/requests-util.d.ts +6 -0
- package/dist/pi/packages/ta-recall/lib/requests-util.js +37 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +2 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.js +5 -0
- package/dist/pi/packages/ta-recall/lib/settings.d.ts +1 -1
- package/dist/pi/packages/ta-recall/lib/settings.js +1 -1
- package/dist/pi/packages/ta-recall/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-recall/lib/style.js +2 -2
- package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +2 -2
- package/dist/pi/packages/ta-recall/lib/tool-line.js +10 -5
- package/dist/pi/packages/ta-recall/lib/tool.d.ts +14 -5
- package/dist/pi/packages/ta-recall/lib/tool.js +29 -17
- package/dist/pi/packages/ta-recall/package.json +13 -5
- package/dist/pi/packages/ta-recall/web/index.js +397 -153
- package/dist/pi/packages/ta-rooms/README.en.md +14 -5
- package/dist/pi/packages/ta-rooms/README.md +14 -5
- package/dist/pi/packages/ta-rooms/extension/index.mjs +526 -0
- package/dist/pi/packages/ta-rooms/host/index.mjs +1734 -0
- package/dist/pi/packages/ta-rooms/lib/agents-view.d.ts +25 -0
- package/dist/pi/packages/ta-rooms/lib/agents-view.js +128 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.js +5 -0
- package/dist/pi/packages/ta-rooms/lib/double-agents.d.ts +26 -0
- package/dist/pi/packages/ta-rooms/lib/double-agents.js +84 -0
- package/dist/pi/packages/ta-rooms/lib/double-grants.d.ts +22 -0
- package/dist/pi/packages/ta-rooms/lib/double-grants.js +140 -0
- package/dist/pi/packages/ta-rooms/lib/double-host.d.ts +117 -0
- package/dist/pi/packages/ta-rooms/lib/double-host.js +476 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.d.ts +105 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.js +212 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.d.ts +258 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.js +128 -0
- package/dist/pi/packages/ta-rooms/lib/double-tasks.d.ts +82 -0
- package/dist/pi/packages/ta-rooms/lib/double-tasks.js +527 -0
- package/dist/pi/packages/ta-rooms/lib/double-user.d.ts +19 -0
- package/dist/pi/packages/ta-rooms/lib/double-user.js +124 -0
- package/dist/pi/packages/ta-rooms/lib/double-util.d.ts +131 -0
- package/dist/pi/packages/ta-rooms/lib/double-util.js +238 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-store.d.ts +48 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-store.js +151 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-view.d.ts +34 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-view.js +228 -0
- package/dist/pi/packages/ta-rooms/lib/extension.d.ts +33 -0
- package/dist/pi/packages/ta-rooms/lib/extension.js +203 -0
- package/dist/pi/packages/ta-rooms/lib/friend-notices.d.ts +12 -0
- package/dist/pi/packages/ta-rooms/lib/friend-notices.js +47 -0
- package/dist/pi/packages/ta-rooms/lib/friends-view.d.ts +20 -0
- package/dist/pi/packages/ta-rooms/lib/friends-view.js +224 -0
- package/dist/pi/packages/ta-rooms/lib/host.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/host.js +25 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +27 -2
- package/dist/pi/packages/ta-rooms/lib/i18n.js +68 -18
- package/dist/pi/packages/ta-rooms/lib/index.js +41 -3
- package/dist/pi/packages/ta-rooms/lib/members-view.js +44 -3
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +97 -10
- package/dist/pi/packages/ta-rooms/lib/page.js +223 -45
- package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +2 -4
- package/dist/pi/packages/ta-rooms/lib/room-view.js +57 -35
- package/dist/pi/packages/ta-rooms/lib/rooms-home.d.ts +32 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-home.js +141 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -2
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +68 -36
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-rooms/lib/style.js +126 -50
- package/dist/pi/packages/ta-rooms/lib/tasks-view.d.ts +41 -0
- package/dist/pi/packages/ta-rooms/lib/tasks-view.js +228 -0
- package/dist/pi/packages/ta-rooms/package.json +19 -4
- package/dist/pi/packages/ta-rooms/web/index.js +2585 -470
- package/dist/pi/packages/ta-share/README.en.md +1 -1
- package/dist/pi/packages/ta-share/README.md +1 -1
- package/dist/pi/packages/ta-share/extension/index.mjs +51 -0
- package/dist/pi/packages/ta-share/lib/i18n.js +6 -6
- package/dist/pi/packages/ta-share/lib/share-dialog.js +1 -1
- package/dist/pi/packages/ta-share/lib/shares-page.js +35 -11
- package/dist/pi/packages/ta-share/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-share/lib/style.js +14 -10
- package/dist/pi/packages/ta-share/package.json +10 -2
- package/dist/pi/packages/ta-share/web/index.js +56 -31
- package/dist/pi/packages/ta-sync/README.en.md +55 -0
- package/dist/pi/packages/ta-sync/README.md +55 -0
- package/dist/pi/packages/ta-sync/host/index.mjs +3763 -0
- package/dist/pi/packages/ta-sync/lib/host.d.ts +10 -0
- package/dist/pi/packages/ta-sync/lib/host.js +94 -0
- package/dist/pi/packages/ta-sync/lib/i18n.d.ts +98 -0
- package/dist/pi/packages/ta-sync/lib/i18n.js +202 -0
- package/dist/pi/packages/ta-sync/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-sync/lib/index.js +115 -0
- package/dist/pi/packages/ta-sync/lib/migrate-archive.d.ts +88 -0
- package/dist/pi/packages/ta-sync/lib/migrate-archive.js +439 -0
- package/dist/pi/packages/ta-sync/lib/migrate-frames.d.ts +77 -0
- package/dist/pi/packages/ta-sync/lib/migrate-frames.js +210 -0
- package/dist/pi/packages/ta-sync/lib/migrate-i18n.d.ts +99 -0
- package/dist/pi/packages/ta-sync/lib/migrate-i18n.js +210 -0
- package/dist/pi/packages/ta-sync/lib/migrate-net.d.ts +51 -0
- package/dist/pi/packages/ta-sync/lib/migrate-net.js +170 -0
- package/dist/pi/packages/ta-sync/lib/migrate-protocol.d.ts +126 -0
- package/dist/pi/packages/ta-sync/lib/migrate-protocol.js +43 -0
- package/dist/pi/packages/ta-sync/lib/migrate-service.d.ts +86 -0
- package/dist/pi/packages/ta-sync/lib/migrate-service.js +521 -0
- package/dist/pi/packages/ta-sync/lib/move-panel.d.ts +16 -0
- package/dist/pi/packages/ta-sync/lib/move-panel.js +320 -0
- package/dist/pi/packages/ta-sync/lib/move-store.d.ts +15 -0
- package/dist/pi/packages/ta-sync/lib/move-store.js +42 -0
- package/dist/pi/packages/ta-sync/lib/panel.d.ts +28 -0
- package/dist/pi/packages/ta-sync/lib/panel.js +305 -0
- package/dist/pi/packages/ta-sync/lib/pictures.d.ts +22 -0
- package/dist/pi/packages/ta-sync/lib/pictures.js +92 -0
- package/dist/pi/packages/ta-sync/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-sync/lib/react.js +16 -0
- package/dist/pi/packages/ta-sync/lib/server-texts.d.ts +29 -0
- package/dist/pi/packages/ta-sync/lib/server-texts.js +111 -0
- package/dist/pi/packages/ta-sync/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-sync/lib/style.js +108 -0
- package/dist/pi/packages/ta-sync/lib/sync-codec.d.ts +16 -0
- package/dist/pi/packages/ta-sync/lib/sync-codec.js +61 -0
- package/dist/pi/packages/ta-sync/lib/sync-engine.d.ts +57 -0
- package/dist/pi/packages/ta-sync/lib/sync-engine.js +203 -0
- package/dist/pi/packages/ta-sync/lib/sync-folder.d.ts +156 -0
- package/dist/pi/packages/ta-sync/lib/sync-folder.js +385 -0
- package/dist/pi/packages/ta-sync/lib/sync-identity.d.ts +60 -0
- package/dist/pi/packages/ta-sync/lib/sync-identity.js +201 -0
- package/dist/pi/packages/ta-sync/lib/sync-items.d.ts +104 -0
- package/dist/pi/packages/ta-sync/lib/sync-items.js +426 -0
- package/dist/pi/packages/ta-sync/lib/sync-merge.d.ts +42 -0
- package/dist/pi/packages/ta-sync/lib/sync-merge.js +109 -0
- package/dist/pi/packages/ta-sync/lib/sync-protocol.d.ts +134 -0
- package/dist/pi/packages/ta-sync/lib/sync-protocol.js +72 -0
- package/dist/pi/packages/ta-sync/lib/sync-service.d.ts +128 -0
- package/dist/pi/packages/ta-sync/lib/sync-service.js +679 -0
- package/dist/pi/packages/ta-sync/lib/sync-store.d.ts +15 -0
- package/dist/pi/packages/ta-sync/lib/sync-store.js +41 -0
- package/dist/pi/packages/ta-sync/package.json +57 -0
- package/dist/pi/packages/ta-sync/web/index.js +2018 -0
- package/dist/pi/packages/ta-sync-cloud/README.en.md +31 -0
- package/dist/pi/packages/ta-sync-cloud/README.md +31 -0
- package/dist/pi/packages/ta-sync-cloud/host/index.mjs +810 -0
- package/dist/pi/packages/ta-sync-cloud/lib/git-store.d.ts +90 -0
- package/dist/pi/packages/ta-sync-cloud/lib/git-store.js +393 -0
- package/dist/pi/packages/ta-sync-cloud/lib/host.d.ts +13 -0
- package/dist/pi/packages/ta-sync-cloud/lib/host.js +112 -0
- package/dist/pi/packages/ta-sync-cloud/lib/s3-store.d.ts +72 -0
- package/dist/pi/packages/ta-sync-cloud/lib/s3-store.js +206 -0
- package/dist/pi/packages/ta-sync-cloud/lib/store-util.d.ts +17 -0
- package/dist/pi/packages/ta-sync-cloud/lib/store-util.js +69 -0
- package/dist/pi/packages/ta-sync-cloud/lib/webdav-store.d.ts +40 -0
- package/dist/pi/packages/ta-sync-cloud/lib/webdav-store.js +144 -0
- package/dist/pi/packages/ta-sync-cloud/package.json +63 -0
- package/dist/pi/packages/ta-team/README.en.md +28 -0
- package/dist/pi/packages/ta-team/README.md +28 -0
- package/dist/pi/packages/ta-team/extension/index.mjs +264 -0
- package/dist/pi/packages/ta-team/host/index.mjs +2100 -0
- package/dist/pi/packages/ta-team/lib/dialogs.d.ts +13 -0
- package/dist/pi/packages/ta-team/lib/dialogs.js +335 -0
- package/dist/pi/packages/ta-team/lib/extension.d.ts +21 -0
- package/dist/pi/packages/ta-team/lib/extension.js +123 -0
- package/dist/pi/packages/ta-team/lib/host.d.ts +13 -0
- package/dist/pi/packages/ta-team/lib/host.js +45 -0
- package/dist/pi/packages/ta-team/lib/i18n.d.ts +200 -0
- package/dist/pi/packages/ta-team/lib/i18n.js +401 -0
- package/dist/pi/packages/ta-team/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-team/lib/index.js +67 -0
- package/dist/pi/packages/ta-team/lib/join.d.ts +28 -0
- package/dist/pi/packages/ta-team/lib/join.js +48 -0
- package/dist/pi/packages/ta-team/lib/member-dialog.d.ts +2 -0
- package/dist/pi/packages/ta-team/lib/member-dialog.js +121 -0
- package/dist/pi/packages/ta-team/lib/members-tab.d.ts +11 -0
- package/dist/pi/packages/ta-team/lib/members-tab.js +133 -0
- package/dist/pi/packages/ta-team/lib/page.d.ts +42 -0
- package/dist/pi/packages/ta-team/lib/page.js +142 -0
- package/dist/pi/packages/ta-team/lib/parts.d.ts +39 -0
- package/dist/pi/packages/ta-team/lib/parts.js +47 -0
- package/dist/pi/packages/ta-team/lib/policy.d.ts +37 -0
- package/dist/pi/packages/ta-team/lib/policy.js +215 -0
- package/dist/pi/packages/ta-team/lib/protocol.d.ts +285 -0
- package/dist/pi/packages/ta-team/lib/protocol.js +119 -0
- package/dist/pi/packages/ta-team/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-team/lib/react.js +8 -0
- package/dist/pi/packages/ta-team/lib/record-tab.d.ts +8 -0
- package/dist/pi/packages/ta-team/lib/record-tab.js +90 -0
- package/dist/pi/packages/ta-team/lib/remote.d.ts +31 -0
- package/dist/pi/packages/ta-team/lib/remote.js +128 -0
- package/dist/pi/packages/ta-team/lib/roles-tab.d.ts +9 -0
- package/dist/pi/packages/ta-team/lib/roles-tab.js +76 -0
- package/dist/pi/packages/ta-team/lib/seal.d.ts +28 -0
- package/dist/pi/packages/ta-team/lib/seal.js +75 -0
- package/dist/pi/packages/ta-team/lib/shared-home.d.ts +23 -0
- package/dist/pi/packages/ta-team/lib/shared-home.js +123 -0
- package/dist/pi/packages/ta-team/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-team/lib/style.js +99 -0
- package/dist/pi/packages/ta-team/lib/team-admin.d.ts +31 -0
- package/dist/pi/packages/ta-team/lib/team-admin.js +140 -0
- package/dist/pi/packages/ta-team/lib/team-audit.d.ts +35 -0
- package/dist/pi/packages/ta-team/lib/team-audit.js +152 -0
- package/dist/pi/packages/ta-team/lib/team-core.d.ts +58 -0
- package/dist/pi/packages/ta-team/lib/team-core.js +115 -0
- package/dist/pi/packages/ta-team/lib/team-error.d.ts +4 -0
- package/dist/pi/packages/ta-team/lib/team-error.js +8 -0
- package/dist/pi/packages/ta-team/lib/team-expiry.d.ts +15 -0
- package/dist/pi/packages/ta-team/lib/team-expiry.js +67 -0
- package/dist/pi/packages/ta-team/lib/team-files.d.ts +21 -0
- package/dist/pi/packages/ta-team/lib/team-files.js +119 -0
- package/dist/pi/packages/ta-team/lib/team-inbox.d.ts +8 -0
- package/dist/pi/packages/ta-team/lib/team-inbox.js +32 -0
- package/dist/pi/packages/ta-team/lib/team-invites.d.ts +46 -0
- package/dist/pi/packages/ta-team/lib/team-invites.js +204 -0
- package/dist/pi/packages/ta-team/lib/team-page.d.ts +6 -0
- package/dist/pi/packages/ta-team/lib/team-page.js +41 -0
- package/dist/pi/packages/ta-team/lib/team-paths.d.ts +15 -0
- package/dist/pi/packages/ta-team/lib/team-paths.js +70 -0
- package/dist/pi/packages/ta-team/lib/team-people.d.ts +28 -0
- package/dist/pi/packages/ta-team/lib/team-people.js +106 -0
- package/dist/pi/packages/ta-team/lib/team-requests.d.ts +24 -0
- package/dist/pi/packages/ta-team/lib/team-requests.js +126 -0
- package/dist/pi/packages/ta-team/lib/team-runs.d.ts +38 -0
- package/dist/pi/packages/ta-team/lib/team-runs.js +136 -0
- package/dist/pi/packages/ta-team/lib/team-service.d.ts +32 -0
- package/dist/pi/packages/ta-team/lib/team-service.js +58 -0
- package/dist/pi/packages/ta-team/lib/team-shares.d.ts +52 -0
- package/dist/pi/packages/ta-team/lib/team-shares.js +145 -0
- package/dist/pi/packages/ta-team/lib/team-waits.d.ts +8 -0
- package/dist/pi/packages/ta-team/lib/team-waits.js +42 -0
- package/dist/pi/packages/ta-team/lib/team-watch.d.ts +28 -0
- package/dist/pi/packages/ta-team/lib/team-watch.js +136 -0
- package/dist/pi/packages/ta-team/package.json +68 -0
- package/dist/pi/packages/ta-team/web/index.js +2741 -0
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +157 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-D9uU0Tx2.js → abnfDiagram-S7VZAUFO-DJMZKA5d.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-f7Nm7EIo.js → architecture-WOLXFQ4H-DwZ8A2Bp.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-DSAqlcms.js → architectureDiagram-YGSQEFNW-DPezb7-w.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-C0lPIW9g.js → blockDiagram-APKKGZFW-SrFYBlSp.js} +1 -1
- package/dist/public/assets/{browser-WLpgVYno.js → browser-CljOqDFz.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CDcZ7mJq.js → c4Diagram-KJ2TOQU5-COCMkiJ6.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-CXPuyqPL.js → chunk-6MUBBAK2-CWRxZCiu.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-Du6JRX1x.js → chunk-AXFCVDMN-Dgn3RHlx.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-D592E55X.js → chunk-BG4553SI-BDnAChfb.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-BW2r2SL4.js → chunk-DQASFODM-DSgprMfc.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C3yoe54R.js → chunk-HFQBQIA3-ChtjyKjP.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-DF8gfYCy.js → chunk-KQLB2F66-B2o0ufJC.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-C8CRMTv1.js → chunk-KS47KZWR-C4qJvDaX.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-BDcMKiwj.js → chunk-LEVMRMFU-2jTGUstS.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-CKJPBygc.js → chunk-M57EVK23-CKAWW7fj.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-B3ZWH07L.js → chunk-OY52VR5R-B5TUKZAt.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-DI-z4UPL.js → chunk-QB3YPZ4I-CyQFTqwG.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-Bg4-haAc.js → chunk-R3KSYZAL-C6git_yh.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-l_SHib3p.js → chunk-STOXU5M4-AwEqcNnS.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-BINu9tIm.js → chunk-TU62E6Q5-GKcRDmvw.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BQn-mvV5.js → chunk-X4PVCEUW-CMG5EfZ9.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-uvpAu0Ys.js → chunk-XXDRQBXY-BHd-dKtZ.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-BIowooW1.js → classDiagram-v2-L25IHNXF-HaRsBCG9.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-BTyx1Mh2.js → cose-bilkent-JH36ORCC-BPBTCfj3.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-DyqqRII3.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-D64EU9I0.js → cynefinDiagram-L36ESFBY-dAmWDtva.js} +1 -1
- package/dist/public/assets/{d3-selection-CN9k6_B9.js → d3-selection-BhemR5ul.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-FCbz2-Kk.js → dagre-SPEB5RXH-D93g6hNI.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-OhHUSI7j.js → diagram-3B7GL73J-FJBKgG3X.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-Be4xMtp6.js → diagram-DNEMPZML-BP22T976.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-CmKSs3aG.js → diagram-L3MUGCDN-DcrCJXRt.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-D1C32rMN.js → diagram-LA4NIPWU-DUgd3PHQ.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BjoE6JXs.js → diagram-MHCOC4E2-ejTInqzQ.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-B22k4v8R.js → diagram-XPFHEONP-BLjkgho1.js} +1 -1
- package/dist/public/assets/{dist-DcBP8Cf6.js → dist-C9xqTt0E.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-Tn-K8-X7.js → ebnfDiagram-UZSYDL2S-CB1QQ4_T.js} +1 -1
- package/dist/public/assets/{editor.api-Bz4sjRz_.js → editor.api-lz6I1oVk.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-COnQsWlN.js → elk-XV6XMXQE-CLBx1s2b.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-c53dJilq.js → erDiagram-EYBAPDEH-Dsj6RYi5.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-DaFpPPks.js → eventmodeling-K75KTNOO-smOORsSG.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-DFmQPJ7B.js +1 -0
- package/dist/public/assets/{freemarker2-BLxfRHsw.js → freemarker2-DrLPw7Mc.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-Md-SavIS.js → ganttDiagram-23REXITY-BV9WK0rK.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-ybrJCK6u.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CMSwTghO.js → gitGraphDiagram-STJD7YCW-CsSpSQ0T.js} +1 -1
- package/dist/public/assets/{handlebars-sNpu01kP.js → handlebars-CLx5-csF.js} +1 -1
- package/dist/public/assets/{html-C_tKd-uP.js → html-C9LmGm46.js} +1 -1
- package/dist/public/assets/{index-Bn86rI4n.js → index-CLWW0mVu.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-n41_wZE4.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-CwgNj-7i.js → infoDiagram-KBXO4MBG-wm5AnXDz.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-BSlzQNMN.js → ishikawaDiagram-M35NCXHK-BLUBDeS3.js} +1 -1
- package/dist/public/assets/{javascript-l3qKw0L-.js → javascript-C4S1eQb7.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-B09LPEnF.js → journeyDiagram-OPLOXDXO-DXc7-I_g.js} +1 -1
- package/dist/public/assets/{jsonMode-5SQQn1EX.js → jsonMode-lLJKR2M6.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-BiW4aJ29.js → kanban-definition-BZKZHSQY-D5Ra4L_5.js} +1 -1
- package/dist/public/assets/{liquid-BGyTIIUt.js → liquid-DRlm-XZd.js} +1 -1
- package/dist/public/assets/{mdx-8tGjz4em.js → mdx-CzIqeqPy.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-CctN5b0z.js → mermaid-parser.core-BIPB1BgS.js} +3 -3
- package/dist/public/assets/{mermaid.core-7ERSdZ4-.js → mermaid.core-DxBlQ6oF.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-D-GOUwW1.js → mindmap-definition-I2QAS2VK-BdupvuYr.js} +1 -1
- package/dist/public/assets/module-BPxWyxwR.js +2362 -0
- package/dist/public/assets/module-C_MSCGQC.js +1 -0
- package/dist/public/assets/{monaco-B_9hlk78.js → monaco-ChpJIYsY.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-BjrqMgis.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-Dmy1fWB3.js → pegDiagram-FD4XPPHP-C_GF7Fng.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-CJSA88kr.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-CXFHLYTg.js → pieDiagram-J4AKIIQI-WlpNP-IM.js} +1 -1
- package/dist/public/assets/{python-e-JK0s5M.js → python-BJgFCfc8.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-RQvEpGWO.js → quadrantDiagram-XTYBLID2-CkCL5rJY.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-4nLUXAkG.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-BD2LqZSr.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-CDOSPZwX.js → railroad-abnf-LNEFI6M7-DZZKUytl.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js → railroad-ebnf-DWYD2UWJ-CS7KsJdb.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-B7NtVofS.js → railroad-peg-JR7BVNR7-CiukTZVd.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-DsDrT0Jf.js → railroadDiagram-MRQ6NCDL-BS0R_H3-.js} +1 -1
- package/dist/public/assets/{razor-DtSPwumi.js → razor-jcBIjr45.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-BQh0hFuA.js → requirementDiagram-Y7LWUY3S-C0_T9jgl.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-BUXNAQEF.js → sankeyDiagram-WGJFYUXA-DF15sUfS.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-05f-N5V_.js → sequenceDiagram-5NDRBG5M-7AkTLleX.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js → stateDiagram-v2-FJ4FJNEA-CU3i-U9q.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-DWhlPvKs.js → swimlanes-UMQ2AFYF-CR-ieLeo.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-COK2pFDF.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-CMdocOui.js → timeline-definition-SEUHKTQE-DeM0Uekm.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-BL13z_2J.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-Lx2qjQpO.js +1 -0
- package/dist/public/assets/{typescript-65jNyipU.js → typescript-B7zp7QPf.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-BQTHUX1f.js → usecaseDiagram-AFA6YXN4-D6rDIgdU.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-BULkVTfA.js → vennDiagram-NNMJR3RB-CncVDcMl.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-B4j5rilS.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-Cek6l8lz.js → wardleyDiagram-S7YFUSEH-DKPAMfTE.js} +1 -1
- package/dist/public/assets/{xml-DWBejfu-.js → xml-BJIgLD52.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-ujnZQTWA.js → xychartDiagram-GGNKY7IX-DmmXGebm.js} +1 -1
- package/dist/public/assets/{yaml-CwRCT7q1.js → yaml-Dxb2gmP5.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +7767 -3392
- package/package.json +37 -31
- package/dist/pi/packages/ta-cron/lib/composer.d.ts +0 -11
- package/dist/pi/packages/ta-cron/lib/composer.js +0 -58
- package/dist/pi/packages/ta-extensions/lib/composer.d.ts +0 -17
- package/dist/pi/packages/ta-extensions/lib/composer.js +0 -84
- package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +0 -9
- package/dist/pi/packages/ta-recall/lib/skill-card.js +0 -51
- package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +0 -19
- package/dist/pi/packages/ta-recall/lib/skill-util.js +0 -110
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +0 -1
- package/dist/public/assets/module-DEqsdd00.js +0 -1
- package/dist/public/assets/module-TWc52XwT.js +0 -2244
- package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.doubles = exports.DoublesStore = void 0;
|
|
4
|
+
exports.useDoubles = useDoubles;
|
|
5
|
+
exports.callDoubles = callDoubles;
|
|
6
|
+
exports.mentionName = mentionName;
|
|
7
|
+
exports.askable = askable;
|
|
8
|
+
exports.names = names;
|
|
9
|
+
exports.addressed = addressed;
|
|
10
|
+
exports.grantsOf = grantsOf;
|
|
11
|
+
exports.left = left;
|
|
12
|
+
exports.capabilityName = capabilityName;
|
|
13
|
+
exports.mayLine = mayLine;
|
|
14
|
+
const double_i18n_1 = require("./double-i18n");
|
|
15
|
+
const double_protocol_1 = require("./double-protocol");
|
|
16
|
+
const page_1 = require("./page");
|
|
17
|
+
const react_1 = require("./react");
|
|
18
|
+
const KEYS = [double_protocol_1.DoubleKeys.QUIET, double_protocol_1.DoubleKeys.GRANTS, double_protocol_1.DoubleKeys.ASKS, double_protocol_1.DoubleKeys.LOG, double_protocol_1.DoubleKeys.TASKS, double_protocol_1.DoubleKeys.HANDED];
|
|
19
|
+
/** What the server side of the package keeps of the doubles (double-host.ts), read from its data as it changes. */
|
|
20
|
+
class DoublesStore {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.state = { quiet: {}, grants: [], asks: [], log: [], tasks: [], handed: [] };
|
|
23
|
+
this.listeners = new Set();
|
|
24
|
+
this.started = false;
|
|
25
|
+
}
|
|
26
|
+
get() {
|
|
27
|
+
return this.state;
|
|
28
|
+
}
|
|
29
|
+
subscribe(listener) {
|
|
30
|
+
this.listeners.add(listener);
|
|
31
|
+
return () => this.listeners.delete(listener);
|
|
32
|
+
}
|
|
33
|
+
/** Reads it, and again as the keys change; once. */
|
|
34
|
+
start() {
|
|
35
|
+
if (this.started || !page_1.pi.storage) {
|
|
36
|
+
return () => undefined;
|
|
37
|
+
}
|
|
38
|
+
this.started = true;
|
|
39
|
+
const stop = page_1.pi.storage.onChange(keys => {
|
|
40
|
+
const changed = keys.filter(key => KEYS.includes(key));
|
|
41
|
+
if (changed.length) {
|
|
42
|
+
void this.read(changed);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
void this.read(KEYS);
|
|
46
|
+
return () => {
|
|
47
|
+
stop();
|
|
48
|
+
this.started = false;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async read(keys) {
|
|
52
|
+
var _a;
|
|
53
|
+
const values = await Promise.all(keys.map(key => page_1.pi.storage.get(key).catch(() => undefined)));
|
|
54
|
+
const next = { ...this.state };
|
|
55
|
+
keys.forEach((key, index) => {
|
|
56
|
+
const value = values[index];
|
|
57
|
+
if (key === double_protocol_1.DoubleKeys.QUIET) {
|
|
58
|
+
next.quiet = value && typeof value === 'object' ? value : {};
|
|
59
|
+
}
|
|
60
|
+
else if (key === double_protocol_1.DoubleKeys.GRANTS) {
|
|
61
|
+
next.grants = Array.isArray(value) ? value : [];
|
|
62
|
+
}
|
|
63
|
+
else if (key === double_protocol_1.DoubleKeys.ASKS) {
|
|
64
|
+
next.asks = Array.isArray(value) ? value : [];
|
|
65
|
+
}
|
|
66
|
+
else if (key === double_protocol_1.DoubleKeys.LOG) {
|
|
67
|
+
next.log = Array.isArray(value) ? value : [];
|
|
68
|
+
}
|
|
69
|
+
else if (key === double_protocol_1.DoubleKeys.TASKS) {
|
|
70
|
+
next.tasks = Array.isArray(value) ? value : [];
|
|
71
|
+
}
|
|
72
|
+
else if (key === double_protocol_1.DoubleKeys.HANDED) {
|
|
73
|
+
next.handed = Array.isArray(value) ? value : [];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const known = new Set(this.state.asks.map(ask => ask.id));
|
|
77
|
+
const fresh = keys.includes(double_protocol_1.DoubleKeys.ASKS) ? next.asks.filter(ask => !known.has(ask.id)) : [];
|
|
78
|
+
this.state = next;
|
|
79
|
+
for (const listener of this.listeners) {
|
|
80
|
+
listener();
|
|
81
|
+
}
|
|
82
|
+
if (fresh.length) {
|
|
83
|
+
(_a = this.onAsk) === null || _a === void 0 ? void 0 : _a.call(this, fresh);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.DoublesStore = DoublesStore;
|
|
88
|
+
exports.doubles = new DoublesStore();
|
|
89
|
+
function useDoubles() {
|
|
90
|
+
return react_1.React.useSyncExternalStore(listener => exports.doubles.subscribe(listener), () => exports.doubles.get());
|
|
91
|
+
}
|
|
92
|
+
/** The user's word to the server side (double-host.ts); a Ta of before the doubles of rooms says to update. */
|
|
93
|
+
async function callDoubles(request) {
|
|
94
|
+
try {
|
|
95
|
+
return await page_1.pi.callHost('doubles', request);
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
99
|
+
throw new Error(/no method|no host/i.test(text) ? (0, double_i18n_1.dt)('oldServer') : text);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** How the message box names the double of a member, after its @. */
|
|
103
|
+
function mentionName(name) {
|
|
104
|
+
return (0, double_i18n_1.dt)('doubleOf', { name });
|
|
105
|
+
}
|
|
106
|
+
/** Those of a room whose doubles can be asked: the others, but web guests. */
|
|
107
|
+
function askable(room) {
|
|
108
|
+
return room.members.filter(member => !member.self && !member.guest);
|
|
109
|
+
}
|
|
110
|
+
/** Whether a line names `name` with @, as a whole name (not the start of a longer one). */
|
|
111
|
+
function names(text, name) {
|
|
112
|
+
const quoted = name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
113
|
+
return new RegExp(`@${quoted}(?![\\p{L}\\p{N}_])`, 'u').test(text);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Whom a line asks (RelayChatLine.to): the members whose doubles it names with @, as the message box puts them, and the
|
|
117
|
+
* agents in the room it names.
|
|
118
|
+
*/
|
|
119
|
+
function addressed(text, room, agents = []) {
|
|
120
|
+
return [
|
|
121
|
+
...askable(room)
|
|
122
|
+
.filter(member => text.includes(`@${mentionName(member.name)}`))
|
|
123
|
+
.map(member => member.member),
|
|
124
|
+
...agents.filter(agent => names(text, agent.name)).map(agent => double_protocol_1.RoomAgentsUtil.address(agent.member, agent.id)),
|
|
125
|
+
];
|
|
126
|
+
}
|
|
127
|
+
/** What holds of the permissions of one, now. */
|
|
128
|
+
function grantsOf(grants, friend, now = Date.now()) {
|
|
129
|
+
return grants.filter(grant => grant.friend === friend && grant.expiresAt > now);
|
|
130
|
+
}
|
|
131
|
+
/** How long a permission still holds, in a few characters. */
|
|
132
|
+
function left(until, now = Date.now()) {
|
|
133
|
+
const minutes = Math.max(1, Math.round((until - now) / 60000));
|
|
134
|
+
if (minutes < 60) {
|
|
135
|
+
return (0, double_i18n_1.dt)('leftMinutes', { n: minutes });
|
|
136
|
+
}
|
|
137
|
+
const hours = Math.round(minutes / 60);
|
|
138
|
+
return hours < 48 ? (0, double_i18n_1.dt)('left', { n: hours }) : (0, double_i18n_1.dt)('leftDays', { n: Math.round(hours / 24) });
|
|
139
|
+
}
|
|
140
|
+
function capabilityName(capability) {
|
|
141
|
+
return capability === 'files' ? (0, double_i18n_1.dt)('mayFiles') : (0, double_i18n_1.dt)('mayCommands');
|
|
142
|
+
}
|
|
143
|
+
/** What the double may do for one, on a line: `files, commands · 5 h left`; empty with nothing. */
|
|
144
|
+
function mayLine(grants) {
|
|
145
|
+
if (grants.length === 0) {
|
|
146
|
+
return '';
|
|
147
|
+
}
|
|
148
|
+
const what = [...new Set(grants.map(grant => grant.capability))].sort().map(capabilityName);
|
|
149
|
+
return (0, double_i18n_1.dt)('may', { what: what.join(page_1.pi.ui.language === 'zh-CN' ? '、' : ', '), left: left(Math.min(...grants.map(grant => grant.expiresAt))) });
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=doubles-store.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TaRoomInfo, TaRoomMember } from '@celljs/ta-protocol';
|
|
2
|
+
import { type RoomPermissionAsk } from './double-protocol';
|
|
3
|
+
/** The log of the double, a tool of the workbench. */
|
|
4
|
+
export declare const DOUBLES_VIEW = "@celljs/ta-rooms/doubles";
|
|
5
|
+
/**
|
|
6
|
+
* What the user lets their double do for one: what (a permission the double asked for, or those chosen here), in which
|
|
7
|
+
* directory, for how long. Only here, by the user: a model never gives a permission.
|
|
8
|
+
*/
|
|
9
|
+
export declare function GrantDialog({ friend, name, ask, close }: {
|
|
10
|
+
friend: string;
|
|
11
|
+
name: string;
|
|
12
|
+
ask?: RoomPermissionAsk;
|
|
13
|
+
close(): void;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare function openGrant(member: Pick<TaRoomMember, 'id' | 'name'>): void;
|
|
16
|
+
/** The dialog of an ask of the double; one at a time, the next once it is answered or put off. */
|
|
17
|
+
export declare function openAsk(ask: RoomPermissionAsk): void;
|
|
18
|
+
/** An ask of the double in a list, for the user to answer. */
|
|
19
|
+
export declare function AskRow({ ask }: {
|
|
20
|
+
ask: RoomPermissionAsk;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** In the settings of a room: whether the user's double answers there. */
|
|
23
|
+
export declare function DoubleSwitch({ room }: {
|
|
24
|
+
room: TaRoomInfo;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
/** What the double may do for a member, under their name; empty with nothing. */
|
|
27
|
+
export declare function useMayLine(member: TaRoomMember): string;
|
|
28
|
+
/** Stops all the double does for one: their permissions, their asks, what it does for them now; asking first. */
|
|
29
|
+
export declare function revokeAll(friend: string, name: string): Promise<void>;
|
|
30
|
+
/** The permissions the user gave, and what the double did for others: a tool of the workbench. */
|
|
31
|
+
export declare function DoublesView(): import("react").JSX.Element;
|
|
32
|
+
/** Asks of the double that came: the first shows at once, as a dialog. */
|
|
33
|
+
export declare function listenAsks(): () => void;
|
|
34
|
+
//# sourceMappingURL=doubles-view.d.ts.map
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DOUBLES_VIEW = void 0;
|
|
4
|
+
exports.GrantDialog = GrantDialog;
|
|
5
|
+
exports.openGrant = openGrant;
|
|
6
|
+
exports.openAsk = openAsk;
|
|
7
|
+
exports.AskRow = AskRow;
|
|
8
|
+
exports.DoubleSwitch = DoubleSwitch;
|
|
9
|
+
exports.useMayLine = useMayLine;
|
|
10
|
+
exports.revokeAll = revokeAll;
|
|
11
|
+
exports.DoublesView = DoublesView;
|
|
12
|
+
exports.listenAsks = listenAsks;
|
|
13
|
+
const dialogs_1 = require("./dialogs");
|
|
14
|
+
const double_i18n_1 = require("./double-i18n");
|
|
15
|
+
const double_protocol_1 = require("./double-protocol");
|
|
16
|
+
const doubles_store_1 = require("./doubles-store");
|
|
17
|
+
const page_1 = require("./page");
|
|
18
|
+
const react_1 = require("./react");
|
|
19
|
+
/** The log of the double, a tool of the workbench. */
|
|
20
|
+
exports.DOUBLES_VIEW = '@celljs/ta-rooms/doubles';
|
|
21
|
+
function useBusy() {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
const fallback = react_1.React.useState(false);
|
|
24
|
+
const busy = (_b = (_a = page_1.pi.ui).useBusy) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
25
|
+
if (busy) {
|
|
26
|
+
return busy;
|
|
27
|
+
}
|
|
28
|
+
const [on, set] = fallback;
|
|
29
|
+
return [
|
|
30
|
+
on,
|
|
31
|
+
async (action) => {
|
|
32
|
+
set(true);
|
|
33
|
+
try {
|
|
34
|
+
await action();
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
set(false);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
function hoursLabel(hours) {
|
|
43
|
+
return hours === 1 ? (0, double_i18n_1.dt)('hours1') : hours === 24 ? (0, double_i18n_1.dt)('hours24') : (0, double_i18n_1.dt)('hours168');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* What the user lets their double do for one: what (a permission the double asked for, or those chosen here), in which
|
|
47
|
+
* directory, for how long. Only here, by the user: a model never gives a permission.
|
|
48
|
+
*/
|
|
49
|
+
function GrantDialog({ friend, name, ask, close }) {
|
|
50
|
+
const cwd = page_1.pi.ui.useCwd();
|
|
51
|
+
const [directory, setDirectory] = react_1.React.useState(cwd);
|
|
52
|
+
const [picking, setPicking] = react_1.React.useState(false);
|
|
53
|
+
const [hours, setHours] = react_1.React.useState(1);
|
|
54
|
+
const [chosen, setChosen] = react_1.React.useState(ask ? [ask.capability] : ['files']);
|
|
55
|
+
const [error, setError] = react_1.React.useState();
|
|
56
|
+
const [busy, run] = useBusy();
|
|
57
|
+
const Folder = (0, page_1.icon)('Folder');
|
|
58
|
+
const answer = (accept) => void run(async () => {
|
|
59
|
+
setError(undefined);
|
|
60
|
+
try {
|
|
61
|
+
if (ask) {
|
|
62
|
+
await (0, doubles_store_1.callDoubles)({ kind: 'answer', ask: ask.id, accept, cwd: directory, hours });
|
|
63
|
+
}
|
|
64
|
+
else if (accept) {
|
|
65
|
+
await (0, doubles_store_1.callDoubles)({ kind: 'grant', friend, name, capabilities: chosen, cwd: directory, hours });
|
|
66
|
+
}
|
|
67
|
+
close();
|
|
68
|
+
}
|
|
69
|
+
catch (failure) {
|
|
70
|
+
setError((0, page_1.message)(failure));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const toggle = (capability, on) => setChosen(list => (on ? [...new Set([...list, capability])] : list.filter(each => each !== capability)));
|
|
74
|
+
return (react_1.React.createElement(page_1.pi.ui.Dialog, { title: ask ? (0, double_i18n_1.dt)('asksTitle') : (0, double_i18n_1.dt)('grantTitle', { name }), onClose: close },
|
|
75
|
+
react_1.React.createElement("div", { className: "trm-dialog" },
|
|
76
|
+
react_1.React.createElement("div", { className: "trm-grant-who" },
|
|
77
|
+
react_1.React.createElement(page_1.Face, { id: friend, name: name, size: 36 }),
|
|
78
|
+
react_1.React.createElement("p", { className: "trm-lead" }, ask ? (0, double_i18n_1.dt)('askLead', { name, title: ask.title }) : (0, double_i18n_1.dt)('grantLead', { name }))),
|
|
79
|
+
ask && (react_1.React.createElement(react_1.React.Fragment, null,
|
|
80
|
+
react_1.React.createElement("blockquote", { className: "trm-grant-reason" }, ask.reason),
|
|
81
|
+
react_1.React.createElement("p", { className: "trm-lead" }, (0, double_i18n_1.dt)('askWants', { name, what: ask.capability === 'files' ? (0, double_i18n_1.dt)('wantsFiles') : (0, double_i18n_1.dt)('wantsCommands') })))),
|
|
82
|
+
!ask && (react_1.React.createElement("ul", { className: "trm-grant-list" }, double_protocol_1.ROOM_CAPABILITIES.map(capability => (react_1.React.createElement("li", { key: capability, className: "trm-grant-item" },
|
|
83
|
+
react_1.React.createElement("span", { className: "trm-grant-text" },
|
|
84
|
+
react_1.React.createElement("span", null, capability === 'files' ? (0, double_i18n_1.dt)('files') : (0, double_i18n_1.dt)('commands')),
|
|
85
|
+
react_1.React.createElement("span", { className: "trm-note" }, capability === 'files' ? (0, double_i18n_1.dt)('filesHint') : (0, double_i18n_1.dt)('commandsHint'))),
|
|
86
|
+
react_1.React.createElement(page_1.pi.ui.Switch, { checked: chosen.includes(capability), label: capability === 'files' ? (0, double_i18n_1.dt)('files') : (0, double_i18n_1.dt)('commands'), onChange: on => toggle(capability, on) })))))),
|
|
87
|
+
(ask === null || ask === void 0 ? void 0 : ask.capability) === 'commands' && react_1.React.createElement("p", { className: "trm-note" }, (0, double_i18n_1.dt)('commandsHint')),
|
|
88
|
+
react_1.React.createElement("div", { className: "trm-grant-field" },
|
|
89
|
+
react_1.React.createElement("span", { className: "trm-grant-label" }, (0, double_i18n_1.dt)('directory')),
|
|
90
|
+
react_1.React.createElement("button", { type: "button", className: "trm-grant-dir", onClick: () => setPicking(true), title: directory },
|
|
91
|
+
react_1.React.createElement(Folder, { size: 15 }),
|
|
92
|
+
react_1.React.createElement("span", { className: "trm-ellipsis" }, directory || (0, double_i18n_1.dt)('pick')))),
|
|
93
|
+
react_1.React.createElement("div", { className: "trm-grant-field" },
|
|
94
|
+
react_1.React.createElement("span", { className: "trm-grant-label" }, (0, double_i18n_1.dt)('duration')),
|
|
95
|
+
react_1.React.createElement("span", { className: "trm-chips" }, double_protocol_1.GRANT_HOURS.map(each => (react_1.React.createElement("button", { key: each, type: "button", "aria-pressed": hours === each, className: `trm-chip${hours === each ? ' trm-chip-on' : ''}`, onClick: () => setHours(each) }, hoursLabel(each)))))),
|
|
96
|
+
react_1.React.createElement("p", { className: "trm-note" }, (0, double_i18n_1.dt)('grantNote')),
|
|
97
|
+
error && react_1.React.createElement("p", { className: "trm-error" }, error),
|
|
98
|
+
react_1.React.createElement("div", { className: "trm-actions" },
|
|
99
|
+
react_1.React.createElement("button", { type: "button", className: "ta-button", disabled: busy, onClick: () => (ask ? answer(false) : close()) }, ask ? (0, double_i18n_1.dt)('refuse') : (0, double_i18n_1.dt)('cancel')),
|
|
100
|
+
ask && (react_1.React.createElement("button", { type: "button", className: "ta-button", disabled: busy, onClick: close }, (0, double_i18n_1.dt)('later'))),
|
|
101
|
+
react_1.React.createElement("button", { type: "button", className: `ta-button ta-primary${busy ? ' ta-busy' : ''}`, disabled: busy || !directory || chosen.length === 0, onClick: () => answer(true) }, (0, double_i18n_1.dt)('allow')))),
|
|
102
|
+
picking && page_1.pi.ui.FolderPicker && (react_1.React.createElement(page_1.pi.ui.FolderPicker, { initial: directory, onPick: path => {
|
|
103
|
+
setDirectory(path);
|
|
104
|
+
setPicking(false);
|
|
105
|
+
}, onClose: () => setPicking(false) }))));
|
|
106
|
+
}
|
|
107
|
+
function openGrant(member) {
|
|
108
|
+
(0, dialogs_1.show)(({ close }) => react_1.React.createElement(GrantDialog, { friend: member.id, name: member.name, close: close }));
|
|
109
|
+
}
|
|
110
|
+
let asking;
|
|
111
|
+
/** The dialog of an ask of the double; one at a time, the next once it is answered or put off. */
|
|
112
|
+
function openAsk(ask) {
|
|
113
|
+
if (asking) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
asking = ask.id;
|
|
117
|
+
(0, dialogs_1.show)(({ close }) => (react_1.React.createElement(GrantDialog, { friend: ask.friend, name: ask.name, ask: ask, close: () => {
|
|
118
|
+
asking = undefined;
|
|
119
|
+
close();
|
|
120
|
+
} })));
|
|
121
|
+
}
|
|
122
|
+
/** An ask of the double in a list, for the user to answer. */
|
|
123
|
+
function AskRow({ ask }) {
|
|
124
|
+
return (react_1.React.createElement("li", { className: "trm-row" },
|
|
125
|
+
react_1.React.createElement(page_1.Face, { id: ask.friend, name: ask.name }),
|
|
126
|
+
react_1.React.createElement("div", { className: "trm-row-text" },
|
|
127
|
+
react_1.React.createElement("span", { className: "trm-row-title" },
|
|
128
|
+
ask.name,
|
|
129
|
+
react_1.React.createElement("span", { className: "trm-tag" }, (0, doubles_store_1.capabilityName)(ask.capability))),
|
|
130
|
+
react_1.React.createElement("span", { className: "trm-row-line" }, (0, double_i18n_1.dt)('askLine', { name: ask.name, title: ask.title, reason: ask.reason }))),
|
|
131
|
+
react_1.React.createElement("div", { className: "trm-answers" },
|
|
132
|
+
react_1.React.createElement("button", { type: "button", className: "ta-button ta-primary", onClick: () => openAsk(ask) }, (0, double_i18n_1.dt)('review')))));
|
|
133
|
+
}
|
|
134
|
+
/** In the settings of a room: whether the user's double answers there. */
|
|
135
|
+
function DoubleSwitch({ room }) {
|
|
136
|
+
const { quiet } = (0, doubles_store_1.useDoubles)();
|
|
137
|
+
return (react_1.React.createElement("div", { className: "trm-double-switch" },
|
|
138
|
+
react_1.React.createElement("span", { className: "trm-grant-text" },
|
|
139
|
+
react_1.React.createElement("span", null, (0, double_i18n_1.dt)('answersHere')),
|
|
140
|
+
react_1.React.createElement("span", { className: "trm-note" }, (0, double_i18n_1.dt)('answersHint'))),
|
|
141
|
+
react_1.React.createElement(page_1.pi.ui.Switch, { checked: !quiet[room.id], label: (0, double_i18n_1.dt)('answersHere'), onChange: on => (0, doubles_store_1.callDoubles)({ kind: 'quiet', room: room.id, quiet: !on }).catch(error => page_1.pi.ui.notify((0, page_1.message)(error), 'error')) })));
|
|
142
|
+
}
|
|
143
|
+
/** What the double may do for a member, under their name; empty with nothing. */
|
|
144
|
+
function useMayLine(member) {
|
|
145
|
+
const { grants } = (0, doubles_store_1.useDoubles)();
|
|
146
|
+
return member.self || member.guest ? '' : (0, doubles_store_1.mayLine)((0, doubles_store_1.grantsOf)(grants, member.id));
|
|
147
|
+
}
|
|
148
|
+
/** Stops all the double does for one: their permissions, their asks, what it does for them now; asking first. */
|
|
149
|
+
async function revokeAll(friend, name) {
|
|
150
|
+
if (await page_1.pi.ui.confirm((0, double_i18n_1.dt)('revokeAllTitle', { name }), (0, double_i18n_1.dt)('revokeAllHint', { name }), { confirmLabel: (0, double_i18n_1.dt)('stop'), danger: true })) {
|
|
151
|
+
await (0, doubles_store_1.callDoubles)({ kind: 'revokeAll', friend }).catch(error => page_1.pi.ui.notify((0, page_1.message)(error), 'error'));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function GrantRow({ grant }) {
|
|
155
|
+
const [busy, run] = useBusy();
|
|
156
|
+
return (react_1.React.createElement("li", { className: `trm-row${busy ? ' ta-pending' : ''}` },
|
|
157
|
+
react_1.React.createElement(page_1.Face, { id: grant.friend, name: grant.name, size: 30 }),
|
|
158
|
+
react_1.React.createElement("div", { className: "trm-row-text" },
|
|
159
|
+
react_1.React.createElement("span", { className: "trm-row-title" },
|
|
160
|
+
grant.name,
|
|
161
|
+
react_1.React.createElement("span", { className: "trm-tag" }, (0, doubles_store_1.capabilityName)(grant.capability))),
|
|
162
|
+
react_1.React.createElement("span", { className: "trm-row-line trm-ellipsis", title: grant.cwd },
|
|
163
|
+
grant.cwd,
|
|
164
|
+
" \u00B7 ",
|
|
165
|
+
(0, doubles_store_1.left)(grant.expiresAt))),
|
|
166
|
+
react_1.React.createElement("button", { type: "button", className: "ta-button", disabled: busy, onClick: () => void run(() => (0, doubles_store_1.callDoubles)({ kind: 'revoke', grant: grant.id }).catch(error => page_1.pi.ui.notify((0, page_1.message)(error), 'error'))) }, (0, double_i18n_1.dt)('revoke'))));
|
|
167
|
+
}
|
|
168
|
+
function LogRow({ entry }) {
|
|
169
|
+
const outcome = entry.outcome === 'answered' ? (0, double_i18n_1.dt)('answered') : entry.outcome === 'failed' ? (0, double_i18n_1.dt)('failed') : (0, double_i18n_1.dt)('limited');
|
|
170
|
+
return (react_1.React.createElement("li", { className: "trm-log" },
|
|
171
|
+
react_1.React.createElement("div", { className: "trm-log-head" },
|
|
172
|
+
react_1.React.createElement(page_1.Face, { id: entry.friend, name: entry.name, size: 22 }),
|
|
173
|
+
react_1.React.createElement("span", { className: "trm-log-who trm-ellipsis" },
|
|
174
|
+
entry.agent
|
|
175
|
+
? (0, double_i18n_1.dt)('agentAsked', { name: entry.name, agent: entry.agent })
|
|
176
|
+
: entry.task
|
|
177
|
+
? (0, double_i18n_1.dt)('taskLog', { name: entry.name })
|
|
178
|
+
: (0, double_i18n_1.dt)('asked', { name: entry.name }),
|
|
179
|
+
' ',
|
|
180
|
+
"\u00B7 ",
|
|
181
|
+
entry.title),
|
|
182
|
+
react_1.React.createElement("span", { className: "trm-log-time" }, (0, page_1.when)(entry.at))),
|
|
183
|
+
react_1.React.createElement("div", { className: "trm-log-asked" }, entry.asked),
|
|
184
|
+
entry.answer && react_1.React.createElement("div", { className: "trm-log-answer" }, entry.answer),
|
|
185
|
+
react_1.React.createElement("div", { className: `trm-log-meta${entry.outcome === 'answered' ? '' : ' trm-log-bad'}` }, [
|
|
186
|
+
outcome,
|
|
187
|
+
...(entry.capabilities.length ? [entry.capabilities.map(doubles_store_1.capabilityName).join(' · ')] : []),
|
|
188
|
+
...(entry.tools.length ? [(0, double_i18n_1.dt)('tools', { n: entry.tools.length })] : []),
|
|
189
|
+
...(entry.error ? [entry.error] : []),
|
|
190
|
+
].join(' · '))));
|
|
191
|
+
}
|
|
192
|
+
/** The permissions the user gave, and what the double did for others: a tool of the workbench. */
|
|
193
|
+
function DoublesView() {
|
|
194
|
+
const { grants, asks, log } = (0, doubles_store_1.useDoubles)();
|
|
195
|
+
const now = Date.now();
|
|
196
|
+
const live = grants.filter(grant => grant.expiresAt > now);
|
|
197
|
+
const friends = [...new Map(live.map(grant => [grant.friend, grant.name])).entries()];
|
|
198
|
+
const recent = [...log].reverse();
|
|
199
|
+
return (react_1.React.createElement("div", { className: "trm-panel" },
|
|
200
|
+
react_1.React.createElement("div", { className: "trm-panel-scroll" },
|
|
201
|
+
asks.length > 0 && (react_1.React.createElement(react_1.React.Fragment, null,
|
|
202
|
+
react_1.React.createElement("div", { className: "trm-panel-label" }, (0, double_i18n_1.dt)('asksTitle')),
|
|
203
|
+
react_1.React.createElement("ul", { className: "trm-rows" }, asks.map(ask => (react_1.React.createElement(AskRow, { key: ask.id, ask: ask })))))),
|
|
204
|
+
react_1.React.createElement("div", { className: "trm-panel-label" }, (0, double_i18n_1.dt)('grants')),
|
|
205
|
+
live.length === 0 ? (react_1.React.createElement("p", { className: "trm-note trm-panel-note" }, (0, double_i18n_1.dt)('noGrants'))) : (react_1.React.createElement(react_1.React.Fragment, null,
|
|
206
|
+
react_1.React.createElement("ul", { className: "trm-rows" }, live.map(grant => (react_1.React.createElement(GrantRow, { key: grant.id, grant: grant })))),
|
|
207
|
+
friends.map(([friend, name]) => (react_1.React.createElement("button", { key: friend, type: "button", className: "trm-link trm-danger trm-panel-note", onClick: () => void revokeAll(friend, name) }, (0, double_i18n_1.dt)('revokeAll', { name })))))),
|
|
208
|
+
react_1.React.createElement("div", { className: "trm-panel-label trm-log-label" },
|
|
209
|
+
react_1.React.createElement("span", null, (0, double_i18n_1.dt)('logTitle')),
|
|
210
|
+
recent.length > 0 && (react_1.React.createElement("button", { type: "button", className: "trm-link", onClick: () => void (0, doubles_store_1.callDoubles)({ kind: 'clearLog' }).catch(error => page_1.pi.ui.notify((0, page_1.message)(error), 'error')) }, (0, double_i18n_1.dt)('clearLog')))),
|
|
211
|
+
recent.length === 0 ? (react_1.React.createElement("div", { className: "trm-log-empty" },
|
|
212
|
+
react_1.React.createElement(page_1.pi.ui.Empty, { title: (0, double_i18n_1.dt)('logEmpty'), hint: (0, double_i18n_1.dt)('logEmptyHint'), compact: true }))) : (react_1.React.createElement("ul", { className: "trm-logs" }, recent.map(entry => (react_1.React.createElement(LogRow, { key: entry.id, entry: entry }))))))));
|
|
213
|
+
}
|
|
214
|
+
/** Asks of the double that came: the first shows at once, as a dialog. */
|
|
215
|
+
function listenAsks() {
|
|
216
|
+
doubles_store_1.doubles.onAsk = asks => {
|
|
217
|
+
const latest = asks[asks.length - 1];
|
|
218
|
+
if (latest) {
|
|
219
|
+
openAsk(latest);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
const stop = doubles_store_1.doubles.start();
|
|
223
|
+
return () => {
|
|
224
|
+
doubles_store_1.doubles.onAsk = undefined;
|
|
225
|
+
stop();
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=doubles-view.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const NO_SERVER = "Rooms need the Ta service: start it with `ta serve`. In Ta in a terminal there are none.";
|
|
2
|
+
interface Pi {
|
|
3
|
+
events: {
|
|
4
|
+
emit(event: string, data: unknown): void;
|
|
5
|
+
};
|
|
6
|
+
on(event: string, handler: (event: never, ctx: never) => unknown): unknown;
|
|
7
|
+
registerTool(tool: never): unknown;
|
|
8
|
+
getActiveTools(): string[];
|
|
9
|
+
getAllTools(): {
|
|
10
|
+
name: string;
|
|
11
|
+
}[];
|
|
12
|
+
setActiveTools(names: string[]): void;
|
|
13
|
+
sendMessage(message: {
|
|
14
|
+
customType: string;
|
|
15
|
+
content: string;
|
|
16
|
+
display: boolean;
|
|
17
|
+
details: unknown;
|
|
18
|
+
}, options?: {
|
|
19
|
+
triggerTurn?: boolean;
|
|
20
|
+
deliverAs?: string;
|
|
21
|
+
}): void;
|
|
22
|
+
}
|
|
23
|
+
/** A path of a call of a tool of files, inside the directory the user let the double work in. */
|
|
24
|
+
export declare function inside(cwd: string, path: unknown): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The pi extension of the rooms: in the session of a double in a room (its role has ROOM_DOUBLE_MARK), only the tools its
|
|
27
|
+
* permissions allow, for the one it answers now, and no instructions or skills of the user's that it may not read; so too
|
|
28
|
+
* for an agent of the user others ask in a room, while one the user asks works with all its tools. In the user's own
|
|
29
|
+
* conversations, the tools to act in rooms for them. The doubles are the host's (double-host.ts).
|
|
30
|
+
*/
|
|
31
|
+
export default function activate(pi: Pi): void;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=extension.d.ts.map
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_SERVER = void 0;
|
|
4
|
+
exports.inside = inside;
|
|
5
|
+
exports.default = activate;
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const ta_extension_host_1 = require("@celljs/ta-protocol/lib/common/ta-extension-host");
|
|
8
|
+
const double_protocol_1 = require("./double-protocol");
|
|
9
|
+
const double_util_1 = require("./double-util");
|
|
10
|
+
exports.NO_SERVER = 'Rooms need the Ta service: start it with `ta serve`. In Ta in a terminal there are none.';
|
|
11
|
+
/** In the role of the agents of ta-channels (AGENT_MARK there, which this bundle does not import): they do not act in rooms. */
|
|
12
|
+
const AGENT_MARK = 'one of the agents of Ta';
|
|
13
|
+
/** pi's tools an agent the user asks in a room has at least. */
|
|
14
|
+
const OWN_TOOLS = ['read', 'bash', 'edit', 'write'];
|
|
15
|
+
/** The tools of a double in a room (DoubleUtil.ROOM_TOOLS): what it may do with no permission, and asking for one. */
|
|
16
|
+
const DOUBLE_TOOLS = [
|
|
17
|
+
{
|
|
18
|
+
name: 'room_state',
|
|
19
|
+
label: 'Room state',
|
|
20
|
+
description: 'Reads the shared state of the room you are answering in (what its game or app keeps), by key: all of it, or the keys that start with prefix.',
|
|
21
|
+
parameters: { type: 'object', properties: { prefix: { type: 'string' } } },
|
|
22
|
+
run: (doubles, params, file) => doubles.roomState(file, typeof params.prefix === 'string' ? params.prefix : undefined),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'room_set_state',
|
|
26
|
+
label: 'Set room state',
|
|
27
|
+
description: 'Sets a key of the shared state of the room you are answering in, as its game or app keeps it (null clears it). Say things in your reply, not here.',
|
|
28
|
+
parameters: { type: 'object', properties: { key: { type: 'string' }, value: {} }, required: ['key', 'value'] },
|
|
29
|
+
run: (doubles, params, file) => { var _a; return doubles.setRoomState(file, String((_a = params.key) !== null && _a !== void 0 ? _a : ''), params.value); },
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'ask_permission',
|
|
33
|
+
label: 'Ask permission',
|
|
34
|
+
description: "Asks your user to let you work on their computer for the one who asked you: 'files' to read and change files of a directory, 'commands' to run commands there. Your user answers in Ta, and picks the directory; tell the one who asked that it is asked.",
|
|
35
|
+
parameters: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: { capability: { type: 'string', enum: [...double_protocol_1.ROOM_CAPABILITIES] }, reason: { type: 'string', description: 'What for, in one sentence.' } },
|
|
38
|
+
required: ['capability', 'reason'],
|
|
39
|
+
},
|
|
40
|
+
run: (doubles, params, file) => doubles.grants.askPermission(file, params.capability, params.reason),
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
/** The tools of the user's own conversations to act in rooms for them (USER_TOOLS). */
|
|
44
|
+
const USER_ROOM_TOOLS = [
|
|
45
|
+
{
|
|
46
|
+
name: 'list_rooms',
|
|
47
|
+
label: 'List rooms',
|
|
48
|
+
description: "Lists the rooms of Ta the user is in (group chats shared with other people's Ta) and who is in each.",
|
|
49
|
+
parameters: { type: 'object', properties: {} },
|
|
50
|
+
run: doubles => doubles.user.listRooms(),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'read_room',
|
|
54
|
+
label: 'Read room',
|
|
55
|
+
description: 'Reads what was said lately in a room of the user, by its title or id. With wait_seconds (up to 120), waits first for someone else to say something: the answer of a double you asked.',
|
|
56
|
+
parameters: { type: 'object', properties: { room: { type: 'string' }, wait_seconds: { type: 'number' } }, required: ['room'] },
|
|
57
|
+
run: (doubles, params) => doubles.user.readRoom(params.room, params.wait_seconds),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'say_in_room',
|
|
61
|
+
label: 'Say in room',
|
|
62
|
+
description: 'Says something in a room of the user, as their double, for them. With ask, the names of members whose doubles it asks: their Ta answers, if their user lets it. Only what the user wants said; nothing private they did not ask you to share.',
|
|
63
|
+
parameters: {
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties: { room: { type: 'string' }, text: { type: 'string' }, ask: { type: 'array', items: { type: 'string' } } },
|
|
66
|
+
required: ['room', 'text'],
|
|
67
|
+
},
|
|
68
|
+
run: (doubles, params) => doubles.user.sayInRoom(params.room, params.text, params.ask),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'hand_task',
|
|
72
|
+
label: 'Hand task',
|
|
73
|
+
description: "Hands a task to the double of a member of a room (work their Ta does for the user, on its own, as that member lets it: look something up, change their files, run their tests), rather than asking a question. Their Ta takes it, may need its user's permission first, and this conversation is told how it ended: do not wait for it or poll. Only what the user wants handed; nothing private they did not ask you to share.",
|
|
74
|
+
parameters: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
room: { type: 'string' },
|
|
78
|
+
to: { type: 'string', description: 'The name of the member whose double does it.' },
|
|
79
|
+
task: { type: 'string', description: 'What to do, whole: their double knows nothing else of it.' },
|
|
80
|
+
},
|
|
81
|
+
required: ['room', 'to', 'task'],
|
|
82
|
+
},
|
|
83
|
+
run: (doubles, params, file) => doubles.user.handTask(file, params.room, params.to, params.task),
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
/** A path of a call of a tool of files, inside the directory the user let the double work in. */
|
|
87
|
+
function inside(cwd, path) {
|
|
88
|
+
const target = (0, node_path_1.resolve)(cwd, typeof path === 'string' && path ? path.replace(/^@/, '') : '.');
|
|
89
|
+
const rest = (0, node_path_1.relative)(cwd, target);
|
|
90
|
+
return !rest.startsWith('..') && !(0, node_path_1.isAbsolute)(rest);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The pi extension of the rooms: in the session of a double in a room (its role has ROOM_DOUBLE_MARK), only the tools its
|
|
94
|
+
* permissions allow, for the one it answers now, and no instructions or skills of the user's that it may not read; so too
|
|
95
|
+
* for an agent of the user others ask in a room, while one the user asks works with all its tools. In the user's own
|
|
96
|
+
* conversations, the tools to act in rooms for them. The doubles are the host's (double-host.ts).
|
|
97
|
+
*/
|
|
98
|
+
function activate(pi) {
|
|
99
|
+
let reached;
|
|
100
|
+
const reach = () => (reached !== null && reached !== void 0 ? reached : (reached = ta_extension_host_1.TaHostUtil.reach(pi.events, double_protocol_1.NAME).then(answer => { var _a; return ({
|
|
101
|
+
answered: !!answer,
|
|
102
|
+
doubles: (_a = answer === null || answer === void 0 ? void 0 : answer.service) === null || _a === void 0 ? void 0 : _a.service,
|
|
103
|
+
}); })));
|
|
104
|
+
const isDouble = (ctx) => ctx.getSystemPrompt().includes(double_protocol_1.ROOM_DOUBLE_MARK);
|
|
105
|
+
/** What a double may do now: nothing but chat when its host is not there. */
|
|
106
|
+
const turnOf = async (ctx) => {
|
|
107
|
+
var _a;
|
|
108
|
+
const turn = (_a = (await reach()).doubles) === null || _a === void 0 ? void 0 : _a.turnOf(ctx.sessionManager.getSessionFile());
|
|
109
|
+
return (turn === null || turn === void 0 ? void 0 : turn.active) ? turn : undefined;
|
|
110
|
+
};
|
|
111
|
+
let detach;
|
|
112
|
+
pi.on('session_start', async (_event, ctx) => {
|
|
113
|
+
const { doubles } = await reach();
|
|
114
|
+
const file = ctx.sessionManager.getSessionFile();
|
|
115
|
+
detach === null || detach === void 0 ? void 0 : detach();
|
|
116
|
+
detach = undefined;
|
|
117
|
+
// A conversation of the user is told here how the tasks it handed ended, and goes on with it.
|
|
118
|
+
if (doubles && file && !isDouble(ctx)) {
|
|
119
|
+
detach = doubles.tasks.attach(file, task => pi.sendMessage({ customType: double_protocol_1.TASK_MESSAGE_TYPE, content: double_util_1.DoubleUtil.taskResult(task), display: true, details: task }, { triggerTurn: true, deliverAs: 'followUp' }));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
pi.on('session_shutdown', () => {
|
|
123
|
+
detach === null || detach === void 0 ? void 0 : detach();
|
|
124
|
+
detach = undefined;
|
|
125
|
+
});
|
|
126
|
+
pi.on('before_agent_start', async (event, ctx) => {
|
|
127
|
+
var _a, _b;
|
|
128
|
+
if (isDouble(ctx)) {
|
|
129
|
+
const turn = await turnOf(ctx);
|
|
130
|
+
// The user asked their agent in a room: it works for them as anywhere, but speaks in rooms only by its answer.
|
|
131
|
+
if (turn === null || turn === void 0 ? void 0 : turn.trusted) {
|
|
132
|
+
const all = new Set(pi.getAllTools().map(tool => tool.name));
|
|
133
|
+
// Its tools as a conversation has them, and pi's own again if a turn for another took them away.
|
|
134
|
+
pi.setActiveTools(double_util_1.DoubleUtil.ownTools([...new Set([...pi.getActiveTools(), ...OWN_TOOLS])].filter(name => all.has(name))));
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const capabilities = (_a = turn === null || turn === void 0 ? void 0 : turn.capabilities) !== null && _a !== void 0 ? _a : [];
|
|
138
|
+
pi.setActiveTools(double_util_1.DoubleUtil.tools(capabilities, pi.getAllTools().map(tool => tool.name)));
|
|
139
|
+
// What the user wrote for their own agents is not for others: only the instructions of the directory it may work in.
|
|
140
|
+
const cwd = turn === null || turn === void 0 ? void 0 : turn.cwd;
|
|
141
|
+
const options = event.systemPromptOptions;
|
|
142
|
+
options.contextFiles = cwd && capabilities.includes('files') ? ((_b = options.contextFiles) !== null && _b !== void 0 ? _b : []).filter(file => inside(cwd, file.path)) : [];
|
|
143
|
+
if (!capabilities.includes('files')) {
|
|
144
|
+
options.skills = [];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
// The tools of a double are not for the user's conversations, and the agents of channels do not act in rooms.
|
|
149
|
+
const agent = ctx.getSystemPrompt().includes(AGENT_MARK);
|
|
150
|
+
const off = new Set([...double_util_1.ROOM_TOOLS, ...(agent ? double_util_1.USER_TOOLS : [])]);
|
|
151
|
+
const active = pi.getActiveTools();
|
|
152
|
+
if (active.some(name => off.has(name))) {
|
|
153
|
+
pi.setActiveTools(active.filter(name => !off.has(name)));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
// Whatever asks for a tool (the model, a script of a tool), a double only uses what it may, where it may.
|
|
158
|
+
pi.on('tool_call', async (event, ctx) => {
|
|
159
|
+
var _a, _b, _c;
|
|
160
|
+
var _d;
|
|
161
|
+
if (!isDouble(ctx)) {
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
const turn = await turnOf(ctx);
|
|
165
|
+
if (turn === null || turn === void 0 ? void 0 : turn.trusted) {
|
|
166
|
+
if (!double_util_1.DoubleUtil.ownTools([event.toolName]).length) {
|
|
167
|
+
return { block: true, reason: 'Your answer is said in the room: no tool for it.' };
|
|
168
|
+
}
|
|
169
|
+
(_a = (await reach()).doubles) === null || _a === void 0 ? void 0 : _a.used(ctx.sessionManager.getSessionFile(), event.toolName);
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
const capabilities = (_d = turn === null || turn === void 0 ? void 0 : turn.capabilities) !== null && _d !== void 0 ? _d : [];
|
|
173
|
+
if (!double_util_1.DoubleUtil.tools(capabilities, [event.toolName]).length) {
|
|
174
|
+
return { block: true, reason: 'A double in a room may not use this tool now; ask_permission asks your user.' };
|
|
175
|
+
}
|
|
176
|
+
if (double_util_1.CAPABILITY_TOOLS.files.includes(event.toolName) && !((turn === null || turn === void 0 ? void 0 : turn.cwd) && inside(turn.cwd, (_b = event.input) === null || _b === void 0 ? void 0 : _b.path))) {
|
|
177
|
+
return { block: true, reason: `Only inside ${turn === null || turn === void 0 ? void 0 : turn.cwd}.` };
|
|
178
|
+
}
|
|
179
|
+
(_c = (await reach()).doubles) === null || _c === void 0 ? void 0 : _c.used(ctx.sessionManager.getSessionFile(), event.toolName);
|
|
180
|
+
return undefined;
|
|
181
|
+
});
|
|
182
|
+
for (const tool of [...DOUBLE_TOOLS, ...USER_ROOM_TOOLS]) {
|
|
183
|
+
const forDouble = DOUBLE_TOOLS.includes(tool);
|
|
184
|
+
pi.registerTool({
|
|
185
|
+
name: tool.name,
|
|
186
|
+
label: tool.label,
|
|
187
|
+
description: tool.description,
|
|
188
|
+
parameters: tool.parameters,
|
|
189
|
+
execute: async (_id, params, _signal, _update, ctx) => {
|
|
190
|
+
if (forDouble !== isDouble(ctx)) {
|
|
191
|
+
throw new Error(forDouble ? 'Only for a double answering in a room.' : 'Not for a double in a room.');
|
|
192
|
+
}
|
|
193
|
+
const { answered, doubles } = await reach();
|
|
194
|
+
if (!doubles) {
|
|
195
|
+
throw new Error(answered ? 'The rooms did not start in the Ta service; its log says why.' : exports.NO_SERVER);
|
|
196
|
+
}
|
|
197
|
+
const text = await tool.run(doubles, params !== null && params !== void 0 ? params : {}, ctx.sessionManager.getSessionFile());
|
|
198
|
+
return { content: [{ type: 'text', text }], details: undefined };
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=extension.js.map
|