Commit Graph
21 Commits
Author SHA1 Message Date
gengruilin f7895910e7 refactor(cli-account): let the Host name diagnostics and the connect operation
The browser no longer decides what belongs to the plugin:

- A failure carries untranslated diagnostic items the section joins
  after the plugin's text; failureDetails() lists a classified
  command and its exit code, so the kit dictionary drops its exit
  code template.
- The display names the operation Connect starts in the activation
  prompt instead of the browser picking the first primary button.
- The browser sends cancel for the operation in progress and shows a
  result's notice as the Host sends it, without repeating the Host's
  cancellable and success checks; the entry drops the cancellable
  and outcome fields that only those checks read.
2026-10-31 22:12:11 +08:00
gengruilin 0995564d4b refactor(cli-account): register CLI app accounts on the Host
CLI app plugins register their account runtime with the Host service
ctx.cliAccounts instead of a browser registry. The registry serves
every account through one cliAccounts Remote and starts or cancels
only the operations each account lists. One browser half renders each
account's section, tag, activation prompt, confirmations, and notices
from the plugin's LocalizedText and the kit's shared dictionary, and
keeps link opening, notices, and the pending-action guard per browser.

The account runtime replaces its follow stream with observe(), which
the registry uses.
2026-10-30 18:56:49 +08:00
gengruilin 565f68846c refactor(cli-account): register CLI accounts through a client plugin
The Web shell's PLATFORM_MODULES list is closed to new packages, and a
feature plugin cannot runtime-import another plugin's values. Turn
ui-cli-account from a statically linked library into a dynamic client
plugin that dsh-web-app mounts.

`ctx.cliAccounts.register()` follows the plugin's account stream and
contributes the bundle section, title tag, activation prompt, and
notice. The surfaces read the shared copy from the plugin's namespace
through the locale seat; the plugin supplies its Remote operations, its
success notices, and a presenter that maps the page snapshot to the
section's translated display. Confirmations become action data the
section asks before running, and the activation prompt connects through
the section's first primary action that asks no confirmation.

Drop the shell seeding, the apps/web dependency, and the CSS
publication exception the static form needed.
2026-10-29 18:41:47 +08:00
gengruilin 40141bb0ec chore(cli-account): match the root version 0.2.2-alpha.2 2026-10-28 14:23:57 +08:00
gengruilin ebf0ea51ab chore(cli-account): match the root version 0.2.1-rc.4 2026-10-27 14:08:11 +08:00
gengruilin e7671cd09f docs(cli-account): state the Host runtime precondition and complete failure contracts
The executor's module and class comments and the README now state that
its subprocess runtime must run on the Host, and `run` lists executable
lookup, spawn, and `onLine` failures among its rejections. The README and
`authorizationHosts` state that hosts are lowercase ASCII with punycode
IDNs. `CliCommandFailure.exitCode` lists every failure that leaves it
null, and `CliAccountBadge` names the bundle and row pages it renders on.
2026-10-17 19:14:25 +08:00
gengruilin 3430ac112a fix(ui-cli-account): open each operation's links and report its notice from its own start
The set of auto-opened links lived as long as the connection, so a later
operation offering the same device page never opened it. A rejected start
kept following the operation of an earlier start, which went on opening
its links and reporting its success after the page's latest action failed.

The followed operation now carries its own opened links. Each start
attempt drops the operation followed before, an accepted start follows
the returned one, and the stream's result for it ends the following.
2026-10-17 19:10:18 +08:00
gengruilin 15aa84f28c fix(ui-cli-account): stop retries and start answers from acting after disposal
`retry()` claimed the reopen only after awaiting the stopped stream, so a
second retry or a disposal in that window still subscribed a stream that
nothing released. A start that answered after disposal, or a view the
stream yielded just before it, still opened the operation's link.

