@celljs/ta 4.16.0 → 4.17.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 +1 -0
- package/README.md +1 -0
- package/dist/cli.mjs +2224 -203
- package/dist/gateway.mjs +2011 -528
- package/dist/pi/CHANGELOG.md +12 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-3d/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-3d/package.json +2 -1
- package/dist/pi/packages/ta-agents/README.en.md +14 -2
- package/dist/pi/packages/ta-agents/README.md +14 -2
- package/dist/pi/packages/ta-agents/extension/index.mjs +278 -105
- package/dist/pi/packages/ta-agents/host/index.mjs +662 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +36 -2
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +76 -6
- package/dist/pi/packages/ta-agents/lib/agent-installer.d.ts +55 -0
- package/dist/pi/packages/ta-agents/lib/agent-installer.js +140 -0
- package/dist/pi/packages/ta-agents/lib/agent-installs.d.ts +25 -0
- package/dist/pi/packages/ta-agents/lib/agent-installs.js +64 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +9 -0
- package/dist/pi/packages/ta-agents/lib/agent-refresh.d.ts +11 -0
- package/dist/pi/packages/ta-agents/lib/agent-refresh.js +37 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -1
- package/dist/pi/packages/ta-agents/lib/agents-protocol.d.ts +26 -0
- package/dist/pi/packages/ta-agents/lib/agents-protocol.js +11 -0
- package/dist/pi/packages/ta-agents/lib/agents-settings.d.ts +10 -0
- package/dist/pi/packages/ta-agents/lib/agents-settings.js +165 -0
- package/dist/pi/packages/ta-agents/lib/extension.d.ts +3 -1
- package/dist/pi/packages/ta-agents/lib/extension.js +17 -4
- package/dist/pi/packages/ta-agents/lib/host.d.ts +35 -0
- package/dist/pi/packages/ta-agents/lib/host.js +96 -0
- package/dist/pi/packages/ta-agents/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-agents/lib/react.js +8 -0
- package/dist/pi/packages/ta-agents/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/style.js +30 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +18 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +18 -0
- package/dist/pi/packages/ta-agents/lib/web-words.d.ts +30 -0
- package/dist/pi/packages/ta-agents/lib/web-words.js +98 -0
- package/dist/pi/packages/ta-agents/lib/web.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/web.js +14 -0
- package/dist/pi/packages/ta-agents/package.json +21 -5
- package/dist/pi/packages/ta-agents/web/index.js +385 -0
- package/dist/pi/packages/ta-app-use/README.en.md +28 -0
- package/dist/pi/packages/ta-app-use/README.md +28 -0
- package/dist/pi/packages/ta-app-use/extension/index.mjs +534 -0
- package/dist/pi/packages/ta-app-use/host/index.mjs +136 -0
- package/dist/pi/packages/ta-app-use/lib/app-host.d.ts +32 -0
- package/dist/pi/packages/ta-app-use/lib/app-host.js +79 -0
- package/dist/pi/packages/ta-app-use/lib/app-protocol.d.ts +23 -0
- package/dist/pi/packages/ta-app-use/lib/app-protocol.js +9 -0
- package/dist/pi/packages/ta-app-use/lib/app-util.d.ts +18 -0
- package/dist/pi/packages/ta-app-use/lib/app-util.js +71 -0
- package/dist/pi/packages/ta-app-use/lib/extension.d.ts +80 -0
- package/dist/pi/packages/ta-app-use/lib/extension.js +125 -0
- package/dist/pi/packages/ta-app-use/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-app-use/lib/host.js +16 -0
- package/dist/pi/packages/ta-app-use/lib/i18n.d.ts +38 -0
- package/dist/pi/packages/ta-app-use/lib/i18n.js +130 -0
- package/dist/pi/packages/ta-app-use/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-app-use/lib/index.js +93 -0
- package/dist/pi/packages/ta-app-use/lib/screen-cursor.d.ts +33 -0
- package/dist/pi/packages/ta-app-use/lib/screen-cursor.js +134 -0
- package/dist/pi/packages/ta-app-use/lib/screen-dom.d.ts +19 -0
- package/dist/pi/packages/ta-app-use/lib/screen-dom.js +184 -0
- package/dist/pi/packages/ta-app-use/lib/screen-driver.d.ts +46 -0
- package/dist/pi/packages/ta-app-use/lib/screen-driver.js +174 -0
- package/dist/pi/packages/ta-app-use/lib/screen-protocol.d.ts +67 -0
- package/dist/pi/packages/ta-app-use/lib/screen-protocol.js +8 -0
- package/dist/pi/packages/ta-app-use/lib/screen-text.d.ts +13 -0
- package/dist/pi/packages/ta-app-use/lib/screen-text.js +69 -0
- package/dist/pi/packages/ta-app-use/lib/screen-window.d.ts +68 -0
- package/dist/pi/packages/ta-app-use/lib/screen-window.js +376 -0
- package/dist/pi/packages/ta-app-use/lib/tool-line.d.ts +11 -0
- package/dist/pi/packages/ta-app-use/lib/tool-line.js +69 -0
- package/dist/pi/packages/ta-app-use/package.json +63 -0
- package/dist/pi/packages/ta-app-use/web/index.js +1520 -0
- package/dist/pi/packages/ta-bots/README.en.md +1 -0
- package/dist/pi/packages/ta-bots/README.md +1 -0
- package/dist/pi/packages/ta-bots/extension/index.mjs +25 -22
- package/dist/pi/packages/ta-bots/host/index.mjs +688 -148
- package/dist/pi/packages/ta-bots/lib/bot-service.d.ts +9 -1
- package/dist/pi/packages/ta-bots/lib/bot-service.js +49 -8
- package/dist/pi/packages/ta-bots/lib/channel-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-bots/lib/extension.d.ts +2 -2
- package/dist/pi/packages/ta-bots/lib/extension.js +28 -24
- package/dist/pi/packages/ta-bots/lib/index.js +4 -0
- package/dist/pi/packages/ta-bots/lib/page.d.ts +7 -1
- package/dist/pi/packages/ta-bots/lib/page.js +17 -0
- package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-bots/lib/style.js +1 -1
- package/dist/pi/packages/ta-bots/lib/wecom-channel.js +1 -1
- package/dist/pi/packages/ta-bots/lib/weixin-api.d.ts +1 -0
- package/dist/pi/packages/ta-bots/lib/weixin-channel.js +2 -1
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-bots/web/index.js +13 -2
- package/dist/pi/packages/ta-call/README.en.md +9 -0
- package/dist/pi/packages/ta-call/README.md +9 -0
- package/dist/pi/packages/ta-call/extension/index.mjs +474 -0
- package/dist/pi/packages/ta-call/host/index.mjs +899 -0
- package/dist/pi/packages/ta-call/lib/call-host.d.ts +127 -0
- package/dist/pi/packages/ta-call/lib/call-host.js +377 -0
- package/dist/pi/packages/ta-call/lib/call-protocol.d.ts +33 -0
- package/dist/pi/packages/ta-call/lib/call-protocol.js +10 -0
- package/dist/pi/packages/ta-call/lib/call-util.d.ts +50 -0
- package/dist/pi/packages/ta-call/lib/call-util.js +250 -0
- package/dist/pi/packages/ta-call/lib/extension.d.ts +20 -0
- package/dist/pi/packages/ta-call/lib/extension.js +114 -0
- package/dist/pi/packages/ta-call/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-call/lib/host.js +20 -0
- package/dist/pi/packages/ta-call/lib/i18n.d.ts +16 -0
- package/dist/pi/packages/ta-call/lib/i18n.js +38 -0
- package/dist/pi/packages/ta-call/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-call/lib/index.js +60 -0
- package/dist/pi/packages/ta-call/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-call/lib/react.js +8 -0
- package/dist/pi/packages/ta-call/package.json +64 -0
- package/dist/pi/packages/ta-call/web/index.js +552 -0
- package/dist/pi/packages/ta-changes/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-changes/lib/card.js +4 -1
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-changes/web/index.js +2 -0
- package/dist/pi/packages/ta-channels/extension/index.mjs +155 -194
- package/dist/pi/packages/ta-channels/host/index.mjs +2035 -1534
- package/dist/pi/packages/ta-channels/lib/agent-menu.js +2 -1
- package/dist/pi/packages/ta-channels/lib/channel-menu.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/channel-menu.js +2 -2
- package/dist/pi/packages/ta-channels/lib/channels-text.d.ts +38 -0
- package/dist/pi/packages/ta-channels/lib/channels-text.js +173 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +0 -48
- package/dist/pi/packages/ta-channels/lib/channels-util.js +1 -223
- package/dist/pi/packages/ta-channels/lib/create.js +5 -1
- package/dist/pi/packages/ta-channels/lib/i18n-ja.d.ts +3 -0
- package/dist/pi/packages/ta-channels/lib/i18n-ja.js +182 -0
- package/dist/pi/packages/ta-channels/lib/i18n-zh-tw.d.ts +3 -0
- package/dist/pi/packages/ta-channels/lib/i18n-zh-tw.js +182 -0
- package/dist/pi/packages/ta-channels/lib/i18n-zh.d.ts +3 -0
- package/dist/pi/packages/ta-channels/lib/i18n-zh.js +182 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +4 -535
- package/dist/pi/packages/ta-channels/lib/index.js +2 -1
- package/dist/pi/packages/ta-channels/lib/notice-util.d.ts +15 -0
- package/dist/pi/packages/ta-channels/lib/notice-util.js +61 -0
- package/dist/pi/packages/ta-channels/lib/notice.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/notice.js +5 -4
- package/dist/pi/packages/ta-channels/lib/room.js +4 -3
- package/dist/pi/packages/ta-channels/lib/sidebar-head.d.ts +6 -0
- package/dist/pi/packages/ta-channels/lib/sidebar-head.js +67 -0
- package/dist/pi/packages/ta-channels/lib/sidebar-hooks.d.ts +51 -0
- package/dist/pi/packages/ta-channels/lib/sidebar-hooks.js +230 -0
- package/dist/pi/packages/ta-channels/lib/sidebar-rows.d.ts +71 -0
- package/dist/pi/packages/ta-channels/lib/sidebar-rows.js +105 -0
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +0 -4
- package/dist/pi/packages/ta-channels/lib/sidebar.js +35 -396
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +0 -1
- package/dist/pi/packages/ta-channels/lib/tasks.js +2 -1
- package/dist/pi/packages/ta-channels/lib/team-store.d.ts +78 -0
- package/dist/pi/packages/ta-channels/lib/team-store.js +261 -0
- package/dist/pi/packages/ta-channels/lib/team-tools.js +3 -2
- package/dist/pi/packages/ta-channels/lib/team.d.ts +3 -76
- package/dist/pi/packages/ta-channels/lib/team.js +5 -254
- package/dist/pi/packages/ta-channels/package.json +1 -1
- package/dist/pi/packages/ta-channels/web/index.js +889 -809
- package/dist/pi/packages/ta-computer-use/package.json +1 -1
- package/dist/pi/packages/ta-cron/README.en.md +19 -3
- package/dist/pi/packages/ta-cron/README.md +19 -3
- package/dist/pi/packages/ta-cron/extension/index.mjs +396 -111
- package/dist/pi/packages/ta-cron/host/index.mjs +633 -49
- package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +5 -3
- package/dist/pi/packages/ta-cron/lib/chat-task.js +15 -10
- package/dist/pi/packages/ta-cron/lib/commands.d.ts +7 -4
- package/dist/pi/packages/ta-cron/lib/commands.js +26 -47
- package/dist/pi/packages/ta-cron/lib/cron-expression.d.ts +8 -0
- package/dist/pi/packages/ta-cron/lib/cron-expression.js +43 -1
- package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +54 -7
- package/dist/pi/packages/ta-cron/lib/cron-protocol.js +16 -2
- package/dist/pi/packages/ta-cron/lib/editor.d.ts +3 -0
- package/dist/pi/packages/ta-cron/lib/editor.js +106 -36
- package/dist/pi/packages/ta-cron/lib/extension.js +1 -1
- package/dist/pi/packages/ta-cron/lib/form-util.d.ts +16 -6
- package/dist/pi/packages/ta-cron/lib/form-util.js +40 -28
- package/dist/pi/packages/ta-cron/lib/host.js +17 -1
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +39 -5
- package/dist/pi/packages/ta-cron/lib/i18n.js +160 -24
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +3 -2
- package/dist/pi/packages/ta-cron/lib/page.js +13 -2
- package/dist/pi/packages/ta-cron/lib/schedule-util.d.ts +4 -0
- package/dist/pi/packages/ta-cron/lib/schedule-util.js +52 -4
- package/dist/pi/packages/ta-cron/lib/scheduler.d.ts +56 -6
- package/dist/pi/packages/ta-cron/lib/scheduler.js +209 -27
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +50 -21
- package/dist/pi/packages/ta-cron/lib/task-list.d.ts +23 -0
- package/dist/pi/packages/ta-cron/lib/task-list.js +70 -0
- package/dist/pi/packages/ta-cron/lib/task-row.d.ts +19 -0
- package/dist/pi/packages/ta-cron/lib/task-row.js +246 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +10 -6
- package/dist/pi/packages/ta-cron/lib/task-util.js +53 -19
- package/dist/pi/packages/ta-cron/lib/task-watchers.d.ts +30 -0
- package/dist/pi/packages/ta-cron/lib/task-watchers.js +90 -0
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +3 -2
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +48 -193
- package/dist/pi/packages/ta-cron/lib/tool-line.js +4 -0
- package/dist/pi/packages/ta-cron/lib/tool.d.ts +7 -0
- package/dist/pi/packages/ta-cron/lib/tool.js +18 -8
- package/dist/pi/packages/ta-cron/lib/when.d.ts +39 -0
- package/dist/pi/packages/ta-cron/lib/when.js +231 -0
- package/dist/pi/packages/ta-cron/package.json +2 -1
- package/dist/pi/packages/ta-cron/web/index.js +1091 -340
- package/dist/pi/packages/ta-extensions/lib/market-detail.js +9 -5
- package/dist/pi/packages/ta-extensions/lib/page.js +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +1 -1
- package/dist/pi/packages/ta-extensions/package.json +1 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +9 -7
- package/dist/pi/packages/ta-extensions/web/index.js +739 -234
- package/dist/pi/packages/ta-feedback/README.en.md +10 -0
- package/dist/pi/packages/ta-feedback/README.md +10 -0
- package/dist/pi/packages/ta-feedback/extension/index.mjs +451 -0
- package/dist/pi/packages/ta-feedback/host/index.mjs +1187 -0
- package/dist/pi/packages/ta-feedback/lib/extension.d.ts +31 -0
- package/dist/pi/packages/ta-feedback/lib/extension.js +160 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-git.d.ts +25 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-git.js +44 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-host.d.ts +133 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-host.js +668 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-protocol.d.ts +127 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-protocol.js +41 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-util.d.ts +79 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-util.js +252 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-view.d.ts +11 -0
- package/dist/pi/packages/ta-feedback/lib/feedback-view.js +244 -0
- package/dist/pi/packages/ta-feedback/lib/host.d.ts +8 -0
- package/dist/pi/packages/ta-feedback/lib/host.js +19 -0
- package/dist/pi/packages/ta-feedback/lib/i18n.d.ts +69 -0
- package/dist/pi/packages/ta-feedback/lib/i18n.js +250 -0
- package/dist/pi/packages/ta-feedback/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-feedback/lib/index.js +88 -0
- package/dist/pi/packages/ta-feedback/lib/page.d.ts +35 -0
- package/dist/pi/packages/ta-feedback/lib/page.js +135 -0
- package/dist/pi/packages/ta-feedback/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-feedback/lib/react.js +8 -0
- package/dist/pi/packages/ta-feedback/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-feedback/lib/style.js +71 -0
- package/dist/pi/packages/ta-feedback/package.json +65 -0
- package/dist/pi/packages/ta-feedback/web/index.js +939 -0
- package/dist/pi/packages/ta-games/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-games/lib/style.js +1 -1
- package/dist/pi/packages/ta-games/package.json +1 -1
- package/dist/pi/packages/ta-games/web/index.js +1 -1
- package/dist/pi/packages/ta-glance/extension/index.mjs +27 -8
- package/dist/pi/packages/ta-glance/lib/card.js +67 -27
- package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/glance-json.js +8 -1
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +3 -3
- package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +9 -2
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +33 -5
- package/dist/pi/packages/ta-glance/lib/glance-speech.d.ts +13 -0
- package/dist/pi/packages/ta-glance/lib/glance-speech.js +45 -0
- package/dist/pi/packages/ta-glance/lib/i18n.d.ts +5 -0
- package/dist/pi/packages/ta-glance/lib/i18n.js +20 -0
- package/dist/pi/packages/ta-glance/lib/index.js +11 -1
- package/dist/pi/packages/ta-glance/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/style.js +17 -3
- package/dist/pi/packages/ta-glance/package.json +2 -1
- package/dist/pi/packages/ta-glance/web/index.js +180 -30
- package/dist/pi/packages/ta-initiative/extension/index.mjs +3 -2
- package/dist/pi/packages/ta-initiative/host/index.mjs +1 -1
- package/dist/pi/packages/ta-initiative/lib/chat-proposals.js +1 -1
- package/dist/pi/packages/ta-initiative/lib/index.js +1 -0
- package/dist/pi/packages/ta-initiative/lib/material-util.js +1 -1
- package/dist/pi/packages/ta-initiative/lib/settings.js +2 -1
- package/dist/pi/packages/ta-initiative/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-initiative/lib/style.js +1 -1
- package/dist/pi/packages/ta-initiative/package.json +1 -1
- package/dist/pi/packages/ta-initiative/web/index.js +5 -3
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +1 -1
- package/dist/pi/packages/ta-manual/lib/pictures-c.js +15 -0
- package/dist/pi/packages/ta-manual/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-manual/lib/style.js +1 -1
- package/dist/pi/packages/ta-manual/lib/topics-a.d.ts +3 -0
- package/dist/pi/packages/ta-manual/lib/topics-a.js +295 -0
- package/dist/pi/packages/ta-manual/lib/topics-model.d.ts +46 -0
- package/dist/pi/packages/ta-manual/lib/topics-model.js +21 -0
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +1 -44
- package/dist/pi/packages/ta-manual/lib/topics.js +28 -318
- package/dist/pi/packages/ta-manual/package.json +1 -1
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +12 -10
- package/dist/pi/packages/ta-manual/web/index.js +97 -24
- package/dist/pi/packages/ta-moments/extension/index.mjs +702 -191
- package/dist/pi/packages/ta-moments/host/index.mjs +1361 -837
- package/dist/pi/packages/ta-moments/lib/index.js +3 -1
- package/dist/pi/packages/ta-moments/lib/moments-host-base.d.ts +96 -0
- package/dist/pi/packages/ta-moments/lib/moments-host-base.js +276 -0
- package/dist/pi/packages/ta-moments/lib/moments-host-pictures.d.ts +22 -0
- package/dist/pi/packages/ta-moments/lib/moments-host-pictures.js +167 -0
- package/dist/pi/packages/ta-moments/lib/moments-host.d.ts +4 -84
- package/dist/pi/packages/ta-moments/lib/moments-host.js +13 -426
- package/dist/pi/packages/ta-moments/lib/page.js +3 -3
- package/dist/pi/packages/ta-moments/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-moments/lib/style.js +1 -1
- package/dist/pi/packages/ta-moments/lib/talk-host-base.d.ts +71 -0
- package/dist/pi/packages/ta-moments/lib/talk-host-base.js +171 -0
- package/dist/pi/packages/ta-moments/lib/talk-host.d.ts +3 -62
- package/dist/pi/packages/ta-moments/lib/talk-host.js +14 -169
- package/dist/pi/packages/ta-moments/package.json +1 -1
- package/dist/pi/packages/ta-moments/web/index.js +648 -144
- package/dist/pi/packages/ta-nearby/extension/index.mjs +9 -0
- package/dist/pi/packages/ta-nearby/host/index.mjs +1073 -1018
- package/dist/pi/packages/ta-nearby/lib/index.js +8 -5
- package/dist/pi/packages/ta-nearby/lib/nearby-home.d.ts +13 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-home.js +91 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-meet-view.d.ts +12 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-meet-view.js +113 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-page.d.ts +6 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-page.js +157 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service-base.d.ts +161 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service-base.js +343 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service-meet.d.ts +41 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service-meet.js +297 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-service.d.ts +6 -167
- package/dist/pi/packages/ta-nearby/lib/nearby-service.js +38 -638
- package/dist/pi/packages/ta-nearby/lib/nearby-show-view.d.ts +6 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-show-view.js +88 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-spot.d.ts +6 -0
- package/dist/pi/packages/ta-nearby/lib/nearby-spot.js +25 -3
- package/dist/pi/packages/ta-nearby/lib/page.d.ts +27 -20
- package/dist/pi/packages/ta-nearby/lib/page.js +15 -417
- package/dist/pi/packages/ta-nearby/lib/server-texts.d.ts +1 -1
- package/dist/pi/packages/ta-nearby/lib/server-texts.js +9 -1
- package/dist/pi/packages/ta-nearby/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-nearby/lib/style.js +1 -1
- package/dist/pi/packages/ta-nearby/package.json +1 -1
- package/dist/pi/packages/ta-nearby/web/index.js +370 -362
- package/dist/pi/packages/ta-notify/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-notify/lib/settings.js +1 -0
- package/dist/pi/packages/ta-notify/package.json +1 -1
- package/dist/pi/packages/ta-notify/web/index.js +1 -0
- package/dist/pi/packages/ta-plot/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-plot/package.json +2 -1
- package/dist/pi/packages/ta-recall/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-recall/host/index.mjs +1 -0
- package/dist/pi/packages/ta-recall/lib/settings.js +1 -0
- package/dist/pi/packages/ta-recall/package.json +1 -1
- package/dist/pi/packages/ta-recall/web/index.js +2 -0
- package/dist/pi/packages/ta-rooms/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-rooms/host/index.mjs +497 -492
- package/dist/pi/packages/ta-rooms/lib/double-agents.js +6 -6
- package/dist/pi/packages/ta-rooms/lib/double-grants.js +10 -10
- package/dist/pi/packages/ta-rooms/lib/double-host.js +6 -5
- package/dist/pi/packages/ta-rooms/lib/double-tasks-base.d.ts +55 -0
- package/dist/pi/packages/ta-rooms/lib/double-tasks-base.js +279 -0
- package/dist/pi/packages/ta-rooms/lib/double-tasks.d.ts +3 -45
- package/dist/pi/packages/ta-rooms/lib/double-tasks.js +14 -282
- package/dist/pi/packages/ta-rooms/lib/double-user.js +2 -2
- package/dist/pi/packages/ta-rooms/lib/friend-notices.js +2 -2
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +1 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +8 -4
- package/dist/pi/packages/ta-rooms/lib/index.js +18 -2
- package/dist/pi/packages/ta-rooms/lib/members-view.js +37 -3
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +36 -1
- package/dist/pi/packages/ta-rooms/lib/page.js +76 -1
- package/dist/pi/packages/ta-rooms/lib/room-view.js +22 -17
- package/dist/pi/packages/ta-rooms/lib/rooms-home.js +1 -0
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-rooms/lib/style.js +32 -6
- package/dist/pi/packages/ta-rooms/package.json +1 -1
- package/dist/pi/packages/ta-rooms/web/index.js +223 -38
- package/dist/pi/packages/ta-secrets/README.en.md +22 -0
- package/dist/pi/packages/ta-secrets/README.md +22 -0
- package/dist/pi/packages/ta-secrets/extension/index.mjs +462 -0
- package/dist/pi/packages/ta-secrets/host/index.mjs +1341 -0
- package/dist/pi/packages/ta-secrets/lib/command-prelude.d.ts +36 -0
- package/dist/pi/packages/ta-secrets/lib/command-prelude.js +66 -0
- package/dist/pi/packages/ta-secrets/lib/extension.d.ts +28 -0
- package/dist/pi/packages/ta-secrets/lib/extension.js +156 -0
- package/dist/pi/packages/ta-secrets/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-secrets/lib/host.js +15 -0
- package/dist/pi/packages/ta-secrets/lib/i18n.d.ts +47 -0
- package/dist/pi/packages/ta-secrets/lib/i18n.js +166 -0
- package/dist/pi/packages/ta-secrets/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-secrets/lib/index.js +28 -0
- package/dist/pi/packages/ta-secrets/lib/personal-info.d.ts +26 -0
- package/dist/pi/packages/ta-secrets/lib/personal-info.js +108 -0
- package/dist/pi/packages/ta-secrets/lib/proxy-certs.d.ts +40 -0
- package/dist/pi/packages/ta-secrets/lib/proxy-certs.js +200 -0
- package/dist/pi/packages/ta-secrets/lib/proxy-scenario.d.ts +6 -0
- package/dist/pi/packages/ta-secrets/lib/proxy-scenario.js +91 -0
- package/dist/pi/packages/ta-secrets/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-secrets/lib/react.js +8 -0
- package/dist/pi/packages/ta-secrets/lib/scrubber.d.ts +20 -0
- package/dist/pi/packages/ta-secrets/lib/scrubber.js +70 -0
- package/dist/pi/packages/ta-secrets/lib/secrets-protocol.d.ts +106 -0
- package/dist/pi/packages/ta-secrets/lib/secrets-protocol.js +134 -0
- package/dist/pi/packages/ta-secrets/lib/server-texts.d.ts +14 -0
- package/dist/pi/packages/ta-secrets/lib/server-texts.js +62 -0
- package/dist/pi/packages/ta-secrets/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-secrets/lib/settings.js +179 -0
- package/dist/pi/packages/ta-secrets/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-secrets/lib/style.js +32 -0
- package/dist/pi/packages/ta-secrets/lib/vault-fixture.d.ts +8 -0
- package/dist/pi/packages/ta-secrets/lib/vault-fixture.js +22 -0
- package/dist/pi/packages/ta-secrets/lib/vault-proxy.d.ts +94 -0
- package/dist/pi/packages/ta-secrets/lib/vault-proxy.js +357 -0
- package/dist/pi/packages/ta-secrets/lib/vault-service.d.ts +111 -0
- package/dist/pi/packages/ta-secrets/lib/vault-service.js +429 -0
- package/dist/pi/packages/ta-secrets/lib/vault-store.d.ts +48 -0
- package/dist/pi/packages/ta-secrets/lib/vault-store.js +107 -0
- package/dist/pi/packages/ta-secrets/package.json +67 -0
- package/dist/pi/packages/ta-secrets/web/index.js +579 -0
- package/dist/pi/packages/ta-share/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-share/host/index.mjs +172 -21
- package/dist/pi/packages/ta-share/lib/i18n.d.ts +1 -0
- package/dist/pi/packages/ta-share/lib/i18n.js +4 -0
- package/dist/pi/packages/ta-share/lib/index.js +1 -1
- package/dist/pi/packages/ta-share/lib/share-dialog.js +1 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-share/lib/share-service.d.ts +11 -1
- package/dist/pi/packages/ta-share/lib/share-service.js +62 -4
- package/dist/pi/packages/ta-share/lib/snapshot.d.ts +8 -2
- package/dist/pi/packages/ta-share/lib/snapshot.js +93 -7
- package/dist/pi/packages/ta-share/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-share/lib/style.js +1 -1
- package/dist/pi/packages/ta-share/package.json +1 -1
- package/dist/pi/packages/ta-share/web/index.js +7 -2
- package/dist/pi/packages/ta-sync/host/index.mjs +1154 -755
- package/dist/pi/packages/ta-sync/lib/host.js +3 -0
- package/dist/pi/packages/ta-sync/lib/index.js +6 -2
- package/dist/pi/packages/ta-sync/lib/migrate-archive.d.ts +8 -6
- package/dist/pi/packages/ta-sync/lib/migrate-archive.js +24 -28
- package/dist/pi/packages/ta-sync/lib/migrate-i18n.d.ts +10 -0
- package/dist/pi/packages/ta-sync/lib/migrate-i18n.js +40 -0
- package/dist/pi/packages/ta-sync/lib/migrate-paths.d.ts +24 -0
- package/dist/pi/packages/ta-sync/lib/migrate-paths.js +230 -0
- package/dist/pi/packages/ta-sync/lib/migrate-protocol.d.ts +18 -0
- package/dist/pi/packages/ta-sync/lib/migrate-service.d.ts +11 -1
- package/dist/pi/packages/ta-sync/lib/migrate-service.js +28 -1
- package/dist/pi/packages/ta-sync/lib/move-panel.d.ts +9 -1
- package/dist/pi/packages/ta-sync/lib/move-panel.js +69 -5
- package/dist/pi/packages/ta-sync/lib/server-texts.d.ts +1 -0
- package/dist/pi/packages/ta-sync/lib/server-texts.js +9 -0
- package/dist/pi/packages/ta-sync/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-sync/lib/style.js +8 -1
- package/dist/pi/packages/ta-sync/lib/sync-service-base.d.ts +78 -0
- package/dist/pi/packages/ta-sync/lib/sync-service-base.js +224 -0
- package/dist/pi/packages/ta-sync/lib/sync-service-space.d.ts +36 -0
- package/dist/pi/packages/ta-sync/lib/sync-service-space.js +210 -0
- package/dist/pi/packages/ta-sync/lib/sync-service.d.ts +3 -99
- package/dist/pi/packages/ta-sync/lib/sync-service.js +2 -412
- package/dist/pi/packages/ta-sync/package.json +1 -1
- package/dist/pi/packages/ta-sync/web/index.js +138 -5
- package/dist/pi/packages/ta-sync-cloud/package.json +1 -1
- package/dist/pi/packages/ta-team/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-team/host/index.mjs +1 -0
- package/dist/pi/packages/ta-team/lib/dialogs.d.ts +0 -2
- package/dist/pi/packages/ta-team/lib/dialogs.js +0 -227
- package/dist/pi/packages/ta-team/lib/i18n-ja.d.ts +3 -0
- package/dist/pi/packages/ta-team/lib/i18n-ja.js +211 -0
- package/dist/pi/packages/ta-team/lib/i18n-zh-tw.d.ts +3 -0
- package/dist/pi/packages/ta-team/lib/i18n-zh-tw.js +211 -0
- package/dist/pi/packages/ta-team/lib/i18n-zh.d.ts +3 -0
- package/dist/pi/packages/ta-team/lib/i18n-zh.js +211 -0
- package/dist/pi/packages/ta-team/lib/i18n.d.ts +1 -2
- package/dist/pi/packages/ta-team/lib/i18n.js +6 -624
- package/dist/pi/packages/ta-team/lib/index.js +3 -1
- package/dist/pi/packages/ta-team/lib/join-dialog.d.ts +3 -0
- package/dist/pi/packages/ta-team/lib/join-dialog.js +234 -0
- package/dist/pi/packages/ta-team/lib/members-tab.js +2 -1
- package/dist/pi/packages/ta-team/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-team/lib/style.js +1 -1
- package/dist/pi/packages/ta-team/package.json +1 -1
- package/dist/pi/packages/ta-team/web/index.js +2095 -2086
- package/dist/pi/packages/ta-usage/README.en.md +6 -0
- package/dist/pi/packages/ta-usage/README.md +6 -0
- package/dist/pi/packages/ta-usage/host/index.mjs +220 -0
- package/dist/pi/packages/ta-usage/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-usage/lib/host.js +9 -0
- package/dist/pi/packages/ta-usage/lib/i18n.d.ts +30 -0
- package/dist/pi/packages/ta-usage/lib/i18n.js +98 -0
- package/dist/pi/packages/ta-usage/lib/index.d.ts +4 -0
- package/dist/pi/packages/ta-usage/lib/index.js +20 -0
- package/dist/pi/packages/ta-usage/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-usage/lib/react.js +8 -0
- package/dist/pi/packages/ta-usage/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-usage/lib/style.js +53 -0
- package/dist/pi/packages/ta-usage/lib/usage-host.d.ts +25 -0
- package/dist/pi/packages/ta-usage/lib/usage-host.js +70 -0
- package/dist/pi/packages/ta-usage/lib/usage-protocol.d.ts +55 -0
- package/dist/pi/packages/ta-usage/lib/usage-protocol.js +7 -0
- package/dist/pi/packages/ta-usage/lib/usage-util.d.ts +18 -0
- package/dist/pi/packages/ta-usage/lib/usage-util.js +159 -0
- package/dist/pi/packages/ta-usage/lib/usage-view.d.ts +9 -0
- package/dist/pi/packages/ta-usage/lib/usage-view.js +91 -0
- package/dist/pi/packages/ta-usage/package.json +61 -0
- package/dist/pi/packages/ta-usage/web/index.js +471 -0
- package/dist/pi/packages/ta-voice/README.en.md +8 -0
- package/dist/pi/packages/ta-voice/README.md +8 -0
- package/dist/pi/packages/ta-voice/host/index.mjs +662 -0
- package/dist/pi/packages/ta-voice/lib/doubao-frames.d.ts +44 -0
- package/dist/pi/packages/ta-voice/lib/doubao-frames.js +116 -0
- package/dist/pi/packages/ta-voice/lib/doubao-realtime.d.ts +35 -0
- package/dist/pi/packages/ta-voice/lib/doubao-realtime.js +172 -0
- package/dist/pi/packages/ta-voice/lib/host.d.ts +20 -0
- package/dist/pi/packages/ta-voice/lib/host.js +120 -0
- package/dist/pi/packages/ta-voice/lib/openai-realtime.d.ts +73 -0
- package/dist/pi/packages/ta-voice/lib/openai-realtime.js +257 -0
- package/dist/pi/packages/ta-voice/lib/realtime-socket.d.ts +23 -0
- package/dist/pi/packages/ta-voice/lib/realtime-socket.js +80 -0
- package/dist/pi/packages/ta-voice/package.json +67 -0
- package/dist/pi/packages/ta-workspace/README.md +1 -1
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
- package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +4 -0
- package/dist/pi/packages/ta-workspace/lib/browser-common.js +1 -0
- package/dist/pi/packages/ta-workspace/lib/browser-pick.d.ts +49 -0
- package/dist/pi/packages/ta-workspace/lib/browser-pick.js +166 -0
- package/dist/pi/packages/ta-workspace/lib/browser-webview.js +16 -1
- package/dist/pi/packages/ta-workspace/lib/i18n-en.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/i18n-en.js +215 -0
- package/dist/pi/packages/ta-workspace/lib/i18n-ja.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/i18n-ja.js +215 -0
- package/dist/pi/packages/ta-workspace/lib/i18n-zh-tw.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/i18n-zh-tw.js +215 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +7 -3
- package/dist/pi/packages/ta-workspace/lib/i18n.js +11 -621
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +1464 -765
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-FSEuUCgT.js → abnfDiagram-S7VZAUFO-w8qXXVn-.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-Do_DyWCg.js → architecture-WOLXFQ4H-B-FHaYwY.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-D-N2qDs4.js → architectureDiagram-YGSQEFNW-DTnoGaaX.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-Ds6DzHNZ.js → blockDiagram-APKKGZFW-CyeBzv-v.js} +1 -1
- package/dist/public/assets/{browser-D2BcOPKG.js → browser-Cb38iiEE.js} +1 -1
- package/dist/public/assets/{browser-KlrZxPbE.js → browser-DXexCqIh.js} +2 -2
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-D5ZdqxrP.js → c4Diagram-KJ2TOQU5-CJJqDqyQ.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-CWOwhB3b.js → chunk-6MUBBAK2-DbvUMdNm.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-Dr6p2RGg.js → chunk-AXFCVDMN-D4hlZGtj.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-DUCV_pmW.js → chunk-BG4553SI-VNa9Q9On.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-Yxd3jIXM.js → chunk-DQASFODM-BtlEbc_V.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C24I15MF.js → chunk-HFQBQIA3-CAYSo4CJ.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-Dxk-aejD.js → chunk-KQLB2F66-CyKdg6hW.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-DPyr7gb8.js → chunk-KS47KZWR-BMogCB2r.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-D_mEFJGR.js → chunk-LEVMRMFU-Y9wr-8qB.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-DfMFxQib.js → chunk-M57EVK23-DL3IAQKR.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-O9W83Laa.js → chunk-OY52VR5R-CJBFHdg6.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-IdikGcw1.js → chunk-QB3YPZ4I-CyuWKZZv.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-DLpaFCvz.js → chunk-R3KSYZAL-DxvGhfpm.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-Lx-CZ4Ql.js → chunk-STOXU5M4-Cpdl6bfz.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-DCnr5NsA.js → chunk-TU62E6Q5-CIxOg6QF.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-Ct7aUJFY.js → chunk-X4PVCEUW-DCFSCRBh.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-CQhxfoYw.js → chunk-XXDRQBXY-B2R8Cxf7.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-DPSu5qYq.js → classDiagram-v2-L25IHNXF-B7W9HSbj.js} +1 -1
- package/dist/public/assets/{client-C8gi9Fk2.js → client-D75LfyFa.js} +1 -1
- package/dist/public/assets/{common-DrZR0tgm.js → common-CjqTomRQ.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-CFimsFsN.js → cose-bilkent-JH36ORCC-CXSLFyCH.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-BIcbDns7.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-CiAWhkVp.js → cynefinDiagram-L36ESFBY-DTv0Kn1r.js} +1 -1
- package/dist/public/assets/{d3-selection-C8RIDfkO.js → d3-selection-g4Hl3_NH.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-l1nRD1Fx.js → dagre-SPEB5RXH-BujVqk5R.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-ipqtnhoX.js → diagram-3B7GL73J-Ds-VnLzP.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-VpIcHRUP.js → diagram-DNEMPZML-BBoIIK-a.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-8VdVmcS6.js → diagram-L3MUGCDN-Glgd5N_n.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-Bej-aiF0.js → diagram-LA4NIPWU-B4EODdUU.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-D8gW4bVQ.js → diagram-MHCOC4E2-pzDDXO2J.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-BMevAJ1M.js → diagram-XPFHEONP-l--gwSuK.js} +1 -1
- package/dist/public/assets/{dist-DBKJcjvW.js → dist-C0u3lAFR.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-C3HDTOzn.js → ebnfDiagram-UZSYDL2S-BVfPeaVX.js} +1 -1
- package/dist/public/assets/{editor.api-BMWdjwhK.js → editor.api-BMcewI3C.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-XOOPrVin.js → elk-XV6XMXQE-BFJtUnG9.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-Cr-vwx1l.js → erDiagram-EYBAPDEH-BWxMtfIc.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-DbPhpfxn.js → eventmodeling-K75KTNOO-YwYgBgCX.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-Dah4--NW.js +1 -0
- package/dist/public/assets/{freemarker2-6h_1-8qB.js → freemarker2-B8HquI7K.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-C7kNPXx3.js → ganttDiagram-23REXITY-CBqv7wbi.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BwDfrSZS.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CVnEJEZr.js → gitGraphDiagram-STJD7YCW-BLSf23f_.js} +1 -1
- package/dist/public/assets/{handlebars-F4lp3oLr.js → handlebars-P1qmNq4N.js} +1 -1
- package/dist/public/assets/{html-Dj6f8B_g.js → html-Ceswbytr.js} +1 -1
- package/dist/public/assets/{index-DnNrrk68.js → index-10isUUN4.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-Ch8aMV1p.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-DcttQWdp.js → infoDiagram-KBXO4MBG-LvOtgUlm.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-BSUYTZf6.js → ishikawaDiagram-M35NCXHK-CwUZOvcm.js} +1 -1
- package/dist/public/assets/{javascript-b_BkOE5Y.js → javascript-B3FXC8qR.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-BCfd5-6n.js → journeyDiagram-OPLOXDXO-5j1KtwTt.js} +1 -1
- package/dist/public/assets/{jsonMode-Cq5QJbVZ.js → jsonMode-CrCyxNQI.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-B3nenaw_.js → kanban-definition-BZKZHSQY-BKAB5id1.js} +1 -1
- package/dist/public/assets/{liquid-CGuZI_Aa.js → liquid-CXZRIgp2.js} +1 -1
- package/dist/public/assets/{mdx-Dt9yTqnf.js → mdx-Dm3uNczM.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-CquzROwT.js → mermaid-parser.core-C755A-rX.js} +3 -3
- package/dist/public/assets/{mermaid.core-Bx-e_Scq.js → mermaid.core-CQrYmFAR.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DyeewbnH.js → mindmap-definition-I2QAS2VK-DNJQKYbK.js} +1 -1
- package/dist/public/assets/module-9otB6_kX.js +1 -0
- package/dist/public/assets/{module-Cm_mLwAQ.js → module-C3jC5acf.js} +1 -1
- package/dist/public/assets/module-C_MyFORb.js +1 -0
- package/dist/public/assets/module-Cjpl4gva.js +1 -0
- package/dist/public/assets/{module-DUYj4E8T.js → module-D8yH9xCl.js} +1 -1
- package/dist/public/assets/module-DlHjBjOg.js +1 -0
- package/dist/public/assets/module-QsLiJaR6.js +1 -0
- package/dist/public/assets/module-aaW5Ri2L.js +2771 -0
- package/dist/public/assets/module-gSy9fKBo.js +1 -0
- package/dist/public/assets/{monaco-nvIdDTWu.js → monaco-BS7JBNW4.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-LqMrrc60.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-B884_KoR.js → pegDiagram-FD4XPPHP-BzbBCWht.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-BWzABXQU.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-I40wRwyy.js → pieDiagram-J4AKIIQI-Bf_LDukL.js} +1 -1
- package/dist/public/assets/{python-Djw4wvG9.js → python-jgOUhB-F.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-DyNOImfk.js → quadrantDiagram-XTYBLID2-CdMHWnKX.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-CR4kNiUj.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-BAkWtkGC.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-3G0zWzgf.js → railroad-abnf-LNEFI6M7-DQGYaRbc.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-B5XRDRWS.js → railroad-ebnf-DWYD2UWJ-D6Ljza0U.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-rcIioIyH.js → railroad-peg-JR7BVNR7-Du9hL1Gf.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-CDM2ahQM.js → railroadDiagram-MRQ6NCDL-CS_JnlGN.js} +1 -1
- package/dist/public/assets/{razor-CStezNUn.js → razor-BWj90God.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-hbb6WtfM.js → requirementDiagram-Y7LWUY3S-Cq8rRz2y.js} +1 -1
- package/dist/public/assets/{resolver-0zC31mg5.js → resolver-BPuspqws.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-DLV3Aoae.js → sankeyDiagram-WGJFYUXA-aK7jRBVK.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-BWxOV5U9.js → sequenceDiagram-5NDRBG5M-BxcIyc38.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-C-TaUPaQ.js → stateDiagram-v2-FJ4FJNEA-Ctletlj4.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-CJY0BFmc.js → swimlanes-UMQ2AFYF-DaD55xd2.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CytCT4x3.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-CUfQb8Gv.js → timeline-definition-SEUHKTQE-Ce19CDiJ.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-DvzNkX4G.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-BuUeBmMd.js +1 -0
- package/dist/public/assets/{typescript-B7kmi8MF.js → typescript-RgyfxmPQ.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-BKTVAp-G.js → usecaseDiagram-AFA6YXN4-CAVEBKQS.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-CN1RxNTS.js → vennDiagram-NNMJR3RB-DHyJxlHv.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-DSfdKACG.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-JJ6qcpu1.js → wardleyDiagram-S7YFUSEH-C-FCHxR7.js} +1 -1
- package/dist/public/assets/{xml-DVamlHEU.js → xml-DiA1T3iN.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-BNakYgUZ.js → xychartDiagram-GGNKY7IX-BlnHU6Gz.js} +1 -1
- package/dist/public/assets/{yaml-BihGeFrM.js → yaml-dnCcfJBR.js} +1 -1
- package/dist/public/ext/index.json +1 -0
- package/dist/public/ext/ta-3d.js +660 -0
- package/dist/public/ext/ta-glance.js +1611 -0
- package/dist/public/ext/ta-plot.js +1320 -0
- package/dist/public/index.html +2 -2
- package/dist/serve/index.mjs +10558 -7361
- package/package.json +45 -39
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dcc0sCHf.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-CDXqnHAQ.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-KPsoB6Z1.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CtM6s0SQ.js +0 -1
- package/dist/public/assets/module-C-ofp7U4.js +0 -1
- package/dist/public/assets/module-DDH-aU6z.js +0 -1
- package/dist/public/assets/module-DRofmFJn.js +0 -1
- package/dist/public/assets/module-MaD4hvv4.js +0 -1
- package/dist/public/assets/module-ZDJutm0b.js +0 -1
- package/dist/public/assets/module-dnDlIzeV.js +0 -2616
- package/dist/public/assets/module-qoBVcE5h.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-XKjiwdar.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-MuCMavHL.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Cq12GHJS.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-CfeMswZU.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DdFDl6aK.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-BQ4uUy4s.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-BFTTkjF9.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-BbyzsA8S.js +0 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TaskUtil = void 0;
|
|
4
4
|
const cron_protocol_1 = require("./cron-protocol");
|
|
5
5
|
const schedule_util_1 = require("./schedule-util");
|
|
6
|
+
const when_1 = require("./when");
|
|
6
7
|
const PROMPT_MAX = 20000;
|
|
7
8
|
const NAME_MAX = 80;
|
|
8
9
|
/** A prefix of an id names a task from this many characters on. */
|
|
@@ -16,11 +17,32 @@ var TaskUtil;
|
|
|
16
17
|
return `${prefix}_${Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('')}`;
|
|
17
18
|
}
|
|
18
19
|
TaskUtil.newId = newId;
|
|
20
|
+
/** The secret of a webhook: 24 random bytes, in hexadecimal. */
|
|
21
|
+
function newSecret() {
|
|
22
|
+
const bytes = new Uint8Array(24);
|
|
23
|
+
crypto.getRandomValues(bytes);
|
|
24
|
+
return Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');
|
|
25
|
+
}
|
|
26
|
+
TaskUtil.newSecret = newSecret;
|
|
27
|
+
/** A task of a webhook has a secret, and keeps the one it has; another has none. */
|
|
28
|
+
function withSecret(task) {
|
|
29
|
+
if (task.schedule.kind === 'webhook') {
|
|
30
|
+
return task.hookSecret ? task : { ...task, hookSecret: newSecret() };
|
|
31
|
+
}
|
|
32
|
+
if (!task.hookSecret) {
|
|
33
|
+
return task;
|
|
34
|
+
}
|
|
35
|
+
const { hookSecret: _gone, ...rest } = task;
|
|
36
|
+
return rest;
|
|
37
|
+
}
|
|
19
38
|
/** A new task, checked; throws with what is wrong. `cwd` is where it runs when the input names none. */
|
|
20
39
|
function create(input, cwd, now) {
|
|
21
40
|
var _a, _b;
|
|
22
41
|
const prompt = checkPrompt(input === null || input === void 0 ? void 0 : input.prompt);
|
|
23
|
-
const schedule =
|
|
42
|
+
const schedule = ruleOf(input, now);
|
|
43
|
+
if (!schedule) {
|
|
44
|
+
throw new Error(`A task needs when it runs: when, one of ${when_1.WHEN_FORMS}.`);
|
|
45
|
+
}
|
|
24
46
|
const at = now.toISOString();
|
|
25
47
|
const task = {
|
|
26
48
|
id: newId('task'),
|
|
@@ -35,7 +57,7 @@ var TaskUtil;
|
|
|
35
57
|
updatedAt: at,
|
|
36
58
|
};
|
|
37
59
|
setOptional(task, input);
|
|
38
|
-
return arm(task, now);
|
|
60
|
+
return arm(withSecret(task), now);
|
|
39
61
|
}
|
|
40
62
|
TaskUtil.create = create;
|
|
41
63
|
/** The task with the patch applied, its next run worked out again when its rule changed or it was turned on. */
|
|
@@ -55,18 +77,43 @@ var TaskUtil;
|
|
|
55
77
|
if (patch.enabled !== undefined) {
|
|
56
78
|
next.enabled = patch.enabled === true;
|
|
57
79
|
}
|
|
58
|
-
|
|
59
|
-
|
|
80
|
+
const schedule = ruleOf(patch, now);
|
|
81
|
+
if (schedule) {
|
|
82
|
+
next.schedule = schedule;
|
|
60
83
|
}
|
|
61
|
-
const rearm =
|
|
62
|
-
|
|
84
|
+
const rearm = schedule !== undefined || (next.enabled && !task.enabled);
|
|
85
|
+
const secured = withSecret(next);
|
|
86
|
+
return rearm ? arm(secured, now) : secured;
|
|
63
87
|
}
|
|
64
88
|
TaskUtil.patch = patch;
|
|
89
|
+
/**
|
|
90
|
+
* A task named by whoever made it is the only one of its name in its directory: an agent that runs again is
|
|
91
|
+
* told which task to change, rather than making a second one. A name made from the prompt may repeat.
|
|
92
|
+
*/
|
|
93
|
+
function unique(tasks, task, named) {
|
|
94
|
+
const twin = named ? tasks.find(other => other.name === task.name && other.cwd === task.cwd) : undefined;
|
|
95
|
+
if (twin) {
|
|
96
|
+
throw new Error(`A task named ${JSON.stringify(twin.name)} is already in ${twin.cwd} (${twin.id}): change it with update, or give the new one another name.`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
TaskUtil.unique = unique;
|
|
100
|
+
/** The rule of an input or a patch: its `when` in words, else its schedule; none when it says neither. */
|
|
101
|
+
function ruleOf(input, now) {
|
|
102
|
+
if (typeof (input === null || input === void 0 ? void 0 : input.when) === 'string' && input.when.trim()) {
|
|
103
|
+
return when_1.When.parse(input.when, now);
|
|
104
|
+
}
|
|
105
|
+
return (input === null || input === void 0 ? void 0 : input.schedule) === undefined ? undefined : schedule_util_1.ScheduleUtil.check(input.schedule);
|
|
106
|
+
}
|
|
107
|
+
TaskUtil.ruleOf = ruleOf;
|
|
65
108
|
/** Works out the next run of an enabled task from now; throws when its rule has none. */
|
|
66
109
|
function arm(task, now) {
|
|
67
110
|
if (!task.enabled) {
|
|
68
111
|
return task;
|
|
69
112
|
}
|
|
113
|
+
if (schedule_util_1.ScheduleUtil.isEvent(task.schedule)) {
|
|
114
|
+
const { nextRunAt: _none, ...rest } = task;
|
|
115
|
+
return rest;
|
|
116
|
+
}
|
|
70
117
|
const next = schedule_util_1.ScheduleUtil.next(task.schedule, now);
|
|
71
118
|
if (!next) {
|
|
72
119
|
throw new Error(task.schedule.kind === 'once'
|
|
@@ -188,19 +235,6 @@ var TaskUtil;
|
|
|
188
235
|
.trim();
|
|
189
236
|
}
|
|
190
237
|
TaskUtil.firstLine = firstLine;
|
|
191
|
-
/**
|
|
192
|
-
* The tasks of the list and those folded under it: a task that is off (paused, or run once and done) folds,
|
|
193
|
-
* unless it runs now or is one of `stay` (turned off on the page while it shows).
|
|
194
|
-
*/
|
|
195
|
-
function split(tasks, stay = new Set()) {
|
|
196
|
-
const listed = [];
|
|
197
|
-
const off = [];
|
|
198
|
-
for (const task of tasks) {
|
|
199
|
-
(task.enabled || task.lastStatus === 'running' || stay.has(task.id) ? listed : off).push(task);
|
|
200
|
-
}
|
|
201
|
-
return [listed, off];
|
|
202
|
-
}
|
|
203
|
-
TaskUtil.split = split;
|
|
204
238
|
/** Whether a run of the task ended long enough ago, by its rule, to be called missed: a task that runs once, past its grace. */
|
|
205
239
|
function missed(task, now) {
|
|
206
240
|
return task.schedule.kind === 'once' && !!task.nextRunAt && now.getTime() - new Date(task.nextRunAt).getTime() > cron_protocol_1.Limits.GRACE_MS;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Task } from './cron-protocol';
|
|
2
|
+
/** Watches `path`, calling `changed` with each file that changes; returns what stops it (SchedulerOptions.watch). */
|
|
3
|
+
export type Watch = (path: string, changed: (file: string) => void) => () => void;
|
|
4
|
+
/** A task that runs when files change: what changed since its run was asked for, and when it is. */
|
|
5
|
+
interface Watching {
|
|
6
|
+
path: string;
|
|
7
|
+
stop(): void;
|
|
8
|
+
files: Set<string>;
|
|
9
|
+
more: number;
|
|
10
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
11
|
+
}
|
|
12
|
+
/** `path` of `cwd`, unless it is absolute. */
|
|
13
|
+
export declare function resolvePath(cwd: string, path: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* The watches of the tasks run when files change (CronScheduler): one a task while it is on, of its path; what
|
|
16
|
+
* changes is told once the files rested `quietMs`, all that changed together (at most EVENT_FILES named).
|
|
17
|
+
*/
|
|
18
|
+
export declare class TaskWatchers {
|
|
19
|
+
protected readonly watch: Watch | undefined;
|
|
20
|
+
protected readonly quietMs: number;
|
|
21
|
+
protected readonly fire: (taskId: string, event: string) => void;
|
|
22
|
+
protected readonly watching: Map<string, Watching>;
|
|
23
|
+
constructor(watch: Watch | undefined, quietMs: number, fire: (taskId: string, event: string) => void);
|
|
24
|
+
/** Watches the paths of the enabled tasks of files, and no others; none at all once `off`. */
|
|
25
|
+
sync(tasks: readonly Task[], off?: boolean): void;
|
|
26
|
+
protected unwatch(id: string): void;
|
|
27
|
+
protected changed(id: string, watching: Watching, file: string): void;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=task-watchers.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskWatchers = void 0;
|
|
4
|
+
exports.resolvePath = resolvePath;
|
|
5
|
+
const cron_protocol_1 = require("./cron-protocol");
|
|
6
|
+
/** Changes no one wants a run for: of version control, dependencies, builds. */
|
|
7
|
+
const UNWATCHED = /(^|[\\/])(\.git|node_modules|\.turbo|\.next|dist|lib|esm|build|\.cell|\.DS_Store)([\\/]|$)|~$|\.swp$/;
|
|
8
|
+
/** `path` of `cwd`, unless it is absolute. */
|
|
9
|
+
function resolvePath(cwd, path) {
|
|
10
|
+
if (path.startsWith('/') || /^[A-Za-z]:[\\/]/.test(path)) {
|
|
11
|
+
return path;
|
|
12
|
+
}
|
|
13
|
+
const base = cwd.replace(/[\\/]+$/, '');
|
|
14
|
+
return path === '.' || path === './' ? base : `${base}/${path.replace(/^\.\//, '')}`;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The watches of the tasks run when files change (CronScheduler): one a task while it is on, of its path; what
|
|
18
|
+
* changes is told once the files rested `quietMs`, all that changed together (at most EVENT_FILES named).
|
|
19
|
+
*/
|
|
20
|
+
class TaskWatchers {
|
|
21
|
+
constructor(watch, quietMs, fire) {
|
|
22
|
+
this.watch = watch;
|
|
23
|
+
this.quietMs = quietMs;
|
|
24
|
+
this.fire = fire;
|
|
25
|
+
this.watching = new Map();
|
|
26
|
+
}
|
|
27
|
+
/** Watches the paths of the enabled tasks of files, and no others; none at all once `off`. */
|
|
28
|
+
sync(tasks, off = false) {
|
|
29
|
+
const wanted = new Map();
|
|
30
|
+
if (!off && this.watch) {
|
|
31
|
+
for (const task of tasks) {
|
|
32
|
+
if (task.enabled && task.schedule.kind === 'watch' && !task.cwd.includes('://')) {
|
|
33
|
+
wanted.set(task.id, resolvePath(task.cwd, task.schedule.path));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const [id, watching] of [...this.watching]) {
|
|
38
|
+
if (wanted.get(id) !== watching.path) {
|
|
39
|
+
this.unwatch(id);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
for (const [id, path] of wanted) {
|
|
43
|
+
if (this.watching.has(id) || !this.watch) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const watching = { path, stop: () => undefined, files: new Set(), more: 0 };
|
|
47
|
+
try {
|
|
48
|
+
watching.stop = this.watch(path, file => this.changed(id, watching, file));
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.error(`${cron_protocol_1.NAME}: cannot watch ${path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
this.watching.set(id, watching);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
unwatch(id) {
|
|
58
|
+
const watching = this.watching.get(id);
|
|
59
|
+
if (watching) {
|
|
60
|
+
clearTimeout(watching.timer);
|
|
61
|
+
watching.stop();
|
|
62
|
+
this.watching.delete(id);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
changed(id, watching, file) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
if (UNWATCHED.test(file) || this.watching.get(id) !== watching) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (watching.files.size < cron_protocol_1.Limits.EVENT_FILES) {
|
|
71
|
+
watching.files.add(file);
|
|
72
|
+
}
|
|
73
|
+
else if (!watching.files.has(file)) {
|
|
74
|
+
watching.more++;
|
|
75
|
+
}
|
|
76
|
+
clearTimeout(watching.timer);
|
|
77
|
+
watching.timer = setTimeout(() => {
|
|
78
|
+
const files = [...watching.files];
|
|
79
|
+
const more = watching.more;
|
|
80
|
+
watching.files.clear();
|
|
81
|
+
watching.more = 0;
|
|
82
|
+
if (files.length > 0) {
|
|
83
|
+
this.fire(id, `Files changed in ${watching.path}:\n${files.map(name => `- ${name}`).join('\n')}${more ? `\n…and ${more} more` : ''}`);
|
|
84
|
+
}
|
|
85
|
+
}, this.quietMs);
|
|
86
|
+
(_b = (_a = watching.timer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.TaskWatchers = TaskWatchers;
|
|
90
|
+
//# sourceMappingURL=task-watchers.js.map
|
|
@@ -4,8 +4,9 @@ export declare function TasksHead({ client }: {
|
|
|
4
4
|
client: CronClient;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
6
6
|
/**
|
|
7
|
-
* The page of the tasks:
|
|
8
|
-
*
|
|
7
|
+
* The page of the tasks: those that are on, grouped by when they run next (today, tomorrow, this week, later, when
|
|
8
|
+
* something happens), and a tab each for those whose last run failed and those that are off. It scrolls in its own
|
|
9
|
+
* box, the main area giving it what is left under the head.
|
|
9
10
|
*/
|
|
10
11
|
export declare function TasksPage({ client }: {
|
|
11
12
|
client: CronClient;
|
|
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TasksHead = TasksHead;
|
|
4
4
|
exports.TasksPage = TasksPage;
|
|
5
5
|
const editor_1 = require("./editor");
|
|
6
|
+
const form_util_1 = require("./form-util");
|
|
6
7
|
const page_1 = require("./page");
|
|
7
8
|
const pictures_1 = require("./pictures");
|
|
8
9
|
const react_1 = require("./react");
|
|
9
10
|
const schedule_util_1 = require("./schedule-util");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
return react_1.React.useSyncExternalStore(listener => client.subscribe(listener), () => client.state);
|
|
13
|
-
}
|
|
11
|
+
const task_list_1 = require("./task-list");
|
|
12
|
+
const task_row_1 = require("./task-row");
|
|
14
13
|
/** Seconds pass: what says "in 5 minutes" says it again. */
|
|
15
14
|
function useMinute() {
|
|
16
15
|
const [now, setNow] = react_1.React.useState(Date.now());
|
|
@@ -20,17 +19,6 @@ function useMinute() {
|
|
|
20
19
|
}, []);
|
|
21
20
|
return now;
|
|
22
21
|
}
|
|
23
|
-
async function guard(action) {
|
|
24
|
-
try {
|
|
25
|
-
await action();
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
page_1.pi.ui.notify((0, page_1.t)('failedAction', { message: (0, page_1.message)(error) }), 'error');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function Dot({ status, enabled = true }) {
|
|
32
|
-
return react_1.React.createElement("span", { className: `tcr-dot tcr-${enabled ? (status !== null && status !== void 0 ? status : 'idle') : 'off'}` });
|
|
33
|
-
}
|
|
34
22
|
/** A clock whose hand goes round, for the page without tasks. */
|
|
35
23
|
function Clock() {
|
|
36
24
|
return (react_1.React.createElement("svg", { className: "tcr-clock", viewBox: "0 0 120 120", "aria-hidden": "true" },
|
|
@@ -41,20 +29,20 @@ function Clock() {
|
|
|
41
29
|
react_1.React.createElement("circle", { cx: "60", cy: "60", r: "3.5", className: "tcr-clock-pin" })));
|
|
42
30
|
}
|
|
43
31
|
const EXAMPLES = [
|
|
44
|
-
{ text: 'example1', repeat: '
|
|
45
|
-
{ text: 'example2', repeat: 'every', rule: '30m', picture: 'checks' },
|
|
46
|
-
{ text: 'example3', repeat: '
|
|
32
|
+
{ text: 'example1', editing: { repeat: 'days', time: '09:00' }, rule: '0 9 * * *', picture: 'commits' },
|
|
33
|
+
{ text: 'example2', editing: { repeat: 'every' }, rule: '30m', picture: 'checks' },
|
|
34
|
+
{ text: 'example3', editing: { repeat: 'days', days: form_util_1.FormUtil.WEEKDAYS, time: '18:00' }, rule: '0 18 * * 1-5', picture: 'report' },
|
|
47
35
|
];
|
|
48
36
|
function Empty({ onPick }) {
|
|
49
37
|
const PictureCards = page_1.pi.ui.PictureCards;
|
|
50
38
|
const cards = EXAMPLES.map(example => {
|
|
51
|
-
const schedule = example.repeat === 'every' ? { kind: 'interval', every: example.rule } : { kind: 'cron', expression: example.rule };
|
|
39
|
+
const schedule = example.editing.repeat === 'every' ? { kind: 'interval', every: example.rule } : { kind: 'cron', expression: example.rule };
|
|
52
40
|
return {
|
|
53
41
|
key: example.text,
|
|
54
42
|
picture: react_1.React.createElement(pictures_1.ExampleArt, { picture: example.picture }),
|
|
55
43
|
label: (0, page_1.t)(example.text),
|
|
56
44
|
hint: schedule_util_1.ScheduleUtil.describe(schedule, page_1.pi.ui.language),
|
|
57
|
-
onPick: () => onPick({ prompt: (0, page_1.t)(example.text)
|
|
45
|
+
onPick: () => onPick({ ...example.editing, prompt: (0, page_1.t)(example.text) }),
|
|
58
46
|
};
|
|
59
47
|
});
|
|
60
48
|
return (react_1.React.createElement("div", { className: "tcr-empty" },
|
|
@@ -64,155 +52,25 @@ function Empty({ onPick }) {
|
|
|
64
52
|
react_1.React.createElement("div", { className: "tcr-examples" },
|
|
65
53
|
react_1.React.createElement(PictureCards, { cards: cards }))));
|
|
66
54
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const label = run.status === 'running' ? (0, page_1.t)('running') : (0, page_1.t)(run.status);
|
|
87
|
-
return (react_1.React.createElement("div", { className: `tcr-run${open ? ' tcr-open' : ''}${last ? ' tcr-last' : ''}` },
|
|
88
|
-
react_1.React.createElement("button", { type: "button", className: "tcr-run-head", onClick: () => setOpen(!open), "aria-expanded": open },
|
|
89
|
-
react_1.React.createElement(Dot, { status: run.status }),
|
|
90
|
-
react_1.React.createElement("span", { className: "tcr-run-time" }, schedule_util_1.ScheduleUtil.clock(new Date(run.startedAt), new Date(now))),
|
|
91
|
-
react_1.React.createElement("span", { className: `tcr-run-status tcr-is-${run.status}` }, label),
|
|
92
|
-
took && react_1.React.createElement("span", { className: "tcr-muted" }, took),
|
|
93
|
-
run.trigger === 'manual' && react_1.React.createElement("span", { className: "tcr-chip" }, (0, page_1.t)('byHand')),
|
|
94
|
-
react_1.React.createElement("span", { className: "tcr-run-line" }, !open && text ? task_util_1.TaskUtil.firstLine(text) : ''),
|
|
95
|
-
react_1.React.createElement("span", { className: "tcr-chevron", "aria-hidden": "true" },
|
|
96
|
-
react_1.React.createElement(Chevron, { size: 14 }))),
|
|
97
|
-
open && (react_1.React.createElement("div", { className: "tcr-run-body" },
|
|
98
|
-
text && (run.status === 'success' ? react_1.React.createElement(Markdown, { text: text }) : react_1.React.createElement("div", { className: "tcr-run-error" }, text)),
|
|
99
|
-
run.sessionFile && (react_1.React.createElement("button", { type: "button", className: "tcr-button", onClick: () => void (0, page_1.openRun)(run) },
|
|
100
|
-
react_1.React.createElement(Open, { size: 14 }),
|
|
101
|
-
(0, page_1.t)('openChat')))))));
|
|
102
|
-
}
|
|
103
|
-
/** The prompt of a task, a few lines of it until the user asks for the rest. */
|
|
104
|
-
function PromptText({ text }) {
|
|
105
|
-
const [whole, setWhole] = react_1.React.useState(false);
|
|
106
|
-
const [long, setLong] = react_1.React.useState(false);
|
|
107
|
-
const box = react_1.React.useRef(null);
|
|
108
|
-
react_1.React.useLayoutEffect(() => {
|
|
109
|
-
const element = box.current;
|
|
110
|
-
if (element && !whole) {
|
|
111
|
-
setLong(element.scrollHeight > element.clientHeight + 2);
|
|
112
|
-
}
|
|
113
|
-
}, [text, whole]);
|
|
114
|
-
return (react_1.React.createElement("div", { className: "tcr-prompt-block" },
|
|
115
|
-
react_1.React.createElement("div", { className: "tcr-prompt-text" },
|
|
116
|
-
react_1.React.createElement("div", { ref: box, className: `${whole ? '' : 'tcr-clamped'}${long && !whole ? ' tcr-fade' : ''}` }, text)),
|
|
117
|
-
(long || whole) && (react_1.React.createElement("button", { type: "button", className: "tcr-link", onClick: () => setWhole(!whole) }, whole ? (0, page_1.t)('showLess') : (0, page_1.t)('showAll')))));
|
|
118
|
-
}
|
|
119
|
-
/** What a task did: what can be done with it, its prompt, and its runs, newest first; a run opens on what it answered. */
|
|
120
|
-
function Detail({ client, task, now, onEdit }) {
|
|
121
|
-
const { runs } = useClient(client);
|
|
122
|
-
react_1.React.useEffect(() => {
|
|
123
|
-
void client.loadRuns(task.id).catch(() => undefined);
|
|
124
|
-
}, [client, task.id]);
|
|
125
|
-
const list = runs[task.id];
|
|
126
|
-
const Play = (0, page_1.icon)('Play');
|
|
127
|
-
const Pencil = (0, page_1.icon)('Pencil');
|
|
128
|
-
const Sparkles = (0, page_1.icon)('Sparkles');
|
|
129
|
-
const Ask = (0, page_1.icon)('MessageCircle');
|
|
130
|
-
const running = task.lastStatus === 'running';
|
|
131
|
-
const [starting, start] = (0, react_1.useBusy)(page_1.pi.ui);
|
|
132
|
-
return (react_1.React.createElement("div", { className: "tcr-detail" },
|
|
133
|
-
react_1.React.createElement("div", { className: "tcr-toolbar" },
|
|
134
|
-
react_1.React.createElement("button", { type: "button", className: starting ? 'tcr-button ta-busy' : 'tcr-button', "aria-busy": starting || undefined, disabled: running || starting, onClick: () => void start(() => guard(() => client.runNow(task.id))) },
|
|
135
|
-
react_1.React.createElement(Play, { size: 14 }),
|
|
136
|
-
(0, page_1.t)('runNow'),
|
|
137
|
-
starting && react_1.React.createElement("span", { className: "ta-spinner ta-busy-mark" })),
|
|
138
|
-
react_1.React.createElement("button", { type: "button", className: "tcr-button", onClick: () => onEdit(task) },
|
|
139
|
-
react_1.React.createElement(Pencil, { size: 14 }),
|
|
140
|
-
(0, page_1.t)('edit')),
|
|
141
|
-
react_1.React.createElement("button", { type: "button", className: "tcr-button", onClick: () => void (0, page_1.changeTask)(task, list) },
|
|
142
|
-
react_1.React.createElement(Ask, { size: 14 }),
|
|
143
|
-
(0, page_1.t)('change')),
|
|
144
|
-
react_1.React.createElement("button", { type: "button", className: "tcr-button tcr-accent", title: (0, page_1.t)('makeExtensionHint'), onClick: () => void (0, page_1.makeExtension)(task, list) },
|
|
145
|
-
react_1.React.createElement(Sparkles, { size: 14 }),
|
|
146
|
-
(0, page_1.t)('makeExtension')),
|
|
147
|
-
task.runCount > 0 && (react_1.React.createElement("span", { className: "tcr-stats" }, (0, page_1.t)(task.failCount > 0 ? 'statsFailed' : 'stats', { runs: task.runCount, fails: task.failCount })))),
|
|
148
|
-
react_1.React.createElement("div", { className: "tcr-label" }, (0, page_1.t)('promptLabel')),
|
|
149
|
-
react_1.React.createElement(PromptText, { text: task.prompt }),
|
|
150
|
-
react_1.React.createElement("div", { className: "tcr-label" },
|
|
151
|
-
(0, page_1.t)('runs'),
|
|
152
|
-
list && list.length > 0 && react_1.React.createElement("span", { className: "tcr-count" }, list.length)),
|
|
153
|
-
list === undefined && react_1.React.createElement(page_1.pi.ui.Skeleton, { rows: 2 }),
|
|
154
|
-
(list === null || list === void 0 ? void 0 : list.length) === 0 && react_1.React.createElement("div", { className: "tcr-muted tcr-pad" }, (0, page_1.t)('noRuns')),
|
|
155
|
-
list && list.length > 0 && (react_1.React.createElement("div", { className: "tcr-runs" }, list.map((run, index) => (react_1.React.createElement(RunRow, { key: run.id, run: run, now: now, last: index === list.length - 1 })))))));
|
|
156
|
-
}
|
|
157
|
-
/** A task: the mark of its state, its name over its rule, directory and last run, its next run, its switch; opened, its detail. */
|
|
158
|
-
function TaskRow({ client, task, now, onEdit, onSwitch, }) {
|
|
159
|
-
var _a;
|
|
160
|
-
const [open, setOpen] = react_1.React.useState(false);
|
|
161
|
-
const [menu, openMenu] = page_1.pi.ui.useContextMenu();
|
|
162
|
-
const More = (0, page_1.icon)('Ellipsis');
|
|
163
|
-
const Mark = (0, page_1.icon)(task.schedule.kind === 'once' ? 'Clock' : 'AlarmClock');
|
|
164
|
-
const running = task.lastStatus === 'running';
|
|
165
|
-
const state = running
|
|
166
|
-
? (0, page_1.t)('running')
|
|
167
|
-
: !task.enabled
|
|
168
|
-
? task.nextRunAt || schedule_util_1.ScheduleUtil.repeats(task.schedule)
|
|
169
|
-
? (0, page_1.t)('paused')
|
|
170
|
-
: (0, page_1.t)('done')
|
|
171
|
-
: task.nextRunAt
|
|
172
|
-
? (0, page_1.t)('next', { time: (0, page_1.until)(new Date(task.nextRunAt).getTime(), now) })
|
|
173
|
-
: (0, page_1.t)('done');
|
|
174
|
-
const tone = running ? 'running' : !task.enabled ? 'off' : ((_a = task.lastStatus) !== null && _a !== void 0 ? _a : 'idle');
|
|
175
|
-
// The switch moves at once (CronClient.setEnabled); its knob turns until the Ta service has it.
|
|
176
|
-
const [switching, run] = (0, react_1.useBusy)(page_1.pi.ui);
|
|
177
|
-
const remove = async () => {
|
|
178
|
-
if (await page_1.pi.ui.confirm((0, page_1.t)('confirmDelete', { name: task.name }), (0, page_1.t)('confirmDeleteMessage'), { confirmLabel: (0, page_1.t)('delete'), danger: true })) {
|
|
179
|
-
await guard(() => client.remove(task.id));
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
// The menu of the … of the row, and of a right click or a long press on it: the menu of every list of Ta.
|
|
183
|
-
const items = [
|
|
184
|
-
[
|
|
185
|
-
{ key: 'run', label: (0, page_1.t)('runNow'), icon: (0, page_1.icon)('Play'), disabled: running, run: () => void guard(() => client.runNow(task.id)) },
|
|
186
|
-
{ key: 'edit', label: (0, page_1.t)('edit'), icon: (0, page_1.icon)('Pencil'), run: () => onEdit(task) },
|
|
187
|
-
{ key: 'change', label: (0, page_1.t)('change'), icon: (0, page_1.icon)('MessageCircle'), run: () => void (0, page_1.changeTask)(task, client.state.runs[task.id]) },
|
|
188
|
-
{ key: 'extension', label: (0, page_1.t)('makeExtension'), icon: (0, page_1.icon)('Sparkles'), run: () => void (0, page_1.makeExtension)(task, client.state.runs[task.id]) },
|
|
189
|
-
],
|
|
190
|
-
[{ key: 'delete', label: (0, page_1.t)('delete'), icon: (0, page_1.icon)('Trash2'), danger: true, run: () => void remove() }],
|
|
191
|
-
];
|
|
192
|
-
return (react_1.React.createElement("div", { className: `tcr-task${open ? ' tcr-open' : ''}${task.enabled ? '' : ' tcr-disabled'}` },
|
|
193
|
-
react_1.React.createElement("div", { className: "tcr-task-row" },
|
|
194
|
-
react_1.React.createElement("button", { type: "button", className: "tcr-task-main", onClick: () => setOpen(!open), onContextMenu: event => openMenu(event, items), "aria-expanded": open },
|
|
195
|
-
react_1.React.createElement("span", { className: `tcr-mark tcr-tone-${tone}`, "aria-hidden": "true" },
|
|
196
|
-
react_1.React.createElement(Mark, { size: 17 }),
|
|
197
|
-
react_1.React.createElement(Dot, { status: task.lastStatus, enabled: task.enabled || running })),
|
|
198
|
-
react_1.React.createElement("span", { className: "tcr-task-text" },
|
|
199
|
-
react_1.React.createElement("span", { className: "tcr-task-name" }, task.name),
|
|
200
|
-
react_1.React.createElement("span", { className: "tcr-task-meta" },
|
|
201
|
-
react_1.React.createElement("span", { className: "tcr-chip" }, schedule_util_1.ScheduleUtil.describe(task.schedule, page_1.pi.ui.language, new Date(now))),
|
|
202
|
-
react_1.React.createElement("span", { className: "tcr-task-dir", title: task.cwd }, (0, page_1.basename)(task.cwd)),
|
|
203
|
-
react_1.React.createElement("span", { className: `tcr-task-next${running ? ' tcr-pulse' : ''}` }, state),
|
|
204
|
-
task.lastRunAt && (react_1.React.createElement("span", { className: "tcr-task-last" }, (0, page_1.t)('lastRun', { time: schedule_util_1.ScheduleUtil.clock(new Date(task.lastRunAt), new Date(now)) }))))),
|
|
205
|
-
react_1.React.createElement("span", { className: `tcr-task-state${running ? ' tcr-pulse' : ''}`, title: task.nextRunAt ? (0, page_1.t)('nextAt', { time: schedule_util_1.ScheduleUtil.clock(new Date(task.nextRunAt)) }) : undefined }, state)),
|
|
206
|
-
react_1.React.createElement("label", { className: "tcr-switch", title: (0, page_1.t)('enable') },
|
|
207
|
-
react_1.React.createElement("input", { type: "checkbox", role: "switch", className: switching ? 'ta-switch ta-busy' : 'ta-switch', checked: task.enabled, "aria-label": (0, page_1.t)('enable'), "aria-checked": task.enabled, "aria-busy": switching || undefined, onChange: event => {
|
|
208
|
-
const on = event.target.checked;
|
|
209
|
-
onSwitch(task, on);
|
|
210
|
-
void run(() => guard(() => client.setEnabled(task.id, on)));
|
|
211
|
-
} })),
|
|
212
|
-
react_1.React.createElement("button", { type: "button", className: "tcr-icon tcr-more", "aria-label": (0, page_1.t)('more'), "aria-haspopup": "menu", onClick: event => openMenu(event, items) },
|
|
213
|
-
react_1.React.createElement(More, { size: 16 }))),
|
|
214
|
-
open && react_1.React.createElement(Detail, { client: client, task: task, now: now, onEdit: onEdit }),
|
|
215
|
-
menu));
|
|
55
|
+
const FILTERS = [
|
|
56
|
+
['on', 'filterOn'],
|
|
57
|
+
['failed', 'filterFailed'],
|
|
58
|
+
['off', 'filterOff'],
|
|
59
|
+
];
|
|
60
|
+
const GROUP_WORDS = {
|
|
61
|
+
running: 'groupRunning',
|
|
62
|
+
today: 'groupToday',
|
|
63
|
+
tomorrow: 'groupTomorrow',
|
|
64
|
+
week: 'groupWeek',
|
|
65
|
+
later: 'groupLater',
|
|
66
|
+
event: 'groupEvent',
|
|
67
|
+
done: 'groupDone',
|
|
68
|
+
};
|
|
69
|
+
/** What the page lists, as the segmented control of the pages of Ta, with their counts: those on, those whose last run failed, those off; a tab with none but the first is left out. */
|
|
70
|
+
function Filters({ value, counts, onChange }) {
|
|
71
|
+
return (react_1.React.createElement("div", { className: "ta-segmented tcr-filters", role: "tablist" }, FILTERS.filter(([filter]) => filter === 'on' || filter === value || counts[filter] > 0).map(([filter, word]) => (react_1.React.createElement("button", { key: filter, type: "button", role: "tab", "aria-selected": value === filter, className: `${value === filter ? 'ta-on ' : ''}tcr-filter-${filter}`, onClick: () => onChange(filter) },
|
|
72
|
+
(0, page_1.t)(word),
|
|
73
|
+
react_1.React.createElement("span", { className: "tcr-filter-count" }, counts[filter]))))));
|
|
216
74
|
}
|
|
217
75
|
/** The head of the page: its title, and a + for a new task, as the heads of the other pages. */
|
|
218
76
|
function TasksHead({ client }) {
|
|
@@ -224,47 +82,44 @@ function TasksHead({ client }) {
|
|
|
224
82
|
react_1.React.createElement(Plus, { size: 18 }))));
|
|
225
83
|
}
|
|
226
84
|
/**
|
|
227
|
-
* The page of the tasks:
|
|
228
|
-
*
|
|
85
|
+
* The page of the tasks: those that are on, grouped by when they run next (today, tomorrow, this week, later, when
|
|
86
|
+
* something happens), and a tab each for those whose last run failed and those that are off. It scrolls in its own
|
|
87
|
+
* box, the main area giving it what is left under the head.
|
|
229
88
|
*/
|
|
230
89
|
function TasksPage({ client }) {
|
|
231
|
-
const { tasks, loaded } = useClient(client);
|
|
90
|
+
const { tasks, loaded } = (0, task_row_1.useClient)(client);
|
|
232
91
|
const now = useMinute();
|
|
233
92
|
const [editing, setEditing] = react_1.React.useState();
|
|
93
|
+
const [filter, setFilter] = react_1.React.useState('on');
|
|
234
94
|
// A new task asked for at the head of the page while this page shows; the page gone, its ask is gone with it.
|
|
235
95
|
react_1.React.useEffect(() => client.onAskNew(() => setEditing({})), [client]);
|
|
236
|
-
|
|
237
|
-
const sorted = [...tasks].sort((a, b) => { var _a, _b; return Number(b.enabled) - Number(a.enabled) || ((_a = a.nextRunAt) !== null && _a !== void 0 ? _a : '~').localeCompare((_b = b.nextRunAt) !== null && _b !== void 0 ? _b : '~'); });
|
|
238
|
-
// A task the user turns off here stays where it is until the page is left, rather than jumping into the fold.
|
|
96
|
+
// A task the user turns off here stays where it is until the page is left, rather than jumping to the other tab.
|
|
239
97
|
const [stay, setStay] = react_1.React.useState(new Set());
|
|
240
|
-
const [offOpen, setOffOpen] = react_1.React.useState(false);
|
|
241
|
-
const [listed, off] = task_util_1.TaskUtil.split(sorted, stay);
|
|
242
98
|
const edit = react_1.React.useCallback((task) => setEditing({ task }), []);
|
|
243
99
|
const onSwitch = react_1.React.useCallback((task, on) => {
|
|
244
100
|
if (!on) {
|
|
245
101
|
setStay(ids => new Set(ids).add(task.id));
|
|
246
102
|
}
|
|
247
103
|
}, []);
|
|
248
|
-
const
|
|
249
|
-
const
|
|
104
|
+
const counts = task_list_1.TaskList.counts(tasks, stay);
|
|
105
|
+
const listed = task_list_1.TaskList.filter(tasks, filter, stay);
|
|
106
|
+
// The directory of each task says nothing when they all work in the same one.
|
|
107
|
+
const showDir = new Set(tasks.map(task => task.cwd)).size > 1;
|
|
108
|
+
const row = (task, grouped) => (react_1.React.createElement(task_row_1.TaskRow, { key: task.id, client: client, task: task, now: now, grouped: grouped, showDir: showDir, onEdit: edit, onSwitch: onSwitch }));
|
|
109
|
+
const Check = (0, page_1.icon)('CircleCheck');
|
|
250
110
|
return (react_1.React.createElement("div", { className: "tcr-scroll" },
|
|
251
111
|
react_1.React.createElement("div", { className: "tcr-page" },
|
|
252
|
-
tasks.length > 0 &&
|
|
253
|
-
react_1.React.createElement("div", { className: "tcr-stat" },
|
|
254
|
-
(0, page_1.t)('count', { count: tasks.length }),
|
|
255
|
-
running > 0 && react_1.React.createElement("span", { className: "tcr-pulse" },
|
|
256
|
-
" \u00B7 ",
|
|
257
|
-
(0, page_1.t)('runningCount', { count: running }))))),
|
|
112
|
+
tasks.length > 0 && react_1.React.createElement(Filters, { value: filter, counts: counts, onChange: setFilter }),
|
|
258
113
|
!loaded && react_1.React.createElement(page_1.pi.ui.Skeleton, { rows: 3 }),
|
|
259
114
|
loaded && tasks.length === 0 && react_1.React.createElement(Empty, { onPick: setEditing }),
|
|
260
|
-
react_1.React.createElement("div", { className: "tcr-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
(0, page_1.t)(
|
|
266
|
-
react_1.React.createElement("span", { className: "tcr-count" },
|
|
267
|
-
|
|
115
|
+
loaded && tasks.length > 0 && listed.length === 0 && (react_1.React.createElement("div", { className: "tcr-none" },
|
|
116
|
+
react_1.React.createElement(Check, { size: 18 }),
|
|
117
|
+
(0, page_1.t)(filter === 'failed' ? 'noneFailed' : filter === 'off' ? 'noneOff' : 'noneOn'))),
|
|
118
|
+
filter === 'on' ? (task_list_1.TaskList.groups(listed, new Date(now)).map(({ group, tasks: grouped }) => (react_1.React.createElement("section", { key: group, className: "tcr-group" },
|
|
119
|
+
react_1.React.createElement("div", { className: "tcr-group-title" },
|
|
120
|
+
(0, page_1.t)(GROUP_WORDS[group]),
|
|
121
|
+
react_1.React.createElement("span", { className: "tcr-group-count" }, grouped.length)),
|
|
122
|
+
react_1.React.createElement("div", { className: "tcr-list" }, grouped.map(task => row(task, group === 'today' || group === 'tomorrow'))))))) : (react_1.React.createElement("div", { className: "tcr-list" }, listed.map(task => row(task, false))))),
|
|
268
123
|
editing && react_1.React.createElement(editor_1.TaskEditor, { client: client, editing: editing, onClose: () => setEditing(undefined) })));
|
|
269
124
|
}
|
|
270
125
|
//# sourceMappingURL=tasks-view.js.map
|
|
@@ -5,6 +5,7 @@ const cron_protocol_1 = require("./cron-protocol");
|
|
|
5
5
|
const VERBS = {
|
|
6
6
|
add: 'toolAdd',
|
|
7
7
|
update: 'toolUpdate',
|
|
8
|
+
preview: 'toolPreview',
|
|
8
9
|
list: 'toolList',
|
|
9
10
|
show: 'toolShow',
|
|
10
11
|
enable: 'toolEnable',
|
|
@@ -27,6 +28,9 @@ var CronToolLine;
|
|
|
27
28
|
if (action === 'add') {
|
|
28
29
|
return { verb, target: text(args.name) || text(args.prompt).split('\n')[0] };
|
|
29
30
|
}
|
|
31
|
+
if (action === 'preview') {
|
|
32
|
+
return { verb, target: text(args.when) };
|
|
33
|
+
}
|
|
30
34
|
return { verb, target: action === 'list' || action === 'clear' ? '' : text(args.name) || text(args.id) };
|
|
31
35
|
}
|
|
32
36
|
CronToolLine.renderCall = renderCall;
|
|
@@ -32,6 +32,10 @@ export declare namespace CronTool {
|
|
|
32
32
|
type: string;
|
|
33
33
|
description: string;
|
|
34
34
|
};
|
|
35
|
+
when: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
35
39
|
schedule: {
|
|
36
40
|
type: string;
|
|
37
41
|
description: string;
|
|
@@ -49,6 +53,9 @@ export declare namespace CronTool {
|
|
|
49
53
|
expression: {
|
|
50
54
|
type: string;
|
|
51
55
|
};
|
|
56
|
+
path: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
52
59
|
};
|
|
53
60
|
required: string[];
|
|
54
61
|
};
|