@celljs/ta 4.7.0 → 4.9.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 +42 -3
- package/README.md +41 -2
- package/bin/ta.mjs +1 -1
- package/dist/cli.mjs +611 -22
- package/dist/gateway.mjs +2812 -0
- package/dist/pi/CHANGELOG.md +51 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/README.en.md +68 -0
- package/dist/pi/packages/ta-agents/README.md +68 -0
- package/dist/pi/packages/ta-agents/extension/index.mjs +1756 -0
- package/dist/pi/packages/ta-agents/lib/acp-agent.d.ts +52 -0
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +218 -0
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +153 -0
- package/dist/pi/packages/ta-agents/lib/acp-protocol.js +45 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +45 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +135 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +50 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +143 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +18 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +86 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +71 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.js +220 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.d.ts +41 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +172 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.d.ts +22 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +88 -0
- package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +115 -0
- package/dist/pi/packages/ta-agents/lib/agent-turn.js +343 -0
- package/dist/pi/packages/ta-agents/lib/extension.d.ts +26 -0
- package/dist/pi/packages/ta-agents/lib/extension.js +247 -0
- package/dist/pi/packages/ta-agents/lib/json-rpc.d.ts +41 -0
- package/dist/pi/packages/ta-agents/lib/json-rpc.js +145 -0
- package/dist/pi/packages/ta-agents/lib/message-stream.d.ts +31 -0
- package/dist/pi/packages/ta-agents/lib/message-stream.js +134 -0
- package/dist/pi/packages/ta-agents/lib/pi-types.d.ts +20 -0
- package/dist/pi/packages/ta-agents/lib/pi-types.js +3 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +36 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +43 -0
- package/dist/pi/packages/ta-agents/package.json +61 -0
- package/dist/pi/packages/ta-bots/README.en.md +46 -0
- package/dist/pi/packages/ta-bots/README.md +46 -0
- package/dist/pi/packages/ta-bots/extension/index.mjs +629 -0
- package/dist/pi/packages/ta-bots/host/index.mjs +2313 -0
- package/dist/pi/packages/ta-bots/lib/bot-service.d.ts +96 -0
- package/dist/pi/packages/ta-bots/lib/bot-service.js +391 -0
- package/dist/pi/packages/ta-bots/lib/bot-store.d.ts +42 -0
- package/dist/pi/packages/ta-bots/lib/bot-store.js +97 -0
- package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +131 -0
- package/dist/pi/packages/ta-bots/lib/bots-protocol.js +46 -0
- package/dist/pi/packages/ta-bots/lib/bots-view.d.ts +7 -0
- package/dist/pi/packages/ta-bots/lib/bots-view.js +84 -0
- package/dist/pi/packages/ta-bots/lib/channel-protocol.d.ts +58 -0
- package/dist/pi/packages/ta-bots/lib/channel-protocol.js +37 -0
- package/dist/pi/packages/ta-bots/lib/composer.d.ts +21 -0
- package/dist/pi/packages/ta-bots/lib/composer.js +104 -0
- package/dist/pi/packages/ta-bots/lib/connect-dialog.d.ts +18 -0
- package/dist/pi/packages/ta-bots/lib/connect-dialog.js +198 -0
- package/dist/pi/packages/ta-bots/lib/extension.d.ts +34 -0
- package/dist/pi/packages/ta-bots/lib/extension.js +207 -0
- package/dist/pi/packages/ta-bots/lib/host.d.ts +8 -0
- package/dist/pi/packages/ta-bots/lib/host.js +15 -0
- package/dist/pi/packages/ta-bots/lib/i18n.d.ts +87 -0
- package/dist/pi/packages/ta-bots/lib/i18n.js +175 -0
- package/dist/pi/packages/ta-bots/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-bots/lib/index.js +40 -0
- package/dist/pi/packages/ta-bots/lib/login-book.d.ts +17 -0
- package/dist/pi/packages/ta-bots/lib/login-book.js +55 -0
- package/dist/pi/packages/ta-bots/lib/media-crypto.d.ts +19 -0
- package/dist/pi/packages/ta-bots/lib/media-crypto.js +70 -0
- package/dist/pi/packages/ta-bots/lib/message.d.ts +13 -0
- package/dist/pi/packages/ta-bots/lib/message.js +74 -0
- package/dist/pi/packages/ta-bots/lib/page.d.ts +54 -0
- package/dist/pi/packages/ta-bots/lib/page.js +131 -0
- package/dist/pi/packages/ta-bots/lib/pictures.d.ts +3 -0
- package/dist/pi/packages/ta-bots/lib/pictures.js +21 -0
- package/dist/pi/packages/ta-bots/lib/qr-image.d.ts +16 -0
- package/dist/pi/packages/ta-bots/lib/qr-image.js +70 -0
- package/dist/pi/packages/ta-bots/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-bots/lib/react.js +8 -0
- package/dist/pi/packages/ta-bots/lib/server-texts.d.ts +12 -0
- package/dist/pi/packages/ta-bots/lib/server-texts.js +45 -0
- package/dist/pi/packages/ta-bots/lib/session-bridge.d.ts +43 -0
- package/dist/pi/packages/ta-bots/lib/session-bridge.js +118 -0
- package/dist/pi/packages/ta-bots/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-bots/lib/style.js +114 -0
- package/dist/pi/packages/ta-bots/lib/test-fakes.d.ts +37 -0
- package/dist/pi/packages/ta-bots/lib/test-fakes.js +94 -0
- package/dist/pi/packages/ta-bots/lib/text-util.d.ts +16 -0
- package/dist/pi/packages/ta-bots/lib/text-util.js +158 -0
- package/dist/pi/packages/ta-bots/lib/web-socket-client.d.ts +38 -0
- package/dist/pi/packages/ta-bots/lib/web-socket-client.js +213 -0
- package/dist/pi/packages/ta-bots/lib/wecom-channel.d.ts +38 -0
- package/dist/pi/packages/ta-bots/lib/wecom-channel.js +222 -0
- package/dist/pi/packages/ta-bots/lib/wecom-login.d.ts +34 -0
- package/dist/pi/packages/ta-bots/lib/wecom-login.js +84 -0
- package/dist/pi/packages/ta-bots/lib/wecom-socket.d.ts +74 -0
- package/dist/pi/packages/ta-bots/lib/wecom-socket.js +214 -0
- package/dist/pi/packages/ta-bots/lib/weixin-api.d.ts +112 -0
- package/dist/pi/packages/ta-bots/lib/weixin-api.js +171 -0
- package/dist/pi/packages/ta-bots/lib/weixin-channel.d.ts +49 -0
- package/dist/pi/packages/ta-bots/lib/weixin-channel.js +258 -0
- package/dist/pi/packages/ta-bots/lib/weixin-login.d.ts +31 -0
- package/dist/pi/packages/ta-bots/lib/weixin-login.js +110 -0
- package/dist/pi/packages/ta-bots/package.json +55 -0
- package/dist/pi/packages/ta-bots/web/index.js +1241 -0
- package/dist/pi/packages/ta-changes/README.en.md +21 -0
- package/dist/pi/packages/ta-changes/README.md +21 -0
- package/dist/pi/packages/ta-changes/extension/index.mjs +296 -0
- package/dist/pi/packages/ta-changes/host/index.mjs +309 -0
- package/dist/pi/packages/ta-changes/lib/blob-store.d.ts +16 -0
- package/dist/pi/packages/ta-changes/lib/blob-store.js +69 -0
- package/dist/pi/packages/ta-changes/lib/card.d.ts +12 -0
- package/dist/pi/packages/ta-changes/lib/card.js +149 -0
- package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +76 -0
- package/dist/pi/packages/ta-changes/lib/changes-protocol.js +20 -0
- package/dist/pi/packages/ta-changes/lib/changes-service.d.ts +20 -0
- package/dist/pi/packages/ta-changes/lib/changes-service.js +70 -0
- package/dist/pi/packages/ta-changes/lib/changes-util.d.ts +21 -0
- package/dist/pi/packages/ta-changes/lib/changes-util.js +44 -0
- package/dist/pi/packages/ta-changes/lib/diff-tab.d.ts +4 -0
- package/dist/pi/packages/ta-changes/lib/diff-tab.js +45 -0
- package/dist/pi/packages/ta-changes/lib/extension.d.ts +21 -0
- package/dist/pi/packages/ta-changes/lib/extension.js +106 -0
- package/dist/pi/packages/ta-changes/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-changes/lib/host.js +16 -0
- package/dist/pi/packages/ta-changes/lib/i18n.d.ts +30 -0
- package/dist/pi/packages/ta-changes/lib/i18n.js +61 -0
- package/dist/pi/packages/ta-changes/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-changes/lib/index.js +28 -0
- package/dist/pi/packages/ta-changes/lib/line-diff.d.ts +11 -0
- package/dist/pi/packages/ta-changes/lib/line-diff.js +69 -0
- package/dist/pi/packages/ta-changes/lib/page.d.ts +29 -0
- package/dist/pi/packages/ta-changes/lib/page.js +106 -0
- package/dist/pi/packages/ta-changes/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-changes/lib/react.js +8 -0
- package/dist/pi/packages/ta-changes/lib/recorder.d.ts +25 -0
- package/dist/pi/packages/ta-changes/lib/recorder.js +117 -0
- package/dist/pi/packages/ta-changes/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-changes/lib/style.js +46 -0
- package/dist/pi/packages/ta-changes/package.json +55 -0
- package/dist/pi/packages/ta-changes/web/index.js +463 -0
- package/dist/pi/packages/ta-channels/README.en.md +3 -2
- package/dist/pi/packages/ta-channels/README.md +3 -2
- package/dist/pi/packages/ta-channels/extension/index.mjs +109 -8
- package/dist/pi/packages/ta-channels/host/index.mjs +281 -5
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.js +19 -6
- package/dist/pi/packages/ta-channels/lib/channel-menu.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/channel-menu.js +15 -12
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +10 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +10 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.js +29 -2
- package/dist/pi/packages/ta-channels/lib/channels.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/channels.js +1 -0
- package/dist/pi/packages/ta-channels/lib/create.js +2 -2
- package/dist/pi/packages/ta-channels/lib/extension.d.ts +5 -0
- package/dist/pi/packages/ta-channels/lib/extension.js +25 -2
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +40 -9
- package/dist/pi/packages/ta-channels/lib/i18n.js +81 -19
- package/dist/pi/packages/ta-channels/lib/index.d.ts +3 -2
- package/dist/pi/packages/ta-channels/lib/index.js +14 -2
- package/dist/pi/packages/ta-channels/lib/members.js +10 -5
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +5 -1
- package/dist/pi/packages/ta-channels/lib/more-menu.js +55 -9
- package/dist/pi/packages/ta-channels/lib/room.d.ts +11 -2
- package/dist/pi/packages/ta-channels/lib/room.js +47 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +5 -1
- package/dist/pi/packages/ta-channels/lib/sidebar.js +189 -31
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +136 -73
- package/dist/pi/packages/ta-channels/lib/tasks.d.ts +48 -0
- package/dist/pi/packages/ta-channels/lib/tasks.js +226 -0
- package/dist/pi/packages/ta-channels/lib/team-ask.d.ts +21 -0
- package/dist/pi/packages/ta-channels/lib/team-ask.js +73 -0
- package/dist/pi/packages/ta-channels/lib/team-tools.d.ts +6 -1
- package/dist/pi/packages/ta-channels/lib/team-tools.js +5 -4
- package/dist/pi/packages/ta-channels/lib/team.d.ts +5 -1
- package/dist/pi/packages/ta-channels/lib/team.js +10 -4
- package/dist/pi/packages/ta-channels/lib/views.d.ts +18 -3
- package/dist/pi/packages/ta-channels/lib/views.js +45 -9
- package/dist/pi/packages/ta-channels/package.json +11 -2
- package/dist/pi/packages/ta-channels/web/index.js +996 -205
- package/dist/pi/packages/ta-computer-use/extension/index.mjs +4 -2
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-access.d.ts +2 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-access.js +9 -3
- package/dist/pi/packages/ta-computer-use/package.json +11 -2
- package/dist/pi/packages/ta-cron/README.en.md +48 -0
- package/dist/pi/packages/ta-cron/README.md +48 -0
- package/dist/pi/packages/ta-cron/extension/index.mjs +856 -0
- package/dist/pi/packages/ta-cron/host/index.mjs +884 -0
- package/dist/pi/packages/ta-cron/lib/commands.d.ts +61 -0
- package/dist/pi/packages/ta-cron/lib/commands.js +250 -0
- package/dist/pi/packages/ta-cron/lib/cron-expression.d.ts +39 -0
- package/dist/pi/packages/ta-cron/lib/cron-expression.js +146 -0
- package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +160 -0
- package/dist/pi/packages/ta-cron/lib/cron-protocol.js +38 -0
- package/dist/pi/packages/ta-cron/lib/editor.d.ts +17 -0
- package/dist/pi/packages/ta-cron/lib/editor.js +143 -0
- package/dist/pi/packages/ta-cron/lib/extension.d.ts +27 -0
- package/dist/pi/packages/ta-cron/lib/extension.js +142 -0
- package/dist/pi/packages/ta-cron/lib/form-util.d.ts +39 -0
- package/dist/pi/packages/ta-cron/lib/form-util.js +121 -0
- package/dist/pi/packages/ta-cron/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-cron/lib/host.js +14 -0
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +88 -0
- package/dist/pi/packages/ta-cron/lib/i18n.js +173 -0
- package/dist/pi/packages/ta-cron/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-cron/lib/index.js +48 -0
- package/dist/pi/packages/ta-cron/lib/next-card.d.ts +9 -0
- package/dist/pi/packages/ta-cron/lib/next-card.js +35 -0
- package/dist/pi/packages/ta-cron/lib/notifier.d.ts +6 -0
- package/dist/pi/packages/ta-cron/lib/notifier.js +50 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +42 -0
- package/dist/pi/packages/ta-cron/lib/page.js +116 -0
- package/dist/pi/packages/ta-cron/lib/pictures.d.ts +6 -0
- package/dist/pi/packages/ta-cron/lib/pictures.js +46 -0
- package/dist/pi/packages/ta-cron/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-cron/lib/react.js +8 -0
- package/dist/pi/packages/ta-cron/lib/reply.d.ts +6 -0
- package/dist/pi/packages/ta-cron/lib/reply.js +53 -0
- package/dist/pi/packages/ta-cron/lib/schedule-util.d.ts +25 -0
- package/dist/pi/packages/ta-cron/lib/schedule-util.js +223 -0
- package/dist/pi/packages/ta-cron/lib/scheduler.d.ts +78 -0
- package/dist/pi/packages/ta-cron/lib/scheduler.js +329 -0
- package/dist/pi/packages/ta-cron/lib/server-texts.d.ts +7 -0
- package/dist/pi/packages/ta-cron/lib/server-texts.js +24 -0
- package/dist/pi/packages/ta-cron/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-cron/lib/style.js +123 -0
- package/dist/pi/packages/ta-cron/lib/task-store.d.ts +25 -0
- package/dist/pi/packages/ta-cron/lib/task-store.js +60 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +18 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +167 -0
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +10 -0
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +204 -0
- package/dist/pi/packages/ta-cron/lib/tool.d.ts +85 -0
- package/dist/pi/packages/ta-cron/lib/tool.js +127 -0
- package/dist/pi/packages/ta-cron/package.json +55 -0
- package/dist/pi/packages/ta-cron/web/index.js +1953 -0
- package/dist/pi/packages/ta-extensions/README.en.md +4 -1
- package/dist/pi/packages/ta-extensions/README.md +4 -1
- package/dist/pi/packages/ta-extensions/host/index.mjs +64 -61
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts +2 -0
- package/dist/pi/packages/ta-extensions/lib/actions.js +9 -1
- package/dist/pi/packages/ta-extensions/lib/host.d.ts +0 -8
- package/dist/pi/packages/ta-extensions/lib/host.js +7 -49
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +8 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +20 -4
- package/dist/pi/packages/ta-extensions/lib/index.js +2 -0
- package/dist/pi/packages/ta-extensions/lib/market-detail.js +14 -2
- package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/market-style.js +18 -18
- package/dist/pi/packages/ta-extensions/lib/page.js +22 -11
- package/dist/pi/packages/ta-extensions/lib/pictures.d.ts +3 -1
- package/dist/pi/packages/ta-extensions/lib/pictures.js +28 -32
- package/dist/pi/packages/ta-extensions/lib/search.d.ts +10 -0
- package/dist/pi/packages/ta-extensions/lib/search.js +139 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +15 -34
- package/dist/pi/packages/ta-extensions/package.json +12 -2
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +12 -7
- package/dist/pi/packages/ta-extensions/web/index.js +488 -120
- package/dist/pi/packages/ta-launcher/README.en.md +15 -0
- package/dist/pi/packages/ta-launcher/README.md +15 -0
- package/dist/pi/packages/ta-launcher/lib/actions.d.ts +31 -0
- package/dist/pi/packages/ta-launcher/lib/actions.js +134 -0
- package/dist/pi/packages/ta-launcher/lib/i18n.d.ts +38 -0
- package/dist/pi/packages/ta-launcher/lib/i18n.js +77 -0
- package/dist/pi/packages/ta-launcher/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-launcher/lib/index.js +48 -0
- package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +19 -0
- package/dist/pi/packages/ta-launcher/lib/launcher-util.js +47 -0
- package/dist/pi/packages/ta-launcher/lib/launcher-view.d.ts +20 -0
- package/dist/pi/packages/ta-launcher/lib/launcher-view.js +99 -0
- package/dist/pi/packages/ta-launcher/lib/mine-store.d.ts +22 -0
- package/dist/pi/packages/ta-launcher/lib/mine-store.js +60 -0
- package/dist/pi/packages/ta-launcher/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
- package/dist/pi/packages/ta-launcher/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-launcher/lib/style.js +48 -0
- package/dist/pi/packages/ta-launcher/package.json +49 -0
- package/dist/pi/packages/ta-launcher/web/index.js +553 -0
- package/dist/pi/packages/ta-workspace/README.md +6 -6
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +6 -6
- package/dist/pi/packages/ta-workspace/lib/browser-agent.d.ts +36 -0
- package/dist/pi/packages/ta-workspace/lib/browser-agent.js +396 -0
- package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +48 -0
- package/dist/pi/packages/ta-workspace/lib/browser-common.js +180 -0
- package/dist/pi/packages/ta-workspace/lib/browser-import.d.ts +5 -0
- package/dist/pi/packages/ta-workspace/lib/browser-import.js +97 -0
- package/dist/pi/packages/ta-workspace/lib/browser-webview.d.ts +7 -0
- package/dist/pi/packages/ta-workspace/lib/browser-webview.js +202 -0
- package/dist/pi/packages/ta-workspace/lib/browser.d.ts +1 -7
- package/dist/pi/packages/ta-workspace/lib/browser.js +14 -154
- package/dist/pi/packages/ta-workspace/lib/common.d.ts +8 -5
- package/dist/pi/packages/ta-workspace/lib/common.js +53 -14
- package/dist/pi/packages/ta-workspace/lib/explorer-excluded.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/explorer-excluded.js +39 -0
- package/dist/pi/packages/ta-workspace/lib/explorer-transfer.d.ts +31 -0
- package/dist/pi/packages/ta-workspace/lib/explorer-transfer.js +156 -0
- package/dist/pi/packages/ta-workspace/lib/explorer.js +121 -18
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +47 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.js +106 -12
- package/dist/pi/packages/ta-workspace/lib/index.js +7 -1
- package/dist/pi/packages/ta-workspace/lib/open-files.js +1 -1
- package/dist/pi/packages/ta-workspace/lib/preview.js +6 -2
- package/dist/pi/packages/ta-workspace/lib/scm.js +4 -4
- package/dist/pi/packages/ta-workspace/lib/search.js +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +130 -56
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +25 -3
- package/dist/pi/packages/ta-workspace/lib/terminal.js +327 -119
- package/dist/pi/packages/ta-workspace/lib/util/browser-snapshot.d.ts +52 -0
- package/dist/pi/packages/ta-workspace/lib/util/browser-snapshot.js +207 -0
- package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +25 -0
- package/dist/pi/packages/ta-workspace/lib/util/terminal.js +55 -0
- package/dist/pi/packages/ta-workspace/lib/util/upload.d.ts +34 -0
- package/dist/pi/packages/ta-workspace/lib/util/upload.js +109 -0
- package/dist/pi/packages/ta-workspace/lib/util/workspace.d.ts +19 -2
- package/dist/pi/packages/ta-workspace/lib/util/workspace.js +50 -3
- package/dist/pi/packages/ta-workspace/lib/util/zip.d.ts +20 -0
- package/dist/pi/packages/ta-workspace/lib/util/zip.js +128 -0
- package/dist/pi/packages/ta-workspace/lib/workspace-client.d.ts +12 -1
- package/dist/pi/packages/ta-workspace/lib/workspace-client.js +101 -0
- package/dist/pi/packages/ta-workspace/package.json +11 -2
- package/dist/pi/packages/ta-workspace/web/index.js +2695 -799
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-D1ZeYB9c.js → abnfDiagram-S7VZAUFO-C1tb6dM5.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-RV_x_iFj.js → architecture-WOLXFQ4H-DN1Va8BF.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-BGOmzcpZ.js → architectureDiagram-YGSQEFNW-BmK2SYtQ.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-BkoflIym.js → blockDiagram-APKKGZFW-DvLrLzTm.js} +1 -1
- package/dist/public/assets/{browser-Cl9_lr0X.js → browser-DAv3ly6M.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CfrQTIEs.js → c4Diagram-KJ2TOQU5-CrQlWwrG.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-C-VxnXsG.js → chunk-6MUBBAK2-CHKMsuY_.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-aqbxPiaN.js → chunk-AXFCVDMN-CWJ7Np6s.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-DDgvFLBP.js → chunk-BG4553SI-3v5XbQGM.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CItpjfW5.js → chunk-DQASFODM-2CC-yiCz.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-BATYGV1I.js → chunk-HFQBQIA3-D2hzQPAy.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-BVAqVjgq.js → chunk-KQLB2F66-SifAZs2r.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-Bk0_a-eE.js → chunk-KS47KZWR-BP0C0VCC.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-DsFG_U8r.js → chunk-LEVMRMFU-B1f5vw5b.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-BgeE81Y7.js → chunk-M57EVK23-B2MCJt7Y.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-2Rp6C2LJ.js → chunk-OY52VR5R-cDpZJMk4.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-BhcIp-Bl.js → chunk-QB3YPZ4I-BE0we2xc.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-i9n2AYPG.js → chunk-R3KSYZAL-D9wOfqqH.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DOSqSu65.js → chunk-STOXU5M4-BIaVsc0K.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-BDA8bjy3.js → chunk-TU62E6Q5-BZc0OZEM.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-Cs-r9l_d.js → chunk-X4PVCEUW-Bngfwwzm.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-DEcanQFC.js → chunk-XXDRQBXY-C5FQ6XHK.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-BS8XxKRR.js → classDiagram-v2-L25IHNXF-_om54nmt.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC--RPleOJ8.js → cose-bilkent-JH36ORCC-Dwpeee_6.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-CW_93VVD.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-DZHM2oEU.js → cynefinDiagram-L36ESFBY-DP5_y9Dq.js} +1 -1
- package/dist/public/assets/{d3-selection-D2iIEb1P.js → d3-selection-DFiMlEmn.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-h_G5ukMB.js → dagre-SPEB5RXH-DYwsk6gk.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-BnThWj9P.js → diagram-3B7GL73J-Dq_nT3AZ.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-DHCMo8sZ.js → diagram-DNEMPZML-ChURW6y9.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-DxJZnIKT.js → diagram-L3MUGCDN-CgVp4Rto.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-Cn0SGxqL.js → diagram-LA4NIPWU-vrqLMDby.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BafBOkBk.js → diagram-MHCOC4E2-lvfOr5ij.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-D7UnEMcU.js → diagram-XPFHEONP-oQ18TeVp.js} +1 -1
- package/dist/public/assets/{dist-CN9JBoER.js → dist-BOxxmveI.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-Us1rkKwp.js → ebnfDiagram-UZSYDL2S-C7_tlZCS.js} +1 -1
- package/dist/public/assets/{editor.api-S_CuXudU.js → editor.api-CoZ8MEuz.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-Czvqrn49.js → elk-XV6XMXQE-Dkt5-ikg.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-C0g3K15f.js → erDiagram-EYBAPDEH-27kh3zlx.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-DIcU7mQ5.js → eventmodeling-K75KTNOO-CxVEejjN.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-BRowRdve.js +1 -0
- package/dist/public/assets/{freemarker2-CkAEBjHO.js → freemarker2-D6CwPIXh.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-CIkKvihz.js → ganttDiagram-23REXITY-C-amlwpX.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BGmojXlx.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-BxM3589j.js → gitGraphDiagram-STJD7YCW-DKhzI0Xz.js} +1 -1
- package/dist/public/assets/{handlebars-CPBNiVZ2.js → handlebars-mxNr68Gm.js} +1 -1
- package/dist/public/assets/{html-CJBVALoy.js → html-Bze6s9R9.js} +1 -1
- package/dist/public/assets/{index-CBMmE3BQ.js → index-BhQUc9PU.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-CRRVgGj2.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-BIcStK_t.js → infoDiagram-KBXO4MBG-WHuWjEDO.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-CpV2hKA6.js → ishikawaDiagram-M35NCXHK-DFHUwD0J.js} +1 -1
- package/dist/public/assets/{javascript-dv6GQsa3.js → javascript-4NMPu7y1.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-B_vnmdId.js → journeyDiagram-OPLOXDXO-C7gV6zEr.js} +1 -1
- package/dist/public/assets/{jsonMode-DG_orhvz.js → jsonMode-B1JEHPMp.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-q5uWw99H.js → kanban-definition-BZKZHSQY-DlRu_d2Q.js} +1 -1
- package/dist/public/assets/{liquid-CD-LM2Kh.js → liquid-B7sIf4NX.js} +1 -1
- package/dist/public/assets/{mdx-C9mfI8up.js → mdx-CAN0qez6.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-DNe1duhT.js → mermaid-parser.core-BGmotBhf.js} +3 -3
- package/dist/public/assets/{mermaid.core-B1AcqJgl.js → mermaid.core-Cl6SS3cM.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-CwYG3Fl3.js → mindmap-definition-I2QAS2VK-DiQ8Feqr.js} +1 -1
- package/dist/public/assets/module-1nDbf1AK.js +1761 -0
- package/dist/public/assets/module-BkKfSTDV.js +1 -0
- package/dist/public/assets/{monaco-C0ktZo3r.js → monaco-CwCjTWAO.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-DUlqTCWQ.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-DxtA4QDS.js → pegDiagram-FD4XPPHP-XhCpv6BX.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-2RgP4ScO.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-CfcIi0Vn.js → pieDiagram-J4AKIIQI-DUVzuXUd.js} +1 -1
- package/dist/public/assets/{python-DCA1j2QE.js → python-DsoF66Sp.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-BxkJdurF.js → quadrantDiagram-XTYBLID2-Ddobf0z0.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-Dap8k-yH.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-Ds10NBze.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7--H3g5ywg.js → railroad-abnf-LNEFI6M7-DkrNo-Gf.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-C2LAUFu6.js → railroad-ebnf-DWYD2UWJ-DaB7gY8P.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-Kq_ZXQMl.js → railroad-peg-JR7BVNR7-D_QG87QV.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-i4xIvHJV.js → railroadDiagram-MRQ6NCDL-x-nUoBjv.js} +1 -1
- package/dist/public/assets/{razor-CEeNaFx5.js → razor-DSrcJyQe.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CYNXjuJm.js → requirementDiagram-Y7LWUY3S-kNNcbsty.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-CRQiHcW6.js → sankeyDiagram-WGJFYUXA-ClC12Odk.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-BSDVFsi2.js → sequenceDiagram-5NDRBG5M-DDQITP2g.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-uyUAaysl.js → stateDiagram-v2-FJ4FJNEA-N1t_36oh.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-DdEjQumY.js → swimlanes-UMQ2AFYF-DSt9fFYE.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BHAN4SQO.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DZl-TXXh.js → timeline-definition-SEUHKTQE-CfymOw_s.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-f1hLUBjI.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-_NPRpuUC.js +1 -0
- package/dist/public/assets/{typescript-DrF8YGbQ.js → typescript-J7rF-zX8.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-DkG3gLrp.js → usecaseDiagram-AFA6YXN4-CK_mRc2_.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-B_lj8x7-.js → vennDiagram-NNMJR3RB-DW8xR6IJ.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-CLBqtefx.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-B1VFrC5a.js → wardleyDiagram-S7YFUSEH-Css55Zq5.js} +1 -1
- package/dist/public/assets/{xml-DfL-Brke.js → xml-CJeviG_a.js} +1 -1
- package/dist/public/assets/xterm-BrP-ENHg.css +1 -0
- package/dist/public/assets/xterm-wtHqjrNn.js +85 -0
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-CM2CpXu9.js → xychartDiagram-GGNKY7IX-BnhK9cFS.js} +1 -1
- package/dist/public/assets/{yaml-CpmxRjjF.js → yaml-Gw3uo6rF.js} +1 -1
- package/dist/public/index.html +35 -6
- package/dist/public/launch.svg +49 -0
- package/dist/serve/index.mjs +8862 -5822
- package/package.json +24 -18
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/agent-menu.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channel-menu.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channel-menu.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channels-model.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channels-util.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channels.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/channels.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/create.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/create.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/extension.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/extension.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/faces.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/faces.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/host.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/host.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/i18n.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/index.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/index.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/members.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/members.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/more-menu.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/react.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/react.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/room.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/room.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/sidebar.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/style.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/style.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/team-tools.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/team-tools.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/team.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/team.js.map +0 -1
- package/dist/pi/packages/ta-channels/lib/views.d.ts.map +0 -1
- package/dist/pi/packages/ta-channels/lib/views.js.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-access.d.ts.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-access.js.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-daemon.d.ts.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-daemon.js.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver.d.ts.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver.js.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/extension.d.ts.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/extension.js.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/pi-types.d.ts.map +0 -1
- package/dist/pi/packages/ta-computer-use/lib/pi-types.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/actions.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/archive.d.ts +0 -30
- package/dist/pi/packages/ta-extensions/lib/archive.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/archive.js +0 -213
- package/dist/pi/packages/ta-extensions/lib/archive.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/context.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/context.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/extensions-util.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/host.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/host.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/i18n.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/import-dialog.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/import-dialog.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/index.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/index.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-detail.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-detail.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-parts.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-parts.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-store.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-store.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-style.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-style.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-util.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-util.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-view.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market-view.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/market.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/page.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/page.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/pictures.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/pictures.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/react.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/react.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/signal.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/signal.js.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/style.d.ts.map +0 -1
- package/dist/pi/packages/ta-extensions/lib/style.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/browser.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/browser.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/common.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/common.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/editors.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/editors.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/explorer.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/explorer.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/file-icon.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/file-icon.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/host.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/host.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/i18n.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/index.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/index.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/open-files.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/open-files.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/preview.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/react.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/react.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/scm.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/scm.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/search.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/search.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/style.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/style.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/terminal.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/ansi.d.ts +0 -72
- package/dist/pi/packages/ta-workspace/lib/util/ansi.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/ansi.js +0 -434
- package/dist/pi/packages/ta-workspace/lib/util/ansi.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/file-icon.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/file-icon.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/git.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/git.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +0 -14
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/keys.js +0 -52
- package/dist/pi/packages/ta-workspace/lib/util/keys.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/preview.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/search.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/search.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/seti-font.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/seti-font.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/seti.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/seti.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/workspace.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/util/workspace.js.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/workspace-client.d.ts.map +0 -1
- package/dist/pi/packages/ta-workspace/lib/workspace-client.js.map +0 -1
- package/dist/pi/packages/ta-workspace/scripts/seti.ts +0 -173
- package/dist/public/assets/cynefin-EF2NZ3EQ-CXQC7Jwi.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-D5Z_jzJ0.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-CvdLb7m6.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-BLs8wjUC.js +0 -1
- package/dist/public/assets/module-BLLqRvli.js +0 -1099
- package/dist/public/assets/module-BZPCnGxA.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-jwWITUaQ.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CeTVZZgy.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-BGI8J8LU.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-CFkpx3Pr.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BJsun6CT.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-CL1mG6td.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-Bk3Z1uEC.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-1E8i3qpD.js +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Reply, Run, Schedule, Task, TaskInput, TaskPatch } from './cron-protocol';
|
|
2
|
+
/** The flags that may end a command: `--notify always`, `--model=anthropic/claude-sonnet-4-5`. */
|
|
3
|
+
export interface Flags {
|
|
4
|
+
name?: string;
|
|
5
|
+
notify?: string;
|
|
6
|
+
model?: string;
|
|
7
|
+
thinking?: string;
|
|
8
|
+
cwd?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ACTIONS: readonly ['add', 'list', 'show', 'runs', 'run', 'enable', 'disable', 'set', 'remove', 'clear', 'help'];
|
|
11
|
+
export type Action = (typeof ACTIONS)[number];
|
|
12
|
+
export declare const HELP = "Scheduled tasks: each run is a conversation of its own in the Ta service, which runs them while it runs.\n\n/loop <when> <prompt> repeat: 30m, 2h, @daily, @hourly, or a cron expression in quotes (\"0 9 * * 1-5\")\n/remind in <duration> <prompt> once, after a while: in 45m\n/remind at <time> <prompt> once, at a time: at 15:30, at 2026-11-12 09:00\n/schedule add <when> <prompt> as /loop\n/schedule list the tasks\n/schedule show <task> a task and its last runs\n/schedule run <task> run it now; its schedule stays\n/schedule enable|disable <task>\n/schedule set <task> [flags] change it; a value of - clears the flag\n/schedule remove <task>\n/schedule clear remove the tasks of this directory\n\nA task is its id, the start of it, or its name. Flags at the end of a prompt:\n--name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>";
|
|
13
|
+
/** The arguments of the commands, read: what is wrong throws with a message for the user. */
|
|
14
|
+
export declare namespace CommandParser {
|
|
15
|
+
/** The flags at the end, and the text before them as it was typed. */
|
|
16
|
+
function splitFlags(text: string): {
|
|
17
|
+
rest: string;
|
|
18
|
+
flags: Flags;
|
|
19
|
+
};
|
|
20
|
+
/** `<when> <prompt>`: a duration, a nickname, or a cron expression in quotes, then the prompt. */
|
|
21
|
+
function repeating(text: string): TaskInput;
|
|
22
|
+
/** `in <duration> <prompt>`, `<duration> <prompt>` or `at <time> <prompt>`. */
|
|
23
|
+
function reminder(text: string, now: Date): TaskInput;
|
|
24
|
+
/** The first word, as an action of /schedule, and the rest. */
|
|
25
|
+
function action(text: string): {
|
|
26
|
+
action: Action;
|
|
27
|
+
rest: string;
|
|
28
|
+
};
|
|
29
|
+
/** The task and the flags of `/schedule set`; `-` (or nothing after `=`) clears a flag. */
|
|
30
|
+
function patch(text: string): {
|
|
31
|
+
ref: string;
|
|
32
|
+
patch: TaskPatch;
|
|
33
|
+
};
|
|
34
|
+
function leadingSchedule(text: string): {
|
|
35
|
+
schedule: Schedule;
|
|
36
|
+
remainder: string;
|
|
37
|
+
};
|
|
38
|
+
/** `15:30` (today, or tomorrow once it passed), `2026-11-12 09:00`, or an ISO time; how many words it took. */
|
|
39
|
+
function clockTime(words: string[], now: Date): {
|
|
40
|
+
date: Date;
|
|
41
|
+
words: number;
|
|
42
|
+
} | undefined;
|
|
43
|
+
/** What to offer after `/schedule `: the actions, then the tasks. */
|
|
44
|
+
function completions(prefix: string, tasks: Task[]): {
|
|
45
|
+
value: string;
|
|
46
|
+
label: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
}[];
|
|
49
|
+
/** What to offer after `/loop `: the nicknames and a few durations. */
|
|
50
|
+
function loopCompletions(prefix: string): {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
/** The answers of the commands and the tool in plain text: for the terminal and the model. */
|
|
56
|
+
export declare namespace CronText {
|
|
57
|
+
function task(task: Task, now?: Date): string;
|
|
58
|
+
function run(run: Run, now?: Date): string;
|
|
59
|
+
function reply(reply: Reply): string;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CronText = exports.CommandParser = exports.HELP = exports.ACTIONS = void 0;
|
|
4
|
+
const cron_expression_1 = require("./cron-expression");
|
|
5
|
+
const schedule_util_1 = require("./schedule-util");
|
|
6
|
+
const FLAG_NAMES = ['name', 'notify', 'model', 'thinking', 'cwd'];
|
|
7
|
+
const TRAILING_FLAG = new RegExp(`(?:^|\\s)--(${FLAG_NAMES.join('|')})(?:=|\\s+)("[^"]*"|'[^']*'|\\S*)\\s*$`);
|
|
8
|
+
exports.ACTIONS = ['add', 'list', 'show', 'runs', 'run', 'enable', 'disable', 'set', 'remove', 'clear', 'help'];
|
|
9
|
+
exports.HELP = `Scheduled tasks: each run is a conversation of its own in the Ta service, which runs them while it runs.
|
|
10
|
+
|
|
11
|
+
/loop <when> <prompt> repeat: 30m, 2h, @daily, @hourly, or a cron expression in quotes ("0 9 * * 1-5")
|
|
12
|
+
/remind in <duration> <prompt> once, after a while: in 45m
|
|
13
|
+
/remind at <time> <prompt> once, at a time: at 15:30, at 2026-11-12 09:00
|
|
14
|
+
/schedule add <when> <prompt> as /loop
|
|
15
|
+
/schedule list the tasks
|
|
16
|
+
/schedule show <task> a task and its last runs
|
|
17
|
+
/schedule run <task> run it now; its schedule stays
|
|
18
|
+
/schedule enable|disable <task>
|
|
19
|
+
/schedule set <task> [flags] change it; a value of - clears the flag
|
|
20
|
+
/schedule remove <task>
|
|
21
|
+
/schedule clear remove the tasks of this directory
|
|
22
|
+
|
|
23
|
+
A task is its id, the start of it, or its name. Flags at the end of a prompt:
|
|
24
|
+
--name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>`;
|
|
25
|
+
/** The arguments of the commands, read: what is wrong throws with a message for the user. */
|
|
26
|
+
var CommandParser;
|
|
27
|
+
(function (CommandParser) {
|
|
28
|
+
/** The flags at the end, and the text before them as it was typed. */
|
|
29
|
+
function splitFlags(text) {
|
|
30
|
+
const flags = {};
|
|
31
|
+
let rest = text.trim();
|
|
32
|
+
for (let match = TRAILING_FLAG.exec(rest); match; match = TRAILING_FLAG.exec(rest)) {
|
|
33
|
+
const key = match[1];
|
|
34
|
+
if (flags[key] === undefined) {
|
|
35
|
+
flags[key] = unquote(match[2]);
|
|
36
|
+
}
|
|
37
|
+
rest = rest.slice(0, match.index).trimEnd();
|
|
38
|
+
}
|
|
39
|
+
return { rest, flags };
|
|
40
|
+
}
|
|
41
|
+
CommandParser.splitFlags = splitFlags;
|
|
42
|
+
/** `<when> <prompt>`: a duration, a nickname, or a cron expression in quotes, then the prompt. */
|
|
43
|
+
function repeating(text) {
|
|
44
|
+
const { rest, flags } = splitFlags(text);
|
|
45
|
+
const { schedule, remainder } = leadingSchedule(rest);
|
|
46
|
+
return input(schedule, remainder, flags);
|
|
47
|
+
}
|
|
48
|
+
CommandParser.repeating = repeating;
|
|
49
|
+
/** `in <duration> <prompt>`, `<duration> <prompt>` or `at <time> <prompt>`. */
|
|
50
|
+
function reminder(text, now) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
const { rest, flags } = splitFlags(text);
|
|
53
|
+
const words = rest.split(/\s+/);
|
|
54
|
+
let at;
|
|
55
|
+
let used = 0;
|
|
56
|
+
if (words[0] === 'at') {
|
|
57
|
+
const time = clockTime(words.slice(1, 3), now);
|
|
58
|
+
at = time === null || time === void 0 ? void 0 : time.date;
|
|
59
|
+
used = 1 + ((_a = time === null || time === void 0 ? void 0 : time.words) !== null && _a !== void 0 ? _a : 0);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const offset = words[0] === 'in' ? 1 : 0;
|
|
63
|
+
const ms = schedule_util_1.Duration.parse((_b = words[offset]) !== null && _b !== void 0 ? _b : '');
|
|
64
|
+
at = ms === undefined ? undefined : new Date(now.getTime() + ms);
|
|
65
|
+
used = offset + 1;
|
|
66
|
+
}
|
|
67
|
+
if (!at) {
|
|
68
|
+
throw new Error('Say when: /remind in 45m <prompt>, or /remind at 15:30 <prompt>.');
|
|
69
|
+
}
|
|
70
|
+
return input({ kind: 'once', at: at.toISOString() }, words.slice(used).join(' '), flags);
|
|
71
|
+
}
|
|
72
|
+
CommandParser.reminder = reminder;
|
|
73
|
+
/** The first word, as an action of /schedule, and the rest. */
|
|
74
|
+
function action(text) {
|
|
75
|
+
const trimmed = text.trim();
|
|
76
|
+
const first = trimmed.split(/\s+/, 1)[0] || 'list';
|
|
77
|
+
const action = (first === 'delete' ? 'remove' : first === 'ls' ? 'list' : first);
|
|
78
|
+
if (!exports.ACTIONS.includes(action)) {
|
|
79
|
+
throw new Error(`/schedule does not know ${JSON.stringify(first)}. It takes: ${exports.ACTIONS.join(', ')}.`);
|
|
80
|
+
}
|
|
81
|
+
return { action, rest: trimmed.slice(trimmed ? first.length : 0).trim() };
|
|
82
|
+
}
|
|
83
|
+
CommandParser.action = action;
|
|
84
|
+
/** The task and the flags of `/schedule set`; `-` (or nothing after `=`) clears a flag. */
|
|
85
|
+
function patch(text) {
|
|
86
|
+
const { rest, flags } = splitFlags(text);
|
|
87
|
+
if (!rest) {
|
|
88
|
+
throw new Error('Name the task: /schedule set <task> --model <provider/model>.');
|
|
89
|
+
}
|
|
90
|
+
const value = (flag) => (flag === undefined ? undefined : flag === '-' ? '' : flag);
|
|
91
|
+
const patch = {};
|
|
92
|
+
if (flags.name !== undefined) {
|
|
93
|
+
patch.name = value(flags.name);
|
|
94
|
+
}
|
|
95
|
+
if (flags.cwd !== undefined) {
|
|
96
|
+
patch.cwd = value(flags.cwd);
|
|
97
|
+
}
|
|
98
|
+
if (flags.model !== undefined) {
|
|
99
|
+
patch.model = value(flags.model);
|
|
100
|
+
}
|
|
101
|
+
if (flags.thinking !== undefined) {
|
|
102
|
+
patch.thinking = value(flags.thinking);
|
|
103
|
+
}
|
|
104
|
+
if (flags.notify !== undefined) {
|
|
105
|
+
patch.notify = value(flags.notify);
|
|
106
|
+
}
|
|
107
|
+
if (Object.keys(patch).length === 0) {
|
|
108
|
+
throw new Error('Say what changes: --name, --notify, --model, --thinking or --cwd.');
|
|
109
|
+
}
|
|
110
|
+
return { ref: rest, patch };
|
|
111
|
+
}
|
|
112
|
+
CommandParser.patch = patch;
|
|
113
|
+
function leadingSchedule(text) {
|
|
114
|
+
const trimmed = text.trim();
|
|
115
|
+
const quote = trimmed[0];
|
|
116
|
+
if (quote === '"' || quote === "'") {
|
|
117
|
+
const end = trimmed.indexOf(quote, 1);
|
|
118
|
+
if (end < 0) {
|
|
119
|
+
throw new Error('The cron expression has no closing quote.');
|
|
120
|
+
}
|
|
121
|
+
return { schedule: schedule_util_1.ScheduleUtil.check({ kind: 'cron', expression: trimmed.slice(1, end) }), remainder: trimmed.slice(end + 1) };
|
|
122
|
+
}
|
|
123
|
+
const [first = ''] = trimmed.split(/\s+/, 1);
|
|
124
|
+
const remainder = trimmed.slice(first.length);
|
|
125
|
+
if (first.startsWith('@')) {
|
|
126
|
+
return { schedule: schedule_util_1.ScheduleUtil.check({ kind: 'cron', expression: first }), remainder };
|
|
127
|
+
}
|
|
128
|
+
if (schedule_util_1.Duration.parse(first) !== undefined) {
|
|
129
|
+
return { schedule: schedule_util_1.ScheduleUtil.check({ kind: 'interval', every: first }), remainder };
|
|
130
|
+
}
|
|
131
|
+
throw new Error('Start with when: 30m, 2h, @daily, or a cron expression in quotes such as "0 9 * * 1-5".');
|
|
132
|
+
}
|
|
133
|
+
CommandParser.leadingSchedule = leadingSchedule;
|
|
134
|
+
/** `15:30` (today, or tomorrow once it passed), `2026-11-12 09:00`, or an ISO time; how many words it took. */
|
|
135
|
+
function clockTime(words, now) {
|
|
136
|
+
const [first = '', second = ''] = words;
|
|
137
|
+
const hm = /^(\d{1,2}):(\d{2})$/;
|
|
138
|
+
const day = /^(\d{4})-(\d{1,2})-(\d{1,2})$/;
|
|
139
|
+
const time = hm.exec(first);
|
|
140
|
+
if (time) {
|
|
141
|
+
const date = new Date(now.getTime());
|
|
142
|
+
date.setHours(Number(time[1]), Number(time[2]), 0, 0);
|
|
143
|
+
if (date.getTime() <= now.getTime()) {
|
|
144
|
+
date.setDate(date.getDate() + 1);
|
|
145
|
+
}
|
|
146
|
+
return valid(date, Number(time[1]) < 24 && Number(time[2]) < 60) ? { date, words: 1 } : undefined;
|
|
147
|
+
}
|
|
148
|
+
const date = day.exec(first);
|
|
149
|
+
const later = hm.exec(second);
|
|
150
|
+
if (date) {
|
|
151
|
+
const at = new Date(Number(date[1]), Number(date[2]) - 1, Number(date[3]), later ? Number(later[1]) : 9, later ? Number(later[2]) : 0);
|
|
152
|
+
return valid(at, true) ? { date: at, words: later ? 2 : 1 } : undefined;
|
|
153
|
+
}
|
|
154
|
+
const iso = /^\d{4}-\d{2}-\d{2}T/.test(first) ? new Date(first) : undefined;
|
|
155
|
+
return iso && valid(iso, true) ? { date: iso, words: 1 } : undefined;
|
|
156
|
+
}
|
|
157
|
+
CommandParser.clockTime = clockTime;
|
|
158
|
+
function valid(date, ok) {
|
|
159
|
+
return ok && !Number.isNaN(date.getTime());
|
|
160
|
+
}
|
|
161
|
+
function input(schedule, prompt, flags) {
|
|
162
|
+
const text = prompt.trim();
|
|
163
|
+
if (!text) {
|
|
164
|
+
throw new Error('Then say what Ta should do: the prompt of the task.');
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
schedule,
|
|
168
|
+
prompt: text,
|
|
169
|
+
...(flags.name ? { name: flags.name } : {}),
|
|
170
|
+
...(flags.cwd ? { cwd: flags.cwd } : {}),
|
|
171
|
+
...(flags.model ? { model: flags.model } : {}),
|
|
172
|
+
...(flags.thinking ? { thinking: flags.thinking } : {}),
|
|
173
|
+
...(flags.notify ? { notify: flags.notify } : {}),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function unquote(value) {
|
|
177
|
+
return /^(["']).*\1$/.test(value) ? value.slice(1, -1) : value;
|
|
178
|
+
}
|
|
179
|
+
/** What to offer after `/schedule `: the actions, then the tasks. */
|
|
180
|
+
function completions(prefix, tasks) {
|
|
181
|
+
const parts = prefix.split(/\s+/);
|
|
182
|
+
if (parts.length <= 1) {
|
|
183
|
+
return exports.ACTIONS.filter(action => { var _a; return action.startsWith((_a = parts[0]) !== null && _a !== void 0 ? _a : ''); }).map(action => ({ value: `${action} `, label: action }));
|
|
184
|
+
}
|
|
185
|
+
const [action, ref] = parts;
|
|
186
|
+
if (!['show', 'runs', 'run', 'enable', 'disable', 'set', 'remove'].includes(action) || parts.length > 2) {
|
|
187
|
+
return [];
|
|
188
|
+
}
|
|
189
|
+
return tasks
|
|
190
|
+
.filter(task => task.id.startsWith(ref) || task.name.startsWith(ref))
|
|
191
|
+
.map(task => ({ value: `${action} ${task.id} `, label: task.id, description: task.name }));
|
|
192
|
+
}
|
|
193
|
+
CommandParser.completions = completions;
|
|
194
|
+
/** What to offer after `/loop `: the nicknames and a few durations. */
|
|
195
|
+
function loopCompletions(prefix) {
|
|
196
|
+
if (/\s/.test(prefix)) {
|
|
197
|
+
return [];
|
|
198
|
+
}
|
|
199
|
+
return [...Object.keys(cron_expression_1.NICKNAMES), '5m', '30m', '1h', '1d'].filter(item => item.startsWith(prefix)).map(item => ({ value: `${item} `, label: item }));
|
|
200
|
+
}
|
|
201
|
+
CommandParser.loopCompletions = loopCompletions;
|
|
202
|
+
})(CommandParser || (exports.CommandParser = CommandParser = {}));
|
|
203
|
+
/** The answers of the commands and the tool in plain text: for the terminal and the model. */
|
|
204
|
+
var CronText;
|
|
205
|
+
(function (CronText) {
|
|
206
|
+
function task(task, now = new Date()) {
|
|
207
|
+
const state = !task.enabled
|
|
208
|
+
? 'off'
|
|
209
|
+
: task.lastStatus === 'running'
|
|
210
|
+
? 'running'
|
|
211
|
+
: task.nextRunAt
|
|
212
|
+
? `next ${schedule_util_1.ScheduleUtil.clock(new Date(task.nextRunAt), now)}`
|
|
213
|
+
: 'done';
|
|
214
|
+
const last = task.lastStatus && task.lastStatus !== 'running' ? `, last ${task.lastStatus}` : '';
|
|
215
|
+
return `${task.id} ${task.name} (${schedule_util_1.ScheduleUtil.describe(task.schedule, 'en', now)}; ${state}${last}) in ${task.cwd}`;
|
|
216
|
+
}
|
|
217
|
+
CronText.task = task;
|
|
218
|
+
function run(run, now = new Date()) {
|
|
219
|
+
var _a, _b;
|
|
220
|
+
const time = schedule_util_1.ScheduleUtil.clock(new Date(run.startedAt), now);
|
|
221
|
+
const took = run.endedAt ? ` in ${schedule_util_1.Duration.format(new Date(run.endedAt).getTime() - new Date(run.startedAt).getTime())}` : '';
|
|
222
|
+
const what = (_b = (_a = run.error) !== null && _a !== void 0 ? _a : run.summary) !== null && _b !== void 0 ? _b : '';
|
|
223
|
+
const file = run.sessionFile ? `\n conversation: ${run.sessionFile}` : '';
|
|
224
|
+
return `${run.id} ${time} ${run.status}${took}${run.trigger === 'manual' ? ' (by hand)' : ''}${what ? `\n ${what.replace(/\n/g, '\n ')}` : ''}${file}`;
|
|
225
|
+
}
|
|
226
|
+
CronText.run = run;
|
|
227
|
+
function reply(reply) {
|
|
228
|
+
switch (reply.kind) {
|
|
229
|
+
case 'task':
|
|
230
|
+
return `${capital(reply.event)}: ${task(reply.task)}`;
|
|
231
|
+
case 'removed':
|
|
232
|
+
return reply.tasks.length ? `Removed ${reply.tasks.map(item => item.name).join(', ')}.` : 'No tasks to remove.';
|
|
233
|
+
case 'started':
|
|
234
|
+
return `Started ${reply.task.name} (${reply.run.id}); it runs in a conversation of its own.`;
|
|
235
|
+
case 'list':
|
|
236
|
+
return reply.tasks.length ? reply.tasks.map(item => task(item)).join('\n') : 'No scheduled tasks. Make one with /loop or /remind.';
|
|
237
|
+
case 'show':
|
|
238
|
+
return `${task(reply.task)}\nprompt: ${reply.task.prompt}\n${reply.runs.length ? reply.runs.map(item => run(item)).join('\n') : 'No runs yet.'}`;
|
|
239
|
+
case 'help':
|
|
240
|
+
return exports.HELP;
|
|
241
|
+
case 'error':
|
|
242
|
+
return reply.message;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
CronText.reply = reply;
|
|
246
|
+
function capital(text) {
|
|
247
|
+
return text[0].toUpperCase() + text.slice(1);
|
|
248
|
+
}
|
|
249
|
+
})(CronText || (exports.CronText = CronText = {}));
|
|
250
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** A field of a cron expression: its range and the names it takes. */
|
|
2
|
+
interface Field {
|
|
3
|
+
name: string;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
names?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const NICKNAMES: Readonly<Record<string, string>>;
|
|
9
|
+
/**
|
|
10
|
+
* A cron expression of five fields (minute, hour, day of month, month, day of week), as cron reads it, in
|
|
11
|
+
* the local time of the Ta service: `*`, numbers, ranges `a-b`, lists `a,b`, steps `*\/n` and `a-b/n`, the
|
|
12
|
+
* names of months and days (`jan`, `mon`), and the nicknames `@daily` and the like. When both days are
|
|
13
|
+
* restricted, a day that matches either one matches, as in cron.
|
|
14
|
+
*/
|
|
15
|
+
export declare class CronExpression {
|
|
16
|
+
readonly source: string;
|
|
17
|
+
protected readonly minutes: Set<number>;
|
|
18
|
+
protected readonly hours: Set<number>;
|
|
19
|
+
protected readonly days: Set<number>;
|
|
20
|
+
protected readonly months: Set<number>;
|
|
21
|
+
protected readonly weekdays: Set<number>;
|
|
22
|
+
/** Whether each day field is `*`. */
|
|
23
|
+
protected readonly anyDay: boolean;
|
|
24
|
+
protected readonly anyWeekday: boolean;
|
|
25
|
+
protected constructor(source: string, minutes: Set<number>, hours: Set<number>, days: Set<number>, months: Set<number>, weekdays: Set<number>,
|
|
26
|
+
/** Whether each day field is `*`. */
|
|
27
|
+
anyDay: boolean, anyWeekday: boolean);
|
|
28
|
+
/** Throws with what is wrong. */
|
|
29
|
+
static parse(text: string): CronExpression;
|
|
30
|
+
/** Whether the text is a valid expression. */
|
|
31
|
+
static isValid(text: string): boolean;
|
|
32
|
+
protected static field(text: string, field: Field): Set<number>;
|
|
33
|
+
protected static value(text: string, field: Field): number;
|
|
34
|
+
/** The first time after `after` (a minute later at least) that matches; undefined when none comes in four years. */
|
|
35
|
+
next(after: Date): Date | undefined;
|
|
36
|
+
protected matchesDay(time: Date): boolean;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=cron-expression.d.ts.map
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CronExpression = exports.NICKNAMES = void 0;
|
|
4
|
+
const FIELDS = [
|
|
5
|
+
{ name: 'minute', min: 0, max: 59 },
|
|
6
|
+
{ name: 'hour', min: 0, max: 23 },
|
|
7
|
+
{ name: 'day of month', min: 1, max: 31 },
|
|
8
|
+
{ name: 'month', min: 1, max: 12, names: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'] },
|
|
9
|
+
// 7 is Sunday too.
|
|
10
|
+
{ name: 'day of week', min: 0, max: 7, names: ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'] },
|
|
11
|
+
];
|
|
12
|
+
exports.NICKNAMES = {
|
|
13
|
+
'@yearly': '0 0 1 1 *',
|
|
14
|
+
'@annually': '0 0 1 1 *',
|
|
15
|
+
'@monthly': '0 0 1 * *',
|
|
16
|
+
'@weekly': '0 0 * * 0',
|
|
17
|
+
'@daily': '0 0 * * *',
|
|
18
|
+
'@midnight': '0 0 * * *',
|
|
19
|
+
'@hourly': '0 * * * *',
|
|
20
|
+
};
|
|
21
|
+
/** Minutes looked at for the next time, at most: past four years a rule such as `0 0 30 2 *` never matches. */
|
|
22
|
+
const MAX_STEPS = 200000;
|
|
23
|
+
/**
|
|
24
|
+
* A cron expression of five fields (minute, hour, day of month, month, day of week), as cron reads it, in
|
|
25
|
+
* the local time of the Ta service: `*`, numbers, ranges `a-b`, lists `a,b`, steps `*\/n` and `a-b/n`, the
|
|
26
|
+
* names of months and days (`jan`, `mon`), and the nicknames `@daily` and the like. When both days are
|
|
27
|
+
* restricted, a day that matches either one matches, as in cron.
|
|
28
|
+
*/
|
|
29
|
+
class CronExpression {
|
|
30
|
+
constructor(source, minutes, hours, days, months, weekdays,
|
|
31
|
+
/** Whether each day field is `*`. */
|
|
32
|
+
anyDay, anyWeekday) {
|
|
33
|
+
this.source = source;
|
|
34
|
+
this.minutes = minutes;
|
|
35
|
+
this.hours = hours;
|
|
36
|
+
this.days = days;
|
|
37
|
+
this.months = months;
|
|
38
|
+
this.weekdays = weekdays;
|
|
39
|
+
this.anyDay = anyDay;
|
|
40
|
+
this.anyWeekday = anyWeekday;
|
|
41
|
+
}
|
|
42
|
+
/** Throws with what is wrong. */
|
|
43
|
+
static parse(text) {
|
|
44
|
+
var _a;
|
|
45
|
+
const source = text.trim().replace(/\s+/g, ' ');
|
|
46
|
+
const expanded = (_a = exports.NICKNAMES[source.toLowerCase()]) !== null && _a !== void 0 ? _a : source;
|
|
47
|
+
const parts = expanded.split(' ');
|
|
48
|
+
if (parts.length !== 5) {
|
|
49
|
+
throw new Error(`A cron expression has five fields (minute hour day month weekday), or is one of ${Object.keys(exports.NICKNAMES).join(', ')}: ${JSON.stringify(text)} has ${parts.length}.`);
|
|
50
|
+
}
|
|
51
|
+
const sets = parts.map((part, index) => CronExpression.field(part, FIELDS[index]));
|
|
52
|
+
const weekdays = sets[4];
|
|
53
|
+
if (weekdays.delete(7)) {
|
|
54
|
+
weekdays.add(0);
|
|
55
|
+
}
|
|
56
|
+
return new CronExpression(source, sets[0], sets[1], sets[2], sets[3], weekdays, parts[2] === '*', parts[4] === '*');
|
|
57
|
+
}
|
|
58
|
+
/** Whether the text is a valid expression. */
|
|
59
|
+
static isValid(text) {
|
|
60
|
+
try {
|
|
61
|
+
CronExpression.parse(text);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
static field(text, field) {
|
|
69
|
+
const values = new Set();
|
|
70
|
+
for (const item of text.toLowerCase().split(',')) {
|
|
71
|
+
const [range, stepText, extra] = item.split('/');
|
|
72
|
+
const step = stepText === undefined ? 1 : Number(stepText);
|
|
73
|
+
if (extra !== undefined || !Number.isInteger(step) || step < 1) {
|
|
74
|
+
throw new Error(`${JSON.stringify(item)} is not a valid ${field.name}: a step is a whole number from 1.`);
|
|
75
|
+
}
|
|
76
|
+
let from;
|
|
77
|
+
let to;
|
|
78
|
+
if (range === '*') {
|
|
79
|
+
from = field.min;
|
|
80
|
+
to = field.max;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
const [first, last, more] = range.split('-');
|
|
84
|
+
if (more !== undefined) {
|
|
85
|
+
throw new Error(`${JSON.stringify(item)} is not a valid ${field.name}.`);
|
|
86
|
+
}
|
|
87
|
+
from = CronExpression.value(first, field);
|
|
88
|
+
// `5/15` is from 5 to the end, by 15.
|
|
89
|
+
to = last === undefined ? (stepText === undefined ? from : field.max) : CronExpression.value(last, field);
|
|
90
|
+
}
|
|
91
|
+
if (from > to) {
|
|
92
|
+
throw new Error(`${JSON.stringify(item)} is not a valid ${field.name}: the range goes backwards.`);
|
|
93
|
+
}
|
|
94
|
+
for (let value = from; value <= to; value += step) {
|
|
95
|
+
values.add(value);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return values;
|
|
99
|
+
}
|
|
100
|
+
static value(text, field) {
|
|
101
|
+
var _a;
|
|
102
|
+
var _b;
|
|
103
|
+
const named = (_b = (_a = field.names) === null || _a === void 0 ? void 0 : _a.indexOf(text)) !== null && _b !== void 0 ? _b : -1;
|
|
104
|
+
const value = named >= 0 ? named + (field.min === 1 ? 1 : 0) : /^\d+$/.test(text) ? Number(text) : Number.NaN;
|
|
105
|
+
if (!(value >= field.min && value <= field.max)) {
|
|
106
|
+
throw new Error(`${JSON.stringify(text)} is not a valid ${field.name}: from ${field.min} to ${field.max}.`);
|
|
107
|
+
}
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
/** The first time after `after` (a minute later at least) that matches; undefined when none comes in four years. */
|
|
111
|
+
next(after) {
|
|
112
|
+
const time = new Date(after.getTime());
|
|
113
|
+
time.setSeconds(0, 0);
|
|
114
|
+
time.setMinutes(time.getMinutes() + 1);
|
|
115
|
+
for (let step = 0; step < MAX_STEPS; step++) {
|
|
116
|
+
if (!this.months.has(time.getMonth() + 1)) {
|
|
117
|
+
time.setMonth(time.getMonth() + 1, 1);
|
|
118
|
+
time.setHours(0, 0, 0, 0);
|
|
119
|
+
}
|
|
120
|
+
else if (!this.matchesDay(time)) {
|
|
121
|
+
time.setDate(time.getDate() + 1);
|
|
122
|
+
time.setHours(0, 0, 0, 0);
|
|
123
|
+
}
|
|
124
|
+
else if (!this.hours.has(time.getHours())) {
|
|
125
|
+
time.setHours(time.getHours() + 1, 0, 0, 0);
|
|
126
|
+
}
|
|
127
|
+
else if (!this.minutes.has(time.getMinutes())) {
|
|
128
|
+
time.setMinutes(time.getMinutes() + 1, 0, 0);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return time;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
matchesDay(time) {
|
|
137
|
+
const day = this.days.has(time.getDate());
|
|
138
|
+
const weekday = this.weekdays.has(time.getDay());
|
|
139
|
+
if (this.anyDay || this.anyWeekday) {
|
|
140
|
+
return day && weekday;
|
|
141
|
+
}
|
|
142
|
+
return day || weekday;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.CronExpression = CronExpression;
|
|
146
|
+
//# sourceMappingURL=cron-expression.js.map
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/** The name of the package: of its data, its host and the group of the conversations of its runs. */
|
|
2
|
+
export declare const NAME = "@celljs/ta-cron";
|
|
3
|
+
/** TA_HOST_EVENT of @celljs/ta-protocol, which the bundle of the pi extension does not import. */
|
|
4
|
+
export declare const TA_HOST_EVENT = "ta:host";
|
|
5
|
+
/** The custom message by which the commands answer: shown in the conversation, never read by the model. */
|
|
6
|
+
export declare const REPLY_TYPE = "ta-cron";
|
|
7
|
+
/**
|
|
8
|
+
* The start of what a run adds to the system prompt: the pi extension finds it there and keeps its tool
|
|
9
|
+
* and commands out of the run, so that a scheduled run never schedules more work.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RUN_MARK = "<ta-cron-run>";
|
|
12
|
+
/** When a task runs: once at a time, every so often, or when a cron expression of five fields says (local time). */
|
|
13
|
+
export type Schedule = {
|
|
14
|
+
kind: 'once';
|
|
15
|
+
at: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'interval';
|
|
18
|
+
every: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'cron';
|
|
21
|
+
expression: string;
|
|
22
|
+
};
|
|
23
|
+
/** When a run says so in the pages of Ta: `always`, `error` (when it failed) or `never`. */
|
|
24
|
+
export type NotifyLevel = 'always' | 'error' | 'never';
|
|
25
|
+
export type RunStatus = 'running' | 'success' | 'error' | 'missed';
|
|
26
|
+
/** A prompt and a time rule: what runs, where, and when it ran. */
|
|
27
|
+
export interface Task {
|
|
28
|
+
/** `task_` and 8 hexadecimal digits. */
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
prompt: string;
|
|
32
|
+
schedule: Schedule;
|
|
33
|
+
/** Where its runs work: a path of the machine of the Ta service or an `ssh://` location. */
|
|
34
|
+
cwd: string;
|
|
35
|
+
/** `<provider>/<model id>`; default: the settings. */
|
|
36
|
+
model?: string;
|
|
37
|
+
thinking?: string;
|
|
38
|
+
/** Default: `always` for a task that runs once, `error` for one that repeats. */
|
|
39
|
+
notify?: NotifyLevel;
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
/** ISO time of the next run; none once a task that ran once is done, or when its rule has no next time. */
|
|
42
|
+
nextRunAt?: string;
|
|
43
|
+
lastRunAt?: string;
|
|
44
|
+
lastStatus?: RunStatus;
|
|
45
|
+
runCount: number;
|
|
46
|
+
failCount: number;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
49
|
+
}
|
|
50
|
+
/** One run of a task, in a conversation of its own. */
|
|
51
|
+
export interface Run {
|
|
52
|
+
/** `run_` and 8 hexadecimal digits. */
|
|
53
|
+
id: string;
|
|
54
|
+
taskId: string;
|
|
55
|
+
/** `schedule`: its time came; `manual`: the user ran it, and its schedule stays as it was. */
|
|
56
|
+
trigger: 'schedule' | 'manual';
|
|
57
|
+
status: RunStatus;
|
|
58
|
+
startedAt: string;
|
|
59
|
+
endedAt?: string;
|
|
60
|
+
/** The last answer of the run, cut to SUMMARY_MAX characters; the conversation holds all of it. */
|
|
61
|
+
summary?: string;
|
|
62
|
+
error?: string;
|
|
63
|
+
/** Why it failed, when the Ta service knows: it stopped during the run, or the run took too long. */
|
|
64
|
+
reason?: 'interrupted' | 'timeout';
|
|
65
|
+
cwd: string;
|
|
66
|
+
/** The conversation of the run, which the page opens. */
|
|
67
|
+
sessionFile?: string;
|
|
68
|
+
}
|
|
69
|
+
/** The latest run that ended, for the pages that tell the user (the key LATEST_KEY). */
|
|
70
|
+
export interface FinishedRun {
|
|
71
|
+
run: Run;
|
|
72
|
+
taskName: string;
|
|
73
|
+
/** Whether the notify level of the task says to tell the user. */
|
|
74
|
+
notify: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** What makes a task; the rest has defaults. */
|
|
77
|
+
export interface TaskInput {
|
|
78
|
+
prompt: string;
|
|
79
|
+
schedule: Schedule;
|
|
80
|
+
name?: string;
|
|
81
|
+
cwd?: string;
|
|
82
|
+
model?: string;
|
|
83
|
+
thinking?: string;
|
|
84
|
+
notify?: NotifyLevel;
|
|
85
|
+
enabled?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** What changes a task: a field left out stays; `''` (or `null`) clears model, thinking and notify. */
|
|
88
|
+
export interface TaskPatch {
|
|
89
|
+
name?: string;
|
|
90
|
+
prompt?: string;
|
|
91
|
+
schedule?: Schedule;
|
|
92
|
+
cwd?: string;
|
|
93
|
+
model?: string | null;
|
|
94
|
+
thinking?: string | null;
|
|
95
|
+
notify?: NotifyLevel | '' | null;
|
|
96
|
+
enabled?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The scheduler in the Ta service (`pi.host`): the only writer of the tasks and their runs. Its pi
|
|
100
|
+
* extension calls it in the process, its web extension with `callHost`; a task is named by its id, a
|
|
101
|
+
* prefix of it, or its name.
|
|
102
|
+
*/
|
|
103
|
+
export interface CronService {
|
|
104
|
+
list(): Promise<Task[]>;
|
|
105
|
+
get(ref: string): Promise<Task>;
|
|
106
|
+
/** Newest first. */
|
|
107
|
+
runs(ref: string, limit?: number): Promise<Run[]>;
|
|
108
|
+
add(input: TaskInput): Promise<Task>;
|
|
109
|
+
update(ref: string, patch: TaskPatch): Promise<Task>;
|
|
110
|
+
setEnabled(ref: string, enabled: boolean): Promise<Task>;
|
|
111
|
+
remove(ref: string): Promise<Task>;
|
|
112
|
+
/** The tasks of a directory, or all of them without one; their runs go too. */
|
|
113
|
+
clear(cwd?: string): Promise<Task[]>;
|
|
114
|
+
/** Runs a task now, leaving its schedule as it is; resolves with the run once it started. */
|
|
115
|
+
run(ref: string): Promise<Run>;
|
|
116
|
+
}
|
|
117
|
+
/** What a command answered, in `details` of its REPLY_TYPE message: the page shows it in its language. */
|
|
118
|
+
export type Reply = {
|
|
119
|
+
kind: 'task';
|
|
120
|
+
event: 'created' | 'updated' | 'enabled' | 'disabled';
|
|
121
|
+
task: Task;
|
|
122
|
+
} | {
|
|
123
|
+
kind: 'removed';
|
|
124
|
+
tasks: Task[];
|
|
125
|
+
} | {
|
|
126
|
+
kind: 'started';
|
|
127
|
+
task: Task;
|
|
128
|
+
run: Run;
|
|
129
|
+
} | {
|
|
130
|
+
kind: 'list';
|
|
131
|
+
tasks: Task[];
|
|
132
|
+
} | {
|
|
133
|
+
kind: 'show';
|
|
134
|
+
task: Task;
|
|
135
|
+
runs: Run[];
|
|
136
|
+
} | {
|
|
137
|
+
kind: 'help';
|
|
138
|
+
} | {
|
|
139
|
+
kind: 'error';
|
|
140
|
+
message: string;
|
|
141
|
+
};
|
|
142
|
+
export declare namespace Keys {
|
|
143
|
+
const TASKS = "tasks";
|
|
144
|
+
const LATEST = "latest";
|
|
145
|
+
function runs(taskId: string): string;
|
|
146
|
+
}
|
|
147
|
+
export declare namespace Limits {
|
|
148
|
+
/** The runs kept per task, newest first. */
|
|
149
|
+
const RUNS_KEPT = 20;
|
|
150
|
+
const SUMMARY_MAX = 4000;
|
|
151
|
+
/** The shortest interval. */
|
|
152
|
+
const MIN_INTERVAL_MS = 60000;
|
|
153
|
+
/** A run that takes longer is stopped and fails. */
|
|
154
|
+
const RUN_TIMEOUT_MS: number;
|
|
155
|
+
/** A task that runs once and whose time passed by more than this while the Ta service was not running is missed, not run. */
|
|
156
|
+
const GRACE_MS: number;
|
|
157
|
+
/** Runs at the same time; the others wait for one to end. */
|
|
158
|
+
const PARALLEL_RUNS = 3;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=cron-protocol.d.ts.map
|