@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PersonalInfo = void 0;
|
|
4
|
+
const EMAIL = /(?<![\w.%+-])[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,24}(?![\w-])/g;
|
|
5
|
+
/** A mobile number of China, with or without +86, in groups or not; or any number written with a + and a country code. */
|
|
6
|
+
const PHONE = /(?<![\w+])(?:(?:\+?86[ -]?)?1[3-9]\d(?:[ -]?\d{4}){2}|\+[1-9]\d{0,2}[ -]?\d{2,4}(?:[ -]?\d{2,4}){1,3})(?![\w])/g;
|
|
7
|
+
const ID_NUMBER = /(?<![\w])\d{17}[\dXx](?![\w])/g;
|
|
8
|
+
/** 15 to 19 digits, in groups of four or not. */
|
|
9
|
+
const BANK_CARD = /(?<![\w-])\d{4}(?:[ -]?\d{4}){2}(?:[ -]?\d{1,4}){1,2}(?![\w-])/g;
|
|
10
|
+
/** Addresses no one owns, or of machines. */
|
|
11
|
+
const NOT_PERSONAL = /^(?:no-?reply|noreply|donotreply|git|root|admin|bot)@|@(?:example\.(?:com|org|net)|test|localhost|users\.noreply\.github\.com)$/i;
|
|
12
|
+
/**
|
|
13
|
+
* Personal details in what the user sends (docs/design/ta-secrets.md 3.3, 12): phone numbers, emails, ID numbers of
|
|
14
|
+
* China (the check digit and a birth date that can be) and bank cards (the Luhn check and the prefixes of card
|
|
15
|
+
* networks), none overlapping. Each has a masked hint, which is all the model is told of it besides its name.
|
|
16
|
+
*/
|
|
17
|
+
var PersonalInfo;
|
|
18
|
+
(function (PersonalInfo) {
|
|
19
|
+
function spans(text) {
|
|
20
|
+
const found = [];
|
|
21
|
+
const add = (pattern, kind, keep) => {
|
|
22
|
+
for (const match of text.matchAll(pattern)) {
|
|
23
|
+
if (keep(match[0])) {
|
|
24
|
+
found.push({ start: match.index, end: match.index + match[0].length, kind, hint: mask(kind, match[0]) });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
add(EMAIL, 'EMAIL', value => !NOT_PERSONAL.test(value));
|
|
29
|
+
add(ID_NUMBER, 'ID_NUMBER', idNumber);
|
|
30
|
+
add(BANK_CARD, 'BANK_CARD', bankCard);
|
|
31
|
+
add(PHONE, 'PHONE', phone);
|
|
32
|
+
found.sort((a, b) => a.start - b.start || b.end - a.end);
|
|
33
|
+
const spans = [];
|
|
34
|
+
for (const span of found) {
|
|
35
|
+
const last = spans.at(-1);
|
|
36
|
+
if (!last || span.start >= last.end) {
|
|
37
|
+
spans.push(span);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return spans;
|
|
41
|
+
}
|
|
42
|
+
PersonalInfo.spans = spans;
|
|
43
|
+
function digits(value) {
|
|
44
|
+
return value.replace(/\D/g, '');
|
|
45
|
+
}
|
|
46
|
+
PersonalInfo.digits = digits;
|
|
47
|
+
/** A citizen ID number of China: its check digit, and a birth date between 1900 and today. */
|
|
48
|
+
function idNumber(value) {
|
|
49
|
+
if (!/^\d{17}[\dXx]$/.test(value)) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
|
|
53
|
+
const sum = weights.reduce((total, weight, index) => total + weight * Number(value[index]), 0);
|
|
54
|
+
if ('10X98765432'[sum % 11] !== value[17].toUpperCase()) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const year = Number(value.slice(6, 10));
|
|
58
|
+
const month = Number(value.slice(10, 12));
|
|
59
|
+
const day = Number(value.slice(12, 14));
|
|
60
|
+
const birth = new Date(Date.UTC(year, month - 1, day));
|
|
61
|
+
return year >= 1900 && birth.getTime() <= Date.now() && birth.getUTCMonth() === month - 1 && birth.getUTCDate() === day;
|
|
62
|
+
}
|
|
63
|
+
PersonalInfo.idNumber = idNumber;
|
|
64
|
+
/** A card of a network (Visa, Mastercard, UnionPay, Amex, JCB, Discover) whose digits pass Luhn's check. */
|
|
65
|
+
function bankCard(value) {
|
|
66
|
+
const number = digits(value);
|
|
67
|
+
if (number.length < 15 || number.length > 19 || !/^(?:4|5[1-5]|2[2-7]|62|3[47]|35|6011|65)/.test(number)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
let sum = 0;
|
|
71
|
+
for (let index = 0; index < number.length; index++) {
|
|
72
|
+
let digit = Number(number[number.length - 1 - index]);
|
|
73
|
+
if (index % 2 === 1) {
|
|
74
|
+
digit *= 2;
|
|
75
|
+
if (digit > 9) {
|
|
76
|
+
digit -= 9;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
sum += digit;
|
|
80
|
+
}
|
|
81
|
+
return sum % 10 === 0;
|
|
82
|
+
}
|
|
83
|
+
PersonalInfo.bankCard = bankCard;
|
|
84
|
+
function phone(value) {
|
|
85
|
+
const number = digits(value);
|
|
86
|
+
return value.startsWith('+') ? number.length >= 8 && number.length <= 15 : /^(?:86)?1[3-9]\d{9}$/.test(number);
|
|
87
|
+
}
|
|
88
|
+
PersonalInfo.phone = phone;
|
|
89
|
+
/** How a detail reads masked: 138****1234, a***@qq.com, 1101**********123X, **** 1234. */
|
|
90
|
+
function mask(kind, value) {
|
|
91
|
+
if (kind === 'EMAIL') {
|
|
92
|
+
const [local, domain] = value.split('@');
|
|
93
|
+
return `${local.slice(0, 1)}***@${domain}`;
|
|
94
|
+
}
|
|
95
|
+
const number = kind === 'ID_NUMBER' ? value.toUpperCase() : digits(value);
|
|
96
|
+
if (kind === 'PHONE') {
|
|
97
|
+
const china = number.length === 13 && number.startsWith('86');
|
|
98
|
+
const local = china ? number.slice(2) : number;
|
|
99
|
+
return `${value.startsWith('+') && !china ? '+' : ''}${local.slice(0, 3)}****${local.slice(-4)}`;
|
|
100
|
+
}
|
|
101
|
+
if (kind === 'ID_NUMBER') {
|
|
102
|
+
return `${number.slice(0, 4)}**********${number.slice(-4)}`;
|
|
103
|
+
}
|
|
104
|
+
return `**** ${number.slice(-4)}`;
|
|
105
|
+
}
|
|
106
|
+
PersonalInfo.mask = mask;
|
|
107
|
+
})(PersonalInfo || (exports.PersonalInfo = PersonalInfo = {}));
|
|
108
|
+
//# sourceMappingURL=personal-info.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** A key and the certificate that goes with it, in PEM. */
|
|
2
|
+
export interface KeyPair {
|
|
3
|
+
key: string;
|
|
4
|
+
cert: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The certificates of the proxy of the vault (docs/design/ta-secrets.md 11): a certificate authority made for this
|
|
8
|
+
* run of ta serve, its key in a folder only the user reads, removed on dispose, and a certificate of each host the
|
|
9
|
+
* proxy speaks for, signed by it with `openssl`. It is trusted only by the commands given the bundle (`bundle`),
|
|
10
|
+
* never installed in the system.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ProxyCerts {
|
|
13
|
+
protected readonly openssl: string;
|
|
14
|
+
protected folder: Promise<string> | undefined;
|
|
15
|
+
protected authority: Promise<KeyPair> | undefined;
|
|
16
|
+
protected readonly leaves: Map<string, Promise<KeyPair>>;
|
|
17
|
+
protected bundled: Promise<string> | undefined;
|
|
18
|
+
constructor(openssl?: string);
|
|
19
|
+
/** The certificate of the authority, in PEM. */
|
|
20
|
+
ca(): Promise<string>;
|
|
21
|
+
/** A file of the certificate of the authority alone. */
|
|
22
|
+
cacertFile(): Promise<string>;
|
|
23
|
+
/** The certificate of a host (a name or an address), made once. */
|
|
24
|
+
leaf(host: string): Promise<KeyPair>;
|
|
25
|
+
/** Whether a certificate was made for a host. */
|
|
26
|
+
madeFor(host: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* A file of the authorities a command trusts: those of Node, those of the system and of the user's environment,
|
|
29
|
+
* and this one, so that hosts the proxy only tunnels are checked as ever.
|
|
30
|
+
*/
|
|
31
|
+
bundle(): Promise<string>;
|
|
32
|
+
dispose(): Promise<void>;
|
|
33
|
+
protected dir(): Promise<string>;
|
|
34
|
+
protected made(): Promise<KeyPair>;
|
|
35
|
+
protected sign(host: string): Promise<KeyPair>;
|
|
36
|
+
protected run(args: string[]): Promise<void>;
|
|
37
|
+
/** A key of P-256, in PEM. */
|
|
38
|
+
static key(): string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=proxy-certs.d.ts.map
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ProxyCerts = void 0;
|
|
37
|
+
const node_crypto_1 = require("node:crypto");
|
|
38
|
+
const promises_1 = require("node:fs/promises");
|
|
39
|
+
const node_net_1 = require("node:net");
|
|
40
|
+
const node_os_1 = require("node:os");
|
|
41
|
+
const node_path_1 = require("node:path");
|
|
42
|
+
const tls = __importStar(require("node:tls"));
|
|
43
|
+
const vault_store_1 = require("./vault-store");
|
|
44
|
+
const CONFIG = `[req]
|
|
45
|
+
distinguished_name = dn
|
|
46
|
+
prompt = no
|
|
47
|
+
[dn]
|
|
48
|
+
CN = Ta vault proxy
|
|
49
|
+
[ca]
|
|
50
|
+
basicConstraints = critical,CA:TRUE,pathlen:0
|
|
51
|
+
keyUsage = critical,keyCertSign,cRLSign
|
|
52
|
+
subjectKeyIdentifier = hash
|
|
53
|
+
`;
|
|
54
|
+
/**
|
|
55
|
+
* The certificates of the proxy of the vault (docs/design/ta-secrets.md 11): a certificate authority made for this
|
|
56
|
+
* run of ta serve, its key in a folder only the user reads, removed on dispose, and a certificate of each host the
|
|
57
|
+
* proxy speaks for, signed by it with `openssl`. It is trusted only by the commands given the bundle (`bundle`),
|
|
58
|
+
* never installed in the system.
|
|
59
|
+
*/
|
|
60
|
+
class ProxyCerts {
|
|
61
|
+
constructor(openssl = process.env.TA_SECRETS_OPENSSL || 'openssl') {
|
|
62
|
+
this.openssl = openssl;
|
|
63
|
+
this.leaves = new Map();
|
|
64
|
+
}
|
|
65
|
+
/** The certificate of the authority, in PEM. */
|
|
66
|
+
async ca() {
|
|
67
|
+
return (await this.made()).cert;
|
|
68
|
+
}
|
|
69
|
+
/** A file of the certificate of the authority alone. */
|
|
70
|
+
async cacertFile() {
|
|
71
|
+
const file = (0, node_path_1.join)(await this.dir(), 'ca-only.pem');
|
|
72
|
+
await (0, promises_1.writeFile)(file, await this.ca(), { mode: 0o600 });
|
|
73
|
+
return file;
|
|
74
|
+
}
|
|
75
|
+
/** The certificate of a host (a name or an address), made once. */
|
|
76
|
+
leaf(host) {
|
|
77
|
+
let leaf = this.leaves.get(host);
|
|
78
|
+
if (!leaf) {
|
|
79
|
+
leaf = this.sign(host);
|
|
80
|
+
this.leaves.set(host, leaf);
|
|
81
|
+
leaf.catch(() => this.leaves.delete(host));
|
|
82
|
+
}
|
|
83
|
+
return leaf;
|
|
84
|
+
}
|
|
85
|
+
/** Whether a certificate was made for a host. */
|
|
86
|
+
madeFor(host) {
|
|
87
|
+
return this.leaves.has(host);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A file of the authorities a command trusts: those of Node, those of the system and of the user's environment,
|
|
91
|
+
* and this one, so that hosts the proxy only tunnels are checked as ever.
|
|
92
|
+
*/
|
|
93
|
+
bundle() {
|
|
94
|
+
var _a;
|
|
95
|
+
(_a = this.bundled) !== null && _a !== void 0 ? _a : (this.bundled = (async () => {
|
|
96
|
+
const getCA = tls.getCACertificates;
|
|
97
|
+
const system = (() => {
|
|
98
|
+
var _a;
|
|
99
|
+
try {
|
|
100
|
+
return (_a = getCA === null || getCA === void 0 ? void 0 : getCA('system')) !== null && _a !== void 0 ? _a : [];
|
|
101
|
+
}
|
|
102
|
+
catch (_b) {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
})();
|
|
106
|
+
const extra = await Promise.all([process.env.NODE_EXTRA_CA_CERTS, process.env.SSL_CERT_FILE].filter(Boolean).map(file => (0, promises_1.readFile)(file, 'utf8').catch(() => '')));
|
|
107
|
+
const all = [...new Set([...tls.rootCertificates, ...system].map(cert => cert.trim()))];
|
|
108
|
+
const file = (0, node_path_1.join)(await this.dir(), 'bundle.pem');
|
|
109
|
+
await (0, promises_1.writeFile)(file, `${[...all, ...extra.map(text => text.trim()).filter(Boolean), (await this.ca()).trim()].join('\n')}\n`, { mode: 0o600 });
|
|
110
|
+
return file;
|
|
111
|
+
})());
|
|
112
|
+
this.bundled.catch(() => {
|
|
113
|
+
this.bundled = undefined;
|
|
114
|
+
});
|
|
115
|
+
return this.bundled;
|
|
116
|
+
}
|
|
117
|
+
async dispose() {
|
|
118
|
+
const folder = this.folder;
|
|
119
|
+
this.folder = undefined;
|
|
120
|
+
this.authority = undefined;
|
|
121
|
+
this.bundled = undefined;
|
|
122
|
+
this.leaves.clear();
|
|
123
|
+
if (folder) {
|
|
124
|
+
await (0, promises_1.rm)(await folder, { recursive: true, force: true }).catch(() => undefined);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
dir() {
|
|
128
|
+
var _a;
|
|
129
|
+
(_a = this.folder) !== null && _a !== void 0 ? _a : (this.folder = (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'ta-vault-proxy-')));
|
|
130
|
+
return this.folder;
|
|
131
|
+
}
|
|
132
|
+
made() {
|
|
133
|
+
var _a;
|
|
134
|
+
(_a = this.authority) !== null && _a !== void 0 ? _a : (this.authority = (async () => {
|
|
135
|
+
const dir = await this.dir();
|
|
136
|
+
const key = (0, node_path_1.join)(dir, 'ca.key');
|
|
137
|
+
const cert = (0, node_path_1.join)(dir, 'ca.pem');
|
|
138
|
+
const config = (0, node_path_1.join)(dir, 'ca.cnf');
|
|
139
|
+
await (0, promises_1.writeFile)(key, ProxyCerts.key(), { mode: 0o600 });
|
|
140
|
+
await (0, promises_1.writeFile)(config, CONFIG, { mode: 0o600 });
|
|
141
|
+
await this.run(['req', '-x509', '-new', '-key', key, '-out', cert, '-days', '365', '-sha256', '-config', config, '-extensions', 'ca']);
|
|
142
|
+
return { key: await (0, promises_1.readFile)(key, 'utf8'), cert: await (0, promises_1.readFile)(cert, 'utf8') };
|
|
143
|
+
})());
|
|
144
|
+
this.authority.catch(() => {
|
|
145
|
+
this.authority = undefined;
|
|
146
|
+
});
|
|
147
|
+
return this.authority;
|
|
148
|
+
}
|
|
149
|
+
async sign(host) {
|
|
150
|
+
await this.made();
|
|
151
|
+
const dir = await this.dir();
|
|
152
|
+
const stem = (0, node_path_1.join)(dir, `leaf-${(0, node_crypto_1.randomBytes)(6).toString('hex')}`);
|
|
153
|
+
const key = ProxyCerts.key();
|
|
154
|
+
const san = (0, node_net_1.isIP)(host) ? `IP:${host}` : `DNS:${host}`;
|
|
155
|
+
await (0, promises_1.writeFile)(`${stem}.key`, key, { mode: 0o600 });
|
|
156
|
+
await (0, promises_1.writeFile)(`${stem}.cnf`, CONFIG.replace('CN = Ta vault proxy', `CN = ${host.replace(/[^A-Za-z0-9.:-]/g, '')}`), { mode: 0o600 });
|
|
157
|
+
await (0, promises_1.writeFile)(`${stem}.ext`, `[leaf]\nbasicConstraints = critical,CA:FALSE\nkeyUsage = critical,digitalSignature\nextendedKeyUsage = serverAuth\nsubjectAltName = ${san}\n`, { mode: 0o600 });
|
|
158
|
+
await this.run(['req', '-new', '-key', `${stem}.key`, '-out', `${stem}.csr`, '-config', `${stem}.cnf`]);
|
|
159
|
+
await this.run([
|
|
160
|
+
'x509',
|
|
161
|
+
'-req',
|
|
162
|
+
'-in',
|
|
163
|
+
`${stem}.csr`,
|
|
164
|
+
'-CA',
|
|
165
|
+
(0, node_path_1.join)(dir, 'ca.pem'),
|
|
166
|
+
'-CAkey',
|
|
167
|
+
(0, node_path_1.join)(dir, 'ca.key'),
|
|
168
|
+
'-set_serial',
|
|
169
|
+
`0x1${(0, node_crypto_1.randomBytes)(15).toString('hex')}`,
|
|
170
|
+
'-days',
|
|
171
|
+
'90',
|
|
172
|
+
'-sha256',
|
|
173
|
+
'-extfile',
|
|
174
|
+
`${stem}.ext`,
|
|
175
|
+
'-extensions',
|
|
176
|
+
'leaf',
|
|
177
|
+
'-out',
|
|
178
|
+
`${stem}.pem`,
|
|
179
|
+
]);
|
|
180
|
+
const cert = await (0, promises_1.readFile)(`${stem}.pem`, 'utf8');
|
|
181
|
+
await Promise.all(['.key', '.csr', '.cnf', '.ext', '.pem'].map(suffix => (0, promises_1.rm)(stem + suffix, { force: true })));
|
|
182
|
+
return { key, cert };
|
|
183
|
+
}
|
|
184
|
+
async run(args) {
|
|
185
|
+
const done = await vault_store_1.VaultStores.run(this.openssl, args);
|
|
186
|
+
if (done.code !== 0) {
|
|
187
|
+
throw new Error(`openssl ${args[0]} failed: ${done.stderr.trim().split('\n')[0] || done.code}`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/** A key of P-256, in PEM. */
|
|
191
|
+
static key() {
|
|
192
|
+
return (0, node_crypto_1.generateKeyPairSync)('ec', {
|
|
193
|
+
namedCurve: 'prime256v1',
|
|
194
|
+
privateKeyEncoding: { type: 'pkcs8', format: 'pem' },
|
|
195
|
+
publicKeyEncoding: { type: 'spki', format: 'pem' },
|
|
196
|
+
}).privateKey;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
exports.ProxyCerts = ProxyCerts;
|
|
200
|
+
//# sourceMappingURL=proxy-certs.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The proxy of the vault against servers of names made up (`*.vault.test`) and curl, for vault-proxy.spec.ts, which
|
|
3
|
+
* runs it in Node: ta serve runs in Node, and Bun does not speak TLS over a socket it took as a server.
|
|
4
|
+
*/
|
|
5
|
+
export declare function proxyScenario(): Promise<Record<string, unknown>>;
|
|
6
|
+
//# sourceMappingURL=proxy-scenario.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proxyScenario = proxyScenario;
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
|
+
const node_https_1 = require("node:https");
|
|
6
|
+
const node_net_1 = require("node:net");
|
|
7
|
+
const proxy_certs_1 = require("./proxy-certs");
|
|
8
|
+
const vault_proxy_1 = require("./vault-proxy");
|
|
9
|
+
/**
|
|
10
|
+
* The proxy of the vault against servers of names made up (`*.vault.test`) and curl, for vault-proxy.spec.ts, which
|
|
11
|
+
* runs it in Node: ta serve runs in Node, and Bun does not speak TLS over a socket it took as a server.
|
|
12
|
+
*/
|
|
13
|
+
async function proxyScenario() {
|
|
14
|
+
var _a;
|
|
15
|
+
const others = new proxy_certs_1.ProxyCerts();
|
|
16
|
+
const certs = new proxy_certs_1.ProxyCerts();
|
|
17
|
+
const uses = [];
|
|
18
|
+
const seen = [];
|
|
19
|
+
const servers = {};
|
|
20
|
+
for (const host of ['api.vault.test', 'other.vault.test', 'git.vault.test']) {
|
|
21
|
+
const leaf = await others.leaf(host);
|
|
22
|
+
const server = (0, node_https_1.createServer)({ key: leaf.key, cert: leaf.cert }, (request, response) => {
|
|
23
|
+
var _a;
|
|
24
|
+
seen.push({ host, url: request.url, headers: request.headers });
|
|
25
|
+
response.end(`seen ${(_a = request.headers.authorization) !== null && _a !== void 0 ? _a : ''} ${request.url}`);
|
|
26
|
+
});
|
|
27
|
+
await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
|
|
28
|
+
servers[host] = { server, port: server.address().port };
|
|
29
|
+
}
|
|
30
|
+
const proxy = new vault_proxy_1.VaultProxy({
|
|
31
|
+
certs,
|
|
32
|
+
onUse: use => uses.push(use),
|
|
33
|
+
trust: [await others.ca()],
|
|
34
|
+
connect: (host, port) => new Promise((resolve, reject) => {
|
|
35
|
+
const known = servers[host];
|
|
36
|
+
const socket = (0, node_net_1.connect)(known && port === 443 ? known.port : 1, '127.0.0.1');
|
|
37
|
+
socket.once('connect', () => resolve(socket));
|
|
38
|
+
socket.once('error', reject);
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
const curl = async (session, url, ...args) => {
|
|
42
|
+
const child = (0, node_child_process_1.spawn)('curl', ['-sS', '--max-time', '10', '--proxy', session, '--cacert', await proxy.bundle(), ...args, url]);
|
|
43
|
+
let out = '';
|
|
44
|
+
child.stdout.on('data', chunk => {
|
|
45
|
+
out += chunk;
|
|
46
|
+
});
|
|
47
|
+
child.stderr.on('data', chunk => {
|
|
48
|
+
out += chunk;
|
|
49
|
+
});
|
|
50
|
+
await new Promise(resolve => child.on('close', resolve));
|
|
51
|
+
return out;
|
|
52
|
+
};
|
|
53
|
+
const value = 'sk-real-value-123456';
|
|
54
|
+
const placeholder = 'ta-vault-0123456789abcdef01234567';
|
|
55
|
+
try {
|
|
56
|
+
const session = await proxy.open([{ name: 'API', placeholder, value, hosts: ['api.vault.test', 'git.vault.test'] }], 'Deploy');
|
|
57
|
+
const bound = await curl(session, `https://api.vault.test/v1?key=${placeholder}`, '-H', `Authorization: Bearer ${placeholder}`);
|
|
58
|
+
const basic = await curl(session, 'https://git.vault.test/repo.git/info/refs', '-u', `x-access-token:${placeholder}`);
|
|
59
|
+
// Only the real authorities are trusted there: the tunnel leaves TLS to the host itself.
|
|
60
|
+
const tunnelled = await curl(session, 'https://other.vault.test/x', '-H', `Authorization: Bearer ${placeholder}`, '--cacert', await others.cacertFile());
|
|
61
|
+
// Another Host, or an absolute URL, through a bound host's TLS: the request goes to the bound host as itself, or not at all.
|
|
62
|
+
await curl(session, 'https://api.vault.test/fronted', '-H', `Authorization: Bearer ${placeholder}`, '-H', 'Host: other.vault.test');
|
|
63
|
+
const absolute = await curl(session, 'https://api.vault.test/', '--request-target', 'https://other.vault.test/absolute', '-o', '/dev/null', '-w', '%{http_code}');
|
|
64
|
+
const refused = await curl(session.replace(/ta:[^@]+@/, 'ta:nope@'), 'https://api.vault.test/refused', '-o', '/dev/null', '-w', '%{http_connect}');
|
|
65
|
+
return {
|
|
66
|
+
bound,
|
|
67
|
+
basic,
|
|
68
|
+
tunnelled,
|
|
69
|
+
refused: refused.trim().slice(-3),
|
|
70
|
+
expected: {
|
|
71
|
+
bearer: `seen Bearer ${value} /v1?key=${value}`,
|
|
72
|
+
basic: `seen Basic ${Buffer.from(`x-access-token:${value}`).toString('base64')} /repo.git/info/refs`,
|
|
73
|
+
},
|
|
74
|
+
placeholder,
|
|
75
|
+
uses,
|
|
76
|
+
otherMitm: certs.madeFor('other.vault.test'),
|
|
77
|
+
seenRefused: seen.some(one => one.url === '/refused'),
|
|
78
|
+
frontedHost: (_a = seen.find(one => one.url === '/fronted')) === null || _a === void 0 ? void 0 : _a.headers.host,
|
|
79
|
+
absolute: absolute.trim().slice(-3),
|
|
80
|
+
seenAbsolute: seen.some(one => { var _a; return (_a = one.url) === null || _a === void 0 ? void 0 : _a.includes('absolute'); }),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
await proxy.dispose();
|
|
85
|
+
await others.dispose();
|
|
86
|
+
for (const { server } of Object.values(servers)) {
|
|
87
|
+
server.close();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=proxy-scenario.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as ReactModule from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The React of the page, which a web extension cannot import: `activate` binds it before anything
|
|
4
|
+
* renders. The JSX of this package compiles to `React.createElement` (tsconfig.json).
|
|
5
|
+
*/
|
|
6
|
+
export declare let React: typeof ReactModule;
|
|
7
|
+
export declare function bind(react: typeof ReactModule): void;
|
|
8
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Values shorter than this are not looked for: they would hide ordinary words. */
|
|
2
|
+
export declare const MIN_SCRUBBED = 6;
|
|
3
|
+
/**
|
|
4
|
+
* Takes the values of the vault out of what the model reads, each as its name (`$TA_SECRET_GITHUB_TOKEN`): as
|
|
5
|
+
* written, in base64, URL-encoded and escaped in JSON, so that output of a command that printed one does not carry it.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Scrubber {
|
|
8
|
+
protected readonly names: Map<string, string>;
|
|
9
|
+
protected readonly pattern: RegExp | undefined;
|
|
10
|
+
/** `aliases`: more texts that stand for a name, as the placeholders of the proxy. */
|
|
11
|
+
constructor(values: ReadonlyMap<string, string>, aliases?: ReadonlyMap<string, string>);
|
|
12
|
+
get empty(): boolean;
|
|
13
|
+
/** The name of the value a text is, if it is one. */
|
|
14
|
+
nameOf(text: string): string | undefined;
|
|
15
|
+
text(text: string): string;
|
|
16
|
+
/** Strings of a value, deep; what did not change is the same object. Pictures are left as they are. */
|
|
17
|
+
value<T>(value: T): T;
|
|
18
|
+
static variants(value: string): string[];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=scrubber.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scrubber = exports.MIN_SCRUBBED = void 0;
|
|
4
|
+
const secrets_protocol_1 = require("./secrets-protocol");
|
|
5
|
+
/** Values shorter than this are not looked for: they would hide ordinary words. */
|
|
6
|
+
exports.MIN_SCRUBBED = 6;
|
|
7
|
+
function escapeRegExp(text) {
|
|
8
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Takes the values of the vault out of what the model reads, each as its name (`$TA_SECRET_GITHUB_TOKEN`): as
|
|
12
|
+
* written, in base64, URL-encoded and escaped in JSON, so that output of a command that printed one does not carry it.
|
|
13
|
+
*/
|
|
14
|
+
class Scrubber {
|
|
15
|
+
/** `aliases`: more texts that stand for a name, as the placeholders of the proxy. */
|
|
16
|
+
constructor(values, aliases = new Map()) {
|
|
17
|
+
this.names = new Map();
|
|
18
|
+
for (const [name, value] of [...values, ...aliases]) {
|
|
19
|
+
for (const variant of Scrubber.variants(value)) {
|
|
20
|
+
if (variant.length >= exports.MIN_SCRUBBED && !this.names.has(variant)) {
|
|
21
|
+
this.names.set(variant, name);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const all = [...this.names.keys()].sort((a, b) => b.length - a.length);
|
|
26
|
+
this.pattern = all.length ? new RegExp(all.map(escapeRegExp).join('|'), 'g') : undefined;
|
|
27
|
+
}
|
|
28
|
+
get empty() {
|
|
29
|
+
return !this.pattern;
|
|
30
|
+
}
|
|
31
|
+
/** The name of the value a text is, if it is one. */
|
|
32
|
+
nameOf(text) {
|
|
33
|
+
return this.names.get(text);
|
|
34
|
+
}
|
|
35
|
+
text(text) {
|
|
36
|
+
return this.pattern ? text.replace(this.pattern, found => secrets_protocol_1.SecretNames.handle(this.names.get(found))) : text;
|
|
37
|
+
}
|
|
38
|
+
/** Strings of a value, deep; what did not change is the same object. Pictures are left as they are. */
|
|
39
|
+
value(value) {
|
|
40
|
+
if (!this.pattern) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
if (typeof value === 'string') {
|
|
44
|
+
return this.text(value);
|
|
45
|
+
}
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
const items = value.map(item => this.value(item));
|
|
48
|
+
return (items.some((item, index) => item !== value[index]) ? items : value);
|
|
49
|
+
}
|
|
50
|
+
if (value && typeof value === 'object') {
|
|
51
|
+
if (value.type === 'image') {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
let changed = false;
|
|
55
|
+
const entries = Object.entries(value).map(([key, item]) => {
|
|
56
|
+
const next = this.value(item);
|
|
57
|
+
changed || (changed = next !== item);
|
|
58
|
+
return [key, next];
|
|
59
|
+
});
|
|
60
|
+
return (changed ? Object.fromEntries(entries) : value);
|
|
61
|
+
}
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
static variants(value) {
|
|
65
|
+
const json = JSON.stringify(value).slice(1, -1);
|
|
66
|
+
return [...new Set([value, Buffer.from(value, 'utf8').toString('base64'), encodeURIComponent(value), json])];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.Scrubber = Scrubber;
|
|
70
|
+
//# sourceMappingURL=scrubber.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** The `name` of the package.json: what TaHostUtil.reach and callHost name. */
|
|
2
|
+
export declare const NAME = "@celljs/ta-secrets";
|
|
3
|
+
/** The section of pi's system prompt that tells the model how secrets are used. */
|
|
4
|
+
export declare const SECTION = "ta-secrets";
|
|
5
|
+
/** The tool by which the model asks the user for a secret the vault lacks. */
|
|
6
|
+
export declare const REQUEST_TOOL = "request_secret";
|
|
7
|
+
/** A secret is named in commands and in what the model reads by this prefix and its name: `$TA_SECRET_GITHUB_TOKEN`. */
|
|
8
|
+
export declare const ENV_PREFIX = "TA_SECRET_";
|
|
9
|
+
/** Keys of the data of the package: what the page reads (no value is ever there). */
|
|
10
|
+
export declare namespace Keys {
|
|
11
|
+
/** SecretEntry[]: what is kept, by name. */
|
|
12
|
+
const ENTRIES = "entries";
|
|
13
|
+
/** boolean, true unless set: secrets in what the user sends go into the vault first. */
|
|
14
|
+
const CAPTURE = "capture";
|
|
15
|
+
/** boolean, true unless set: phone numbers, emails, ID numbers and bank cards in what the user sends go into the vault first. */
|
|
16
|
+
const PERSONAL = "personal";
|
|
17
|
+
/** SecretUse[]: the latest commands that were given secrets, the latest last. */
|
|
18
|
+
const USES = "uses";
|
|
19
|
+
}
|
|
20
|
+
export type SecretKind = 'credential' | 'personal';
|
|
21
|
+
/** How a secret came: typed in the settings, taken out of a message, or asked for by Ta. */
|
|
22
|
+
export type SecretSource = 'typed' | 'pasted' | 'asked';
|
|
23
|
+
/** What is kept of a secret besides its value, which only the keychain (or the file of the vault) holds. */
|
|
24
|
+
export interface SecretEntry {
|
|
25
|
+
/** `GITHUB_TOKEN`: upper case, digits and _. */
|
|
26
|
+
name: string;
|
|
27
|
+
kind: SecretKind;
|
|
28
|
+
/** What it is for, in the user's words or Ta's. */
|
|
29
|
+
note?: string;
|
|
30
|
+
source: SecretSource;
|
|
31
|
+
createdAt: number;
|
|
32
|
+
/** When a command last got it, and how many have. */
|
|
33
|
+
usedAt?: number;
|
|
34
|
+
uses?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Hosts it may go to (`github.com`, `api.example.com`, `host:8443`): git over https gets it there by itself, and a
|
|
37
|
+
* command naming it holds a placeholder, which the proxy of the vault turns into the value for these hosts alone.
|
|
38
|
+
*/
|
|
39
|
+
hosts?: string[];
|
|
40
|
+
/** The user name git gives with it; `x-access-token` (`oauth2` for GitLab) when not set. */
|
|
41
|
+
gitUser?: string;
|
|
42
|
+
/** A personal detail masked (`138****5678`): all the model and the pages are told of it. */
|
|
43
|
+
hint?: string;
|
|
44
|
+
/** A private key of SSH: ssh, scp, rsync and git get it through an agent of their own, never as a variable. */
|
|
45
|
+
ssh?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** How a secret was given: a variable a command named, git's credentials, an agent of SSH, the proxy to a host, the arguments of a tool. */
|
|
48
|
+
export type SecretHow = 'env' | 'git' | 'ssh' | 'http' | 'tool';
|
|
49
|
+
/** A command that was given secrets: when, which, how, the command (with names, never values) and its conversation. */
|
|
50
|
+
export interface SecretUse {
|
|
51
|
+
at: number;
|
|
52
|
+
names: string[];
|
|
53
|
+
how: SecretHow[];
|
|
54
|
+
command: string;
|
|
55
|
+
conversation?: string;
|
|
56
|
+
}
|
|
57
|
+
/** How many uses are kept. */
|
|
58
|
+
export declare const MAX_USES = 100;
|
|
59
|
+
/** What a page or the tool gives the vault to keep. */
|
|
60
|
+
export interface SecretInput {
|
|
61
|
+
name: string;
|
|
62
|
+
value: string;
|
|
63
|
+
kind?: SecretKind;
|
|
64
|
+
note?: string;
|
|
65
|
+
source?: SecretSource;
|
|
66
|
+
/** Hosts it may go to: `github.com`, or several in a line. */
|
|
67
|
+
hosts?: string[] | string;
|
|
68
|
+
hint?: string;
|
|
69
|
+
gitUser?: string;
|
|
70
|
+
}
|
|
71
|
+
/** Where values are kept. */
|
|
72
|
+
export interface VaultInfo {
|
|
73
|
+
store: 'keychain' | 'file';
|
|
74
|
+
}
|
|
75
|
+
export declare namespace SecretNames {
|
|
76
|
+
const MAX = 48;
|
|
77
|
+
/** `GITHUB_TOKEN` of "github token", "$TA_SECRET_github-token"; empty when nothing is left. */
|
|
78
|
+
function normalize(name: string): string;
|
|
79
|
+
function valid(name: string): boolean;
|
|
80
|
+
/** `TA_SECRET_GITHUB_TOKEN`. */
|
|
81
|
+
function env(name: string): string;
|
|
82
|
+
/** What the model reads in place of a value: `$TA_SECRET_GITHUB_TOKEN`. */
|
|
83
|
+
function handle(name: string): string;
|
|
84
|
+
/** The names a command refers to, `$TA_SECRET_X` or `${TA_SECRET_X}`, each once. */
|
|
85
|
+
function references(command: string): string[];
|
|
86
|
+
/** `base`, or `base_2`, `base_3`… when it is taken. */
|
|
87
|
+
function free(base: string, taken: ReadonlySet<string>): string;
|
|
88
|
+
/**
|
|
89
|
+
* Whether a value assigned to a name (`password = …`) looks like a secret rather than code: no brackets, and
|
|
90
|
+
* letters with digits or long. Values of a shape of their own (keys, tokens) need no such guess.
|
|
91
|
+
*/
|
|
92
|
+
function looksSecret(value: string): boolean;
|
|
93
|
+
/** `github.com` of `https://GitHub.com/acme`, `github.com, gitlab.com` or a list of them; what is no host is left out. */
|
|
94
|
+
function hosts(value: unknown): string[];
|
|
95
|
+
/** The hosts a token of GitHub, GitLab or Gitee is for, by its name or kind; none for others. */
|
|
96
|
+
function defaultHosts(name: string): string[];
|
|
97
|
+
/** The user name git gives with a token for a host. */
|
|
98
|
+
function gitUser(entry: Pick<SecretEntry, 'gitUser'>, host: string): string;
|
|
99
|
+
/** Whether a value is a private key of SSH (or another in PEM). */
|
|
100
|
+
function privateKey(value: string): boolean;
|
|
101
|
+
/** The uses of the data of the package, whatever was stored. */
|
|
102
|
+
function uses(value: unknown): SecretUse[];
|
|
103
|
+
/** The entries of the data of the package, whatever was stored. */
|
|
104
|
+
function entries(value: unknown): SecretEntry[];
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=secrets-protocol.d.ts.map
|