@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,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STYLE = void 0;
|
|
4
|
+
exports.injectStyle = injectStyle;
|
|
5
|
+
/** The styles of the package; only the --ta-* variables of the page, so they follow its theme. */
|
|
6
|
+
exports.STYLE = `
|
|
7
|
+
.tsy-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; animation: tsy-in 200ms var(--ta-ease); }
|
|
8
|
+
@keyframes tsy-in { from { opacity: 0; transform: translateY(3px); } }
|
|
9
|
+
.tsy-pic { display: block; width: 100%; max-width: 280px; height: auto; align-self: center; margin: 2px 0 4px; }
|
|
10
|
+
.tsy-pic-fill { transform-box: fill-box; transform-origin: left; animation: tsy-fill 2.4s ease-in-out infinite; }
|
|
11
|
+
@keyframes tsy-fill { 0% { transform: scaleX(.08); } 70%, 100% { transform: scaleX(1); } }
|
|
12
|
+
.tsy-pic-later { animation-delay: .9s; }
|
|
13
|
+
.tsy-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 6px 4px 2px; }
|
|
14
|
+
.tsy-hero .tsy-lead { max-width: 460px; text-wrap: balance; }
|
|
15
|
+
.tsy-hero .tsy-actions { justify-content: center; margin-top: 6px; }
|
|
16
|
+
.tsy-title { margin: 0; color: var(--ta-text); font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }
|
|
17
|
+
.tsy-via { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--ta-hover); color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); }
|
|
18
|
+
.tsy-via svg { flex: none; }
|
|
19
|
+
.tsy-status { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
20
|
+
.tsy-status .tsy-dot { width: 7px; height: 7px; }
|
|
21
|
+
.tsy-status.tsy-warn { color: var(--ta-yellow); }
|
|
22
|
+
.tsy-status .ta-spinner { width: 12px; height: 12px; }
|
|
23
|
+
.tsy-big { margin: 0; color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); line-height: 1.6; }
|
|
24
|
+
.tsy-code-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 12px; border-radius: 14px; background: var(--ta-raised); }
|
|
25
|
+
.tsy-code-box .tsy-code { align-self: center; background: none; padding: 0; font-size: calc(30px * var(--ta-font-scale)); letter-spacing: .24em; margin-right: -.24em; }
|
|
26
|
+
.tsy-code-box .tsy-line { text-align: center; }
|
|
27
|
+
.tsy-actions .ta-button { min-width: 72px; justify-content: center; }
|
|
28
|
+
.tsy-check-mark { flex: none; display: grid; place-items: center; width: 18px; height: 18px; box-sizing: border-box; border: 1.5px solid var(--ta-border-field); border-radius: 5px; color: #fff; transition: background 120ms, border-color 120ms; }
|
|
29
|
+
.tsy-check-mark[data-on] { border-color: var(--ta-green); background: var(--ta-green); }
|
|
30
|
+
.tsy-check-mark svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: opacity 120ms, transform 160ms var(--ta-ease); }
|
|
31
|
+
.tsy-check-mark[data-on] svg { opacity: 1; transform: none; }
|
|
32
|
+
.tsy-check input { position: absolute; opacity: 0; pointer-events: none; }
|
|
33
|
+
.tsy-check:focus-within .tsy-check-mark { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ta-green) 25%, transparent); }
|
|
34
|
+
.tsy-check { position: relative; transition: background 120ms; }
|
|
35
|
+
@media (hover: hover) { .tsy-check:not(.tsy-empty):hover, .tsy-pick:hover { background: var(--ta-hover); } }
|
|
36
|
+
.tsy-check.tsy-empty { cursor: default; opacity: .5; }
|
|
37
|
+
.tsy-device { transition: background 120ms; }
|
|
38
|
+
.tsy-devices .tsy-device + .tsy-device { border-top: 1px solid var(--ta-border-muted); }
|
|
39
|
+
.tsy-device-name { display: flex; align-items: center; gap: 6px; }
|
|
40
|
+
.tsy-qr { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
|
|
41
|
+
.tsy-ask { border: 1px solid var(--ta-border-muted); border-radius: 12px; }
|
|
42
|
+
.tsy-size { flex: none; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }
|
|
43
|
+
.tsy-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
44
|
+
.tsy-total .tsy-line { font-variant-numeric: tabular-nums; }
|
|
45
|
+
.tsy-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
|
|
46
|
+
.tsy-tabs button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
|
|
47
|
+
.tsy-section { margin: 4px 0 -4px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
48
|
+
.tsy-path { overflow-wrap: anywhere; font-family: var(--ta-mono); font-size: calc(11.5px * var(--ta-font-scale)); color: var(--ta-secondary); }
|
|
49
|
+
.tsy-progress { height: 8px; border-radius: 4px; }
|
|
50
|
+
.tsy-progress-bar { border-radius: 4px; transition: width .4s var(--ta-ease); }
|
|
51
|
+
.tsy-big-number { margin: 0; color: var(--ta-text); font-size: calc(22px * var(--ta-font-scale)); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
52
|
+
.tsy-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
|
|
53
|
+
.tsy-fact { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--ta-raised); }
|
|
54
|
+
.tsy-fact b { color: var(--ta-text); font-size: calc(18px * var(--ta-font-scale)); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
55
|
+
.tsy-fact span { color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
56
|
+
.tsy-end { justify-content: flex-end; }
|
|
57
|
+
.tsy-lead { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }
|
|
58
|
+
.tsy-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
59
|
+
.tsy-devices { display: flex; flex-direction: column; border: 1px solid var(--ta-border-muted); border-radius: 12px; overflow: hidden; }
|
|
60
|
+
.tsy-device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 52px; }
|
|
61
|
+
.tsy-device + .tsy-device { border-top: 1px solid var(--ta-border-muted); }
|
|
62
|
+
.tsy-device-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-secondary); }
|
|
63
|
+
.tsy-device-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
64
|
+
.tsy-device-name { color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
65
|
+
.tsy-device-line { display: flex; align-items: center; gap: 6px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
66
|
+
.tsy-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ta-border-field); flex: none; }
|
|
67
|
+
.tsy-dot.tsy-on { background: var(--ta-green); }
|
|
68
|
+
.tsy-line { margin: 0; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); overflow-wrap: anywhere; }
|
|
69
|
+
.tsy-line.tsy-warn { color: var(--ta-yellow); }
|
|
70
|
+
.tsy-link { padding: 2px 4px; border: 0; border-radius: 6px; background: none; color: var(--ta-link); font: inherit; font-size: calc(12px * var(--ta-font-scale)); cursor: pointer; }
|
|
71
|
+
.tsy-link:hover { background: var(--ta-hover); }
|
|
72
|
+
.tsy-link.tsy-danger { color: var(--ta-red); }
|
|
73
|
+
.tsy-dialog { display: flex; flex-direction: column; gap: 14px; width: min(400px, calc(100vw - 48px)); }
|
|
74
|
+
.tsy-dialog .tsy-qr { width: 200px; }
|
|
75
|
+
.tsy-dialog .tsy-link-box { max-height: 3.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
|
|
76
|
+
.tsy-qr { align-self: center; width: 188px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--ta-border-muted); }
|
|
77
|
+
.tsy-qr svg { display: block; width: 100%; height: auto; }
|
|
78
|
+
.tsy-link-box { padding: 8px 10px; border-radius: 8px; background: var(--ta-code); font-family: var(--ta-mono); font-size: calc(11.5px * var(--ta-font-scale)); color: var(--ta-secondary); overflow-wrap: anywhere; }
|
|
79
|
+
.tsy-field { width: 100%; box-sizing: border-box; height: 36px; padding: 0 10px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }
|
|
80
|
+
[data-touch] .tsy-field { font-size: max(16px, calc(13px * var(--ta-font-scale))); }
|
|
81
|
+
.tsy-error { margin: 0; color: var(--ta-red); font-size: calc(12px * var(--ta-font-scale)); }
|
|
82
|
+
.tsy-page { padding: 24px 20px 40px; max-width: 640px; margin: 0 auto; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
|
|
83
|
+
.tsy-page h2 { margin: 0; font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }
|
|
84
|
+
.tsy-what { display: flex; flex-direction: column; border: 1px solid var(--ta-border-muted); border-radius: 12px; }
|
|
85
|
+
.tsy-what-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
|
|
86
|
+
.tsy-what-row + .tsy-what-row { border-top: 1px solid var(--ta-border-muted); }
|
|
87
|
+
.tsy-what-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
88
|
+
.tsy-what-label { color: var(--ta-text); font-size: calc(13px * var(--ta-font-scale)); }
|
|
89
|
+
.tsy-check { cursor: pointer; }
|
|
90
|
+
.tsy-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ta-green); }
|
|
91
|
+
.tsy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
|
92
|
+
.tsy-row .tsy-field { flex: 1 1 200px; width: auto; }
|
|
93
|
+
.tsy-row .tsy-short { flex: 0 1 140px; }
|
|
94
|
+
.tsy-code { align-self: flex-start; padding: 6px 14px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(24px * var(--ta-font-scale)); letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }
|
|
95
|
+
.tsy-progress-box { display: flex; flex-direction: column; gap: 6px; }
|
|
96
|
+
.tsy-progress { height: 6px; border-radius: 3px; background: var(--ta-raised); overflow: hidden; }
|
|
97
|
+
.tsy-progress-bar { height: 100%; border-radius: 3px; background: var(--ta-green); transition: width 0.3s ease; }
|
|
98
|
+
.tsy-pick { width: 100%; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
|
|
99
|
+
.tsy-picked { background: var(--ta-hover); }
|
|
100
|
+
`;
|
|
101
|
+
function injectStyle() {
|
|
102
|
+
const element = document.createElement('style');
|
|
103
|
+
element.dataset.taPackage = 'ta-sync';
|
|
104
|
+
element.textContent = exports.STYLE;
|
|
105
|
+
document.head.appendChild(element);
|
|
106
|
+
return () => element.remove();
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How content goes into the state of the room: compressed, in base64, in pieces small enough for a value of the
|
|
3
|
+
* relay once sealed (RELAY_HUB_MAX_VALUE, 96 KB), under the SHA-256 of what it was.
|
|
4
|
+
*/
|
|
5
|
+
export declare namespace SyncCodec {
|
|
6
|
+
const PIECE: number;
|
|
7
|
+
function hash(bytes: Uint8Array): string;
|
|
8
|
+
function encode(bytes: Uint8Array, piece?: number): string[];
|
|
9
|
+
function decode(pieces: readonly string[]): Uint8Array;
|
|
10
|
+
function json(value: unknown): Uint8Array;
|
|
11
|
+
function parse(bytes: Uint8Array): unknown;
|
|
12
|
+
/** The files of a directory as one content: their paths (with /) and their bytes, in order. */
|
|
13
|
+
function pack(files: ReadonlyMap<string, Uint8Array>): Uint8Array;
|
|
14
|
+
function unpack(bytes: Uint8Array): Map<string, Uint8Array>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=sync-codec.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncCodec = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const node_zlib_1 = require("node:zlib");
|
|
6
|
+
const sync_merge_1 = require("./sync-merge");
|
|
7
|
+
const encoder = new TextEncoder();
|
|
8
|
+
const decoder = new TextDecoder();
|
|
9
|
+
/**
|
|
10
|
+
* How content goes into the state of the room: compressed, in base64, in pieces small enough for a value of the
|
|
11
|
+
* relay once sealed (RELAY_HUB_MAX_VALUE, 96 KB), under the SHA-256 of what it was.
|
|
12
|
+
*/
|
|
13
|
+
var SyncCodec;
|
|
14
|
+
(function (SyncCodec) {
|
|
15
|
+
SyncCodec.PIECE = 48 * 1024;
|
|
16
|
+
function hash(bytes) {
|
|
17
|
+
return (0, node_crypto_1.createHash)('sha256').update(bytes).digest('hex');
|
|
18
|
+
}
|
|
19
|
+
SyncCodec.hash = hash;
|
|
20
|
+
function encode(bytes, piece = SyncCodec.PIECE) {
|
|
21
|
+
const text = Buffer.from((0, node_zlib_1.gzipSync)(bytes)).toString('base64');
|
|
22
|
+
const pieces = [];
|
|
23
|
+
for (let start = 0; start < text.length; start += piece) {
|
|
24
|
+
pieces.push(text.slice(start, start + piece));
|
|
25
|
+
}
|
|
26
|
+
return pieces.length ? pieces : [''];
|
|
27
|
+
}
|
|
28
|
+
SyncCodec.encode = encode;
|
|
29
|
+
function decode(pieces) {
|
|
30
|
+
return new Uint8Array((0, node_zlib_1.gunzipSync)(Buffer.from(pieces.join(''), 'base64')));
|
|
31
|
+
}
|
|
32
|
+
SyncCodec.decode = decode;
|
|
33
|
+
function json(value) {
|
|
34
|
+
return encoder.encode(sync_merge_1.SyncMerge.canonical(value));
|
|
35
|
+
}
|
|
36
|
+
SyncCodec.json = json;
|
|
37
|
+
function parse(bytes) {
|
|
38
|
+
return JSON.parse(decoder.decode(bytes));
|
|
39
|
+
}
|
|
40
|
+
SyncCodec.parse = parse;
|
|
41
|
+
/** The files of a directory as one content: their paths (with /) and their bytes, in order. */
|
|
42
|
+
function pack(files) {
|
|
43
|
+
const entries = [...files].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0));
|
|
44
|
+
return json(Object.fromEntries(entries.map(([path, bytes]) => [path, Buffer.from(bytes).toString('base64')])));
|
|
45
|
+
}
|
|
46
|
+
SyncCodec.pack = pack;
|
|
47
|
+
function unpack(bytes) {
|
|
48
|
+
const data = parse(bytes);
|
|
49
|
+
const files = new Map();
|
|
50
|
+
if (sync_merge_1.SyncMerge.isObject(data)) {
|
|
51
|
+
for (const [path, text] of Object.entries(data)) {
|
|
52
|
+
if (typeof text === 'string') {
|
|
53
|
+
files.set(path, new Uint8Array(Buffer.from(text, 'base64')));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return files;
|
|
58
|
+
}
|
|
59
|
+
SyncCodec.unpack = unpack;
|
|
60
|
+
})(SyncCodec || (exports.SyncCodec = SyncCodec = {}));
|
|
61
|
+
//# sourceMappingURL=sync-codec.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { SyncIdentityBase } from './sync-identity';
|
|
2
|
+
import { type LocalItem, type SyncPlace } from './sync-items';
|
|
3
|
+
import { type SyncEntry, type SyncReport, type SyncResource } from './sync-protocol';
|
|
4
|
+
/** The state of the room, as TaRooms gives it for one room. */
|
|
5
|
+
export interface SyncRoom {
|
|
6
|
+
getState(prefix: string): Promise<Record<string, {
|
|
7
|
+
value: unknown;
|
|
8
|
+
version: number;
|
|
9
|
+
}>>;
|
|
10
|
+
setState(key: string, value: unknown, version?: number): Promise<{
|
|
11
|
+
ok: boolean;
|
|
12
|
+
version: number;
|
|
13
|
+
}>;
|
|
14
|
+
/** Characters of a piece of content: a room's are small (SyncCodec.PIECE), a folder's large. */
|
|
15
|
+
readonly piece?: number;
|
|
16
|
+
}
|
|
17
|
+
/** What both had of an item after the last sync here: its hash ('' deleted), and the value of a `json` or `set` one. */
|
|
18
|
+
export interface SyncBaseItem {
|
|
19
|
+
h: string;
|
|
20
|
+
v?: unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface SyncBase {
|
|
23
|
+
room: string;
|
|
24
|
+
items: Record<string, SyncBaseItem>;
|
|
25
|
+
/** Of the identity shared, when it is (SyncIdentity). */
|
|
26
|
+
identity?: SyncIdentityBase;
|
|
27
|
+
}
|
|
28
|
+
interface Remote {
|
|
29
|
+
entry: SyncEntry;
|
|
30
|
+
version: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One sync of this computer with the room: each item compared three ways (here, there, after the last sync), sent,
|
|
34
|
+
* taken or merged; what this computer had and loses is kept aside. An item is written to the room on the version
|
|
35
|
+
* read (compare and set): when another computer wrote it first, the round reads again.
|
|
36
|
+
*/
|
|
37
|
+
export declare class SyncEngine {
|
|
38
|
+
protected readonly room: SyncRoom;
|
|
39
|
+
protected readonly place: SyncPlace;
|
|
40
|
+
protected readonly device: string;
|
|
41
|
+
protected readonly now: () => number;
|
|
42
|
+
constructor(room: SyncRoom, place: SyncPlace, device: string, now?: () => number);
|
|
43
|
+
round(base: SyncBase, resources: ReadonlySet<SyncResource>): Promise<SyncReport>;
|
|
44
|
+
/** True when another computer wrote an item between the read and the write: read again. */
|
|
45
|
+
protected once(base: SyncBase, resources: ReadonlySet<SyncResource>, report: SyncReport): Promise<boolean>;
|
|
46
|
+
protected item(id: string, local: LocalItem | undefined, remote: Remote | undefined, base: SyncBase, report: SyncReport): Promise<boolean>;
|
|
47
|
+
protected merge(id: string, local: LocalItem, remote: Remote, had: SyncBaseItem | undefined, base: SyncBase, report: SyncReport): Promise<boolean>;
|
|
48
|
+
/** The item to the room on the version read (a deletion as a mark): its pieces first, then the entry. */
|
|
49
|
+
protected send(id: string, local: LocalItem | undefined, remote: Remote | undefined): Promise<boolean>;
|
|
50
|
+
/** The pieces of what an item replaced, unless another item has the same content. */
|
|
51
|
+
protected dropBlob(entry: SyncEntry): Promise<void>;
|
|
52
|
+
protected content(entry: SyncEntry): Promise<Uint8Array | undefined>;
|
|
53
|
+
protected remote(): Promise<Map<string, Remote>>;
|
|
54
|
+
protected dropOldMarks(): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=sync-engine.d.ts.map
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncEngine = void 0;
|
|
4
|
+
const sync_codec_1 = require("./sync-codec");
|
|
5
|
+
const sync_items_1 = require("./sync-items");
|
|
6
|
+
const sync_merge_1 = require("./sync-merge");
|
|
7
|
+
const sync_protocol_1 = require("./sync-protocol");
|
|
8
|
+
/** How many times a round reads the room again when another computer wrote an item first. */
|
|
9
|
+
const ATTEMPTS = 3;
|
|
10
|
+
/** A mark of a deletion is dropped after this long: a computer away longer deletes what it still has by its base. */
|
|
11
|
+
const TOMBSTONE_MS = 90 * 24 * 60 * 60 * 1000;
|
|
12
|
+
/**
|
|
13
|
+
* One sync of this computer with the room: each item compared three ways (here, there, after the last sync), sent,
|
|
14
|
+
* taken or merged; what this computer had and loses is kept aside. An item is written to the room on the version
|
|
15
|
+
* read (compare and set): when another computer wrote it first, the round reads again.
|
|
16
|
+
*/
|
|
17
|
+
class SyncEngine {
|
|
18
|
+
constructor(room, place, device, now = Date.now) {
|
|
19
|
+
this.room = room;
|
|
20
|
+
this.place = place;
|
|
21
|
+
this.device = device;
|
|
22
|
+
this.now = now;
|
|
23
|
+
}
|
|
24
|
+
async round(base, resources) {
|
|
25
|
+
const report = { at: this.now(), sent: 0, received: 0, skipped: [] };
|
|
26
|
+
for (let attempt = 0; attempt < ATTEMPTS; attempt++) {
|
|
27
|
+
const raced = await this.once(base, resources, report);
|
|
28
|
+
if (!raced) {
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
await this.dropOldMarks();
|
|
33
|
+
return report;
|
|
34
|
+
}
|
|
35
|
+
/** True when another computer wrote an item between the read and the write: read again. */
|
|
36
|
+
async once(base, resources, report) {
|
|
37
|
+
const remote = await this.remote();
|
|
38
|
+
const local = await this.place.read(resources);
|
|
39
|
+
const ids = new Set([...local.keys(), ...remote.keys(), ...Object.keys(base.items)]);
|
|
40
|
+
let raced = false;
|
|
41
|
+
for (const id of [...ids].sort()) {
|
|
42
|
+
const resource = sync_items_1.SyncItems.resourceOf(id);
|
|
43
|
+
if (!resource || !resources.has(resource)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
raced = (await this.item(id, local.get(id), remote.get(id), base, report)) || raced;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
report.skipped.push({ id, reason: error instanceof Error ? error.message : String(error) });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return raced;
|
|
54
|
+
}
|
|
55
|
+
async item(id, local, remote, base, report) {
|
|
56
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
57
|
+
const type = (_b = (_a = local === null || local === void 0 ? void 0 : local.type) !== null && _a !== void 0 ? _a : remote === null || remote === void 0 ? void 0 : remote.entry.t) !== null && _b !== void 0 ? _b : 'bytes';
|
|
58
|
+
const mergeable = type === 'json' || type === 'set';
|
|
59
|
+
const had = base.items[id];
|
|
60
|
+
const action = sync_merge_1.SyncMerge.decide(local, remote === null || remote === void 0 ? void 0 : remote.entry, had === null || had === void 0 ? void 0 : had.h, mergeable && ((_c = local === null || local === void 0 ? void 0 : local.type) !== null && _c !== void 0 ? _c : type) === ((_d = remote === null || remote === void 0 ? void 0 : remote.entry.t) !== null && _d !== void 0 ? _d : type));
|
|
61
|
+
switch (action) {
|
|
62
|
+
case 'none':
|
|
63
|
+
base.items[id] = { h: (_e = local === null || local === void 0 ? void 0 : local.h) !== null && _e !== void 0 ? _e : '', ...((local === null || local === void 0 ? void 0 : local.value) === undefined ? {} : { v: local.value }) };
|
|
64
|
+
return false;
|
|
65
|
+
case 'forget':
|
|
66
|
+
delete base.items[id];
|
|
67
|
+
return false;
|
|
68
|
+
case 'push':
|
|
69
|
+
case 'keepLocal': {
|
|
70
|
+
if (action === 'keepLocal' && remote) {
|
|
71
|
+
const theirs = await this.content(remote.entry);
|
|
72
|
+
if (theirs) {
|
|
73
|
+
await this.place.keep(id, remote.entry.t, theirs, remote.entry.by);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const ok = await this.send(id, local, remote);
|
|
77
|
+
if (ok) {
|
|
78
|
+
base.items[id] = { h: (_f = local === null || local === void 0 ? void 0 : local.h) !== null && _f !== void 0 ? _f : '', ...((local === null || local === void 0 ? void 0 : local.value) === undefined ? {} : { v: local.value }) };
|
|
79
|
+
report.sent++;
|
|
80
|
+
}
|
|
81
|
+
return !ok;
|
|
82
|
+
}
|
|
83
|
+
case 'pull':
|
|
84
|
+
case 'keepRemote': {
|
|
85
|
+
const entry = remote === null || remote === void 0 ? void 0 : remote.entry;
|
|
86
|
+
const content = entry && !entry.deleted ? await this.content(entry) : undefined;
|
|
87
|
+
if (entry && !entry.deleted && !content) {
|
|
88
|
+
// Its pieces are still on their way: the next round.
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
// What this computer changed since the last sync, or had before it ever synced, is kept aside.
|
|
92
|
+
const aside = !!local && (action === 'keepRemote' || had === undefined || local.h !== had.h);
|
|
93
|
+
await this.place.apply(id, (_g = entry === null || entry === void 0 ? void 0 : entry.t) !== null && _g !== void 0 ? _g : type, content, aside);
|
|
94
|
+
base.items[id] = { h: content ? ((_h = entry === null || entry === void 0 ? void 0 : entry.h) !== null && _h !== void 0 ? _h : '') : '', ...(content && mergeable ? { v: sync_codec_1.SyncCodec.parse(content) } : {}) };
|
|
95
|
+
if (local || content) {
|
|
96
|
+
report.received++;
|
|
97
|
+
}
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
case 'merge':
|
|
101
|
+
return this.merge(id, local, remote, had, base, report);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async merge(id, local, remote, had, base, report) {
|
|
105
|
+
const content = await this.content(remote.entry);
|
|
106
|
+
if (!content) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
const theirs = sync_codec_1.SyncCodec.parse(content);
|
|
110
|
+
const merged = local.type === 'set'
|
|
111
|
+
? sync_merge_1.SyncMerge.set(Array.isArray(had === null || had === void 0 ? void 0 : had.v) ? had.v : undefined, Array.isArray(local.value) ? local.value : [], Array.isArray(theirs) ? theirs : [])
|
|
112
|
+
: sync_merge_1.SyncMerge.value(had === null || had === void 0 ? void 0 : had.v, local.value, theirs);
|
|
113
|
+
const item = sync_items_1.SyncItems.item(id, local.type, sync_codec_1.SyncCodec.json(merged), this.now(), merged);
|
|
114
|
+
if (item.h !== remote.entry.h && !(await this.send(id, item, remote))) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
if (item.h !== local.h) {
|
|
118
|
+
await this.place.apply(id, local.type, item.bytes, false);
|
|
119
|
+
report.received++;
|
|
120
|
+
}
|
|
121
|
+
if (item.h !== remote.entry.h) {
|
|
122
|
+
report.sent++;
|
|
123
|
+
}
|
|
124
|
+
base.items[id] = { h: item.h, v: merged };
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
/** The item to the room on the version read (a deletion as a mark): its pieces first, then the entry. */
|
|
128
|
+
async send(id, local, remote) {
|
|
129
|
+
var _a;
|
|
130
|
+
var _b, _c;
|
|
131
|
+
const entry = local
|
|
132
|
+
? { t: local.type, h: local.h, at: Math.round(local.at || this.now()), by: this.device, n: 0 }
|
|
133
|
+
: { t: (_b = remote === null || remote === void 0 ? void 0 : remote.entry.t) !== null && _b !== void 0 ? _b : 'bytes', h: '', at: this.now(), by: this.device, n: 0, deleted: true };
|
|
134
|
+
if (local) {
|
|
135
|
+
const pieces = sync_codec_1.SyncCodec.encode(local.bytes, this.room.piece);
|
|
136
|
+
entry.n = pieces.length;
|
|
137
|
+
const there = await this.room.getState(`${sync_protocol_1.SyncStateKeys.BLOB}${local.h}:`);
|
|
138
|
+
for (const [index, piece] of pieces.entries()) {
|
|
139
|
+
const key = sync_protocol_1.SyncStateKeys.blob(local.h, index);
|
|
140
|
+
if (((_a = there[key]) === null || _a === void 0 ? void 0 : _a.value) !== piece) {
|
|
141
|
+
await this.room.setState(key, piece);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const result = await this.room.setState(sync_protocol_1.SyncStateKeys.item(id), entry, (_c = remote === null || remote === void 0 ? void 0 : remote.version) !== null && _c !== void 0 ? _c : 0);
|
|
146
|
+
if (result.ok && remote && !remote.entry.deleted && remote.entry.h !== entry.h) {
|
|
147
|
+
await this.dropBlob(remote.entry);
|
|
148
|
+
}
|
|
149
|
+
return result.ok;
|
|
150
|
+
}
|
|
151
|
+
/** The pieces of what an item replaced, unless another item has the same content. */
|
|
152
|
+
async dropBlob(entry) {
|
|
153
|
+
const remote = await this.remote();
|
|
154
|
+
if ([...remote.values()].some(({ entry: other }) => !other.deleted && other.h === entry.h)) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
for (let index = 0; index < entry.n; index++) {
|
|
158
|
+
await this.room.setState(sync_protocol_1.SyncStateKeys.blob(entry.h, index), null);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async content(entry) {
|
|
162
|
+
var _a;
|
|
163
|
+
const state = await this.room.getState(`${sync_protocol_1.SyncStateKeys.BLOB}${entry.h}:`);
|
|
164
|
+
const pieces = [];
|
|
165
|
+
for (let index = 0; index < entry.n; index++) {
|
|
166
|
+
const piece = (_a = state[sync_protocol_1.SyncStateKeys.blob(entry.h, index)]) === null || _a === void 0 ? void 0 : _a.value;
|
|
167
|
+
if (typeof piece !== 'string') {
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
pieces.push(piece);
|
|
171
|
+
}
|
|
172
|
+
const bytes = sync_codec_1.SyncCodec.decode(pieces);
|
|
173
|
+
// Pieces of another content under the same name would be a fault of the room: not written here.
|
|
174
|
+
return sync_codec_1.SyncCodec.hash(bytes) === entry.h ? bytes : undefined;
|
|
175
|
+
}
|
|
176
|
+
async remote() {
|
|
177
|
+
const items = new Map();
|
|
178
|
+
for (const [key, { value, version }] of Object.entries(await this.room.getState(sync_protocol_1.SyncStateKeys.ITEM))) {
|
|
179
|
+
if (isEntry(value)) {
|
|
180
|
+
items.set(key.slice(sync_protocol_1.SyncStateKeys.ITEM.length), { entry: value, version });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return items;
|
|
184
|
+
}
|
|
185
|
+
async dropOldMarks() {
|
|
186
|
+
for (const [id, { entry, version }] of await this.remote()) {
|
|
187
|
+
if (entry.deleted && this.now() - entry.at > TOMBSTONE_MS) {
|
|
188
|
+
await this.room.setState(sync_protocol_1.SyncStateKeys.item(id), null, version);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
exports.SyncEngine = SyncEngine;
|
|
194
|
+
function isEntry(value) {
|
|
195
|
+
const entry = value;
|
|
196
|
+
return (sync_merge_1.SyncMerge.isObject(value) &&
|
|
197
|
+
['json', 'set', 'bytes', 'tree'].includes(entry.t) &&
|
|
198
|
+
typeof entry.h === 'string' &&
|
|
199
|
+
typeof entry.at === 'number' &&
|
|
200
|
+
typeof entry.n === 'number' &&
|
|
201
|
+
typeof entry.by === 'string');
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=sync-engine.js.map
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { TaRelayStore } from '@celljs/ta-protocol';
|
|
2
|
+
import type { SyncRoom } from './sync-engine';
|
|
3
|
+
/**
|
|
4
|
+
* Sync in a folder a cloud drive keeps the same on the user's computers (docs/design/ta-relays.md 4.1): no relay, no
|
|
5
|
+
* owner. The drive only carries files Ta sealed; the key is in the link one computer shows another, never in the folder.
|
|
6
|
+
*
|
|
7
|
+
* `<folder>/ta-sync/<space>/`:
|
|
8
|
+
* - `space.json`, in the clear: the version and a check sealed with the key, which tells a computer joining whether
|
|
9
|
+
* its key is the one;
|
|
10
|
+
* - `devices/<device>/device` and `devices/<device>/items/<name>`: what each computer writes, it alone, so that the
|
|
11
|
+
* drive never has two computers writing one file; an item is read as the latest version any computer wrote;
|
|
12
|
+
* - `blobs/<name>.<n>`: the content of items, in pieces, named by what they hold.
|
|
13
|
+
*
|
|
14
|
+
* Names are HMACs of the keys of the sync: the drive sees neither the ids of items nor what they hold.
|
|
15
|
+
*/
|
|
16
|
+
export interface FolderSpaceRecord {
|
|
17
|
+
/** The id of the space in the folder. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** base64url, 32 bytes. */
|
|
20
|
+
key: string;
|
|
21
|
+
/** The folder, `~/…` under the home directory; `` for a store. */
|
|
22
|
+
path: string;
|
|
23
|
+
/** A store of a package instead (WebDAV, S3): its id in relays.json, and its type. */
|
|
24
|
+
service?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
/** This computer's id in the space. */
|
|
27
|
+
device: string;
|
|
28
|
+
at: number;
|
|
29
|
+
}
|
|
30
|
+
interface Sealed<T> {
|
|
31
|
+
key: string;
|
|
32
|
+
value: T;
|
|
33
|
+
v: number;
|
|
34
|
+
}
|
|
35
|
+
export interface FolderDevice {
|
|
36
|
+
device: string;
|
|
37
|
+
name: string;
|
|
38
|
+
platform?: string;
|
|
39
|
+
at: number;
|
|
40
|
+
}
|
|
41
|
+
/** A piece of a blob in a folder: no limit of a relay, so large; a file each. */
|
|
42
|
+
export declare const FOLDER_PIECE: number;
|
|
43
|
+
export declare namespace FolderSyncUtil {
|
|
44
|
+
function randomId(): string;
|
|
45
|
+
function randomKey(): string;
|
|
46
|
+
/** `ta-sync://folder#v=1&s=<space>&k=<key>&p=<folder>&n=<computer>`: the key in the fragment. */
|
|
47
|
+
function link(record: Pick<FolderSpaceRecord, 'id' | 'key' | 'path'>, name: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* `ta-sync://store#v=1&s=<space>&k=<key>&t=<type>&o=<options>&a=<its name>&n=<computer>`: the options of the store, its
|
|
50
|
+
* sign-in among them, in base64url JSON of the fragment, so that the other computer joins by the link alone.
|
|
51
|
+
*/
|
|
52
|
+
function storeLink(record: Pick<FolderSpaceRecord, 'id' | 'key'>, config: {
|
|
53
|
+
type: string;
|
|
54
|
+
options: Record<string, unknown>;
|
|
55
|
+
name?: string;
|
|
56
|
+
}, name: string): string;
|
|
57
|
+
function isStore(text: string): boolean;
|
|
58
|
+
function parseStore(text: string): {
|
|
59
|
+
id: string;
|
|
60
|
+
key: string;
|
|
61
|
+
type: string;
|
|
62
|
+
options: Record<string, unknown>;
|
|
63
|
+
service: string;
|
|
64
|
+
name: string;
|
|
65
|
+
};
|
|
66
|
+
function is(text: string): boolean;
|
|
67
|
+
function parse(text: string): {
|
|
68
|
+
id: string;
|
|
69
|
+
key: string;
|
|
70
|
+
path: string;
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** A folder of this computer as a store (TaRelayStore): what a cloud drive keeps the same on the user's computers. */
|
|
75
|
+
export declare class LocalFolderStore implements TaRelayStore {
|
|
76
|
+
readonly root: string;
|
|
77
|
+
constructor(root: string);
|
|
78
|
+
list(dir: string): Promise<{
|
|
79
|
+
name: string;
|
|
80
|
+
tag: string;
|
|
81
|
+
dir?: boolean;
|
|
82
|
+
}[]>;
|
|
83
|
+
read(path: string): Promise<Uint8Array | undefined>;
|
|
84
|
+
write(path: string, data: Uint8Array): Promise<void>;
|
|
85
|
+
remove(path: string): Promise<void>;
|
|
86
|
+
/** Best effort: a system without recursive watching has the rounds of every while. */
|
|
87
|
+
watch(listener: (path?: string) => void): () => void;
|
|
88
|
+
protected path(path: string): string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The space of a sync in a store (a folder, WebDAV, S3): what SyncEngine reads and writes (SyncRoom), sealed in files
|
|
92
|
+
* under `ta-sync/<space>/`. Files a round read are kept by their tags: a store far away is read only where it changed.
|
|
93
|
+
*/
|
|
94
|
+
export declare class StoreSpace implements SyncRoom {
|
|
95
|
+
readonly store: TaRelayStore;
|
|
96
|
+
protected readonly record: Pick<FolderSpaceRecord, 'id' | 'key' | 'device'>;
|
|
97
|
+
readonly piece: number;
|
|
98
|
+
protected readonly key: Buffer;
|
|
99
|
+
protected readonly root: string;
|
|
100
|
+
protected readonly opened: Map<string, {
|
|
101
|
+
tag: string;
|
|
102
|
+
value: unknown;
|
|
103
|
+
}>;
|
|
104
|
+
constructor(store: TaRelayStore, record: Pick<FolderSpaceRecord, 'id' | 'key' | 'device'>);
|
|
105
|
+
/** Makes the space: its check. */
|
|
106
|
+
create(): Promise<void>;
|
|
107
|
+
/** Whether the space is in the store and the key opens it; why not, else. */
|
|
108
|
+
check(): Promise<'missing' | 'newer' | 'key' | undefined>;
|
|
109
|
+
getState(prefix: string): Promise<Record<string, {
|
|
110
|
+
value: unknown;
|
|
111
|
+
version: number;
|
|
112
|
+
}>>;
|
|
113
|
+
/**
|
|
114
|
+
* An item on the version read: refused when another computer wrote a later one since. A store gives no lock, so
|
|
115
|
+
* two computers may still write the same version at once: the later wins on every computer, and the other finds
|
|
116
|
+
* its change gone on its next round, which merges it again (SyncMerge).
|
|
117
|
+
*/
|
|
118
|
+
setState(key: string, value: unknown, version?: number): Promise<{
|
|
119
|
+
ok: boolean;
|
|
120
|
+
version: number;
|
|
121
|
+
}>;
|
|
122
|
+
/** The computers that synced here, as each says of itself. */
|
|
123
|
+
devices(): Promise<FolderDevice[]>;
|
|
124
|
+
/** What the files of the other computers are now, by their names and tags: another computer wrote when it changes. */
|
|
125
|
+
signature(): Promise<string>;
|
|
126
|
+
/** Hears the other computers write, where the store can tell (a folder); the rounds of every while stay. */
|
|
127
|
+
watch(listener: () => void): () => void;
|
|
128
|
+
/** Every item, as the latest version any computer wrote of it. */
|
|
129
|
+
protected items(): Promise<Map<string, Sealed<unknown> & {
|
|
130
|
+
device: string;
|
|
131
|
+
}>>;
|
|
132
|
+
protected blobs(prefix: string): Promise<Record<string, {
|
|
133
|
+
value: unknown;
|
|
134
|
+
version: number;
|
|
135
|
+
}>>;
|
|
136
|
+
protected dirs(dir: string): Promise<string[]>;
|
|
137
|
+
protected blobName(key: string): string;
|
|
138
|
+
protected name(key: string): string;
|
|
139
|
+
protected seal(aad: string, value: unknown): Buffer;
|
|
140
|
+
protected open(sealed: Buffer, aad: string): unknown;
|
|
141
|
+
/** A file opened, again only once its tag changed. */
|
|
142
|
+
protected cached<T>(path: string, tag: string, aad: string): Promise<T | undefined>;
|
|
143
|
+
/** A file of the space, opened; undefined when it is not there yet (the drive still bringing it) or does not open. */
|
|
144
|
+
protected read<T>(path: string, aad: string): Promise<T | undefined>;
|
|
145
|
+
}
|
|
146
|
+
/** The space of a sync in a folder of this computer. */
|
|
147
|
+
export declare class FolderSpace extends StoreSpace {
|
|
148
|
+
/** The folder, as it is on this computer. */
|
|
149
|
+
readonly folder: string;
|
|
150
|
+
constructor(
|
|
151
|
+
/** The folder, as it is on this computer. */
|
|
152
|
+
folder: string, record: Pick<FolderSpaceRecord, 'id' | 'key' | 'device'>);
|
|
153
|
+
get dir(): string;
|
|
154
|
+
}
|
|
155
|
+
export {};
|
|
156
|
+
//# sourceMappingURL=sync-folder.d.ts.map
|