Merge branch 'main' into feat/audit-log-v2

This commit is contained in:
修雨
2026-07-14 10:21:15 +08:00
310 changed files with 31054 additions and 916 deletions
+18
View File
@@ -53,6 +53,10 @@ type ToolCaller interface {
Format() string
// DryRun returns true when --dry-run is active.
DryRun() bool
// Fields returns the global --fields output projection ("" if unset).
Fields() string
// JQ returns the global --jq output filter expression ("" if unset).
JQ() string
}
// RuntimeDefaultFn resolves a single runtimeDefault placeholder (e.g.
@@ -74,6 +78,12 @@ type Hooks struct {
// to DefaultOSSClawType; overlays set their own value (e.g. "wukong").
ClawTypeValue string
// PersonalEventSourceID identifies the personal-event source channel
// used by dws event --as user. Empty → "open". Overlays set their own
// value through Override; open-source core never infers custom sources
// from environment/user input.
PersonalEventSourceID string
// --- runtime mode ---
IsEmbedded bool // true when running inside a host application
HideAuthLogin bool // true suppresses the "dws auth login" command
@@ -185,3 +195,11 @@ func ClawType() string {
}
return DefaultOSSClawType
}
// PersonalEventSourceID returns the source channel for user-level events.
func PersonalEventSourceID() string {
if v := Get().PersonalEventSourceID; v != "" {
return v
}
return "open"
}