@celljs/ta 4.12.0 → 4.13.1
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 +182 -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 +75 -11
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +2 -2
- package/dist/pi/packages/ta-agents/lib/acp-protocol.js +5 -2
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -4
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +7 -5
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.js +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +44 -3
- package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +12 -2
- package/dist/pi/packages/ta-agents/lib/agent-turn.js +29 -4
- package/dist/pi/packages/ta-agents/package.json +1 -1
- package/dist/pi/packages/ta-bots/extension/index.mjs +72 -0
- package/dist/pi/packages/ta-bots/host/index.mjs +178 -0
- package/dist/pi/packages/ta-bots/package.json +7 -2
- package/dist/pi/packages/ta-changes/extension/index.mjs +72 -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 +78 -4
- package/dist/pi/packages/ta-channels/host/index.mjs +289 -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/extension.js +2 -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/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +7 -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/package.json +26 -2
- package/dist/pi/packages/ta-channels/web/index.js +137 -27
- 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 +113 -258
- 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 +12 -8
- 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 +15 -11
- package/dist/pi/packages/ta-extensions/web/index.js +197 -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 +446 -3
- package/dist/pi/packages/ta-glance/lib/card.js +38 -12
- 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 +6 -1
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +41 -7
- 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 +9 -1
- package/dist/pi/packages/ta-glance/package.json +1 -1
- package/dist/pi/packages/ta-glance/web/index.js +87 -19
- 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 +741 -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 +237 -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.js +109 -2
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +4 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +123 -11
- package/dist/pi/packages/ta-manual/package.json +1 -1
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +45 -10
- package/dist/pi/packages/ta-manual/web/index.js +567 -12
- 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 +1787 -0
- package/dist/pi/packages/ta-moments/host/index.mjs +2415 -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 +2008 -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 +410 -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 +85 -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 +311 -134
- package/dist/pi/packages/ta-recall/host/index.mjs +472 -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/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 +31 -23
- 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 +414 -153
- package/dist/pi/packages/ta-rooms/README.en.md +6 -3
- package/dist/pi/packages/ta-rooms/README.md +6 -3
- package/dist/pi/packages/ta-rooms/extension/index.mjs +194 -9
- package/dist/pi/packages/ta-rooms/host/index.mjs +1023 -234
- 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 +43 -40
- package/dist/pi/packages/ta-rooms/lib/double-host.js +142 -311
- package/dist/pi/packages/ta-rooms/lib/double-i18n.d.ts +20 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.js +40 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.d.ts +96 -3
- package/dist/pi/packages/ta-rooms/lib/double-protocol.js +58 -3
- 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 +34 -2
- package/dist/pi/packages/ta-rooms/lib/double-util.js +60 -2
- package/dist/pi/packages/ta-rooms/lib/doubles-store.d.ts +4 -1
- package/dist/pi/packages/ta-rooms/lib/doubles-store.js +8 -2
- package/dist/pi/packages/ta-rooms/lib/doubles-view.js +7 -2
- package/dist/pi/packages/ta-rooms/lib/extension.d.ts +9 -0
- package/dist/pi/packages/ta-rooms/lib/extension.js +35 -8
- 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 +2 -1
- package/dist/pi/packages/ta-rooms/lib/host.js +9 -2
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +23 -2
- package/dist/pi/packages/ta-rooms/lib/i18n.js +60 -18
- package/dist/pi/packages/ta-rooms/lib/index.js +18 -1
- package/dist/pi/packages/ta-rooms/lib/members-view.js +12 -1
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +42 -4
- package/dist/pi/packages/ta-rooms/lib/page.js +108 -24
- package/dist/pi/packages/ta-rooms/lib/room-view.js +7 -3
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +6 -17
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-rooms/lib/style.js +31 -6
- 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 +11 -2
- package/dist/pi/packages/ta-rooms/web/index.js +1633 -751
- 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 +72 -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/style.d.ts +1 -1
- package/dist/pi/packages/ta-share/lib/style.js +4 -6
- package/dist/pi/packages/ta-share/package.json +10 -2
- package/dist/pi/packages/ta-share/web/index.js +12 -14
- 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 +285 -0
- package/dist/pi/packages/ta-team/host/index.mjs +2121 -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 +178 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-BnqtcbpZ.js → abnfDiagram-S7VZAUFO-C30pzFN3.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-BzPq1Ioe.js → architecture-WOLXFQ4H-wfYFQl2u.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-BsquO3a7.js → architectureDiagram-YGSQEFNW-B05zgxyT.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-BQNYOEP4.js → blockDiagram-APKKGZFW-BhN8Bsu0.js} +1 -1
- package/dist/public/assets/{browser-DS711n7Y.js → browser-DteLjv_-.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-D6e79Ycq.js → c4Diagram-KJ2TOQU5-DvdF3qCV.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-B-sgaPoU.js → chunk-6MUBBAK2-DNavkrnr.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-D8pJKIg2.js → chunk-AXFCVDMN-DplVEqp_.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-86TL-vCz.js → chunk-BG4553SI-BazOaHvw.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CfUVuGjc.js → chunk-DQASFODM-DmoQWa8b.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-Drm0FEYk.js → chunk-HFQBQIA3-Cj1m9ccz.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-BVFRADlC.js → chunk-KQLB2F66-_jbilrLX.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-DfyALEmP.js → chunk-KS47KZWR-CWU16Lut.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-DtJVzk2c.js → chunk-LEVMRMFU-wsbxWEZE.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-DTy27PHQ.js → chunk-M57EVK23-BGvmwwTv.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-nSgn7jZg.js → chunk-OY52VR5R-Bp3hJ4kT.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-CkSxO_X6.js → chunk-QB3YPZ4I-C1rQVxsJ.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-Ck6iAjAL.js → chunk-R3KSYZAL-CEy0dKWn.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DQPHdSTh.js → chunk-STOXU5M4-akqvafwH.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-Bc2AbV2Y.js → chunk-TU62E6Q5-CVXAS4DS.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-Cgpm0IXm.js → chunk-X4PVCEUW-DT_bEMvQ.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-CGE4eLpg.js → chunk-XXDRQBXY-Bgv_n5Qh.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-4eQuDPEo.js → classDiagram-v2-L25IHNXF-BtjQChpS.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-tDLCWq07.js → cose-bilkent-JH36ORCC-DSrOY8Uk.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-DYlwwGUb.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-ByqcZ8x9.js → cynefinDiagram-L36ESFBY-DTy7FNFS.js} +1 -1
- package/dist/public/assets/{d3-selection-Bgn1374-.js → d3-selection-ip6rDUzY.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-mCgr71mV.js → dagre-SPEB5RXH-CHrks7Jb.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-DpYSwpQ0.js → diagram-3B7GL73J-eUJ7STAr.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-DMozUQzi.js → diagram-DNEMPZML-B_fptNkg.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-Bk5Uf8PD.js → diagram-L3MUGCDN-C15owCSG.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-DFt5cPVK.js → diagram-LA4NIPWU-Bfa1qEgY.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BkZZcKqK.js → diagram-MHCOC4E2-Bwxsih_Q.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-HEY6kyyN.js → diagram-XPFHEONP-DKZ_lwah.js} +1 -1
- package/dist/public/assets/{dist-Bj2CrKn7.js → dist-VHGBaby6.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D4JvYyVb.js → ebnfDiagram-UZSYDL2S-CCkttvYi.js} +1 -1
- package/dist/public/assets/{editor.api-BpJFzYbl.js → editor.api-a2gC0dVD.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-CT6qLJkF.js → elk-XV6XMXQE-DcikW39e.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-BGng1goR.js → erDiagram-EYBAPDEH-BE3TV5lU.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-Tt8O-Q1Z.js → eventmodeling-K75KTNOO-C2s1kutf.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-Bufgn1OL.js +1 -0
- package/dist/public/assets/{freemarker2-Dd5ksoRn.js → freemarker2-2e8pZojb.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-Jl8VO_g2.js → ganttDiagram-23REXITY-rGnJptii.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-D_tzR9z9.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-Be4qXALb.js → gitGraphDiagram-STJD7YCW-CNnsDjQA.js} +1 -1
- package/dist/public/assets/{handlebars-4xabgUi4.js → handlebars-CMKN6E37.js} +1 -1
- package/dist/public/assets/{html-Dk3kt2w_.js → html-0AjXQhkQ.js} +1 -1
- package/dist/public/assets/{index-Bx0c7eoh.js → index-TUtoc8CW.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-C5Pwv-6e.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-Coc0tdwb.js → infoDiagram-KBXO4MBG-DMKs8cuE.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-CE_1VQCg.js → ishikawaDiagram-M35NCXHK-Dg_IbA0G.js} +1 -1
- package/dist/public/assets/{javascript-DKLGqy6v.js → javascript-CqYOqPjw.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-CrolRZ_7.js → journeyDiagram-OPLOXDXO-ohAOfoEY.js} +1 -1
- package/dist/public/assets/{jsonMode-Chcs19_y.js → jsonMode-D-gI-S5H.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-CjJj47De.js → kanban-definition-BZKZHSQY-w-aKZS_U.js} +1 -1
- package/dist/public/assets/{liquid-jff3p-Ji.js → liquid-oBN7c8NZ.js} +1 -1
- package/dist/public/assets/{mdx-DW4uRDfJ.js → mdx-CnwhgGjX.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-XhQj6FvH.js → mermaid-parser.core-CfFkSR0t.js} +3 -3
- package/dist/public/assets/{mermaid.core-OD4Atimg.js → mermaid.core-apiVCSBY.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DpGelVY7.js → mindmap-definition-I2QAS2VK-E7vqVWB0.js} +1 -1
- package/dist/public/assets/module-C2jtFD0v.js +2365 -0
- package/dist/public/assets/module-xT4L5yYw.js +1 -0
- package/dist/public/assets/{monaco-BTVZP-tU.js → monaco-C0ByxW3l.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-xozI7a9T.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-CqcBmPfB.js → pegDiagram-FD4XPPHP--RpwCE7x.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-BkHXIzDi.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-CRir3beB.js → pieDiagram-J4AKIIQI-DxSbPaRZ.js} +1 -1
- package/dist/public/assets/{python-BwW_0207.js → python-vNPe_Fao.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-DIY6gdcf.js → quadrantDiagram-XTYBLID2-CR_eeYXi.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-CaUh9zV3.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-DckPvlDe.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-XWNOzunl.js → railroad-abnf-LNEFI6M7-D6I2HxIC.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-CI0-j1Jz.js → railroad-ebnf-DWYD2UWJ-BuhDRGo3.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-BVB_IaIG.js → railroad-peg-JR7BVNR7-n15PB7Sb.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-CudwT6q2.js → railroadDiagram-MRQ6NCDL-Bbe5bNap.js} +1 -1
- package/dist/public/assets/{razor-DrjCyQqB.js → razor-CnKbF0Yz.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CvRMeRqj.js → requirementDiagram-Y7LWUY3S-Beuygh9j.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-adxYCJKr.js → sankeyDiagram-WGJFYUXA-jwWPgnrS.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-lCRsoLUp.js → sequenceDiagram-5NDRBG5M-CmU-HYQI.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-DNst1BLg.js → stateDiagram-v2-FJ4FJNEA-Bo7BEi-m.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-S_omrdvA.js → swimlanes-UMQ2AFYF-PSKyZN_b.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-z_0ABNQq.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-_pMGrTE-.js → timeline-definition-SEUHKTQE-BuRxLScZ.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-BN38Jg9j.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-CKdz7u7W.js +1 -0
- package/dist/public/assets/{typescript-0-z_OYCU.js → typescript-C00ztMLg.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-B2oJKi5Q.js → usecaseDiagram-AFA6YXN4-Dlvyos8r.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-inPs2Kkr.js → vennDiagram-NNMJR3RB-CuLZubJH.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-B0cvM1zV.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-DNhNHM7b.js → wardleyDiagram-S7YFUSEH-WOGGTs4y.js} +1 -1
- package/dist/public/assets/{xml-BXPxQzKF.js → xml-CHBFuf5n.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-DJc93dNT.js → xychartDiagram-GGNKY7IX-DwW9eifP.js} +1 -1
- package/dist/public/assets/{yaml-CGmD9Rya.js → yaml-C4qkqzcL.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +7738 -3839
- 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-Dd40W2Jh.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-uFzenfA3.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-D28I_jUc.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-5vIGEIq7.js +0 -1
- package/dist/public/assets/module-CrD0OHQp.js +0 -1
- package/dist/public/assets/module-DEBMgdtf.js +0 -2273
- package/dist/public/assets/packet-JDAUHWVQ-CBxQ5Mzy.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-DT5V3581.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-BAOovYEa.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-RZ2Rnwzh.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-By5lnz4u.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-Cyb9N8KY.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-BkMo57pG.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-CSt-uQ-Y.js +0 -1
|
@@ -3,10 +3,185 @@ import { existsSync } from "node:fs";
|
|
|
3
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { join as join2 } from "node:path";
|
|
5
5
|
|
|
6
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
7
|
+
var TA_HOST_EVENT = "ta:host";
|
|
8
|
+
var TaHostUtil;
|
|
9
|
+
(function(TaHostUtil2) {
|
|
10
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
11
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
12
|
+
return new Promise((resolve) => {
|
|
13
|
+
let heard = false;
|
|
14
|
+
let answered = false;
|
|
15
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
16
|
+
const request = {
|
|
17
|
+
name,
|
|
18
|
+
heard: () => {
|
|
19
|
+
heard = true;
|
|
20
|
+
},
|
|
21
|
+
resolve: (answer) => {
|
|
22
|
+
answered = true;
|
|
23
|
+
clearTimeout(timer);
|
|
24
|
+
resolve(answer);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
events.emit(TA_HOST_EVENT, request);
|
|
28
|
+
if (!heard && !answered) {
|
|
29
|
+
clearTimeout(timer);
|
|
30
|
+
resolve(undefined);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
TaHostUtil2.reach = reach;
|
|
35
|
+
function marked(systemPrompt, mark) {
|
|
36
|
+
return role(systemPrompt).includes(mark);
|
|
37
|
+
}
|
|
38
|
+
TaHostUtil2.marked = marked;
|
|
39
|
+
function role(systemPrompt) {
|
|
40
|
+
if (!systemPrompt) {
|
|
41
|
+
return "";
|
|
42
|
+
}
|
|
43
|
+
const open = `<addendum>
|
|
44
|
+
`;
|
|
45
|
+
const start = systemPrompt.indexOf(open);
|
|
46
|
+
const context = systemPrompt.indexOf(`<project_context>
|
|
47
|
+
`);
|
|
48
|
+
if (start < 0 || context >= 0 && context < start) {
|
|
49
|
+
return "";
|
|
50
|
+
}
|
|
51
|
+
const end = systemPrompt.indexOf(`
|
|
52
|
+
</addendum>`, start);
|
|
53
|
+
return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
|
|
54
|
+
}
|
|
55
|
+
TaHostUtil2.role = role;
|
|
56
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
57
|
+
var TA_BRIEF_SOURCE = "brief";
|
|
58
|
+
var TA_ASK_ENTRY = "ta-ask";
|
|
59
|
+
var TaAskUtil;
|
|
60
|
+
(function(TaAskUtil2) {
|
|
61
|
+
const LENGTH = 120;
|
|
62
|
+
function entry(question) {
|
|
63
|
+
const line = question.replace(/\s+/g, " ").trim();
|
|
64
|
+
return { question: line.length > LENGTH ? `${line.slice(0, LENGTH - 1)}…` : line };
|
|
65
|
+
}
|
|
66
|
+
TaAskUtil2.entry = entry;
|
|
67
|
+
function asking(entries) {
|
|
68
|
+
var _a;
|
|
69
|
+
for (let i = entries.length - 1;i >= 0; i--) {
|
|
70
|
+
const entry2 = entries[i];
|
|
71
|
+
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY) {
|
|
75
|
+
return read(entry2);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
TaAskUtil2.asking = asking;
|
|
81
|
+
function next(asked, entry2) {
|
|
82
|
+
var _a;
|
|
83
|
+
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
return entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY ? read(entry2) : asked;
|
|
87
|
+
}
|
|
88
|
+
TaAskUtil2.next = next;
|
|
89
|
+
function read(found) {
|
|
90
|
+
var _a;
|
|
91
|
+
const question = (_a = found.data) === null || _a === undefined ? undefined : _a.question;
|
|
92
|
+
if (typeof question !== "string" || !question.trim()) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const at = found.timestamp ? Date.parse(found.timestamp) : Number.NaN;
|
|
96
|
+
return { question: entry(question).question, at: Number.isNaN(at) ? 0 : at };
|
|
97
|
+
}
|
|
98
|
+
})(TaAskUtil || (TaAskUtil = {}));
|
|
99
|
+
|
|
100
|
+
// ../ta-protocol/esm/common/team-protocol.js
|
|
101
|
+
var TA_OWNER = "owner";
|
|
102
|
+
var TA_UNDECLARED = "extensions.install";
|
|
103
|
+
var TaPermissionUtil;
|
|
104
|
+
(function(TaPermissionUtil2) {
|
|
105
|
+
function read(pi) {
|
|
106
|
+
const given = pi === null || pi === undefined ? undefined : pi.permissions;
|
|
107
|
+
const map = (value) => value && typeof value === "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string")) : undefined;
|
|
108
|
+
const host2 = map(given === null || given === undefined ? undefined : given.host);
|
|
109
|
+
const tools = map(given === null || given === undefined ? undefined : given.tools);
|
|
110
|
+
return { ...host2 ? { host: host2 } : {}, ...tools ? { tools } : {} };
|
|
111
|
+
}
|
|
112
|
+
TaPermissionUtil2.read = read;
|
|
113
|
+
function host(manifest, method, kind) {
|
|
114
|
+
var _a, _b, _c, _d;
|
|
115
|
+
const host2 = (_a = manifest === null || manifest === undefined ? undefined : manifest.host) !== null && _a !== undefined ? _a : {};
|
|
116
|
+
const own = (key) => Object.prototype.hasOwnProperty.call(host2, key) ? host2[key] : undefined;
|
|
117
|
+
return (_d = (_c = (_b = kind ? own(`${method}:${kind}`) : undefined) !== null && _b !== undefined ? _b : own(method)) !== null && _c !== undefined ? _c : own("*")) !== null && _d !== undefined ? _d : TA_UNDECLARED;
|
|
118
|
+
}
|
|
119
|
+
TaPermissionUtil2.host = host;
|
|
120
|
+
})(TaPermissionUtil || (TaPermissionUtil = {}));
|
|
121
|
+
var action = (id, en, zh, more = {}) => ({
|
|
122
|
+
id,
|
|
123
|
+
area: id.split(".")[0],
|
|
124
|
+
title: { en, "zh-CN": zh },
|
|
125
|
+
...more
|
|
126
|
+
});
|
|
127
|
+
var TA_ACTIONS = [
|
|
128
|
+
action("chat.view", "See conversations", "查看对话"),
|
|
129
|
+
action("chat.send", "Send in conversations", "在对话里发消息"),
|
|
130
|
+
action("chat.create", "Start conversations", "新建对话"),
|
|
131
|
+
action("chat.stop", "Stop a reply", "停止回复"),
|
|
132
|
+
action("chat.manage", "Rename, archive and close conversations", "改名、归档、关闭对话"),
|
|
133
|
+
action("chat.share", "Share by a link", "生成分享链接"),
|
|
134
|
+
action("agent.view", "See agents", "查看智能体"),
|
|
135
|
+
action("agent.use", "Talk with agents", "和智能体对话"),
|
|
136
|
+
action("agent.edit", "Create, change and remove agents", "新建、修改、删除智能体"),
|
|
137
|
+
action("channel.view", "See channels", "查看频道"),
|
|
138
|
+
action("channel.post", "Post in channels", "在频道里发言"),
|
|
139
|
+
action("channel.manage", "Create and change channels", "新建、管理频道"),
|
|
140
|
+
action("task.view", "See tasks", "查看任务"),
|
|
141
|
+
action("task.create", "Hand out tasks", "派任务"),
|
|
142
|
+
action("task.manage", "Take over and stop tasks", "接管、停止任务"),
|
|
143
|
+
action("files.read", "Read files", "读文件", { scoped: true }),
|
|
144
|
+
action("files.write", "Change files", "改文件", { scoped: true }),
|
|
145
|
+
action("commands.run", "Let Ta run commands", "让 Ta 运行命令", { scoped: true, risky: true }),
|
|
146
|
+
action("commands.terminal", "Open terminals", "打开终端", { scoped: true, risky: true }),
|
|
147
|
+
action("hosts.use", "Use remote hosts", "使用远程主机", { risky: true }),
|
|
148
|
+
action("models.use", "Use the models", "使用模型"),
|
|
149
|
+
action("models.manage", "Sign in to models", "登录和更换模型账号"),
|
|
150
|
+
action("cron.view", "See scheduled tasks", "查看定时任务"),
|
|
151
|
+
action("cron.manage", "Change scheduled tasks", "管理定时任务"),
|
|
152
|
+
action("extensions.use", "Use extensions", "使用扩展"),
|
|
153
|
+
action("extensions.install", "Install and turn off extensions", "安装、停用扩展"),
|
|
154
|
+
action("settings.view", "See settings", "查看设置"),
|
|
155
|
+
action("settings.manage", "Change settings", "修改设置"),
|
|
156
|
+
action("members.view", "See members", "查看成员"),
|
|
157
|
+
action("members.invite", "Invite people", "邀请别人"),
|
|
158
|
+
action("members.approve", "Answer requests", "处理申请"),
|
|
159
|
+
action("members.roles", "Change roles and members", "管理角色和成员"),
|
|
160
|
+
action("audit.view", "See the record", "查看记录")
|
|
161
|
+
];
|
|
162
|
+
var TaActionUtil;
|
|
163
|
+
(function(TaActionUtil2) {
|
|
164
|
+
const byId = new Map(TA_ACTIONS.map((one) => [one.id, one]));
|
|
165
|
+
function info(id) {
|
|
166
|
+
return byId.get(id);
|
|
167
|
+
}
|
|
168
|
+
TaActionUtil2.info = info;
|
|
169
|
+
function title(id, language) {
|
|
170
|
+
const found = byId.get(id);
|
|
171
|
+
return found ? language.startsWith("zh") ? found.title["zh-CN"] : found.title.en : id;
|
|
172
|
+
}
|
|
173
|
+
TaActionUtil2.title = title;
|
|
174
|
+
function inside(dir, path) {
|
|
175
|
+
const base = dir.replace(/\/+$/, "");
|
|
176
|
+
return path === base || path.startsWith(`${base}/`) || base === "";
|
|
177
|
+
}
|
|
178
|
+
TaActionUtil2.inside = inside;
|
|
179
|
+
})(TaActionUtil || (TaActionUtil = {}));
|
|
180
|
+
|
|
6
181
|
// web-src/recall-protocol.ts
|
|
7
182
|
var NAME = "@celljs/ta-recall";
|
|
8
|
-
var
|
|
9
|
-
var
|
|
183
|
+
var EXTENSION_BLOCK = "ta-extension";
|
|
184
|
+
var EXTENSION_KINDS = ["steps", "board", "page", "command", "panel"];
|
|
10
185
|
var Keys;
|
|
11
186
|
((Keys) => {
|
|
12
187
|
Keys.SUGGEST = "suggest";
|
|
@@ -35,6 +210,9 @@ var Limits;
|
|
|
35
210
|
Limits.BRIEF_CONVERSATIONS = 30;
|
|
36
211
|
Limits.BRIEF_ITEMS = 5;
|
|
37
212
|
Limits.ASKED_ARCHIVE_DAYS = 7;
|
|
213
|
+
Limits.REQUEST_CONVERSATIONS = 80;
|
|
214
|
+
Limits.REQUEST_ASKS = 12;
|
|
215
|
+
Limits.REQUEST_CHARS = 300;
|
|
38
216
|
})(Limits ||= {});
|
|
39
217
|
|
|
40
218
|
// web-src/brief-util.ts
|
|
@@ -43,6 +221,8 @@ var ASKS = 3;
|
|
|
43
221
|
var ASK_CHARS = 160;
|
|
44
222
|
var ANSWER_CHARS = 500;
|
|
45
223
|
var SUMMARY_CHARS = 300;
|
|
224
|
+
var SOURCE_ITEMS = 30;
|
|
225
|
+
var SOURCE_CHARS = 600;
|
|
46
226
|
var BriefUtil;
|
|
47
227
|
((BriefUtil) => {
|
|
48
228
|
BriefUtil.DEFAULT = { enabled: true, time: "09:00" };
|
|
@@ -103,10 +283,43 @@ var BriefUtil;
|
|
|
103
283
|
parts.push(`- ${run.name}: ${run.status ?? "ran"}${run.summary ? ` — ${line(run.summary, SUMMARY_CHARS)}` : ""}`);
|
|
104
284
|
}
|
|
105
285
|
}
|
|
286
|
+
const suggestions = input.suggestions ?? [];
|
|
287
|
+
const offered = suggestions.filter((one) => (one.state === "pending" || one.state === "digest") && one.at >= input.since);
|
|
288
|
+
if (offered.length > 0) {
|
|
289
|
+
parts.push("", "Suggestions of Ta waiting for the user (in Suggestions, on the double's home):");
|
|
290
|
+
for (const one of offered) {
|
|
291
|
+
parts.push(`- ${line(one.title, ASK_CHARS)}${one.why ? ` — ${line(one.why, ASK_CHARS)}` : ""}`);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
const alone = suggestions.filter((one) => one.auto && one.state === "done" && (one.decidedAt ?? one.at) >= input.since);
|
|
295
|
+
if (alone.length > 0) {
|
|
296
|
+
parts.push("", "Done by Ta on its own (the user may undo it in Suggestions):");
|
|
297
|
+
for (const one of alone) {
|
|
298
|
+
parts.push(`- ${line(one.title, ASK_CHARS)}${one.why ? ` — ${line(one.why, ASK_CHARS)}` : ""}`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
for (const source2 of input.sources ?? []) {
|
|
302
|
+
const items = source2.items.filter((item) => item.at >= input.since).slice(-SOURCE_ITEMS);
|
|
303
|
+
if (items.length > 0) {
|
|
304
|
+
parts.push("", `${line(source2.section, ASK_CHARS)} (from ${source2.name}; ${line(source2.instruction, SOURCE_CHARS)}):`);
|
|
305
|
+
for (const item of items) {
|
|
306
|
+
parts.push(`- ${line(item.text, SOURCE_CHARS)}`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
106
310
|
return parts.join(`
|
|
107
311
|
`);
|
|
108
312
|
}
|
|
109
313
|
BriefUtil.material = material;
|
|
314
|
+
function source(name, value) {
|
|
315
|
+
const raw = value && typeof value === "object" ? value : undefined;
|
|
316
|
+
if (!raw || typeof raw.section !== "string" || typeof raw.instruction !== "string" || !Array.isArray(raw.items)) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const items = raw.items.filter((item) => !!item && typeof item.at === "number" && typeof item.text === "string" && !!item.text.trim());
|
|
320
|
+
return { name, section: raw.section, instruction: raw.instruction, items };
|
|
321
|
+
}
|
|
322
|
+
BriefUtil.source = source;
|
|
110
323
|
function conversationLines(conversation, since2, state) {
|
|
111
324
|
const recent = conversation.said.filter((said) => said.at >= since2);
|
|
112
325
|
const asks = recent.filter((said) => said.role === "user" && !/^\/\S+$/.test(said.text)).slice(-ASKS);
|
|
@@ -176,6 +389,7 @@ var BriefUtil;
|
|
|
176
389
|
`- ### ${heads[1]}: what waits for a decision of the user, failed or was left half done, and what they should do, the most pressing first;`,
|
|
177
390
|
`- ### ${heads[2]}: two or three concrete next steps.`,
|
|
178
391
|
"Each line links its conversation as [title](session file). Leave out a part with nothing in it, small talk, and this conversation itself. Use no tools unless something must be checked.",
|
|
392
|
+
'Material of a package ("from <package>") says itself what to do with it, as a part of its own after these three: do as it says.',
|
|
179
393
|
"",
|
|
180
394
|
material2
|
|
181
395
|
].join(`
|
|
@@ -340,6 +554,169 @@ class ConversationIndex {
|
|
|
340
554
|
}
|
|
341
555
|
}
|
|
342
556
|
|
|
557
|
+
// web-src/block-util.ts
|
|
558
|
+
var BlockUtil;
|
|
559
|
+
((BlockUtil) => {
|
|
560
|
+
function last(text, language) {
|
|
561
|
+
const lines = text.split(/\r?\n/);
|
|
562
|
+
let found;
|
|
563
|
+
for (let index = 0;index < lines.length; index++) {
|
|
564
|
+
const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
|
|
565
|
+
if (open?.[2] !== language) {
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
568
|
+
const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
|
|
569
|
+
const end = lines.findIndex((line, at) => at > index && close.test(line));
|
|
570
|
+
found = lines.slice(index + 1, end < 0 ? lines.length : end);
|
|
571
|
+
index = end < 0 ? lines.length : end;
|
|
572
|
+
}
|
|
573
|
+
return found && parse(found);
|
|
574
|
+
}
|
|
575
|
+
BlockUtil.last = last;
|
|
576
|
+
function parse(lines) {
|
|
577
|
+
const rule = lines.findIndex((line) => line.trim() === "---");
|
|
578
|
+
const fields = {};
|
|
579
|
+
for (const line of rule < 0 ? [] : lines.slice(0, rule)) {
|
|
580
|
+
const field = /^\s*([\w-]+)\s*:\s*(.*)$/.exec(line);
|
|
581
|
+
const key = field?.[1].toLowerCase();
|
|
582
|
+
if (field && key && !(key in fields)) {
|
|
583
|
+
fields[key] = field[2].trim().replace(/^["'](.*)["']$/, "$1");
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return {
|
|
587
|
+
fields,
|
|
588
|
+
body: lines.slice(rule + 1).join(`
|
|
589
|
+
`).trim()
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
})(BlockUtil ||= {});
|
|
593
|
+
|
|
594
|
+
// web-src/extension-util.ts
|
|
595
|
+
var FENCE = "```";
|
|
596
|
+
var NAME_CHARS = 64;
|
|
597
|
+
var TITLE_CHARS2 = 60;
|
|
598
|
+
var SUMMARY_CHARS2 = 300;
|
|
599
|
+
var ExtensionUtil;
|
|
600
|
+
((ExtensionUtil) => {
|
|
601
|
+
ExtensionUtil.KIND_HELP = {
|
|
602
|
+
steps: "steps Ta follows when the user asks again and judges as it goes: a skill of the package, saved from the card as written",
|
|
603
|
+
board: "a card of the board, to see at a glance: a status, a count, what is next",
|
|
604
|
+
page: "a page of its own: a table, a chart, a form the user fills in",
|
|
605
|
+
command: "a /command, or a button, that runs a fixed set of commands whose result needs no judgment",
|
|
606
|
+
panel: "a tool of the workbench beside the conversation, as the explorer or the terminal"
|
|
607
|
+
};
|
|
608
|
+
function find(text) {
|
|
609
|
+
const block = BlockUtil.last(text, EXTENSION_BLOCK);
|
|
610
|
+
if (!block?.body) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
const { name: name2 = "", title = "", kind = "", summary = "" } = block.fields;
|
|
614
|
+
return check({ name: name2, title, kind, summary, body: block.body });
|
|
615
|
+
}
|
|
616
|
+
ExtensionUtil.find = find;
|
|
617
|
+
function name(text) {
|
|
618
|
+
return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, NAME_CHARS).replace(/-+$/, "");
|
|
619
|
+
}
|
|
620
|
+
ExtensionUtil.name = name;
|
|
621
|
+
function check(draft) {
|
|
622
|
+
const body = typeof draft?.body === "string" ? draft.body.trim() : "";
|
|
623
|
+
if (!body) {
|
|
624
|
+
throw new Error("An extension needs a body: its steps, or the plan to make it by.");
|
|
625
|
+
}
|
|
626
|
+
const line = (value, chars) => (typeof value === "string" ? value : "").replace(/\s+/g, " ").trim().slice(0, chars);
|
|
627
|
+
const title = line(draft.title, TITLE_CHARS2);
|
|
628
|
+
const named = name(typeof draft.name === "string" ? draft.name : "") || name(title) || "extension";
|
|
629
|
+
const kind = EXTENSION_KINDS.includes(draft.kind) ? draft.kind : "steps";
|
|
630
|
+
return { name: named, title: title || named, kind, summary: line(draft.summary, SUMMARY_CHARS2) || line(body.split(`
|
|
631
|
+
`)[0], 200), body };
|
|
632
|
+
}
|
|
633
|
+
ExtensionUtil.check = check;
|
|
634
|
+
function blockHelp() {
|
|
635
|
+
return [
|
|
636
|
+
`${FENCE}${EXTENSION_BLOCK}`,
|
|
637
|
+
"name: <lowercase-words-with-dashes, its directory>",
|
|
638
|
+
"title: <a few words, as the lists show it>",
|
|
639
|
+
`kind: <one of ${EXTENSION_KINDS.join(", ")}>`,
|
|
640
|
+
"summary: <one line: what it does, and when Ta uses it (steps) or where it shows>",
|
|
641
|
+
"---",
|
|
642
|
+
"<steps: the goal, then the steps, commands, files, checks and pitfalls that worked, in general terms; else the plan: what it shows or does, where its data comes from, the commands it runs, the files it reads or writes>",
|
|
643
|
+
FENCE,
|
|
644
|
+
"Use a longer fence when the body has fences of its own. Write it in the language of the user."
|
|
645
|
+
].join(`
|
|
646
|
+
`);
|
|
647
|
+
}
|
|
648
|
+
ExtensionUtil.blockHelp = blockHelp;
|
|
649
|
+
function manifest(draft) {
|
|
650
|
+
const pkg = {
|
|
651
|
+
name: draft.name,
|
|
652
|
+
version: "0.1.0",
|
|
653
|
+
description: draft.summary,
|
|
654
|
+
pi: { title: draft.title, summary: draft.summary, icon: "ListChecks", skills: ["./skills"] }
|
|
655
|
+
};
|
|
656
|
+
return `${JSON.stringify(pkg, null, 2)}
|
|
657
|
+
`;
|
|
658
|
+
}
|
|
659
|
+
ExtensionUtil.manifest = manifest;
|
|
660
|
+
function skill(draft) {
|
|
661
|
+
return `---
|
|
662
|
+
name: ${draft.name}
|
|
663
|
+
description: ${JSON.stringify(draft.summary)}
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
${draft.body.trim()}
|
|
667
|
+
`;
|
|
668
|
+
}
|
|
669
|
+
ExtensionUtil.skill = skill;
|
|
670
|
+
function make(draft, language) {
|
|
671
|
+
const context = [
|
|
672
|
+
"[ta-recall:make]",
|
|
673
|
+
"The user wants the extension Ta offered made now. Read the ta-package skill first and make it as it says, in the smallest package that does what the plan says.",
|
|
674
|
+
`- name: ${draft.name}`,
|
|
675
|
+
`- title: ${draft.title}`,
|
|
676
|
+
`- kind: ${draft.kind} (${ExtensionUtil.KIND_HELP[draft.kind]})`,
|
|
677
|
+
`- summary: ${draft.summary}`,
|
|
678
|
+
"- plan:",
|
|
679
|
+
draft.body,
|
|
680
|
+
"- Put it in extensions/ of the agent directory, as the skill says. Give it the title and summary above, in the language of the user and English.",
|
|
681
|
+
"- Once it is made, say in one line where the user finds it."
|
|
682
|
+
].join(`
|
|
683
|
+
`);
|
|
684
|
+
const said = /^zh/i.test(language) ? `做出来:${draft.title}` : `Make it: ${draft.title}`;
|
|
685
|
+
return `<context>
|
|
686
|
+
${context}
|
|
687
|
+
</context>
|
|
688
|
+
${said}`;
|
|
689
|
+
}
|
|
690
|
+
ExtensionUtil.make = make;
|
|
691
|
+
})(ExtensionUtil ||= {});
|
|
692
|
+
|
|
693
|
+
// web-src/requests-util.ts
|
|
694
|
+
var CRON = "@celljs/ta-cron";
|
|
695
|
+
var RequestsUtil;
|
|
696
|
+
((RequestsUtil) => {
|
|
697
|
+
function collect(conversations, query) {
|
|
698
|
+
const until = query.until ?? Number.POSITIVE_INFINITY;
|
|
699
|
+
const exclude = new Set(query.exclude ?? []);
|
|
700
|
+
const found = [];
|
|
701
|
+
for (const conversation of conversations) {
|
|
702
|
+
if (conversation.updatedAt < query.since || conversation.group === CRON || exclude.has(conversation.file)) {
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
705
|
+
const asks = conversation.said.filter((said) => said.role === "user" && !said.framed && said.at >= query.since && said.at <= until && !/^\/\S+$/.test(said.text)).slice(-Limits.REQUEST_ASKS).map((said) => ({ at: said.at, text: clip(said.text) }));
|
|
706
|
+
if (asks.length > 0) {
|
|
707
|
+
const { file, cwd, title, updatedAt, group } = conversation;
|
|
708
|
+
found.push({ file, cwd, title, updatedAt, ...group ? { group } : {}, asks });
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
return found.sort((a, b) => b.updatedAt - a.updatedAt).slice(0, Math.max(1, query.limit ?? Limits.REQUEST_CONVERSATIONS));
|
|
712
|
+
}
|
|
713
|
+
RequestsUtil.collect = collect;
|
|
714
|
+
function clip(text) {
|
|
715
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
716
|
+
return flat.length > Limits.REQUEST_CHARS ? `${flat.slice(0, Limits.REQUEST_CHARS - 1)}…` : flat;
|
|
717
|
+
}
|
|
718
|
+
})(RequestsUtil ||= {});
|
|
719
|
+
|
|
343
720
|
// web-src/search-util.ts
|
|
344
721
|
var DAY_MS2 = 24 * 60 * 60000;
|
|
345
722
|
var PAIRS_CHARS = 1000;
|
|
@@ -483,112 +860,23 @@ var RecallServerTexts;
|
|
|
483
860
|
return zh() ? "每日简报" : "Daily brief";
|
|
484
861
|
}
|
|
485
862
|
RecallServerTexts.briefTitle = briefTitle;
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
// web-src/skill-util.ts
|
|
489
|
-
var FENCE = "```";
|
|
490
|
-
var NAME_CHARS = 64;
|
|
491
|
-
var DESCRIPTION_CHARS = 1024;
|
|
492
|
-
var SkillUtil;
|
|
493
|
-
((SkillUtil) => {
|
|
494
|
-
function find(text) {
|
|
495
|
-
const lines = text.split(/\r?\n/);
|
|
496
|
-
let found;
|
|
497
|
-
for (let index = 0;index < lines.length; index++) {
|
|
498
|
-
const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
|
|
499
|
-
if (open?.[2] !== SKILL_BLOCK) {
|
|
500
|
-
continue;
|
|
501
|
-
}
|
|
502
|
-
const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
|
|
503
|
-
const end = lines.findIndex((line, at) => at > index && close.test(line));
|
|
504
|
-
found = lines.slice(index + 1, end < 0 ? lines.length : end);
|
|
505
|
-
index = end < 0 ? lines.length : end;
|
|
506
|
-
}
|
|
507
|
-
return found && parse(found);
|
|
863
|
+
function notOpen() {
|
|
864
|
+
return zh() ? "这个对话没有打开,打开它再点一次" : "The conversation is not open: open it and tap again";
|
|
508
865
|
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
const rule = lines.findIndex((line) => line.trim() === "---");
|
|
512
|
-
const head = rule < 0 ? [] : lines.slice(0, rule);
|
|
513
|
-
const body = lines.slice(rule + 1).join(`
|
|
514
|
-
`).trim();
|
|
515
|
-
if (!body) {
|
|
516
|
-
return;
|
|
517
|
-
}
|
|
518
|
-
const field = (key) => head.map((line) => new RegExp(`^\\s*${key}\\s*:\\s*(.*)$`, "i").exec(line)?.[1].trim().replace(/^["'](.*)["']$/, "$1")).find((value) => value !== undefined);
|
|
519
|
-
const description = (field("description") ?? "").replace(/\s+/g, " ").slice(0, DESCRIPTION_CHARS);
|
|
520
|
-
return { name: name(field("name") ?? "") || name(description) || "skill", description, body };
|
|
521
|
-
}
|
|
522
|
-
function name(text) {
|
|
523
|
-
return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, NAME_CHARS).replace(/-+$/, "");
|
|
524
|
-
}
|
|
525
|
-
SkillUtil.name = name;
|
|
526
|
-
function check(draft) {
|
|
527
|
-
const body = typeof draft?.body === "string" ? draft.body.trim() : "";
|
|
528
|
-
if (!body) {
|
|
529
|
-
throw new Error("A skill needs a body.");
|
|
530
|
-
}
|
|
531
|
-
const description = (typeof draft.description === "string" ? draft.description : "").replace(/\s+/g, " ").trim().slice(0, DESCRIPTION_CHARS);
|
|
532
|
-
return { name: name(typeof draft.name === "string" ? draft.name : "") || "skill", description: description || body.split(`
|
|
533
|
-
`)[0].slice(0, 200), body };
|
|
534
|
-
}
|
|
535
|
-
SkillUtil.check = check;
|
|
536
|
-
function markdown(draft) {
|
|
537
|
-
return `---
|
|
538
|
-
name: ${draft.name}
|
|
539
|
-
description: ${JSON.stringify(draft.description)}
|
|
540
|
-
---
|
|
541
|
-
|
|
542
|
-
${draft.body.trim()}
|
|
543
|
-
`;
|
|
544
|
-
}
|
|
545
|
-
SkillUtil.markdown = markdown;
|
|
546
|
-
function blockHelp() {
|
|
547
|
-
return [
|
|
548
|
-
`${FENCE}${SKILL_BLOCK}`,
|
|
549
|
-
"name: <lowercase-words-with-dashes>",
|
|
550
|
-
"description: <one line: what it does and when to use it>",
|
|
551
|
-
"---",
|
|
552
|
-
"<the body: the goal, then the steps, commands, files and checks that worked, in general terms, without what held only this once>",
|
|
553
|
-
FENCE,
|
|
554
|
-
"Use a longer fence when the body has fences of its own. Write it in the language of the user."
|
|
555
|
-
].join(`
|
|
556
|
-
`);
|
|
557
|
-
}
|
|
558
|
-
SkillUtil.blockHelp = blockHelp;
|
|
559
|
-
function hint(asks) {
|
|
560
|
-
const lines = asks.map((ask2) => `- "${ask2.title}" (${new Date(ask2.at).toISOString().slice(0, 10)}): ${JSON.stringify(ask2.text.replace(/\s+/g, " ").slice(0, 200))}`);
|
|
561
|
-
return [
|
|
562
|
-
"The user asked for much the same in other conversations before:",
|
|
563
|
-
...lines,
|
|
564
|
-
`Do what is asked first. Then, if it is a way of working worth doing the same way again (steps, commands, checks; not a one-off answer), offer to keep it as a skill in one short sentence and draft it with ${PROPOSE_TOOL}, which Ta shows as a card the user saves with a tap. Without that tool, end your answer with the draft in a fenced block of the language ${SKILL_BLOCK} instead:`,
|
|
565
|
-
blockHelp(),
|
|
566
|
-
"Offer nothing when it is not worth keeping."
|
|
567
|
-
].join(`
|
|
568
|
-
`);
|
|
569
|
-
}
|
|
570
|
-
SkillUtil.hint = hint;
|
|
571
|
-
function ask(language) {
|
|
572
|
-
const context = [
|
|
573
|
-
"[ta-recall:skill]",
|
|
574
|
-
"The user wants the way of working of this conversation kept as a skill of Ta, which Ta loads in every new conversation: written so that one who never saw this conversation does it the same way.",
|
|
575
|
-
"- Keep what worked: the goal, the steps, the commands, files, checks and pitfalls; leave out what was only tried and dropped and what holds only this once.",
|
|
576
|
-
`- Draft it with ${PROPOSE_TOOL}, which Ta shows as a card the user saves, and say in a line what it does; do not write the skill file yourself. Without that tool, end your answer with the draft in a fenced block of the language ${SKILL_BLOCK}:`,
|
|
577
|
-
blockHelp(),
|
|
578
|
-
"- When the conversation holds no way of working worth keeping, say so and draft nothing."
|
|
579
|
-
].join(`
|
|
580
|
-
`);
|
|
581
|
-
return `<context>
|
|
582
|
-
${context}
|
|
583
|
-
</context>
|
|
584
|
-
${/^zh/i.test(language) ? "把这个对话里的做法存成技能" : "Keep how this was done as a skill"}`;
|
|
585
|
-
}
|
|
586
|
-
SkillUtil.ask = ask;
|
|
587
|
-
})(SkillUtil ||= {});
|
|
866
|
+
RecallServerTexts.notOpen = notOpen;
|
|
867
|
+
})(RecallServerTexts ||= {});
|
|
588
868
|
|
|
589
869
|
// web-src/recall-service.ts
|
|
590
870
|
var NOTIFY = "@celljs/ta-notify";
|
|
591
|
-
var
|
|
871
|
+
var CRON2 = "@celljs/ta-cron";
|
|
872
|
+
var INITIATIVE = "@celljs/ta-initiative";
|
|
873
|
+
var KEEP_KIND = {
|
|
874
|
+
id: "recall.keep",
|
|
875
|
+
owner: NAME,
|
|
876
|
+
title: { en: "Keep how you do things as an extension", zh: "把常做的事存成扩展" },
|
|
877
|
+
reversible: false,
|
|
878
|
+
level: "ask"
|
|
879
|
+
};
|
|
592
880
|
var CHECK_MS = 60000;
|
|
593
881
|
var FIRST_CHECK_MS = 20000;
|
|
594
882
|
|
|
@@ -599,6 +887,7 @@ class RecallHost {
|
|
|
599
887
|
queue = Promise.resolve();
|
|
600
888
|
timers = [];
|
|
601
889
|
briefing;
|
|
890
|
+
defined = false;
|
|
602
891
|
constructor(host, now = Date.now) {
|
|
603
892
|
this.host = host;
|
|
604
893
|
this.now = now;
|
|
@@ -637,6 +926,13 @@ class RecallHost {
|
|
|
637
926
|
if (session?.group) {
|
|
638
927
|
return [];
|
|
639
928
|
}
|
|
929
|
+
if (session?.sessionFile && this.host.team?.actorsOf(session.sessionFile).some((actor) => actor !== TA_OWNER)) {
|
|
930
|
+
return [];
|
|
931
|
+
}
|
|
932
|
+
const level = await this.initiative("level", KEEP_KIND.id);
|
|
933
|
+
if (level === "off" || level === "digest") {
|
|
934
|
+
return [];
|
|
935
|
+
}
|
|
640
936
|
const [declined, briefFile] = await Promise.all([this.read(Keys.DECLINED), this.read(Keys.BRIEF_FILE)]);
|
|
641
937
|
return SimilarUtil.find(text, await this.index.all(), {
|
|
642
938
|
exclude: [session?.sessionFile, typeof briefFile === "string" ? briefFile : undefined].filter((file) => !!file),
|
|
@@ -644,24 +940,53 @@ class RecallHost {
|
|
|
644
940
|
now: this.now()
|
|
645
941
|
});
|
|
646
942
|
}
|
|
647
|
-
|
|
943
|
+
async requests(query) {
|
|
944
|
+
if (typeof query?.since !== "number") {
|
|
945
|
+
throw new Error("Say since when, as a time of Date.now().");
|
|
946
|
+
}
|
|
947
|
+
const briefFile = await this.read(Keys.BRIEF_FILE);
|
|
948
|
+
const exclude = [...strings(query.exclude), ...typeof briefFile === "string" ? [briefFile] : []];
|
|
949
|
+
return RequestsUtil.collect(await this.index.all(), { ...query, exclude });
|
|
950
|
+
}
|
|
951
|
+
keep(key, draft) {
|
|
648
952
|
return this.serial(async () => {
|
|
649
|
-
const checked =
|
|
650
|
-
|
|
953
|
+
const checked = ExtensionUtil.check(draft);
|
|
954
|
+
if (checked.kind !== "steps") {
|
|
955
|
+
throw new Error("Only steps are kept as they are written; Ta makes any other kind (makeExtension).");
|
|
956
|
+
}
|
|
957
|
+
const root = join2(this.host.agentDir, "extensions");
|
|
651
958
|
let name = checked.name;
|
|
652
959
|
for (let count = 2;existsSync(join2(root, name)); count++) {
|
|
653
960
|
name = `${checked.name.slice(0, 60)}-${count}`;
|
|
654
961
|
}
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
await
|
|
658
|
-
await
|
|
659
|
-
|
|
962
|
+
const dir = join2(root, name);
|
|
963
|
+
const named = { ...checked, name };
|
|
964
|
+
await mkdir(join2(dir, "skills", name), { recursive: true });
|
|
965
|
+
await writeFile(join2(dir, "skills", name, "SKILL.md"), ExtensionUtil.skill(named), "utf8");
|
|
966
|
+
await writeFile(join2(dir, "package.json"), ExtensionUtil.manifest(named), "utf8");
|
|
967
|
+
await this.decide(key, { saved: dir, name });
|
|
968
|
+
await this.initiative("record", { kind: KEEP_KIND.id, title: name, why: checked.summary ?? "", outcome: "accepted" });
|
|
969
|
+
return dir;
|
|
660
970
|
});
|
|
661
971
|
}
|
|
662
|
-
|
|
972
|
+
makeExtension(key, session, message) {
|
|
973
|
+
return this.serial(async () => {
|
|
974
|
+
if (typeof message !== "string" || !message.trim()) {
|
|
975
|
+
throw new Error("Say what asks Ta to make it.");
|
|
976
|
+
}
|
|
977
|
+
const open = (await this.host.listSessions()).find((info) => info.piSessionId === session);
|
|
978
|
+
if (!open) {
|
|
979
|
+
throw new Error(RecallServerTexts.notOpen());
|
|
980
|
+
}
|
|
981
|
+
await this.host.prompt(open.sessionId, { clientMessageId: `ta-recall-make:${key}`, message, streamingBehavior: "followUp" });
|
|
982
|
+
await this.decide(key, { made: true });
|
|
983
|
+
await this.initiative("record", { kind: KEEP_KIND.id, title: key, why: "", outcome: "accepted" });
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
decline(key, ask) {
|
|
663
987
|
return this.serial(async () => {
|
|
664
988
|
await this.decide(key, { declined: true });
|
|
989
|
+
await this.initiative("record", { kind: KEEP_KIND.id, title: typeof ask === "string" ? ask.slice(0, 120) : key, why: "", outcome: "declined" });
|
|
665
990
|
if (typeof ask === "string" && SimilarUtil.comparable(ask)) {
|
|
666
991
|
const declined = [...strings(await this.read(Keys.DECLINED)), ask.slice(0, 1000)].slice(-Limits.DECLINED_KEPT);
|
|
667
992
|
await this.host.setExtensionData(NAME, Keys.DECLINED, declined);
|
|
@@ -722,7 +1047,9 @@ class RecallHost {
|
|
|
722
1047
|
briefFile,
|
|
723
1048
|
notices: await this.notices(),
|
|
724
1049
|
runs: await this.runs(since),
|
|
725
|
-
|
|
1050
|
+
suggestions: await this.suggestions(),
|
|
1051
|
+
states,
|
|
1052
|
+
sources: await this.sources()
|
|
726
1053
|
});
|
|
727
1054
|
if (!material) {
|
|
728
1055
|
if (!force) {
|
|
@@ -756,6 +1083,18 @@ class RecallHost {
|
|
|
756
1083
|
await this.host.setSessionName(created.sessionId, RecallServerTexts.briefTitle());
|
|
757
1084
|
return created;
|
|
758
1085
|
}
|
|
1086
|
+
async sources() {
|
|
1087
|
+
let packages = [];
|
|
1088
|
+
try {
|
|
1089
|
+
packages = await this.host.listPackages();
|
|
1090
|
+
} catch {
|
|
1091
|
+
return [];
|
|
1092
|
+
}
|
|
1093
|
+
const sources = await Promise.all(packages.filter((info) => info.enabled && info.name !== NAME).map(async (info) => BriefUtil.source(info.name, await this.host.getExtensionData(info.name, TA_BRIEF_SOURCE).catch(() => {
|
|
1094
|
+
return;
|
|
1095
|
+
}))));
|
|
1096
|
+
return sources.filter((source) => !!source);
|
|
1097
|
+
}
|
|
759
1098
|
async notices() {
|
|
760
1099
|
const value = await this.host.getExtensionData(NOTIFY, "notices").catch(() => {
|
|
761
1100
|
return;
|
|
@@ -763,7 +1102,7 @@ class RecallHost {
|
|
|
763
1102
|
return Array.isArray(value) ? value.filter((notice) => !!notice && typeof notice.at === "number" && typeof notice.text === "string") : [];
|
|
764
1103
|
}
|
|
765
1104
|
async runs(since) {
|
|
766
|
-
const tasks = await this.host.getExtensionData(
|
|
1105
|
+
const tasks = await this.host.getExtensionData(CRON2, "tasks").catch(() => {
|
|
767
1106
|
return;
|
|
768
1107
|
});
|
|
769
1108
|
if (!Array.isArray(tasks)) {
|
|
@@ -771,7 +1110,7 @@ class RecallHost {
|
|
|
771
1110
|
}
|
|
772
1111
|
const ran = tasks.filter((task) => task && typeof task.id === "string" && Date.parse(task.lastRunAt ?? "") >= since);
|
|
773
1112
|
return Promise.all(ran.map(async (task) => {
|
|
774
|
-
const runs = await this.host.getExtensionData(
|
|
1113
|
+
const runs = await this.host.getExtensionData(CRON2, `runs/${task.id}`).catch(() => {
|
|
775
1114
|
return;
|
|
776
1115
|
});
|
|
777
1116
|
const run = Array.isArray(runs) ? runs[0] : undefined;
|
|
@@ -783,6 +1122,23 @@ class RecallHost {
|
|
|
783
1122
|
};
|
|
784
1123
|
}));
|
|
785
1124
|
}
|
|
1125
|
+
async suggestions() {
|
|
1126
|
+
const value = await this.host.getExtensionData(INITIATIVE, "proposals").catch(() => {
|
|
1127
|
+
return;
|
|
1128
|
+
});
|
|
1129
|
+
return Array.isArray(value) ? value.filter((one) => !!one && typeof one.title === "string" && typeof one.state === "string" && typeof one.at === "number") : [];
|
|
1130
|
+
}
|
|
1131
|
+
async initiative(method, ...params) {
|
|
1132
|
+
try {
|
|
1133
|
+
if (!this.defined) {
|
|
1134
|
+
await this.host.callPackageHost(INITIATIVE, "defineKind", [KEEP_KIND]);
|
|
1135
|
+
this.defined = true;
|
|
1136
|
+
}
|
|
1137
|
+
return await this.host.callPackageHost(INITIATIVE, method, params);
|
|
1138
|
+
} catch {
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
786
1142
|
async decide(key, decision) {
|
|
787
1143
|
if (typeof key !== "string" || !key) {
|
|
788
1144
|
throw new Error("A card needs its key.");
|