`retry()` now clears `stopped` before the reopen awaits, and the reopen
subscribes only while the page is live. A start answer and a stream item
that arrive after disposal are dropped.
2026-10-17 19:08:58 +08:00
gengruilin 30514fa7e0 fix(ui-cli-account): keep generated Remote modules out of the Host build
The Web shell links ui-cli-account statically, and webworker-runtime
reaches the Web shell from the Host aggregate. ui-cli-account referenced
the api-remotes Client project, so the Host compiler compiled Client code
that imports generated /remote modules before the Typert step had written
them, and the build failed. ui-cli-account needs only the Gateway's
`ctx.remote` declaration, so it drops the api-remotes import, project
reference, and development dependency. The event matrix no longer counts
terminal-controller, whose Client listener the Host program reached only
through that path.
2026-10-16 10:42:23 +08:00
gengruilin 187603cca0 fix(ui-cli-account): show the tag on the bundle's row pages again
The structural badge subject dropped the Plugins page's row subject, which the badge showed the tag for before.
2026-10-14 23:12:24 +08:00
gengruilin b25f3de03c refactor(ui-cli-account): ship the page pieces as a Web shell platform module
Client feature packages may not request another row's runtime values through dsh.client.external, so the shared pieces become a static library the shell seeds into its module table, like ui-dockkit. Plugins import the package root, the web-app row is gone, and the badge takes a structural subject instead of importing the Plugins page types.
2026-10-14 23:08:46 +08:00
gengruilin 3e89d14b6a test(ui-cli-account): satisfy the type-aware lint rules 2026-10-14 19:22:49 +08:00
gengruilin 1e40d38359 build(ui-cli-account): use the root React types 2026-10-14 18:12:23 +08:00
gengruilin 666604a025 docs(cli-account): add the kit and connector group READMEs
Register both packages with the README, Model Experience, and product-package gates, and regenerate the config catalog, module graph, and composition reference.
2026-10-14 17:51:10 +08:00
gengruilin 57c8447e98 docs(cli-account): document the kit's contracts
Document the executor's deadlines and output limits, the runtime's
one-operation, phase-gated cancellation, trusted-link, and classified-failure
contracts, the shared config fields, and the client mirror and components.
2026-10-14 17:41:20 +08:00
gengruilin 64d8d52106 test(ui-cli-account): cover the connection mirror and Plugins page components
Port the Feishu page connection specs to the kit's connection mirror and
cover the section, tag, activation prompt, confirmation, and notice against
the shared dictionary keys.
2026-10-14 17:37:38 +08:00
gengruilin 363ca76ac1 feat(ui-cli-account): label the section's phase from the shared dictionary
The section labels its status from the plugin's `status.*` keys unless the
plugin passes a step label for an operation in progress. The notice
translator no longer narrows the toast's notice type.
2026-10-14 17:03:32 +08:00
gengruilin 7a2156aacb feat(ui-cli-account): render shared copy from the plugin's dictionary
CLI plugins translate one shared key set, CliAccountKey, for the section
title, hint, tags, activation prompt, confirmation buttons, and failure
diagnostics; the components read those keys through the plugin's
translator, so the plugin passes only its own text. The section takes its
buttons and extra rows as data and disables them while an action is pending
or the Host stream is down.
2026-10-14 16:58:21 +08:00
gengruilin bcce689968 chore(cli-account): package the kit and load its client half as a shared module
Client plugin bundles may not inline another plugin's values, so the client
kit becomes a client row that CLI plugins request through
dsh.client.external. The web app mounts the row once, as it does for other
shared Plugins page surfaces, and the plugins import its components and
connection mirror from the module table. Add the package manifests,
TypeScript projects, and path mappings for both kit packages.
2026-10-14 16:50:39 +08:00
gengruilin 99e93d27d0 feat(ui-cli-account): show failure diagnostics in the account section
describeFailure joins a failed command's identity, exit code, and the
plugin's allowlisted details for the section's diagnostic line.
2026-10-14 16:34:39 +08:00
gengruilin e21c18c693 feat(ui-cli-account): share the Plugins page connection pieces of CLI plugins
CliAccountConnection mirrors a plugin's account view, opens the
authorization link once in the browser that started the operation, and
reports outcomes; the section, tag, activation prompt, confirmation, and
notice components render a plugin's six display phases with the copy the
plugin translates. Each plugin keeps its own presentation and dictionary.
2026-10-14 15:24:53 +08:00