发布

  • feat(cli): add security config flag + fix e2e stdout pollution

    frostbyte_neo 发布于 2026-04-14 02:21:21 +00:00

    Two issues in one commit:

    1. E2E test failure fix
      composio version on headless Linux CI wrote a keyring warning
      to stdout because Effect.logWarning was mixing into the version
      output. Headless Linux (no D-Bus session) is an expected normal
      path for the keyring fallback — it shouldn't be a warning on
      every invocation. Dropped both write and read warnings to
      logDebug so stdout stays clean.

    2. Experimental security config flag
      Added security: "auto" | "keychain-subprocess" | "keychain"
      to CliUserConfig. Default "auto" and explicit
      "keychain-subprocess" both select the subprocess backend (safe
      on ad-hoc signed binaries, no dialogs). "keychain" opts into
      the experimental FFI path for users who have signed builds and
      want the ~25× read perf win.

      cli-keyring exposes this as a MacOSBackend parameter on
      createDefaultStore() and a new KeyringLiveWithBackend(backend)
      Effect layer constructor. user-context.ts uses
      Layer.unwrapEffect to read the config first, then build the
      keyring layer with the resolved backend.

      Linux is unaffected (always secret-tool subprocess).

    Verified: composio version in headless env outputs exactly "0.2.22"
    on stdout, empty stderr. All 676 CLI tests + 16 keyring tests pass.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件