Files
larksuite__cli/internal/runtimebootstrap/bootstrap.go
zhaoyukun.yk 4dfe1b7dc0 feat(auth): support managed external credentials
Add Extended-only direct, credential-proxy, and platform-proxy modes while keeping Standard behavior and external-credential product details isolated behind source-neutral runtime capabilities.

Fail closed across helper execution, proxy routing, streams, managed file transfers, and unsupported event flows. Harden system configuration, edition updates, and release publication.

Cover Standard compatibility and Extended integration with contract tests, repository-local three-mode E2E, native trust checks, and CI and release gates.
2026-08-12 14:55:41 +08:00

28 lines
813 B
Go

// Copyright (c) 2026 Lark Technologies Pte. Ltd.
// SPDX-License-Identifier: MIT
// Package runtimebootstrap resolves all workspace-scoped startup state once
// before command construction.
package runtimebootstrap
import (
"os"
"github.com/larksuite/cli/internal/core"
"github.com/larksuite/cli/internal/runtimeplan"
)
// Result is the immutable startup snapshot shared by registry routing,
// credentials, transports, and workspace policy.
type Result struct {
ProfileConfig *core.MultiAppConfig
Plan *runtimeplan.Plan
}
// Resolve establishes the workspace first, then captures the selected Profile
// and runtime policy exactly once.
func Resolve(profileOverride string) *Result {
core.SetCurrentWorkspace(core.DetectWorkspaceFromEnv(os.Getenv))
return resolveEdition(profileOverride)
}