@celljs/ta 4.14.0 → 4.15.1
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/dist/cli.mjs +106 -7
- package/dist/gateway.mjs +156 -46
- package/dist/pi/CHANGELOG.md +13 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-3d/README.en.md +11 -0
- package/dist/pi/packages/ta-3d/README.md +11 -0
- package/dist/pi/packages/ta-3d/extension/index.mjs +120 -0
- package/dist/pi/packages/ta-3d/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-3d/lib/extension.js +24 -0
- package/dist/pi/packages/ta-3d/lib/i18n.d.ts +19 -0
- package/dist/pi/packages/ta-3d/lib/i18n.js +50 -0
- package/dist/pi/packages/ta-3d/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-3d/lib/index.js +22 -0
- package/dist/pi/packages/ta-3d/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-3d/lib/react.js +8 -0
- package/dist/pi/packages/ta-3d/lib/scene-card.d.ts +4 -0
- package/dist/pi/packages/ta-3d/lib/scene-card.js +60 -0
- package/dist/pi/packages/ta-3d/lib/scene-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-3d/lib/scene-prompt.js +15 -0
- package/dist/pi/packages/ta-3d/lib/scene-protocol.d.ts +5 -0
- package/dist/pi/packages/ta-3d/lib/scene-protocol.js +8 -0
- package/dist/pi/packages/ta-3d/lib/scene-spec.d.ts +59 -0
- package/dist/pi/packages/ta-3d/lib/scene-spec.js +141 -0
- package/dist/pi/packages/ta-3d/lib/scene-view.d.ts +57 -0
- package/dist/pi/packages/ta-3d/lib/scene-view.js +339 -0
- package/dist/pi/packages/ta-3d/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-3d/lib/style.js +33 -0
- package/dist/pi/packages/ta-3d/package.json +58 -0
- package/dist/pi/packages/ta-3d/web/index.js +660 -0
- package/dist/pi/packages/ta-agents/README.en.md +2 -2
- package/dist/pi/packages/ta-agents/README.md +2 -2
- package/dist/pi/packages/ta-agents/extension/index.mjs +248 -27
- package/dist/pi/packages/ta-agents/lib/acp-agent.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +20 -2
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +14 -5
- package/dist/pi/packages/ta-agents/lib/acp-protocol.js +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +13 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +29 -4
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +5 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +16 -4
- package/dist/pi/packages/ta-agents/lib/agent-session.js +34 -4
- package/dist/pi/packages/ta-agents/lib/agent-sign-in.d.ts +28 -0
- package/dist/pi/packages/ta-agents/lib/agent-sign-in.js +62 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.d.ts +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +40 -3
- package/dist/pi/packages/ta-agents/lib/extension.js +12 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +86 -22
- package/dist/pi/packages/ta-agents/lib/texts.js +101 -21
- package/dist/pi/packages/ta-agents/package.json +7 -3
- package/dist/pi/packages/ta-bots/extension/index.mjs +81 -10
- package/dist/pi/packages/ta-bots/host/index.mjs +165 -53
- package/dist/pi/packages/ta-bots/lib/bot-service.d.ts +6 -0
- package/dist/pi/packages/ta-bots/lib/bot-service.js +27 -2
- package/dist/pi/packages/ta-bots/lib/bot-store.d.ts +8 -1
- package/dist/pi/packages/ta-bots/lib/bot-store.js +16 -2
- package/dist/pi/packages/ta-bots/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-bots/lib/i18n.js +167 -2
- package/dist/pi/packages/ta-bots/lib/server-texts.d.ts +0 -1
- package/dist/pi/packages/ta-bots/lib/server-texts.js +45 -12
- package/dist/pi/packages/ta-bots/lib/weixin-channel.js +3 -1
- package/dist/pi/packages/ta-bots/package.json +7 -3
- package/dist/pi/packages/ta-bots/web/index.js +203 -1
- package/dist/pi/packages/ta-changes/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-changes/lib/i18n.js +51 -2
- package/dist/pi/packages/ta-changes/package.json +7 -3
- package/dist/pi/packages/ta-changes/web/index.js +87 -1
- package/dist/pi/packages/ta-channels/extension/index.mjs +78 -13
- package/dist/pi/packages/ta-channels/host/index.mjs +121 -56
- package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +2 -1
- package/dist/pi/packages/ta-channels/lib/agent-cards.js +4 -3
- package/dist/pi/packages/ta-channels/lib/handoff.d.ts +5 -4
- package/dist/pi/packages/ta-channels/lib/handoff.js +22 -6
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +361 -2
- package/dist/pi/packages/ta-channels/lib/team-ask.d.ts +2 -1
- package/dist/pi/packages/ta-channels/lib/team-ask.js +19 -7
- package/dist/pi/packages/ta-channels/lib/team.d.ts +2 -2
- package/dist/pi/packages/ta-channels/lib/team.js +1 -1
- package/dist/pi/packages/ta-channels/package.json +7 -3
- package/dist/pi/packages/ta-channels/web/index.js +482 -47
- package/dist/pi/packages/ta-computer-use/extension/index.mjs +11 -1
- package/dist/pi/packages/ta-computer-use/lib/cua-driver-access.js +20 -2
- package/dist/pi/packages/ta-computer-use/package.json +7 -3
- package/dist/pi/packages/ta-cron/extension/index.mjs +82 -8
- package/dist/pi/packages/ta-cron/host/index.mjs +67 -3
- package/dist/pi/packages/ta-cron/lib/editor.js +1 -1
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-cron/lib/i18n.js +217 -2
- package/dist/pi/packages/ta-cron/lib/page.js +14 -4
- package/dist/pi/packages/ta-cron/lib/schedule-util.js +29 -3
- package/dist/pi/packages/ta-cron/lib/server-texts.d.ts +2 -1
- package/dist/pi/packages/ta-cron/lib/server-texts.js +16 -9
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +4 -2
- package/dist/pi/packages/ta-cron/package.json +7 -3
- package/dist/pi/packages/ta-cron/web/index.js +302 -14
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +240 -2
- package/dist/pi/packages/ta-extensions/package.json +7 -3
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +1 -0
- package/dist/pi/packages/ta-extensions/web/index.js +329 -42
- package/dist/pi/packages/ta-games/README.en.md +1 -1
- package/dist/pi/packages/ta-games/README.md +1 -1
- package/dist/pi/packages/ta-games/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-games/lib/i18n.js +61 -2
- package/dist/pi/packages/ta-games/package.json +7 -3
- package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +41 -3
- package/dist/pi/packages/ta-games/web/index.js +97 -1
- package/dist/pi/packages/ta-glance/extension/index.mjs +32 -13
- package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +2 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.js +38 -16
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +1 -0
- package/dist/pi/packages/ta-glance/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-glance/lib/i18n.js +31 -2
- package/dist/pi/packages/ta-glance/package.json +7 -3
- package/dist/pi/packages/ta-glance/web/index.js +98 -14
- package/dist/pi/packages/ta-initiative/extension/index.mjs +89 -9
- package/dist/pi/packages/ta-initiative/host/index.mjs +120 -19
- package/dist/pi/packages/ta-initiative/lib/chat-kinds.js +15 -3
- package/dist/pi/packages/ta-initiative/lib/cron-proposals.js +20 -3
- package/dist/pi/packages/ta-initiative/lib/event-proposals.d.ts +2 -1
- package/dist/pi/packages/ta-initiative/lib/event-proposals.js +20 -6
- package/dist/pi/packages/ta-initiative/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-initiative/lib/i18n.js +151 -2
- package/dist/pi/packages/ta-initiative/lib/inbox.js +49 -30
- package/dist/pi/packages/ta-initiative/lib/initiative-protocol.d.ts +13 -4
- package/dist/pi/packages/ta-initiative/lib/initiative-protocol.js +11 -1
- package/dist/pi/packages/ta-initiative/lib/initiative-service.js +1 -1
- package/dist/pi/packages/ta-initiative/lib/material-util.d.ts +2 -1
- package/dist/pi/packages/ta-initiative/lib/material-util.js +9 -3
- package/dist/pi/packages/ta-initiative/lib/review-service.js +1 -1
- package/dist/pi/packages/ta-initiative/lib/server-texts.d.ts +2 -1
- package/dist/pi/packages/ta-initiative/lib/server-texts.js +11 -4
- package/dist/pi/packages/ta-initiative/lib/settings.js +2 -3
- package/dist/pi/packages/ta-initiative/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-initiative/lib/style.js +27 -14
- package/dist/pi/packages/ta-initiative/package.json +7 -3
- package/dist/pi/packages/ta-initiative/web/index.js +289 -55
- package/dist/pi/packages/ta-launcher/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-launcher/lib/i18n.js +71 -2
- package/dist/pi/packages/ta-launcher/package.json +7 -3
- package/dist/pi/packages/ta-launcher/web/index.js +107 -1
- package/dist/pi/packages/ta-manual/README.en.md +1 -1
- package/dist/pi/packages/ta-manual/README.md +1 -1
- package/dist/pi/packages/ta-manual/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-manual/lib/i18n.js +21 -2
- package/dist/pi/packages/ta-manual/lib/manual-util.js +2 -1
- package/dist/pi/packages/ta-manual/lib/pictures-c.js +30 -0
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +4 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +188 -71
- package/dist/pi/packages/ta-manual/package.json +7 -3
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +9 -0
- package/dist/pi/packages/ta-manual/web/index.js +405 -119
- package/dist/pi/packages/ta-moments/extension/index.mjs +242 -102
- package/dist/pi/packages/ta-moments/host/index.mjs +268 -115
- package/dist/pi/packages/ta-moments/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-moments/lib/i18n.js +170 -3
- package/dist/pi/packages/ta-moments/lib/moments-host.js +24 -11
- package/dist/pi/packages/ta-moments/lib/page.js +4 -2
- package/dist/pi/packages/ta-moments/lib/server-texts.d.ts +10 -12
- package/dist/pi/packages/ta-moments/lib/server-texts.js +128 -62
- package/dist/pi/packages/ta-moments/lib/talk-host.js +29 -8
- package/dist/pi/packages/ta-moments/package.json +7 -3
- package/dist/pi/packages/ta-moments/web/index.js +260 -43
- package/dist/pi/packages/ta-nearby/extension/index.mjs +229 -32
- package/dist/pi/packages/ta-nearby/host/index.mjs +248 -35
- package/dist/pi/packages/ta-nearby/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-nearby/lib/i18n.js +173 -2
- package/dist/pi/packages/ta-nearby/lib/nearby-service.d.ts +2 -4
- package/dist/pi/packages/ta-nearby/lib/nearby-service.js +21 -3
- package/dist/pi/packages/ta-nearby/lib/page.js +6 -5
- package/dist/pi/packages/ta-nearby/lib/server-texts.d.ts +5 -13
- package/dist/pi/packages/ta-nearby/lib/server-texts.js +194 -42
- package/dist/pi/packages/ta-nearby/package.json +7 -3
- package/dist/pi/packages/ta-nearby/web/index.js +216 -9
- package/dist/pi/packages/ta-notify/extension/index.mjs +54 -5
- package/dist/pi/packages/ta-notify/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-notify/lib/i18n.js +53 -2
- package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +2 -1
- package/dist/pi/packages/ta-notify/lib/server-texts.js +16 -5
- package/dist/pi/packages/ta-notify/lib/settings.js +9 -2
- package/dist/pi/packages/ta-notify/package.json +7 -3
- package/dist/pi/packages/ta-notify/web/index.js +107 -7
- package/dist/pi/packages/ta-plot/README.en.md +12 -0
- package/dist/pi/packages/ta-plot/README.md +12 -0
- package/dist/pi/packages/ta-plot/extension/index.mjs +121 -0
- package/dist/pi/packages/ta-plot/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-plot/lib/extension.js +24 -0
- package/dist/pi/packages/ta-plot/lib/i18n.d.ts +14 -0
- package/dist/pi/packages/ta-plot/lib/i18n.js +30 -0
- package/dist/pi/packages/ta-plot/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-plot/lib/index.js +25 -0
- package/dist/pi/packages/ta-plot/lib/plot-expression.d.ts +16 -0
- package/dist/pi/packages/ta-plot/lib/plot-expression.js +209 -0
- package/dist/pi/packages/ta-plot/lib/plot-painter.d.ts +28 -0
- package/dist/pi/packages/ta-plot/lib/plot-painter.js +208 -0
- package/dist/pi/packages/ta-plot/lib/plot-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-plot/lib/plot-prompt.js +16 -0
- package/dist/pi/packages/ta-plot/lib/plot-protocol.d.ts +7 -0
- package/dist/pi/packages/ta-plot/lib/plot-protocol.js +10 -0
- package/dist/pi/packages/ta-plot/lib/plot-scene.d.ts +65 -0
- package/dist/pi/packages/ta-plot/lib/plot-scene.js +427 -0
- package/dist/pi/packages/ta-plot/lib/plot-spec.d.ts +86 -0
- package/dist/pi/packages/ta-plot/lib/plot-spec.js +165 -0
- package/dist/pi/packages/ta-plot/lib/plot-view.d.ts +4 -0
- package/dist/pi/packages/ta-plot/lib/plot-view.js +205 -0
- package/dist/pi/packages/ta-plot/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-plot/lib/react.js +8 -0
- package/dist/pi/packages/ta-plot/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-plot/lib/style.js +47 -0
- package/dist/pi/packages/ta-plot/package.json +57 -0
- package/dist/pi/packages/ta-plot/web/index.js +1320 -0
- package/dist/pi/packages/ta-recall/extension/index.mjs +52 -2
- package/dist/pi/packages/ta-recall/host/index.mjs +136 -55
- package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +6 -3
- package/dist/pi/packages/ta-recall/lib/brief-util.js +26 -5
- package/dist/pi/packages/ta-recall/lib/extension-util.d.ts +2 -1
- package/dist/pi/packages/ta-recall/lib/extension-util.js +7 -1
- package/dist/pi/packages/ta-recall/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-recall/lib/i18n.js +89 -2
- package/dist/pi/packages/ta-recall/lib/keep-util.d.ts +2 -1
- package/dist/pi/packages/ta-recall/lib/keep-util.js +8 -1
- package/dist/pi/packages/ta-recall/lib/recall-service.js +5 -3
- package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +2 -3
- package/dist/pi/packages/ta-recall/lib/server-texts.js +15 -8
- package/dist/pi/packages/ta-recall/package.json +7 -3
- package/dist/pi/packages/ta-recall/web/index.js +164 -9
- package/dist/pi/packages/ta-rooms/extension/index.mjs +60 -3
- package/dist/pi/packages/ta-rooms/host/index.mjs +284 -37
- package/dist/pi/packages/ta-rooms/lib/dialogs.js +2 -1
- package/dist/pi/packages/ta-rooms/lib/double-agents.js +31 -7
- package/dist/pi/packages/ta-rooms/lib/double-grants.js +57 -13
- package/dist/pi/packages/ta-rooms/lib/double-host.js +31 -5
- package/dist/pi/packages/ta-rooms/lib/double-i18n.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.js +201 -2
- package/dist/pi/packages/ta-rooms/lib/double-tasks.d.ts +2 -1
- package/dist/pi/packages/ta-rooms/lib/double-tasks.js +93 -21
- package/dist/pi/packages/ta-rooms/lib/double-user.js +1 -1
- package/dist/pi/packages/ta-rooms/lib/double-util.d.ts +1 -1
- package/dist/pi/packages/ta-rooms/lib/double-util.js +22 -3
- package/dist/pi/packages/ta-rooms/lib/doubles-store.js +2 -1
- package/dist/pi/packages/ta-rooms/lib/doubles-view.js +8 -1
- package/dist/pi/packages/ta-rooms/lib/friend-notices.js +27 -8
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +243 -2
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-rooms/lib/style.js +1 -0
- package/dist/pi/packages/ta-rooms/package.json +7 -3
- package/dist/pi/packages/ta-rooms/web/index.js +496 -9
- package/dist/pi/packages/ta-share/extension/index.mjs +98 -23
- package/dist/pi/packages/ta-share/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-share/lib/i18n.js +203 -2
- package/dist/pi/packages/ta-share/lib/page.js +1 -1
- package/dist/pi/packages/ta-share/lib/server-texts.d.ts +2 -1
- package/dist/pi/packages/ta-share/lib/server-texts.js +60 -29
- package/dist/pi/packages/ta-share/lib/share-dialog.js +3 -1
- package/dist/pi/packages/ta-share/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-share/lib/style.js +1 -0
- package/dist/pi/packages/ta-share/package.json +7 -3
- package/dist/pi/packages/ta-share/web/index.js +246 -4
- package/dist/pi/packages/ta-sync/host/index.mjs +170 -25
- package/dist/pi/packages/ta-sync/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-sync/lib/i18n.js +173 -2
- package/dist/pi/packages/ta-sync/lib/migrate-i18n.d.ts +3 -0
- package/dist/pi/packages/ta-sync/lib/migrate-i18n.js +183 -2
- package/dist/pi/packages/ta-sync/lib/panel.js +4 -1
- package/dist/pi/packages/ta-sync/lib/server-texts.d.ts +0 -1
- package/dist/pi/packages/ta-sync/lib/server-texts.js +132 -35
- package/dist/pi/packages/ta-sync/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-sync/lib/style.js +1 -0
- package/dist/pi/packages/ta-sync/package.json +7 -3
- package/dist/pi/packages/ta-sync/web/index.js +398 -5
- package/dist/pi/packages/ta-sync-cloud/host/index.mjs +52 -23
- package/dist/pi/packages/ta-sync-cloud/lib/host.js +49 -20
- package/dist/pi/packages/ta-sync-cloud/package.json +7 -3
- package/dist/pi/packages/ta-team/README.en.md +1 -1
- package/dist/pi/packages/ta-team/README.md +1 -1
- package/dist/pi/packages/ta-team/extension/index.mjs +86 -37
- package/dist/pi/packages/ta-team/host/index.mjs +130 -43
- package/dist/pi/packages/ta-team/lib/dialogs.js +68 -9
- package/dist/pi/packages/ta-team/lib/i18n.d.ts +7 -1
- package/dist/pi/packages/ta-team/lib/i18n.js +431 -8
- package/dist/pi/packages/ta-team/lib/member-dialog.js +30 -25
- package/dist/pi/packages/ta-team/lib/page.js +5 -1
- package/dist/pi/packages/ta-team/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-team/lib/style.js +11 -4
- package/dist/pi/packages/ta-team/lib/team-invites.d.ts +14 -8
- package/dist/pi/packages/ta-team/lib/team-invites.js +38 -6
- package/dist/pi/packages/ta-team/package.json +7 -3
- package/dist/pi/packages/ta-team/web/index.js +688 -102
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.js +417 -1
- package/dist/pi/packages/ta-workspace/package.json +7 -3
- package/dist/pi/packages/ta-workspace/web/index.js +504 -40
- package/dist/public/assets/GLTFLoader-C8PT6dAj.js +1 -0
- package/dist/public/assets/SkeletonUtils-BBAzQdty.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-DMceNIR5.js → abnfDiagram-S7VZAUFO-CD8CaArq.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-5AdYeEv8.js → architecture-WOLXFQ4H-f2a9bodL.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-CqkJHg0A.js → architectureDiagram-YGSQEFNW-BCWH9CwO.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-BtuHdIjQ.js → blockDiagram-APKKGZFW-fUamQMeJ.js} +1 -1
- package/dist/public/assets/{browser-Ds5TwWWr.js → browser-CrMa174j.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-eebbjTgZ.js → c4Diagram-KJ2TOQU5-CkLtnwp1.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-BjMKSfTf.js → chunk-6MUBBAK2-cwcGPuAH.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-BElluw_7.js → chunk-AXFCVDMN-DNkmkYfC.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-CUDwpWNL.js → chunk-BG4553SI-C8qbbr2Z.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-B-92o8Uj.js → chunk-DQASFODM-C-PJ2CrJ.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-pveEMcXK.js → chunk-HFQBQIA3-BYcgxNEL.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-m7DKNjYW.js → chunk-KQLB2F66-BTDNzrRl.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-CnSSETdj.js → chunk-KS47KZWR-1sGg1pKP.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-Ds7OnJrC.js → chunk-LEVMRMFU-7lAsFwHT.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-PJSYCuUh.js → chunk-M57EVK23-C8K-ltig.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-C3ygRwSC.js → chunk-OY52VR5R-CBe1QL_V.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-DcFtmZh7.js → chunk-QB3YPZ4I-COhYyyE_.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-B4BOidE6.js → chunk-R3KSYZAL-CREAgaSS.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DcXfwN7k.js → chunk-STOXU5M4-CTl0P8_C.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-B-rpQQxX.js → chunk-TU62E6Q5-B_GG7baF.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BBtlFSw1.js → chunk-X4PVCEUW-CDrSpVOj.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-Do8BIocv.js → chunk-XXDRQBXY-sKeiDEnC.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-bhGAODMS.js → classDiagram-v2-L25IHNXF-Cqo1O5FQ.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-B7Qv6Hv_.js → cose-bilkent-JH36ORCC-CTSKeRBe.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-CP12ndt7.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BX-R5Z6L.js → cynefinDiagram-L36ESFBY-67xEPyP9.js} +1 -1
- package/dist/public/assets/{d3-selection-D3xgEEla.js → d3-selection-BUiX-3qh.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-MfJ9yO0v.js → dagre-SPEB5RXH-DDw-u3Kg.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-DxFRc2vC.js → diagram-3B7GL73J-BBFInaCs.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-BcBwOLbM.js → diagram-DNEMPZML-ZdnFKM7-.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN--Rw-isPI.js → diagram-L3MUGCDN-CPb04hOv.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-DXkY85UN.js → diagram-LA4NIPWU-P9wHFGDS.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-CbNmfAid.js → diagram-MHCOC4E2-Ce_Cr-t6.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-D1nGQjzf.js → diagram-XPFHEONP-CfS34OHW.js} +1 -1
- package/dist/public/assets/{dist-B1JMTrET.js → dist-6pZqZEaM.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-DGXbVfke.js → ebnfDiagram-UZSYDL2S-BkHabCn2.js} +1 -1
- package/dist/public/assets/{editor.api-e3yQoo1r.js → editor.api-CO4Q0NKb.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-pA-iT6fg.js → elk-XV6XMXQE-JpreOVeR.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-BpgBun7y.js → erDiagram-EYBAPDEH-DDFJwzHx.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-CVfyCcul.js → eventmodeling-K75KTNOO-DsnkF6Zc.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-Djxeacjw.js +1 -0
- package/dist/public/assets/{freemarker2-dYGec-fT.js → freemarker2-Cm4NK652.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-DjLTTWwA.js → ganttDiagram-23REXITY-C7eedoYb.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-qlWN7ijl.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-D9m7IVyJ.js → gitGraphDiagram-STJD7YCW-Cuh3ih-z.js} +1 -1
- package/dist/public/assets/{handlebars-Bxerz7ci.js → handlebars-BnE51DUi.js} +1 -1
- package/dist/public/assets/{html-DlVnGsdp.js → html-7koekDfa.js} +1 -1
- package/dist/public/assets/{index-CZmGe9gc.js → index-CQG1XddL.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-jN69V28z.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-DoYdhkAy.js → infoDiagram-KBXO4MBG-BY3iq7I8.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Bc0GAInW.js → ishikawaDiagram-M35NCXHK-COjlz24y.js} +1 -1
- package/dist/public/assets/ja-BHBiml1x.js +12 -0
- package/dist/public/assets/{javascript-DZrowo_I.js → javascript-BUZgUhdn.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-BM7Dwstu.js → journeyDiagram-OPLOXDXO-DReJE04Q.js} +1 -1
- package/dist/public/assets/{jsonMode-Bs30wPr5.js → jsonMode-qPeVDBDp.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-CO-Crrdu.js → kanban-definition-BZKZHSQY-BB0_ePvg.js} +1 -1
- package/dist/public/assets/{liquid-dLz9d3ax.js → liquid-CNKL9dLX.js} +1 -1
- package/dist/public/assets/{mdx-DO0x92Kn.js → mdx-D1_UzrBc.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BXwArNvw.js → mermaid-parser.core-DiE3z_tV.js} +3 -3
- package/dist/public/assets/{mermaid.core-C6mppfDC.js → mermaid.core-CBCRrLdl.js} +4 -4
- package/dist/public/assets/meshopt_decoder.module-DXTYc6wn.js +1 -0
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-vcQ2EU4T.js → mindmap-definition-I2QAS2VK-D-Y5fKl1.js} +1 -1
- package/dist/public/assets/module-BEbKICB1.js +2475 -0
- package/dist/public/assets/module-Egyx6Otv.js +1 -0
- package/dist/public/assets/{monaco-J_Pr5zjk.js → monaco--czRbHhk.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-Cl8QuXQJ.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-DPDrbtS2.js → pegDiagram-FD4XPPHP-1jx5jc73.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-kVGJsGZe.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-DXuaepGJ.js → pieDiagram-J4AKIIQI-DGv_WCCu.js} +1 -1
- package/dist/public/assets/{python-nnmIOv4s.js → python-DNZu5LjV.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-BuD_-coZ.js → quadrantDiagram-XTYBLID2-BgY0lf8V.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-Dw71L-n8.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-DkaUvI4_.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-CkCl68xY.js → railroad-abnf-LNEFI6M7-tZ7rJxwM.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DO3GiRv6.js → railroad-ebnf-DWYD2UWJ-JO6n_1TK.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-DZBsKy4P.js → railroad-peg-JR7BVNR7-Bf0PG2YJ.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-BeLq7Mqp.js → railroadDiagram-MRQ6NCDL-BMjog84X.js} +1 -1
- package/dist/public/assets/{razor-l2rRITgB.js → razor-DU-x8qSP.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-BBizkrON.js → requirementDiagram-Y7LWUY3S-CktbbWjr.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-tyo-p7oc.js → sankeyDiagram-WGJFYUXA-CQonOre7.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-BSGPbeJX.js → sequenceDiagram-5NDRBG5M-CAe8-JvA.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-Dcdy66MQ.js → stateDiagram-v2-FJ4FJNEA-BrkqOuRm.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-BJfgQyQo.js → swimlanes-UMQ2AFYF-sLpgHBKo.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-amBdr5Wc.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-Ch8aQwF6.js → timeline-definition-SEUHKTQE-CHE0x-WN.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-DKLyFqZk.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-CRG6ogj8.js +1 -0
- package/dist/public/assets/{typescript-LasX-M7S.js → typescript-BrNT2oWW.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-BzlSB4R4.js → usecaseDiagram-AFA6YXN4-DwkFRI5R.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-4xaWLrMk.js → vennDiagram-NNMJR3RB-BquQVmJq.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-D2jQfflX.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-C-iK1p-O.js → wardleyDiagram-S7YFUSEH-sNYFUfMe.js} +1 -1
- package/dist/public/assets/{xml-CGhYQUqn.js → xml-BY65QKv7.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-CFsnisdM.js → xychartDiagram-GGNKY7IX-CnWEYuid.js} +1 -1
- package/dist/public/assets/{yaml-BcOaPfuH.js → yaml-BMovUwzO.js} +1 -1
- package/dist/public/assets/zh-tw-7q-tizR0.js +12 -0
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +2773 -626
- package/package.json +39 -37
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dfu5k3iG.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-BHlXeeVG.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-CFVSDv3q.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-C_Db4yjo.js +0 -1
- package/dist/public/assets/module-C0tELrcJ.js +0 -1
- package/dist/public/assets/module-CteT9pTP.js +0 -2405
- package/dist/public/assets/packet-JDAUHWVQ-Bw7hmDUU.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-cb_eq1B6.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Dqy-xoY_.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-CBPVCTd3.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BWvcVkFg.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB--XUqgqA6.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-CfrNtG7H.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-BXBG-txR.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgentBindings = exports.AgentPool = exports.BINDING_ENTRY = void 0;
|
|
3
|
+
exports.AgentBindings = exports.AgentPool = exports.QUEUE_ENTRY = exports.BINDING_ENTRY = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const node_os_1 = require("node:os");
|
|
6
6
|
const node_path_1 = require("node:path");
|
|
@@ -8,6 +8,12 @@ const acp_agent_1 = require("./acp-agent");
|
|
|
8
8
|
const texts_1 = require("./texts");
|
|
9
9
|
/** The custom entry of a pi session that names the session of an agent it talks to. */
|
|
10
10
|
exports.BINDING_ENTRY = 'ta-agents.session';
|
|
11
|
+
/**
|
|
12
|
+
* The custom entry that names what the user said while an agent worked that waits for its turn to end, by when
|
|
13
|
+
* each message was written (none once it went): the agent keeps it in memory only, and a restart of the process
|
|
14
|
+
* would lose it.
|
|
15
|
+
*/
|
|
16
|
+
exports.QUEUE_ENTRY = 'ta-agents.queued';
|
|
11
17
|
const POOL = Symbol.for('ta-agents.pool');
|
|
12
18
|
/**
|
|
13
19
|
* The agents' processes of this process, shared by its pi sessions, which load this package each: one
|
|
@@ -73,6 +79,8 @@ class AgentBindings {
|
|
|
73
79
|
this.release = release;
|
|
74
80
|
this.cwd = process.cwd();
|
|
75
81
|
this.ids = new Map();
|
|
82
|
+
/** What waited for a turn of each agent's session when the conversation was last open. */
|
|
83
|
+
this.waiting = new Map();
|
|
76
84
|
this.opened = new Map();
|
|
77
85
|
/** The agents opened, with where, to let their own processes go on close. */
|
|
78
86
|
this.used = new Map();
|
|
@@ -80,14 +88,21 @@ class AgentBindings {
|
|
|
80
88
|
restore(entries, fork) {
|
|
81
89
|
this.ids.clear();
|
|
82
90
|
this.opened.clear();
|
|
91
|
+
this.waiting.clear();
|
|
83
92
|
if (fork) {
|
|
84
93
|
return;
|
|
85
94
|
}
|
|
86
95
|
for (const entry of entries) {
|
|
87
96
|
const { type, customType, data } = (entry !== null && entry !== void 0 ? entry : {});
|
|
88
|
-
if (type
|
|
97
|
+
if (type !== 'custom' || typeof (data === null || data === void 0 ? void 0 : data.agent) !== 'string' || typeof data.session !== 'string') {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (customType === exports.BINDING_ENTRY) {
|
|
89
101
|
this.ids.set(data.agent, data.session);
|
|
90
102
|
}
|
|
103
|
+
else if (customType === exports.QUEUE_ENTRY && Array.isArray(data.at)) {
|
|
104
|
+
this.waiting.set(data.agent, { agent: data.agent, session: data.session, at: data.at.filter(at => typeof at === 'number') });
|
|
105
|
+
}
|
|
91
106
|
}
|
|
92
107
|
}
|
|
93
108
|
/**
|
|
@@ -97,10 +112,15 @@ class AgentBindings {
|
|
|
97
112
|
forget() {
|
|
98
113
|
this.ids.clear();
|
|
99
114
|
this.opened.clear();
|
|
115
|
+
this.waiting.clear();
|
|
100
116
|
}
|
|
101
117
|
sessionId(agent) {
|
|
102
118
|
return this.ids.get(agent);
|
|
103
119
|
}
|
|
120
|
+
/** The program of the agent for the pi session, here. */
|
|
121
|
+
agent(config) {
|
|
122
|
+
return this.agentOf(config, this.cwd, this.owner);
|
|
123
|
+
}
|
|
104
124
|
/** Its session is open in a program that runs: `open` gives it at once. */
|
|
105
125
|
ready(config) {
|
|
106
126
|
return this.opened.has(config.id) && this.agentOf(config, this.cwd, this.owner).running;
|
|
@@ -112,7 +132,9 @@ class AgentBindings {
|
|
|
112
132
|
if (opened) {
|
|
113
133
|
// The program may have stopped since, idle, and its sessions with it.
|
|
114
134
|
// It starts empty only the first time.
|
|
115
|
-
opened = opened.then(value => agent.running && agent.sessions.get(value.session.id) === value.session
|
|
135
|
+
opened = opened.then(value => agent.running && agent.sessions.get(value.session.id) === value.session
|
|
136
|
+
? { ...value, fresh: false, missed: undefined }
|
|
137
|
+
: this.connect(config, agent, signal));
|
|
116
138
|
}
|
|
117
139
|
else {
|
|
118
140
|
opened = this.connect(config, agent, signal);
|
|
@@ -147,7 +169,10 @@ class AgentBindings {
|
|
|
147
169
|
this.save({ agent: config.id, session: session.id });
|
|
148
170
|
}
|
|
149
171
|
this.prepare(config, session);
|
|
150
|
-
|
|
172
|
+
const waiting = this.waiting.get(config.id);
|
|
173
|
+
this.waiting.delete(config.id);
|
|
174
|
+
const missed = (waiting === null || waiting === void 0 ? void 0 : waiting.session) === session.id && waiting.at.length ? waiting.at : undefined;
|
|
175
|
+
return { session, fresh, images: !!((_c = (_b = (_a = agent.initialized) === null || _a === void 0 ? void 0 : _a.agentCapabilities) === null || _b === void 0 ? void 0 : _b.promptCapabilities) === null || _c === void 0 ? void 0 : _c.image), dirs: AgentBindings.dirs(this.cwd), missed };
|
|
151
176
|
}
|
|
152
177
|
static dirs(cwd) {
|
|
153
178
|
try {
|
|
@@ -6,6 +6,8 @@ export declare const ACTIVITY_TEXT = "[The agent continued on its own]";
|
|
|
6
6
|
export declare namespace AgentPrompt {
|
|
7
7
|
/** The user messages at the end of the transcript, after the last answer or tool result. */
|
|
8
8
|
function pending(messages: readonly Message[]): Message[];
|
|
9
|
+
/** The user messages written at `at`, in the order of the transcript. */
|
|
10
|
+
function written(messages: readonly Message[], at: readonly number[]): Message[];
|
|
9
11
|
/** What pi's retry of a turn that failed with `error` says to the agent, which keeps its own history. */
|
|
10
12
|
function resume(error: string): string;
|
|
11
13
|
/** The messages as a prompt; images when the agent takes them. */
|
|
@@ -25,6 +25,11 @@ var AgentPrompt;
|
|
|
25
25
|
return result;
|
|
26
26
|
}
|
|
27
27
|
AgentPrompt.pending = pending;
|
|
28
|
+
/** The user messages written at `at`, in the order of the transcript. */
|
|
29
|
+
function written(messages, at) {
|
|
30
|
+
return messages.filter(message => { var _a; return message.role === 'user' && at.includes((_a = message.timestamp) !== null && _a !== void 0 ? _a : -1); });
|
|
31
|
+
}
|
|
32
|
+
AgentPrompt.written = written;
|
|
28
33
|
/** What pi's retry of a turn that failed with `error` says to the agent, which keeps its own history. */
|
|
29
34
|
function resume(error) {
|
|
30
35
|
return `Your last turn stopped with an error before it finished: ${error}\nContinue where you left off.`;
|
|
@@ -15,6 +15,8 @@ export interface AgentSessionCallbacks {
|
|
|
15
15
|
activity(session: AgentSession): void;
|
|
16
16
|
/** A call of the agent is about to change a file, or changed it (see WriteListener). */
|
|
17
17
|
write?: WriteListener;
|
|
18
|
+
/** What the user said while the agent worked and waits for its turn to end changed: when each was written. */
|
|
19
|
+
queued?(at: number[]): void;
|
|
18
20
|
}
|
|
19
21
|
/** What an agent says of a request of its model it retries: why (`network`), and which attempt, when it says. */
|
|
20
22
|
export interface AgentRetry {
|
|
@@ -22,8 +24,9 @@ export interface AgentRetry {
|
|
|
22
24
|
attempt?: number;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
|
-
* A session of an ACP agent: its settings, and its turn. A prompt starts a turn; what the user says
|
|
26
|
-
*
|
|
27
|
+
* A session of an ACP agent: its settings, and its turn. A prompt starts a turn; what the user says while it
|
|
28
|
+
* runs goes into it (`session/steer`, CodeBuddy Code's), which the agent reads before it asks its model again,
|
|
29
|
+
* or, to an agent without it, once the turn ended, since ACP itself has no way to steer a running turn.
|
|
27
30
|
*/
|
|
28
31
|
export declare class AgentSession {
|
|
29
32
|
protected readonly host: AgentSessionHost;
|
|
@@ -47,6 +50,10 @@ export declare class AgentSession {
|
|
|
47
50
|
/** How much of its context the agent last said it used, to see it compact. */
|
|
48
51
|
protected context?: number;
|
|
49
52
|
protected readonly queued: Acp.ContentBlock[][];
|
|
53
|
+
/** When what is queued was written. */
|
|
54
|
+
protected queuedAt: number[];
|
|
55
|
+
/** The agent takes `session/steer`: until it says it has no such method. */
|
|
56
|
+
protected steers: boolean;
|
|
50
57
|
protected quietTimer?: ReturnType<typeof setTimeout>;
|
|
51
58
|
protected abandoned?: AgentTurn;
|
|
52
59
|
/** The answer to the last `session/prompt`, settled or not. */
|
|
@@ -73,8 +80,13 @@ export declare class AgentSession {
|
|
|
73
80
|
update(update: Acp.SessionUpdate): void;
|
|
74
81
|
/** Starts a turn with `prompt`. */
|
|
75
82
|
prompt(prompt: Acp.ContentBlock[]): AgentTurn;
|
|
76
|
-
/**
|
|
77
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Gives `prompt` to the turn that runs, which the agent reads before it asks its model again: true when it
|
|
85
|
+
* took it. An agent that does not know `session/steer` is not asked again; one whose turn just ended says no.
|
|
86
|
+
*/
|
|
87
|
+
steer(prompt: Acp.ContentBlock[]): Promise<boolean>;
|
|
88
|
+
/** Keeps `prompt`, of the user messages written at `at`, for when the current turn ended. */
|
|
89
|
+
queue(prompt: Acp.ContentBlock[], at?: number[]): void;
|
|
78
90
|
/** The prompts kept while a turn ran, as one. */
|
|
79
91
|
takeQueued(): Acp.ContentBlock[] | undefined;
|
|
80
92
|
/**
|
|
@@ -10,8 +10,9 @@ const ABANDON_WAIT_MS = 5000;
|
|
|
10
10
|
/** How long a prompt waits for the agent to answer the one before, which it may still finish after saying it is idle. */
|
|
11
11
|
const ANSWER_WAIT_MS = 15000;
|
|
12
12
|
/**
|
|
13
|
-
* A session of an ACP agent: its settings, and its turn. A prompt starts a turn; what the user says
|
|
14
|
-
*
|
|
13
|
+
* A session of an ACP agent: its settings, and its turn. A prompt starts a turn; what the user says while it
|
|
14
|
+
* runs goes into it (`session/steer`, CodeBuddy Code's), which the agent reads before it asks its model again,
|
|
15
|
+
* or, to an agent without it, once the turn ended, since ACP itself has no way to steer a running turn.
|
|
15
16
|
*/
|
|
16
17
|
class AgentSession {
|
|
17
18
|
constructor(host, id, setup) {
|
|
@@ -22,6 +23,10 @@ class AgentSession {
|
|
|
22
23
|
/** The notes of Ta's packages the agent was given (AgentPrompt.notes), each once, until it compacts its context. */
|
|
23
24
|
this.told = new Set();
|
|
24
25
|
this.queued = [];
|
|
26
|
+
/** When what is queued was written. */
|
|
27
|
+
this.queuedAt = [];
|
|
28
|
+
/** The agent takes `session/steer`: until it says it has no such method. */
|
|
29
|
+
this.steers = true;
|
|
25
30
|
/** The agent said it works on the turn (a phase other than idle), so its next idle ends it. */
|
|
26
31
|
this.working = false;
|
|
27
32
|
/** When the last message of the user sent to the agent was written: sent once, not again with a retry. */
|
|
@@ -127,15 +132,40 @@ class AgentSession {
|
|
|
127
132
|
this.answer = answer;
|
|
128
133
|
return turn;
|
|
129
134
|
}
|
|
130
|
-
/**
|
|
131
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Gives `prompt` to the turn that runs, which the agent reads before it asks its model again: true when it
|
|
137
|
+
* took it. An agent that does not know `session/steer` is not asked again; one whose turn just ended says no.
|
|
138
|
+
*/
|
|
139
|
+
async steer(prompt) {
|
|
140
|
+
if (!this.steers || !this.turn) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
const answer = await this.host.request('session/steer', { sessionId: this.id, contentBlocks: prompt });
|
|
145
|
+
return (answer === null || answer === void 0 ? void 0 : answer.steered) === true;
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
if (error.code === acp_protocol_1.Acp.METHOD_NOT_FOUND) {
|
|
149
|
+
this.steers = false;
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/** Keeps `prompt`, of the user messages written at `at`, for when the current turn ended. */
|
|
155
|
+
queue(prompt, at = []) {
|
|
156
|
+
var _a, _b;
|
|
132
157
|
this.queued.push(prompt);
|
|
158
|
+
this.queuedAt.push(...at);
|
|
159
|
+
(_b = (_a = this.callbacks).queued) === null || _b === void 0 ? void 0 : _b.call(_a, [...this.queuedAt]);
|
|
133
160
|
}
|
|
134
161
|
/** The prompts kept while a turn ran, as one. */
|
|
135
162
|
takeQueued() {
|
|
163
|
+
var _a, _b;
|
|
136
164
|
if (!this.queued.length) {
|
|
137
165
|
return undefined;
|
|
138
166
|
}
|
|
167
|
+
this.queuedAt = [];
|
|
168
|
+
(_b = (_a = this.callbacks).queued) === null || _b === void 0 ? void 0 : _b.call(_a, []);
|
|
139
169
|
return this.queued.splice(0).flat();
|
|
140
170
|
}
|
|
141
171
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AcpAgent } from './acp-agent';
|
|
2
|
+
import { Acp } from './acp-protocol';
|
|
3
|
+
import type { AgentConfig } from './agent-catalog';
|
|
4
|
+
/** What signing in asks of the user, as pi's extension UI has it. */
|
|
5
|
+
export interface SignInUi {
|
|
6
|
+
select(title: string, options: string[], opts?: {
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}): Promise<string | undefined>;
|
|
9
|
+
notify(message: string, type?: 'info' | 'warning' | 'error'): void;
|
|
10
|
+
setWorkingMessage(message?: string): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Signing the user in to an agent that asks for it, as the agent offers in `initialize`: the user picks a
|
|
14
|
+
* way, the agent opens its page in the browser of this computer (CodeBuddy Code also says which page, for a
|
|
15
|
+
* user on another device, who gets it as a notice with a link), and the turn goes on once signed in.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AgentSignIn {
|
|
18
|
+
protected readonly config: AgentConfig;
|
|
19
|
+
protected readonly agent: AcpAgent;
|
|
20
|
+
protected readonly ui: SignInUi;
|
|
21
|
+
constructor(config: AgentConfig, agent: AcpAgent, ui: SignInUi);
|
|
22
|
+
static required(error: unknown): boolean;
|
|
23
|
+
/** What a way to sign in says: `Sign in with WeChat`; its own name when the agent words it otherwise. */
|
|
24
|
+
static label(method: Acp.AuthMethod): string;
|
|
25
|
+
/** True once the user signed in; false when they picked no way, or it did not work. */
|
|
26
|
+
run(signal?: AbortSignal): Promise<boolean>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=agent-sign-in.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentSignIn = void 0;
|
|
4
|
+
const acp_protocol_1 = require("./acp-protocol");
|
|
5
|
+
const texts_1 = require("./texts");
|
|
6
|
+
/**
|
|
7
|
+
* Signing the user in to an agent that asks for it, as the agent offers in `initialize`: the user picks a
|
|
8
|
+
* way, the agent opens its page in the browser of this computer (CodeBuddy Code also says which page, for a
|
|
9
|
+
* user on another device, who gets it as a notice with a link), and the turn goes on once signed in.
|
|
10
|
+
*/
|
|
11
|
+
class AgentSignIn {
|
|
12
|
+
constructor(config, agent, ui) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
this.agent = agent;
|
|
15
|
+
this.ui = ui;
|
|
16
|
+
}
|
|
17
|
+
static required(error) {
|
|
18
|
+
return (error === null || error === void 0 ? void 0 : error.code) === acp_protocol_1.Acp.AUTH_REQUIRED;
|
|
19
|
+
}
|
|
20
|
+
/** What a way to sign in says: `Sign in with WeChat`; its own name when the agent words it otherwise. */
|
|
21
|
+
static label(method) {
|
|
22
|
+
const known = (0, texts_1.text)('signInMethod', method.id);
|
|
23
|
+
if (known) {
|
|
24
|
+
return (0, texts_1.text)('signInWith', known);
|
|
25
|
+
}
|
|
26
|
+
const named = /^(?:log ?in|sign ?in) (?:with|via) (.+)$/i.exec(method.name.trim());
|
|
27
|
+
return named ? (0, texts_1.text)('signInWith', named[1]) : method.name;
|
|
28
|
+
}
|
|
29
|
+
/** True once the user signed in; false when they picked no way, or it did not work. */
|
|
30
|
+
async run(signal) {
|
|
31
|
+
var _a;
|
|
32
|
+
var _b;
|
|
33
|
+
const methods = (_b = (_a = this.agent.initialized) === null || _a === void 0 ? void 0 : _a.authMethods) !== null && _b !== void 0 ? _b : [];
|
|
34
|
+
if (!methods.length) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
const labels = methods.map(method => AgentSignIn.label(method));
|
|
38
|
+
const chosen = await this.ui.select((0, texts_1.text)('signInPick', this.config.name), labels, { signal });
|
|
39
|
+
const method = chosen === undefined ? undefined : methods[labels.indexOf(chosen)];
|
|
40
|
+
if (!method || (signal === null || signal === void 0 ? void 0 : signal.aborted)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
this.ui.setWorkingMessage((0, texts_1.text)('signingIn', this.config.name));
|
|
44
|
+
try {
|
|
45
|
+
await this.agent.authenticate(method.id, url => this.ui.notify((0, texts_1.text)('signInPage', this.config.name, url)), signal);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
this.ui.notify((0, texts_1.text)('signInFailed', this.config.name), 'warning');
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
this.ui.setWorkingMessage();
|
|
56
|
+
}
|
|
57
|
+
this.ui.notify((0, texts_1.text)('signedIn', this.config.name));
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.AgentSignIn = AgentSignIn;
|
|
62
|
+
//# sourceMappingURL=agent-sign-in.js.map
|
|
@@ -11,12 +11,19 @@ export interface OpenedSession {
|
|
|
11
11
|
images: boolean;
|
|
12
12
|
/** The directory of the session, as given and as its real path: agents may report either. */
|
|
13
13
|
dirs: string[];
|
|
14
|
+
/**
|
|
15
|
+
* When the user messages were written that waited for a turn of the session that a stop of the process cut
|
|
16
|
+
* off (AgentSession.queue): the agent never had them. Only the first time the session opens again.
|
|
17
|
+
*/
|
|
18
|
+
missed?: number[];
|
|
14
19
|
}
|
|
15
20
|
export interface AgentStreamHost {
|
|
16
21
|
open(config: AgentConfig, signal?: AbortSignal): Promise<OpenedSession>;
|
|
17
22
|
readonly calls: Map<string, AgentCall>;
|
|
18
23
|
/** A turn of `session` ended. */
|
|
19
24
|
ended(config: AgentConfig, session: AgentSession): void;
|
|
25
|
+
/** The agent asks the user to sign in: true once they did, so that what asked is tried again. */
|
|
26
|
+
signIn?(config: AgentConfig, signal?: AbortSignal): Promise<boolean>;
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
29
|
* pi's `streamSimple` for an agent. A pi turn sends what the user said since the agent last answered
|
|
@@ -4,6 +4,7 @@ exports.AgentStreamer = void 0;
|
|
|
4
4
|
const acp_protocol_1 = require("./acp-protocol");
|
|
5
5
|
const agent_catalog_1 = require("./agent-catalog");
|
|
6
6
|
const agent_prompt_1 = require("./agent-prompt");
|
|
7
|
+
const agent_sign_in_1 = require("./agent-sign-in");
|
|
7
8
|
const agent_tool_1 = require("./agent-tool");
|
|
8
9
|
const message_stream_1 = require("./message-stream");
|
|
9
10
|
const texts_1 = require("./texts");
|
|
@@ -42,21 +43,51 @@ class AgentStreamer {
|
|
|
42
43
|
return stream;
|
|
43
44
|
}
|
|
44
45
|
async run(config, model, context, options, builder) {
|
|
46
|
+
var _a, _b;
|
|
45
47
|
const signal = options === null || options === void 0 ? void 0 : options.signal;
|
|
46
|
-
|
|
48
|
+
// Signed in once, a request that asked for it is tried once more; again, it fails.
|
|
49
|
+
let signedIn = false;
|
|
50
|
+
const signIn = async (error) => {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
if (signedIn || !agent_sign_in_1.AgentSignIn.required(error) || !(await ((_b = (_a = this.host).signIn) === null || _b === void 0 ? void 0 : _b.call(_a, config, signal)))) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
signedIn = true;
|
|
56
|
+
return true;
|
|
57
|
+
};
|
|
58
|
+
const { session, fresh, images, dirs, missed } = await this.host.open(config, signal).catch(async (error) => {
|
|
59
|
+
if (await signIn(error)) {
|
|
60
|
+
return this.host.open(config, signal);
|
|
61
|
+
}
|
|
62
|
+
throw error;
|
|
63
|
+
});
|
|
47
64
|
let pending = agent_prompt_1.AgentPrompt.pending(context.messages);
|
|
48
65
|
if (session.failure !== undefined) {
|
|
49
66
|
// pi retries the turn that failed without its error: what the user said then went already.
|
|
50
67
|
pending = pending.filter(message => !(message.timestamp <= session.delivered));
|
|
51
68
|
}
|
|
52
69
|
let turn = session.turn;
|
|
70
|
+
/** What the turn of this message was started with: sent again after signing in. */
|
|
71
|
+
let sent;
|
|
53
72
|
if (turn) {
|
|
54
|
-
// What the user said while the agent works goes
|
|
73
|
+
// What the user said while the agent works goes into its turn, or, when it cannot take it, once the turn ended.
|
|
55
74
|
if (pending.length) {
|
|
56
|
-
|
|
75
|
+
const blocks = agent_prompt_1.AgentPrompt.blocks(pending, images);
|
|
76
|
+
const at = pending.map(message => { var _a; return (_a = message.timestamp) !== null && _a !== void 0 ? _a : 0; });
|
|
77
|
+
if (await session.steer(blocks)) {
|
|
78
|
+
session.delivered = Math.max(session.delivered, ...at);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
session.queue(blocks, at);
|
|
82
|
+
}
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
else {
|
|
86
|
+
if (missed === null || missed === void 0 ? void 0 : missed.length) {
|
|
87
|
+
// Said while the agent worked before a restart: it goes first, as it would have.
|
|
88
|
+
pending = [...agent_prompt_1.AgentPrompt.written(context.messages, missed).filter(message => !pending.includes(message)), ...pending];
|
|
89
|
+
(_b = (_a = session.callbacks).queued) === null || _b === void 0 ? void 0 : _b.call(_a, []);
|
|
90
|
+
}
|
|
60
91
|
let prompt = pending.length ? agent_prompt_1.AgentPrompt.blocks(pending, images) : session.takeQueued();
|
|
61
92
|
if (!(prompt === null || prompt === void 0 ? void 0 : prompt.length) && session.failure !== undefined) {
|
|
62
93
|
// pi's retry of a turn that failed: the agent keeps its history, and goes on from where it stopped.
|
|
@@ -81,6 +112,7 @@ class AgentStreamer {
|
|
|
81
112
|
await session.idle();
|
|
82
113
|
await this.configure(session, model, options, signal);
|
|
83
114
|
turn = session.prompt(prompt);
|
|
115
|
+
sent = prompt;
|
|
84
116
|
}
|
|
85
117
|
for (;;) {
|
|
86
118
|
const item = await turn.next(signal);
|
|
@@ -103,6 +135,7 @@ class AgentStreamer {
|
|
|
103
135
|
const queued = session.takeQueued();
|
|
104
136
|
if (queued) {
|
|
105
137
|
turn = session.prompt(queued);
|
|
138
|
+
sent = queued;
|
|
106
139
|
break;
|
|
107
140
|
}
|
|
108
141
|
if (item.reason === 'cancelled' && (signal === null || signal === void 0 ? void 0 : signal.aborted)) {
|
|
@@ -123,6 +156,10 @@ class AgentStreamer {
|
|
|
123
156
|
}
|
|
124
157
|
case 'error':
|
|
125
158
|
session.finished(turn);
|
|
159
|
+
if (sent && !turn.produced && (await signIn(item))) {
|
|
160
|
+
turn = session.prompt(sent);
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
126
163
|
session.failure = AgentStreamer.describe(config, item);
|
|
127
164
|
builder.error('error', session.failure);
|
|
128
165
|
return;
|
|
@@ -11,6 +11,7 @@ const agent_bindings_1 = require("./agent-bindings");
|
|
|
11
11
|
const agent_catalog_1 = require("./agent-catalog");
|
|
12
12
|
const agent_prompt_1 = require("./agent-prompt");
|
|
13
13
|
const agent_session_1 = require("./agent-session");
|
|
14
|
+
const agent_sign_in_1 = require("./agent-sign-in");
|
|
14
15
|
const agent_streamer_1 = require("./agent-streamer");
|
|
15
16
|
const agent_tool_1 = require("./agent-tool");
|
|
16
17
|
const message_stream_1 = require("./message-stream");
|
|
@@ -173,6 +174,12 @@ function activate(pi, options = {}) {
|
|
|
173
174
|
const file = { path: (0, node_path_1.resolve)((_a = context === null || context === void 0 ? void 0 : context.cwd) !== null && _a !== void 0 ? _a : bindings.cwd, path), ...(before !== undefined ? { before } : {}) };
|
|
174
175
|
pi.events.emit(TA_FILE_WRITE_EVENT, file);
|
|
175
176
|
},
|
|
177
|
+
queued: at => {
|
|
178
|
+
if (context) {
|
|
179
|
+
const entry = { agent: config.id, session: session.id, at };
|
|
180
|
+
pi.appendEntry(agent_bindings_1.QUEUE_ENTRY, entry);
|
|
181
|
+
}
|
|
182
|
+
},
|
|
176
183
|
};
|
|
177
184
|
learn(config, session);
|
|
178
185
|
}, options.agentOf, options.release);
|
|
@@ -192,6 +199,11 @@ function activate(pi, options = {}) {
|
|
|
192
199
|
}
|
|
193
200
|
},
|
|
194
201
|
calls,
|
|
202
|
+
// Only with someone to ask: pi without a UI (`pi -p`) says how to sign in instead.
|
|
203
|
+
signIn: (config, signal) => {
|
|
204
|
+
const ui = (context === null || context === void 0 ? void 0 : context.hasUI) ? context.ui : undefined;
|
|
205
|
+
return ui ? new agent_sign_in_1.AgentSignIn(config, bindings.agent(config), ui).run(signal) : Promise.resolve(false);
|
|
206
|
+
},
|
|
195
207
|
ended: (config, session) => {
|
|
196
208
|
var _a;
|
|
197
209
|
if (session.title && !pi.getSessionName()) {
|
|
@@ -1,52 +1,116 @@
|
|
|
1
1
|
/** What the package says to the user, in English and Chinese. */
|
|
2
2
|
declare const TEXTS: {
|
|
3
3
|
readonly remote: {
|
|
4
|
-
readonly en: (agent: string) => string;
|
|
5
|
-
readonly zh: (agent: string) => string;
|
|
4
|
+
readonly 'en-US': (agent: string) => string;
|
|
5
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
6
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
7
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
6
8
|
};
|
|
7
9
|
readonly signIn: {
|
|
8
|
-
readonly en: (agent: string, command: string) => string;
|
|
9
|
-
readonly zh: (agent: string, command: string) => string;
|
|
10
|
+
readonly 'en-US': (agent: string, command: string) => string;
|
|
11
|
+
readonly 'zh-CN': (agent: string, command: string) => string;
|
|
12
|
+
readonly 'zh-TW': (agent: string, command: string) => string;
|
|
13
|
+
readonly 'ja-JP': (agent: string, command: string) => string;
|
|
14
|
+
};
|
|
15
|
+
readonly signInPick: {
|
|
16
|
+
readonly 'en-US': (agent: string) => string;
|
|
17
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
18
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
19
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
20
|
+
};
|
|
21
|
+
readonly signInWith: {
|
|
22
|
+
readonly 'en-US': (way: string) => string;
|
|
23
|
+
readonly 'zh-CN': (way: string) => string;
|
|
24
|
+
readonly 'zh-TW': (way: string) => string;
|
|
25
|
+
readonly 'ja-JP': (way: string) => string;
|
|
26
|
+
};
|
|
27
|
+
/** The ways CodeBuddy Code offers, by id; '' for another. */
|
|
28
|
+
readonly signInMethod: {
|
|
29
|
+
readonly 'en-US': (id: string) => string;
|
|
30
|
+
readonly 'zh-CN': (id: string) => string;
|
|
31
|
+
readonly 'zh-TW': (id: string) => string;
|
|
32
|
+
readonly 'ja-JP': (id: string) => string;
|
|
33
|
+
};
|
|
34
|
+
readonly signingIn: {
|
|
35
|
+
readonly 'en-US': (agent: string) => string;
|
|
36
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
37
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
38
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
39
|
+
};
|
|
40
|
+
readonly signInPage: {
|
|
41
|
+
readonly 'en-US': (agent: string, url: string) => string;
|
|
42
|
+
readonly 'zh-CN': (agent: string, url: string) => string;
|
|
43
|
+
readonly 'zh-TW': (agent: string, url: string) => string;
|
|
44
|
+
readonly 'ja-JP': (agent: string, url: string) => string;
|
|
45
|
+
};
|
|
46
|
+
readonly signInFailed: {
|
|
47
|
+
readonly 'en-US': (agent: string) => string;
|
|
48
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
49
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
50
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
51
|
+
};
|
|
52
|
+
readonly signedIn: {
|
|
53
|
+
readonly 'en-US': (agent: string) => string;
|
|
54
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
55
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
56
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
10
57
|
};
|
|
11
58
|
readonly notFound: {
|
|
12
|
-
readonly en: (agent: string, command: string) => string;
|
|
13
|
-
readonly zh: (agent: string, command: string) => string;
|
|
59
|
+
readonly 'en-US': (agent: string, command: string) => string;
|
|
60
|
+
readonly 'zh-CN': (agent: string, command: string) => string;
|
|
61
|
+
readonly 'zh-TW': (agent: string, command: string) => string;
|
|
62
|
+
readonly 'ja-JP': (agent: string, command: string) => string;
|
|
14
63
|
};
|
|
15
64
|
readonly exited: {
|
|
16
|
-
readonly en: (agent: string, code: string, last: string) => string;
|
|
17
|
-
readonly zh: (agent: string, code: string, last: string) => string;
|
|
65
|
+
readonly 'en-US': (agent: string, code: string, last: string) => string;
|
|
66
|
+
readonly 'zh-CN': (agent: string, code: string, last: string) => string;
|
|
67
|
+
readonly 'zh-TW': (agent: string, code: string, last: string) => string;
|
|
68
|
+
readonly 'ja-JP': (agent: string, code: string, last: string) => string;
|
|
18
69
|
};
|
|
19
70
|
readonly commandDone: {
|
|
20
|
-
readonly en: (agent: string, command: string) => string;
|
|
21
|
-
readonly zh: (agent: string, command: string) => string;
|
|
71
|
+
readonly 'en-US': (agent: string, command: string) => string;
|
|
72
|
+
readonly 'zh-CN': (agent: string, command: string) => string;
|
|
73
|
+
readonly 'zh-TW': (agent: string, command: string) => string;
|
|
74
|
+
readonly 'ja-JP': (agent: string, command: string) => string;
|
|
22
75
|
};
|
|
23
76
|
readonly starting: {
|
|
24
|
-
readonly en: (agent: string) => string;
|
|
25
|
-
readonly zh: (agent: string) => string;
|
|
77
|
+
readonly 'en-US': (agent: string) => string;
|
|
78
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
79
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
80
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
26
81
|
};
|
|
27
82
|
readonly refused: {
|
|
28
|
-
readonly en: (agent: string) => string;
|
|
29
|
-
readonly zh: (agent: string) => string;
|
|
83
|
+
readonly 'en-US': (agent: string) => string;
|
|
84
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
85
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
86
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
30
87
|
};
|
|
31
88
|
readonly retrying: {
|
|
32
|
-
readonly en: (agent: string, network: string, attempt: string) => string;
|
|
33
|
-
readonly zh: (agent: string, network: string, attempt: string) => string;
|
|
89
|
+
readonly 'en-US': (agent: string, network: string, attempt: string) => string;
|
|
90
|
+
readonly 'zh-CN': (agent: string, network: string, attempt: string) => string;
|
|
91
|
+
readonly 'zh-TW': (agent: string, network: string, attempt: string) => string;
|
|
92
|
+
readonly 'ja-JP': (agent: string, network: string, attempt: string) => string;
|
|
34
93
|
};
|
|
35
94
|
readonly dropped: {
|
|
36
|
-
readonly en: (agent: string) => string;
|
|
37
|
-
readonly zh: (agent: string) => string;
|
|
95
|
+
readonly 'en-US': (agent: string) => string;
|
|
96
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
97
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
98
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
38
99
|
};
|
|
39
100
|
readonly unfinished: {
|
|
40
|
-
readonly en: (agent: string) => string;
|
|
41
|
-
readonly zh: (agent: string) => string;
|
|
101
|
+
readonly 'en-US': (agent: string) => string;
|
|
102
|
+
readonly 'zh-CN': (agent: string) => string;
|
|
103
|
+
readonly 'zh-TW': (agent: string) => string;
|
|
104
|
+
readonly 'ja-JP': (agent: string) => string;
|
|
42
105
|
};
|
|
43
106
|
};
|
|
44
107
|
type Texts = typeof TEXTS;
|
|
108
|
+
type TaLanguage = 'zh-CN' | 'zh-TW' | 'en-US' | 'ja-JP';
|
|
45
109
|
/**
|
|
46
110
|
* The language of the messages: the one of Ta's pages (`TA_LANGUAGE`, which they give ta serve), else the
|
|
47
111
|
* computer's (`LC_ALL`, `LC_MESSAGES`, `LANG`, else the locale of Node), as a terminal's.
|
|
48
112
|
*/
|
|
49
|
-
export declare function language(env?: NodeJS.ProcessEnv):
|
|
50
|
-
export declare function text<K extends keyof Texts>(key: K, ...args: Parameters<Texts[K]['en']>): string;
|
|
113
|
+
export declare function language(env?: NodeJS.ProcessEnv): TaLanguage;
|
|
114
|
+
export declare function text<K extends keyof Texts>(key: K, ...args: Parameters<Texts[K]['en-US']>): string;
|
|
51
115
|
export {};
|
|
52
116
|
//# sourceMappingURL=texts.d.ts.map
|