@celljs/ta 4.12.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 +11 -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 +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/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 +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 +15 -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 +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 +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.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 +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 +289 -133
- 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/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 +30 -22
- 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 +393 -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 +171 -7
- package/dist/pi/packages/ta-rooms/host/index.mjs +1002 -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 +33 -6
- 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 +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/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 +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-BnqtcbpZ.js → abnfDiagram-S7VZAUFO-DJMZKA5d.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-BzPq1Ioe.js → architecture-WOLXFQ4H-DwZ8A2Bp.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-BsquO3a7.js → architectureDiagram-YGSQEFNW-DPezb7-w.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-BQNYOEP4.js → blockDiagram-APKKGZFW-SrFYBlSp.js} +1 -1
- package/dist/public/assets/{browser-DS711n7Y.js → browser-CljOqDFz.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-D6e79Ycq.js → c4Diagram-KJ2TOQU5-COCMkiJ6.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-B-sgaPoU.js → chunk-6MUBBAK2-CWRxZCiu.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-D8pJKIg2.js → chunk-AXFCVDMN-Dgn3RHlx.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-86TL-vCz.js → chunk-BG4553SI-BDnAChfb.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CfUVuGjc.js → chunk-DQASFODM-DSgprMfc.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-Drm0FEYk.js → chunk-HFQBQIA3-ChtjyKjP.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-BVFRADlC.js → chunk-KQLB2F66-B2o0ufJC.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-DfyALEmP.js → chunk-KS47KZWR-C4qJvDaX.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-DtJVzk2c.js → chunk-LEVMRMFU-2jTGUstS.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-DTy27PHQ.js → chunk-M57EVK23-CKAWW7fj.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-nSgn7jZg.js → chunk-OY52VR5R-B5TUKZAt.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-CkSxO_X6.js → chunk-QB3YPZ4I-CyQFTqwG.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-Ck6iAjAL.js → chunk-R3KSYZAL-C6git_yh.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DQPHdSTh.js → chunk-STOXU5M4-AwEqcNnS.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-Bc2AbV2Y.js → chunk-TU62E6Q5-GKcRDmvw.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-Cgpm0IXm.js → chunk-X4PVCEUW-CMG5EfZ9.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-CGE4eLpg.js → chunk-XXDRQBXY-BHd-dKtZ.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-4eQuDPEo.js → classDiagram-v2-L25IHNXF-HaRsBCG9.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-tDLCWq07.js → cose-bilkent-JH36ORCC-BPBTCfj3.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-DyqqRII3.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-ByqcZ8x9.js → cynefinDiagram-L36ESFBY-dAmWDtva.js} +1 -1
- package/dist/public/assets/{d3-selection-Bgn1374-.js → d3-selection-BhemR5ul.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-mCgr71mV.js → dagre-SPEB5RXH-D93g6hNI.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-DpYSwpQ0.js → diagram-3B7GL73J-FJBKgG3X.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-DMozUQzi.js → diagram-DNEMPZML-BP22T976.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-Bk5Uf8PD.js → diagram-L3MUGCDN-DcrCJXRt.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-DFt5cPVK.js → diagram-LA4NIPWU-DUgd3PHQ.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BkZZcKqK.js → diagram-MHCOC4E2-ejTInqzQ.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-HEY6kyyN.js → diagram-XPFHEONP-BLjkgho1.js} +1 -1
- package/dist/public/assets/{dist-Bj2CrKn7.js → dist-C9xqTt0E.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D4JvYyVb.js → ebnfDiagram-UZSYDL2S-CB1QQ4_T.js} +1 -1
- package/dist/public/assets/{editor.api-BpJFzYbl.js → editor.api-lz6I1oVk.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-CT6qLJkF.js → elk-XV6XMXQE-CLBx1s2b.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-BGng1goR.js → erDiagram-EYBAPDEH-Dsj6RYi5.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-Tt8O-Q1Z.js → eventmodeling-K75KTNOO-smOORsSG.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-DFmQPJ7B.js +1 -0
- package/dist/public/assets/{freemarker2-Dd5ksoRn.js → freemarker2-DrLPw7Mc.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-Jl8VO_g2.js → ganttDiagram-23REXITY-BV9WK0rK.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-ybrJCK6u.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-Be4qXALb.js → gitGraphDiagram-STJD7YCW-CsSpSQ0T.js} +1 -1
- package/dist/public/assets/{handlebars-4xabgUi4.js → handlebars-CLx5-csF.js} +1 -1
- package/dist/public/assets/{html-Dk3kt2w_.js → html-C9LmGm46.js} +1 -1
- package/dist/public/assets/{index-Bx0c7eoh.js → index-CLWW0mVu.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-n41_wZE4.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-Coc0tdwb.js → infoDiagram-KBXO4MBG-wm5AnXDz.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-CE_1VQCg.js → ishikawaDiagram-M35NCXHK-BLUBDeS3.js} +1 -1
- package/dist/public/assets/{javascript-DKLGqy6v.js → javascript-C4S1eQb7.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-CrolRZ_7.js → journeyDiagram-OPLOXDXO-DXc7-I_g.js} +1 -1
- package/dist/public/assets/{jsonMode-Chcs19_y.js → jsonMode-lLJKR2M6.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-CjJj47De.js → kanban-definition-BZKZHSQY-D5Ra4L_5.js} +1 -1
- package/dist/public/assets/{liquid-jff3p-Ji.js → liquid-DRlm-XZd.js} +1 -1
- package/dist/public/assets/{mdx-DW4uRDfJ.js → mdx-CzIqeqPy.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-XhQj6FvH.js → mermaid-parser.core-BIPB1BgS.js} +3 -3
- package/dist/public/assets/{mermaid.core-OD4Atimg.js → mermaid.core-DxBlQ6oF.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DpGelVY7.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-BTVZP-tU.js → monaco-ChpJIYsY.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-BjrqMgis.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-CqcBmPfB.js → pegDiagram-FD4XPPHP-C_GF7Fng.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-CJSA88kr.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-CRir3beB.js → pieDiagram-J4AKIIQI-WlpNP-IM.js} +1 -1
- package/dist/public/assets/{python-BwW_0207.js → python-BJgFCfc8.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-DIY6gdcf.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-XWNOzunl.js → railroad-abnf-LNEFI6M7-DZZKUytl.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-CI0-j1Jz.js → railroad-ebnf-DWYD2UWJ-CS7KsJdb.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-BVB_IaIG.js → railroad-peg-JR7BVNR7-CiukTZVd.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-CudwT6q2.js → railroadDiagram-MRQ6NCDL-BS0R_H3-.js} +1 -1
- package/dist/public/assets/{razor-DrjCyQqB.js → razor-jcBIjr45.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CvRMeRqj.js → requirementDiagram-Y7LWUY3S-C0_T9jgl.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-adxYCJKr.js → sankeyDiagram-WGJFYUXA-DF15sUfS.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-lCRsoLUp.js → sequenceDiagram-5NDRBG5M-7AkTLleX.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-DNst1BLg.js → stateDiagram-v2-FJ4FJNEA-CU3i-U9q.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-S_omrdvA.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-_pMGrTE-.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-0-z_OYCU.js → typescript-B7zp7QPf.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-B2oJKi5Q.js → usecaseDiagram-AFA6YXN4-D6rDIgdU.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-inPs2Kkr.js → vennDiagram-NNMJR3RB-CncVDcMl.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-B4j5rilS.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-DNhNHM7b.js → wardleyDiagram-S7YFUSEH-DKPAMfTE.js} +1 -1
- package/dist/public/assets/{xml-BXPxQzKF.js → xml-BJIgLD52.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-DJc93dNT.js → xychartDiagram-GGNKY7IX-DmmXGebm.js} +1 -1
- package/dist/public/assets/{yaml-CGmD9Rya.js → yaml-Dxb2gmP5.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +7727 -3847
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type NearbyShowKind } from './nearby-protocol';
|
|
2
|
+
import type { NearbyService } from './nearby-service';
|
|
3
|
+
export declare const NO_SERVER = "Nearby needs the Ta service: start it with `ta serve`.";
|
|
4
|
+
interface Pi {
|
|
5
|
+
events: {
|
|
6
|
+
emit(event: string, data: unknown): void;
|
|
7
|
+
};
|
|
8
|
+
on(event: string, handler: (event: never, ctx: never) => unknown): unknown;
|
|
9
|
+
registerTool(tool: never): unknown;
|
|
10
|
+
}
|
|
11
|
+
/** The temporary ids of those named, as Ta named them; all of them with no name. */
|
|
12
|
+
export declare function pick(service: Pick<NearbyService, 'peers'>, names: unknown): {
|
|
13
|
+
e: string;
|
|
14
|
+
who: string;
|
|
15
|
+
}[];
|
|
16
|
+
/**
|
|
17
|
+
* The pi extension of Nearby: in the user's own conversations (not those with others), who is around (`<ta-nearby>`)
|
|
18
|
+
* while the user has it on, and the tools to list them and make a room of them. The rest is the host's.
|
|
19
|
+
*/
|
|
20
|
+
export default function activate(pi: Pi): void;
|
|
21
|
+
/** What a file is shown as on a screen nearby, and its content as it goes. */
|
|
22
|
+
export declare function showable(path: string): Promise<{
|
|
23
|
+
kind: NearbyShowKind;
|
|
24
|
+
data: string;
|
|
25
|
+
}>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=extension.d.ts.map
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_SERVER = void 0;
|
|
4
|
+
exports.pick = pick;
|
|
5
|
+
exports.default = activate;
|
|
6
|
+
exports.showable = showable;
|
|
7
|
+
const promises_1 = require("node:fs/promises");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const ta_extension_host_1 = require("@celljs/ta-protocol/lib/common/ta-extension-host");
|
|
10
|
+
const nearby_protocol_1 = require("./nearby-protocol");
|
|
11
|
+
const server_texts_1 = require("./server-texts");
|
|
12
|
+
exports.NO_SERVER = 'Nearby needs the Ta service: start it with `ta serve`.';
|
|
13
|
+
/** The temporary ids of those named, as Ta named them; all of them with no name. */
|
|
14
|
+
function pick(service, names) {
|
|
15
|
+
const peers = service.peers().map(peer => ({ e: peer.e, who: server_texts_1.NearbyTexts.who(peer) }));
|
|
16
|
+
const wanted = Array.isArray(names) ? names.filter((name) => typeof name === 'string' && !!name.trim()).map(name => name.trim()) : [];
|
|
17
|
+
if (!wanted.length) {
|
|
18
|
+
return peers;
|
|
19
|
+
}
|
|
20
|
+
return peers.filter(peer => wanted.some(name => peer.who === name || peer.who.includes(name) || name.includes(peer.who)));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The pi extension of Nearby: in the user's own conversations (not those with others), who is around (`<ta-nearby>`)
|
|
24
|
+
* while the user has it on, and the tools to list them and make a room of them. The rest is the host's.
|
|
25
|
+
*/
|
|
26
|
+
function activate(pi) {
|
|
27
|
+
let reached;
|
|
28
|
+
const reach = () => (reached !== null && reached !== void 0 ? reached : (reached = ta_extension_host_1.TaHostUtil.reach(pi.events, nearby_protocol_1.NAME).then(answer => { var _a; return ({
|
|
29
|
+
answered: !!answer,
|
|
30
|
+
service: (_a = answer === null || answer === void 0 ? void 0 : answer.service) === null || _a === void 0 ? void 0 : _a.service,
|
|
31
|
+
}); })));
|
|
32
|
+
const service = async () => {
|
|
33
|
+
const { answered, service } = await reach();
|
|
34
|
+
if (!service) {
|
|
35
|
+
throw new Error(answered ? 'Nearby did not start in the Ta service; its log says why.' : exports.NO_SERVER);
|
|
36
|
+
}
|
|
37
|
+
return service;
|
|
38
|
+
};
|
|
39
|
+
pi.on('before_agent_start', async (event, ctx) => {
|
|
40
|
+
var _a;
|
|
41
|
+
if (ctx.getSystemPrompt().includes(ta_extension_host_1.TA_WITH_OTHERS_MARK)) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
const section = (_a = (await reach()).service) === null || _a === void 0 ? void 0 : _a.section();
|
|
45
|
+
if (section) {
|
|
46
|
+
event.systemPromptOptions.sections = { ...event.systemPromptOptions.sections, [nearby_protocol_1.SECTION]: section };
|
|
47
|
+
}
|
|
48
|
+
return undefined;
|
|
49
|
+
});
|
|
50
|
+
pi.registerTool({
|
|
51
|
+
name: 'nearby_list',
|
|
52
|
+
label: 'Nearby',
|
|
53
|
+
description: "Lists the other people's Ta around the user now (Nearby, on the same network), while the user has Nearby on.",
|
|
54
|
+
parameters: { type: 'object', properties: {} },
|
|
55
|
+
execute: async () => {
|
|
56
|
+
var _a;
|
|
57
|
+
const found = await service();
|
|
58
|
+
if (!found.isVisible()) {
|
|
59
|
+
return text('Nearby is off. The user turns it on in Discover → Nearby; it is theirs to turn on, not yours.');
|
|
60
|
+
}
|
|
61
|
+
const section = (_a = found.section()) !== null && _a !== void 0 ? _a : '';
|
|
62
|
+
return text(section.replace(/<\/?ta-nearby>\n?/g, '').trim());
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
pi.registerTool({
|
|
66
|
+
name: 'nearby_show',
|
|
67
|
+
label: 'Show nearby',
|
|
68
|
+
description: "Shows a file (HTML, Markdown, an image, text; 600 KB at most) or some Markdown on the screen of a Ta nearby that offers show (a meeting room's screen): by the name nearby_list gives. Its user may be asked first. Nothing is kept there once closed.",
|
|
69
|
+
parameters: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
to: { type: 'string', description: 'The name of the Ta nearby, as nearby_list gives it.' },
|
|
73
|
+
path: { type: 'string', description: 'A file to show.' },
|
|
74
|
+
markdown: { type: 'string', description: 'Or Markdown to show, without a file.' },
|
|
75
|
+
title: { type: 'string' },
|
|
76
|
+
},
|
|
77
|
+
required: ['to'],
|
|
78
|
+
},
|
|
79
|
+
execute: async (_id, params, _signal, _update, ctx) => {
|
|
80
|
+
const found = await service();
|
|
81
|
+
if (!found.isVisible()) {
|
|
82
|
+
throw new Error('Nearby is off: the user turns it on in Discover → Nearby.');
|
|
83
|
+
}
|
|
84
|
+
const name = typeof params.to === 'string' ? params.to.trim() : '';
|
|
85
|
+
const [target, ...others] = name ? pick(found, [name]) : [];
|
|
86
|
+
if (!target || others.length) {
|
|
87
|
+
throw new Error(target ? 'Several are called so: name one.' : `Nobody called ${name} is nearby now.`);
|
|
88
|
+
}
|
|
89
|
+
const path = typeof params.path === 'string' && params.path.trim() ? (0, node_path_1.resolve)(ctx.cwd, params.path.trim().replace(/^@/, '')) : undefined;
|
|
90
|
+
const content = path
|
|
91
|
+
? await showable(path)
|
|
92
|
+
: typeof params.markdown === 'string' && params.markdown.trim()
|
|
93
|
+
? { kind: 'markdown', data: params.markdown }
|
|
94
|
+
: undefined;
|
|
95
|
+
if (!content) {
|
|
96
|
+
throw new Error('Give a path or some Markdown to show.');
|
|
97
|
+
}
|
|
98
|
+
const title = (typeof params.title === 'string' && params.title.trim()) || (path ? path.split(/[\\/]/).pop() : '') || 'Ta';
|
|
99
|
+
const answer = await found.show(target.e, title, content.kind, content.data);
|
|
100
|
+
return text(answer === 'shown'
|
|
101
|
+
? `Shown on the screen of ${target.who}.`
|
|
102
|
+
: answer === 'asked'
|
|
103
|
+
? `${target.who} is asked first; it shows once they let it.`
|
|
104
|
+
: `${target.who} does not take things to show.`);
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
pi.registerTool({
|
|
108
|
+
name: 'nearby_card',
|
|
109
|
+
label: 'Card for Nearby',
|
|
110
|
+
description: 'Saves a draft of the card the user shows others in Nearby, to meet who may help them or follows the same things: what they work on in a sentence, topics, what they look for, what they can help with. Only a draft: the user looks at it and uses it in Ta. Never names, companies, projects, paths, contacts or secrets.',
|
|
111
|
+
parameters: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
properties: {
|
|
114
|
+
line: { type: 'string', description: 'What the user works on, in a sentence.' },
|
|
115
|
+
topics: { type: 'array', items: { type: 'string' }, description: '8 at most, a few words each.' },
|
|
116
|
+
seeking: { type: 'array', items: { type: 'string' }, description: 'What they look for, 3 at most.' },
|
|
117
|
+
offering: { type: 'array', items: { type: 'string' }, description: 'What they can help others with, 3 at most.' },
|
|
118
|
+
},
|
|
119
|
+
required: ['line'],
|
|
120
|
+
},
|
|
121
|
+
execute: async (_id, params) => {
|
|
122
|
+
const found = await service();
|
|
123
|
+
await found.request({ kind: 'cards', draft: params });
|
|
124
|
+
return text('Saved as a draft. The user uses it in Discover → Nearby or Settings → Nearby.');
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
pi.registerTool({
|
|
128
|
+
name: 'nearby_room',
|
|
129
|
+
label: 'Room of those nearby',
|
|
130
|
+
description: 'Makes a room (a group chat of Ta) of the people around the user and invites them: all of them, or those named. The user confirms first; each comes in once they tap Join in their own Ta. Then say_in_room and hand_task work there.',
|
|
131
|
+
parameters: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
title: { type: 'string', description: 'The name of the room; a few words.' },
|
|
135
|
+
people: { type: 'array', items: { type: 'string' }, description: 'Names as nearby_list gives them; none: everyone around.' },
|
|
136
|
+
why: { type: 'string', description: 'What it is for, in one line they see with the invitation.' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
execute: async (_id, params, _signal, _update, ctx) => {
|
|
140
|
+
const found = await service();
|
|
141
|
+
if (!found.isVisible()) {
|
|
142
|
+
throw new Error('Nearby is off: the user turns it on in Discover → Nearby.');
|
|
143
|
+
}
|
|
144
|
+
if (!ctx.hasUI) {
|
|
145
|
+
throw new Error('Inviting needs the user to confirm it in Ta; there is no one to ask here.');
|
|
146
|
+
}
|
|
147
|
+
const chosen = pick(found, params.people);
|
|
148
|
+
if (!chosen.length) {
|
|
149
|
+
throw new Error('Nobody of those is nearby now.');
|
|
150
|
+
}
|
|
151
|
+
const title = typeof params.title === 'string' && params.title.trim() ? params.title.trim().slice(0, 80) : server_texts_1.NearbyTexts.roomTitle();
|
|
152
|
+
const names = chosen.map(one => one.who);
|
|
153
|
+
if (!(await ctx.ui.confirm(...server_texts_1.NearbyTexts.confirmRoom(title, names)).catch(() => false))) {
|
|
154
|
+
throw new Error('The user did not want this room.');
|
|
155
|
+
}
|
|
156
|
+
const result = (await found.request({
|
|
157
|
+
kind: 'room',
|
|
158
|
+
people: chosen.map(one => one.e),
|
|
159
|
+
title,
|
|
160
|
+
...(typeof params.why === 'string' && params.why.trim() ? { why: params.why.trim().slice(0, 200) } : {}),
|
|
161
|
+
}));
|
|
162
|
+
return text([
|
|
163
|
+
`Made the room "${result.title}" and invited ${result.invited.join(', ') || 'nobody'}: each comes in once they tap Join.`,
|
|
164
|
+
result.missed.length ? `Could not reach ${result.missed.join(', ')}.` : '',
|
|
165
|
+
'read_room with wait_seconds tells when they are in; then say_in_room or hand_task there.',
|
|
166
|
+
]
|
|
167
|
+
.filter(Boolean)
|
|
168
|
+
.join(' '));
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
const IMAGES = { '.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.gif': 'image/gif', '.webp': 'image/webp' };
|
|
173
|
+
/** What a file is shown as on a screen nearby, and its content as it goes. */
|
|
174
|
+
async function showable(path) {
|
|
175
|
+
const size = (await (0, promises_1.stat)(path)).size;
|
|
176
|
+
const ext = (0, node_path_1.extname)(path).toLowerCase();
|
|
177
|
+
const image = IMAGES[ext];
|
|
178
|
+
if (size > (image ? (nearby_protocol_1.SHOW_MAX * 3) / 4 : nearby_protocol_1.SHOW_MAX)) {
|
|
179
|
+
throw new Error(`${path} is too large to show nearby: ${Math.round(nearby_protocol_1.SHOW_MAX / 1024)} KB at most.`);
|
|
180
|
+
}
|
|
181
|
+
if (image) {
|
|
182
|
+
return { kind: 'image', data: `data:${image};base64,${(await (0, promises_1.readFile)(path)).toString('base64')}` };
|
|
183
|
+
}
|
|
184
|
+
const kind = ext === '.html' || ext === '.htm' ? 'html' : ext === '.md' || ext === '.markdown' ? 'markdown' : 'text';
|
|
185
|
+
return { kind, data: await (0, promises_1.readFile)(path, 'utf8') };
|
|
186
|
+
}
|
|
187
|
+
function text(value) {
|
|
188
|
+
return { content: [{ type: 'text', text: value }], details: undefined };
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=extension.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TaExtensionHost, TaPackageService } from '@celljs/ta-protocol';
|
|
2
|
+
/**
|
|
3
|
+
* The server side of the package (`pi.host`): ta serve runs it once, so that the Ta around hear this one and its
|
|
4
|
+
* invitations come with no page open. Its pi extension reaches it for the tools; the page calls `nearby` (callHost).
|
|
5
|
+
*/
|
|
6
|
+
export default function activate(host: TaExtensionHost): Promise<TaPackageService>;
|
|
7
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const nearby_service_1 = require("./nearby-service");
|
|
5
|
+
/**
|
|
6
|
+
* The server side of the package (`pi.host`): ta serve runs it once, so that the Ta around hear this one and its
|
|
7
|
+
* invitations come with no page open. Its pi extension reaches it for the tools; the page calls `nearby` (callHost).
|
|
8
|
+
*/
|
|
9
|
+
async function activate(host) {
|
|
10
|
+
const service = new nearby_service_1.NearbyService(host);
|
|
11
|
+
await service.start();
|
|
12
|
+
return {
|
|
13
|
+
dispose: () => service.dispose(),
|
|
14
|
+
nearby: (request) => service.request(request),
|
|
15
|
+
/** Shows on the screen of one nearby (its temporary id): `shown`, `asked` or `refused`. */
|
|
16
|
+
show: (e, title, kind, data) => service.show(String(e), String(title !== null && title !== void 0 ? title : ''), kind, String(data !== null && data !== void 0 ? data : '')),
|
|
17
|
+
service,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare const EN: {
|
|
2
|
+
title: string;
|
|
3
|
+
offTitle: string;
|
|
4
|
+
offHint: string;
|
|
5
|
+
hour: string;
|
|
6
|
+
today: string;
|
|
7
|
+
always: string;
|
|
8
|
+
on: string;
|
|
9
|
+
left: string;
|
|
10
|
+
leftHours: string;
|
|
11
|
+
leftMinutes: string;
|
|
12
|
+
untilOff: string;
|
|
13
|
+
turnOff: string;
|
|
14
|
+
nobody: string;
|
|
15
|
+
nobodyHint: string;
|
|
16
|
+
friend: string;
|
|
17
|
+
someone: string;
|
|
18
|
+
makeRoom: string;
|
|
19
|
+
makeRoomAll: string;
|
|
20
|
+
roomTitle: string;
|
|
21
|
+
defaultRoom: string;
|
|
22
|
+
made: string;
|
|
23
|
+
missed: string;
|
|
24
|
+
sayIt: string;
|
|
25
|
+
youAre: string;
|
|
26
|
+
hideName: string;
|
|
27
|
+
showName: string;
|
|
28
|
+
invites: string;
|
|
29
|
+
invited: string;
|
|
30
|
+
inviteNote: string;
|
|
31
|
+
inviteStranger: string;
|
|
32
|
+
join: string;
|
|
33
|
+
notNow: string;
|
|
34
|
+
error: string;
|
|
35
|
+
oldServer: string;
|
|
36
|
+
settingsName: string;
|
|
37
|
+
settingsNameHint: string;
|
|
38
|
+
homeDetail: string;
|
|
39
|
+
homeNobody: string;
|
|
40
|
+
spotHint: string;
|
|
41
|
+
spotOpen: string;
|
|
42
|
+
spotJoin: string;
|
|
43
|
+
spotJoinTitle: string;
|
|
44
|
+
spotCode: string;
|
|
45
|
+
spotShare: string;
|
|
46
|
+
spotClosed: string;
|
|
47
|
+
spotIn: string;
|
|
48
|
+
spotLeave: string;
|
|
49
|
+
wantsToShow: string;
|
|
50
|
+
showNote: string;
|
|
51
|
+
showIt: string;
|
|
52
|
+
from: string;
|
|
53
|
+
close: string;
|
|
54
|
+
settingsShow: string;
|
|
55
|
+
settingsShowHint: string;
|
|
56
|
+
showOff: string;
|
|
57
|
+
showAsk: string;
|
|
58
|
+
showAuto: string;
|
|
59
|
+
settingsWork: string;
|
|
60
|
+
settingsWorkHint: string;
|
|
61
|
+
settingsMeet: string;
|
|
62
|
+
settingsMeetHint: string;
|
|
63
|
+
card: string;
|
|
64
|
+
cardNone: string;
|
|
65
|
+
cardEdit: string;
|
|
66
|
+
cardTitle: string;
|
|
67
|
+
cardHint: string;
|
|
68
|
+
cardLine: string;
|
|
69
|
+
cardTopics: string;
|
|
70
|
+
cardSeeking: string;
|
|
71
|
+
cardOffering: string;
|
|
72
|
+
cardDraft: string;
|
|
73
|
+
cardDrafting: string;
|
|
74
|
+
cardDraftReady: string;
|
|
75
|
+
cardUse: string;
|
|
76
|
+
cancel: string;
|
|
77
|
+
meetOff: string;
|
|
78
|
+
meetOn: string;
|
|
79
|
+
meetTurnOn: string;
|
|
80
|
+
greets: string;
|
|
81
|
+
greetLine: string;
|
|
82
|
+
greetYes: string;
|
|
83
|
+
greetNo: string;
|
|
84
|
+
};
|
|
85
|
+
type Words = typeof EN;
|
|
86
|
+
export type NearbyWord = keyof Words;
|
|
87
|
+
export declare namespace NearbyWords {
|
|
88
|
+
function of(language: string | undefined): Words;
|
|
89
|
+
function format(text: string, values?: Record<string, string | number>): string;
|
|
90
|
+
}
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NearbyWords = void 0;
|
|
4
|
+
const EN = {
|
|
5
|
+
title: 'Nearby',
|
|
6
|
+
offTitle: 'See who is around',
|
|
7
|
+
offHint: 'Turned on, the Ta around you on the same network that turned it on too show here, and Ta can make a room of them, hand them work or ask their doubles.',
|
|
8
|
+
hour: 'For an hour',
|
|
9
|
+
today: 'Today',
|
|
10
|
+
always: 'Until I turn it off',
|
|
11
|
+
on: 'Nearby is on',
|
|
12
|
+
left: '{time} left',
|
|
13
|
+
leftHours: '{n} h left',
|
|
14
|
+
leftMinutes: '{n} min left',
|
|
15
|
+
untilOff: 'until you turn it off',
|
|
16
|
+
turnOff: 'Turn off',
|
|
17
|
+
nobody: 'No other Ta yet',
|
|
18
|
+
nobodyHint: 'Those with you open Discover → Nearby in their Ta and turn it on too.',
|
|
19
|
+
friend: 'Friend',
|
|
20
|
+
someone: 'A user of Ta',
|
|
21
|
+
makeRoom: 'Make a room of {n}',
|
|
22
|
+
makeRoomAll: 'Make a room together',
|
|
23
|
+
roomTitle: 'Name of the room',
|
|
24
|
+
defaultRoom: 'Nearby · {time}',
|
|
25
|
+
made: 'Invited {names}: each comes in once they tap Join.',
|
|
26
|
+
missed: 'Could not reach {names}.',
|
|
27
|
+
sayIt: 'Or tell Ta: “make a room and send today’s notes to those nearby”.',
|
|
28
|
+
youAre: 'Others see you as',
|
|
29
|
+
hideName: 'Hide my name',
|
|
30
|
+
showName: 'Show my name',
|
|
31
|
+
invites: 'Invitations',
|
|
32
|
+
invited: '{name} invites you into “{title}”',
|
|
33
|
+
inviteNote: 'Nearby, on your network. Once in, you see what is said and shared in the room, and they see what you say there.',
|
|
34
|
+
inviteStranger: 'The name is only what they say: join if you know who it is.',
|
|
35
|
+
join: 'Join',
|
|
36
|
+
notNow: 'Not now',
|
|
37
|
+
error: 'Nearby cannot listen here: {error}',
|
|
38
|
+
oldServer: 'Update Ta on the computer to use Nearby.',
|
|
39
|
+
settingsName: 'Show my name nearby',
|
|
40
|
+
settingsNameHint: 'Off: others nearby see “a user of Ta”; your friends still know you.',
|
|
41
|
+
homeDetail: '{n} Ta: {names}',
|
|
42
|
+
homeNobody: 'No other Ta yet · {left}',
|
|
43
|
+
spotHint: 'Not seeing each other on the same network? Use a code.',
|
|
44
|
+
spotOpen: 'Get a code',
|
|
45
|
+
spotJoin: 'Enter a code',
|
|
46
|
+
spotJoinTitle: 'The code of six digits you were given',
|
|
47
|
+
spotCode: 'Code',
|
|
48
|
+
spotShare: 'Those with you enter it in Nearby · {n} min left',
|
|
49
|
+
spotClosed: 'No one else can come in now; those in stay',
|
|
50
|
+
spotIn: 'In by the code',
|
|
51
|
+
spotLeave: 'Leave',
|
|
52
|
+
wantsToShow: '{name} wants to show “{title}” on this computer',
|
|
53
|
+
showNote: 'Nearby, on your network. It shows here and is not kept once closed.',
|
|
54
|
+
showIt: 'Show it',
|
|
55
|
+
from: 'From {name}, nearby',
|
|
56
|
+
close: 'Close',
|
|
57
|
+
settingsShow: 'Those nearby may show things here',
|
|
58
|
+
settingsShowHint: 'A screen of a meeting room can show at once; on your own computer, ask first.',
|
|
59
|
+
showOff: 'No',
|
|
60
|
+
showAsk: 'Ask me',
|
|
61
|
+
showAuto: 'At once',
|
|
62
|
+
settingsWork: 'Those nearby may ask my Ta to work',
|
|
63
|
+
settingsWorkHint: 'They hand it tasks in a room; working in a folder still needs your permission each time.',
|
|
64
|
+
settingsMeet: 'Open to meet people nearby',
|
|
65
|
+
settingsMeetHint: 'Your Ta and theirs compare cards; Ta proposes to say hello only for a reason, 3 a day at most. Names go only once both say yes.',
|
|
66
|
+
card: 'Your card',
|
|
67
|
+
cardNone: 'No card yet',
|
|
68
|
+
cardEdit: 'Edit',
|
|
69
|
+
cardTitle: 'Your card for Nearby',
|
|
70
|
+
cardHint: 'Others nearby open to meet see this, never your name until you both say yes. No contacts, companies or paths.',
|
|
71
|
+
cardLine: 'What you work on',
|
|
72
|
+
cardTopics: 'Topics, by commas',
|
|
73
|
+
cardSeeking: 'What you look for, by commas',
|
|
74
|
+
cardOffering: 'What you can help with, by commas',
|
|
75
|
+
cardDraft: 'Let Ta draft it',
|
|
76
|
+
cardDrafting: 'Ta is drafting it in a conversation; it shows here when done.',
|
|
77
|
+
cardDraftReady: 'Ta drafted this: look it over',
|
|
78
|
+
cardUse: 'Use this card',
|
|
79
|
+
cancel: 'Cancel',
|
|
80
|
+
meetOff: 'Open to meet people nearby? Ta proposes to say hello only when someone may help you or follows the same things.',
|
|
81
|
+
meetOn: 'Open to meet · {line}',
|
|
82
|
+
meetTurnOn: 'Turn on',
|
|
83
|
+
greets: 'Would like to meet you',
|
|
84
|
+
greetLine: '{name} would like to meet you',
|
|
85
|
+
greetYes: 'Say hello',
|
|
86
|
+
greetNo: 'Not now',
|
|
87
|
+
};
|
|
88
|
+
const ZH = {
|
|
89
|
+
title: '附近',
|
|
90
|
+
offTitle: '看看身边有谁',
|
|
91
|
+
offHint: '打开后,同一网络里也打开了附近的 Ta 会出现在这里;Ta 能和他们一起建房间、派任务、问他们的分身。',
|
|
92
|
+
hour: '1 小时',
|
|
93
|
+
today: '今天',
|
|
94
|
+
always: '一直,直到我关掉',
|
|
95
|
+
on: '附近已打开',
|
|
96
|
+
left: '还剩 {time}',
|
|
97
|
+
leftHours: '还剩 {n} 小时',
|
|
98
|
+
leftMinutes: '还剩 {n} 分钟',
|
|
99
|
+
untilOff: '直到你关掉',
|
|
100
|
+
turnOff: '关掉',
|
|
101
|
+
nobody: '还没有别的 Ta',
|
|
102
|
+
nobodyHint: '让身边的人在自己的 Ta 里打开 发现 → 附近。',
|
|
103
|
+
friend: '好友',
|
|
104
|
+
someone: '一位 Ta 用户',
|
|
105
|
+
makeRoom: '和这 {n} 位建房间',
|
|
106
|
+
makeRoomAll: '一起建个房间',
|
|
107
|
+
roomTitle: '房间名',
|
|
108
|
+
defaultRoom: '附近 · {time}',
|
|
109
|
+
made: '已邀请 {names},他们点“加入”后就进来。',
|
|
110
|
+
missed: '没联系上 {names}。',
|
|
111
|
+
sayIt: '也可以直接对 Ta 说:“建个房间,把今天的纪要发给附近的人”。',
|
|
112
|
+
youAre: '别人看到的你',
|
|
113
|
+
hideName: '不显示名字',
|
|
114
|
+
showName: '显示名字',
|
|
115
|
+
invites: '邀请',
|
|
116
|
+
invited: '{name} 邀请你进房间「{title}」',
|
|
117
|
+
inviteNote: '在你附近、同一网络里。进去后能看到房间里说的和放的东西,他们也能看到你在那里说的话。',
|
|
118
|
+
inviteStranger: '名字是对方自称的,认识再加入。',
|
|
119
|
+
join: '加入',
|
|
120
|
+
notNow: '不了',
|
|
121
|
+
error: '附近在这台电脑上无法使用:{error}',
|
|
122
|
+
oldServer: '请先更新电脑上的 Ta 再使用附近。',
|
|
123
|
+
settingsName: '在附近显示我的名字',
|
|
124
|
+
settingsNameHint: '关掉后附近的人看到的是“一位 Ta 用户”,你的好友仍认得出你。',
|
|
125
|
+
homeDetail: '{n} 个 Ta:{names}',
|
|
126
|
+
homeNobody: '还没有别的 Ta · {left}',
|
|
127
|
+
spotHint: '同一网络里看不到对方?用在场码。',
|
|
128
|
+
spotOpen: '生成在场码',
|
|
129
|
+
spotJoin: '输入在场码',
|
|
130
|
+
spotJoinTitle: '输入对方给你的 6 位在场码',
|
|
131
|
+
spotCode: '在场码',
|
|
132
|
+
spotShare: '让身边的人在“附近”里输入 · 还剩 {n} 分钟',
|
|
133
|
+
spotClosed: '已过 10 分钟,新的人进不来了,已在的人不受影响',
|
|
134
|
+
spotIn: '已用在场码加入',
|
|
135
|
+
spotLeave: '离开',
|
|
136
|
+
wantsToShow: '{name} 想在这台电脑上展示「{title}」',
|
|
137
|
+
showNote: '在你附近、同一网络里。只在这里显示,关掉就没了,不会保存。',
|
|
138
|
+
showIt: '展示',
|
|
139
|
+
from: '来自 {name}(附近)',
|
|
140
|
+
close: '关闭',
|
|
141
|
+
settingsShow: '附近的人可以在这台电脑上展示',
|
|
142
|
+
settingsShowHint: '会议室大屏可以设成直接展示;自己的电脑建议先问我。',
|
|
143
|
+
showOff: '不可以',
|
|
144
|
+
showAsk: '先问我',
|
|
145
|
+
showAuto: '直接展示',
|
|
146
|
+
settingsWork: '附近的人可以请我的 Ta 做事',
|
|
147
|
+
settingsWorkHint: '对方在房间里把任务交给你的分身;要在目录里做事,每次仍由你授权。',
|
|
148
|
+
settingsMeet: '愿意认识附近的人',
|
|
149
|
+
settingsMeetHint: '你和对方的 Ta 先比对名片,有具体理由才提议你打招呼,每天最多 3 次;双方都同意后才互相知道名字。',
|
|
150
|
+
card: '我的名片',
|
|
151
|
+
cardNone: '还没有名片',
|
|
152
|
+
cardEdit: '编辑',
|
|
153
|
+
cardTitle: '我在附近的名片',
|
|
154
|
+
cardHint: '附近也愿意认识人的 Ta 能看到这张名片;双方都同意前不会看到你的名字。不要写联系方式、公司和路径。',
|
|
155
|
+
cardLine: '一句话说你在做什么',
|
|
156
|
+
cardTopics: '话题,用逗号分开',
|
|
157
|
+
cardSeeking: '在找什么,用逗号分开',
|
|
158
|
+
cardOffering: '能帮别人什么,用逗号分开',
|
|
159
|
+
cardDraft: '让 Ta 起草',
|
|
160
|
+
cardDrafting: 'Ta 正在一个对话里起草,好了会出现在这里。',
|
|
161
|
+
cardDraftReady: 'Ta 起草好了,看一眼',
|
|
162
|
+
cardUse: '用这张',
|
|
163
|
+
cancel: '取消',
|
|
164
|
+
meetOff: '愿意认识附近的人吗?只有对方可能帮得上你、或你们关注同样的事时,Ta 才会提议你打招呼。',
|
|
165
|
+
meetOn: '愿意认识附近的人 · {line}',
|
|
166
|
+
meetTurnOn: '打开',
|
|
167
|
+
greets: '想认识你',
|
|
168
|
+
greetLine: '{name} 想认识你',
|
|
169
|
+
greetYes: '打个招呼',
|
|
170
|
+
greetNo: '不了',
|
|
171
|
+
};
|
|
172
|
+
var NearbyWords;
|
|
173
|
+
(function (NearbyWords) {
|
|
174
|
+
function of(language) {
|
|
175
|
+
return language === 'zh-CN' ? ZH : EN;
|
|
176
|
+
}
|
|
177
|
+
NearbyWords.of = of;
|
|
178
|
+
function format(text, values = {}) {
|
|
179
|
+
return text.replace(/\{(\w+)\}/g, (all, key) => (key in values ? String(values[key]) : all));
|
|
180
|
+
}
|
|
181
|
+
NearbyWords.format = format;
|
|
182
|
+
})(NearbyWords || (exports.NearbyWords = NearbyWords = {}));
|
|
183
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
/**
|
|
3
|
+
* Nearby (docs/design/ta-nearby.md): the page under Discover (turned on for a while, who is around, a room of them),
|
|
4
|
+
* its row on the double's home while it is on, the invitations of those around as they come, and its settings. The
|
|
5
|
+
* beacons, the channel and the rooms are the host's (host.ts).
|
|
6
|
+
*/
|
|
7
|
+
export default function activate(pi: WebExtensionAPI): () => void;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const page_1 = require("./page");
|
|
5
|
+
const react_1 = require("./react");
|
|
6
|
+
const style_1 = require("./style");
|
|
7
|
+
/**
|
|
8
|
+
* Nearby (docs/design/ta-nearby.md): the page under Discover (turned on for a while, who is around, a room of them),
|
|
9
|
+
* its row on the double's home while it is on, the invitations of those around as they come, and its settings. The
|
|
10
|
+
* beacons, the channel and the rooms are the host's (host.ts).
|
|
11
|
+
*/
|
|
12
|
+
function activate(pi) {
|
|
13
|
+
var _a;
|
|
14
|
+
(0, react_1.bind)(pi.React);
|
|
15
|
+
(0, page_1.bindPage)(pi);
|
|
16
|
+
const removeStyle = (0, style_1.injectStyle)();
|
|
17
|
+
pi.registerView('nearby', { title: () => (0, page_1.t)('title'), icon: (0, page_1.icon)('Radar'), render: page_1.NearbyPage, discover: true, order: 82 });
|
|
18
|
+
pi.registerSettings((0, page_1.nearbySettings)());
|
|
19
|
+
const home = new page_1.NearbyHome();
|
|
20
|
+
const stopHome = home.start();
|
|
21
|
+
(_a = pi.registerHomeItems) === null || _a === void 0 ? void 0 : _a.call(pi, home);
|
|
22
|
+
page_1.store.onInvites = invites => {
|
|
23
|
+
const latest = invites[invites.length - 1];
|
|
24
|
+
if (latest) {
|
|
25
|
+
(0, page_1.openInvite)(latest);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
page_1.store.onShown = page_1.openShown;
|
|
29
|
+
const stop = page_1.store.start();
|
|
30
|
+
return () => {
|
|
31
|
+
stop();
|
|
32
|
+
stopHome();
|
|
33
|
+
page_1.store.onInvites = undefined;
|
|
34
|
+
page_1.store.onShown = undefined;
|
|
35
|
+
removeStyle();
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ECDH } from 'node:crypto';
|
|
2
|
+
/** How long a temporary id and its keys last: the time of a slot of the friends' marks too. */
|
|
3
|
+
export declare const SLOT_MS: number;
|
|
4
|
+
/** A temporary id with its pair of keys of ECDH (P-256), another every {@link SLOT_MS}. */
|
|
5
|
+
export declare class NearbyKeys {
|
|
6
|
+
readonly createdAt: number;
|
|
7
|
+
readonly e: string;
|
|
8
|
+
readonly x: string;
|
|
9
|
+
protected readonly ecdh: ECDH;
|
|
10
|
+
constructor(createdAt?: number);
|
|
11
|
+
/** The key of what goes between this one and another (its id and public key), both ways. */
|
|
12
|
+
keyWith(e: string, x: string): Buffer;
|
|
13
|
+
}
|
|
14
|
+
/** What seals the messages between two Ta nearby, and the marks by which friends know each other. */
|
|
15
|
+
export declare namespace NearbyCrypto {
|
|
16
|
+
function slot(now?: number): number;
|
|
17
|
+
/** The mark of an identity in a slot: who knows its id (who met it in a room) knows it by this. */
|
|
18
|
+
function mark(identity: string, slot: number): string;
|
|
19
|
+
/** Whether a mark is the identity's, in this slot or the one before. */
|
|
20
|
+
function marks(identity: string, mark: string, now?: number): boolean;
|
|
21
|
+
function seal(key: Buffer, value: unknown): {
|
|
22
|
+
i: string;
|
|
23
|
+
c: string;
|
|
24
|
+
};
|
|
25
|
+
/** What was sealed; throws when the key is not the one. */
|
|
26
|
+
function open(key: Buffer, sealed: {
|
|
27
|
+
i: string;
|
|
28
|
+
c: string;
|
|
29
|
+
}): unknown;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=nearby-crypto.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NearbyCrypto = exports.NearbyKeys = exports.SLOT_MS = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
/** How long a temporary id and its keys last: the time of a slot of the friends' marks too. */
|
|
6
|
+
exports.SLOT_MS = 15 * 60000;
|
|
7
|
+
/** A temporary id with its pair of keys of ECDH (P-256), another every {@link SLOT_MS}. */
|
|
8
|
+
class NearbyKeys {
|
|
9
|
+
constructor(createdAt = Date.now()) {
|
|
10
|
+
this.createdAt = createdAt;
|
|
11
|
+
this.e = (0, node_crypto_1.randomBytes)(9).toString('base64url');
|
|
12
|
+
this.ecdh = (0, node_crypto_1.createECDH)('prime256v1');
|
|
13
|
+
this.x = this.ecdh.generateKeys().toString('base64url');
|
|
14
|
+
}
|
|
15
|
+
/** The key of what goes between this one and another (its id and public key), both ways. */
|
|
16
|
+
keyWith(e, x) {
|
|
17
|
+
const secret = this.ecdh.computeSecret(Buffer.from(x, 'base64url'));
|
|
18
|
+
return Buffer.from((0, node_crypto_1.hkdfSync)('sha256', secret, [this.e, e].sort().join('.'), 'ta-near/1 seal', 32));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.NearbyKeys = NearbyKeys;
|
|
22
|
+
/** What seals the messages between two Ta nearby, and the marks by which friends know each other. */
|
|
23
|
+
var NearbyCrypto;
|
|
24
|
+
(function (NearbyCrypto) {
|
|
25
|
+
function slot(now = Date.now()) {
|
|
26
|
+
return Math.floor(now / exports.SLOT_MS);
|
|
27
|
+
}
|
|
28
|
+
NearbyCrypto.slot = slot;
|
|
29
|
+
/** The mark of an identity in a slot: who knows its id (who met it in a room) knows it by this. */
|
|
30
|
+
function mark(identity, slot) {
|
|
31
|
+
return (0, node_crypto_1.createHmac)('sha256', identity).update(`ta-near/1 ${slot}`).digest().subarray(0, 12).toString('base64url');
|
|
32
|
+
}
|
|
33
|
+
NearbyCrypto.mark = mark;
|
|
34
|
+
/** Whether a mark is the identity's, in this slot or the one before. */
|
|
35
|
+
function marks(identity, mark, now = Date.now()) {
|
|
36
|
+
const at = slot(now);
|
|
37
|
+
return NearbyCrypto.mark(identity, at) === mark || NearbyCrypto.mark(identity, at - 1) === mark;
|
|
38
|
+
}
|
|
39
|
+
NearbyCrypto.marks = marks;
|
|
40
|
+
function seal(key, value) {
|
|
41
|
+
const iv = (0, node_crypto_1.randomBytes)(12);
|
|
42
|
+
const cipher = (0, node_crypto_1.createCipheriv)('aes-256-gcm', key, iv);
|
|
43
|
+
const body = Buffer.concat([cipher.update(JSON.stringify(value), 'utf8'), cipher.final(), cipher.getAuthTag()]);
|
|
44
|
+
return { i: iv.toString('base64url'), c: body.toString('base64url') };
|
|
45
|
+
}
|
|
46
|
+
NearbyCrypto.seal = seal;
|
|
47
|
+
/** What was sealed; throws when the key is not the one. */
|
|
48
|
+
function open(key, sealed) {
|
|
49
|
+
const body = Buffer.from(sealed.c, 'base64url');
|
|
50
|
+
if (body.length < 16) {
|
|
51
|
+
throw new Error('Too short.');
|
|
52
|
+
}
|
|
53
|
+
const decipher = (0, node_crypto_1.createDecipheriv)('aes-256-gcm', key, Buffer.from(sealed.i, 'base64url'));
|
|
54
|
+
decipher.setAuthTag(body.subarray(body.length - 16));
|
|
55
|
+
return JSON.parse(Buffer.concat([decipher.update(body.subarray(0, body.length - 16)), decipher.final()]).toString('utf8'));
|
|
56
|
+
}
|
|
57
|
+
NearbyCrypto.open = open;
|
|
58
|
+
})(NearbyCrypto || (exports.NearbyCrypto = NearbyCrypto = {}));
|
|
59
|
+
//# sourceMappingURL=nearby-crypto.js.map
|