|
|
@@ -149,15 +149,17 @@ func (r configAgentJSON) RawJSON() string {
|
|
|
|
|
|
type ConfigAgentBuild struct {
|
|
|
// Description of when to use the agent
|
|
|
- Description string `json:"description"`
|
|
|
- Disable bool `json:"disable"`
|
|
|
- Mode ConfigAgentBuildMode `json:"mode"`
|
|
|
- Model string `json:"model"`
|
|
|
- Prompt string `json:"prompt"`
|
|
|
- Temperature float64 `json:"temperature"`
|
|
|
- Tools map[string]bool `json:"tools"`
|
|
|
- TopP float64 `json:"top_p"`
|
|
|
- JSON configAgentBuildJSON `json:"-"`
|
|
|
+ Description string `json:"description"`
|
|
|
+ Disable bool `json:"disable"`
|
|
|
+ Mode ConfigAgentBuildMode `json:"mode"`
|
|
|
+ Model string `json:"model"`
|
|
|
+ Permission ConfigAgentBuildPermission `json:"permission"`
|
|
|
+ Prompt string `json:"prompt"`
|
|
|
+ Temperature float64 `json:"temperature"`
|
|
|
+ Tools map[string]bool `json:"tools"`
|
|
|
+ TopP float64 `json:"top_p"`
|
|
|
+ ExtraFields map[string]interface{} `json:"-,extras"`
|
|
|
+ JSON configAgentBuildJSON `json:"-"`
|
|
|
}
|
|
|
|
|
|
// configAgentBuildJSON contains the JSON metadata for the struct
|
|
|
@@ -167,6 +169,7 @@ type configAgentBuildJSON struct {
|
|
|
Disable apijson.Field
|
|
|
Mode apijson.Field
|
|
|
Model apijson.Field
|
|
|
+ Permission apijson.Field
|
|
|
Prompt apijson.Field
|
|
|
Temperature apijson.Field
|
|
|
Tools apijson.Field
|
|
|
@@ -199,17 +202,135 @@ func (r ConfigAgentBuildMode) IsKnown() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+type ConfigAgentBuildPermission struct {
|
|
|
+ Bash ConfigAgentBuildPermissionBashUnion `json:"bash"`
|
|
|
+ Edit ConfigAgentBuildPermissionEdit `json:"edit"`
|
|
|
+ Webfetch ConfigAgentBuildPermissionWebfetch `json:"webfetch"`
|
|
|
+ JSON configAgentBuildPermissionJSON `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+// configAgentBuildPermissionJSON contains the JSON metadata for the struct
|
|
|
+// [ConfigAgentBuildPermission]
|
|
|
+type configAgentBuildPermissionJSON struct {
|
|
|
+ Bash apijson.Field
|
|
|
+ Edit apijson.Field
|
|
|
+ Webfetch apijson.Field
|
|
|
+ raw string
|
|
|
+ ExtraFields map[string]apijson.Field
|
|
|
+}
|
|
|
+
|
|
|
+func (r *ConfigAgentBuildPermission) UnmarshalJSON(data []byte) (err error) {
|
|
|
+ return apijson.UnmarshalRoot(data, r)
|
|
|
+}
|
|
|
+
|
|
|
+func (r configAgentBuildPermissionJSON) RawJSON() string {
|
|
|
+ return r.raw
|
|
|
+}
|
|
|
+
|
|
|
+// Union satisfied by [ConfigAgentBuildPermissionBashString] or
|
|
|
+// [ConfigAgentBuildPermissionBashMap].
|
|
|
+type ConfigAgentBuildPermissionBashUnion interface {
|
|
|
+ implementsConfigAgentBuildPermissionBashUnion()
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ apijson.RegisterUnion(
|
|
|
+ reflect.TypeOf((*ConfigAgentBuildPermissionBashUnion)(nil)).Elem(),
|
|
|
+ "",
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.String,
|
|
|
+ Type: reflect.TypeOf(ConfigAgentBuildPermissionBashString("")),
|
|
|
+ },
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.JSON,
|
|
|
+ Type: reflect.TypeOf(ConfigAgentBuildPermissionBashMap{}),
|
|
|
+ },
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentBuildPermissionBashString string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentBuildPermissionBashStringAsk ConfigAgentBuildPermissionBashString = "ask"
|
|
|
+ ConfigAgentBuildPermissionBashStringAllow ConfigAgentBuildPermissionBashString = "allow"
|
|
|
+ ConfigAgentBuildPermissionBashStringDeny ConfigAgentBuildPermissionBashString = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentBuildPermissionBashString) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentBuildPermissionBashStringAsk, ConfigAgentBuildPermissionBashStringAllow, ConfigAgentBuildPermissionBashStringDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+func (r ConfigAgentBuildPermissionBashString) implementsConfigAgentBuildPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigAgentBuildPermissionBashMap map[string]ConfigAgentBuildPermissionBashMapItem
|
|
|
+
|
|
|
+func (r ConfigAgentBuildPermissionBashMap) implementsConfigAgentBuildPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigAgentBuildPermissionBashMapItem string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentBuildPermissionBashMapAsk ConfigAgentBuildPermissionBashMapItem = "ask"
|
|
|
+ ConfigAgentBuildPermissionBashMapAllow ConfigAgentBuildPermissionBashMapItem = "allow"
|
|
|
+ ConfigAgentBuildPermissionBashMapDeny ConfigAgentBuildPermissionBashMapItem = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentBuildPermissionBashMapItem) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentBuildPermissionBashMapAsk, ConfigAgentBuildPermissionBashMapAllow, ConfigAgentBuildPermissionBashMapDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentBuildPermissionEdit string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentBuildPermissionEditAsk ConfigAgentBuildPermissionEdit = "ask"
|
|
|
+ ConfigAgentBuildPermissionEditAllow ConfigAgentBuildPermissionEdit = "allow"
|
|
|
+ ConfigAgentBuildPermissionEditDeny ConfigAgentBuildPermissionEdit = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentBuildPermissionEdit) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentBuildPermissionEditAsk, ConfigAgentBuildPermissionEditAllow, ConfigAgentBuildPermissionEditDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentBuildPermissionWebfetch string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentBuildPermissionWebfetchAsk ConfigAgentBuildPermissionWebfetch = "ask"
|
|
|
+ ConfigAgentBuildPermissionWebfetchAllow ConfigAgentBuildPermissionWebfetch = "allow"
|
|
|
+ ConfigAgentBuildPermissionWebfetchDeny ConfigAgentBuildPermissionWebfetch = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentBuildPermissionWebfetch) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentBuildPermissionWebfetchAsk, ConfigAgentBuildPermissionWebfetchAllow, ConfigAgentBuildPermissionWebfetchDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
type ConfigAgentGeneral struct {
|
|
|
// Description of when to use the agent
|
|
|
- Description string `json:"description"`
|
|
|
- Disable bool `json:"disable"`
|
|
|
- Mode ConfigAgentGeneralMode `json:"mode"`
|
|
|
- Model string `json:"model"`
|
|
|
- Prompt string `json:"prompt"`
|
|
|
- Temperature float64 `json:"temperature"`
|
|
|
- Tools map[string]bool `json:"tools"`
|
|
|
- TopP float64 `json:"top_p"`
|
|
|
- JSON configAgentGeneralJSON `json:"-"`
|
|
|
+ Description string `json:"description"`
|
|
|
+ Disable bool `json:"disable"`
|
|
|
+ Mode ConfigAgentGeneralMode `json:"mode"`
|
|
|
+ Model string `json:"model"`
|
|
|
+ Permission ConfigAgentGeneralPermission `json:"permission"`
|
|
|
+ Prompt string `json:"prompt"`
|
|
|
+ Temperature float64 `json:"temperature"`
|
|
|
+ Tools map[string]bool `json:"tools"`
|
|
|
+ TopP float64 `json:"top_p"`
|
|
|
+ ExtraFields map[string]interface{} `json:"-,extras"`
|
|
|
+ JSON configAgentGeneralJSON `json:"-"`
|
|
|
}
|
|
|
|
|
|
// configAgentGeneralJSON contains the JSON metadata for the struct
|
|
|
@@ -219,6 +340,7 @@ type configAgentGeneralJSON struct {
|
|
|
Disable apijson.Field
|
|
|
Mode apijson.Field
|
|
|
Model apijson.Field
|
|
|
+ Permission apijson.Field
|
|
|
Prompt apijson.Field
|
|
|
Temperature apijson.Field
|
|
|
Tools apijson.Field
|
|
|
@@ -251,17 +373,135 @@ func (r ConfigAgentGeneralMode) IsKnown() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+type ConfigAgentGeneralPermission struct {
|
|
|
+ Bash ConfigAgentGeneralPermissionBashUnion `json:"bash"`
|
|
|
+ Edit ConfigAgentGeneralPermissionEdit `json:"edit"`
|
|
|
+ Webfetch ConfigAgentGeneralPermissionWebfetch `json:"webfetch"`
|
|
|
+ JSON configAgentGeneralPermissionJSON `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+// configAgentGeneralPermissionJSON contains the JSON metadata for the struct
|
|
|
+// [ConfigAgentGeneralPermission]
|
|
|
+type configAgentGeneralPermissionJSON struct {
|
|
|
+ Bash apijson.Field
|
|
|
+ Edit apijson.Field
|
|
|
+ Webfetch apijson.Field
|
|
|
+ raw string
|
|
|
+ ExtraFields map[string]apijson.Field
|
|
|
+}
|
|
|
+
|
|
|
+func (r *ConfigAgentGeneralPermission) UnmarshalJSON(data []byte) (err error) {
|
|
|
+ return apijson.UnmarshalRoot(data, r)
|
|
|
+}
|
|
|
+
|
|
|
+func (r configAgentGeneralPermissionJSON) RawJSON() string {
|
|
|
+ return r.raw
|
|
|
+}
|
|
|
+
|
|
|
+// Union satisfied by [ConfigAgentGeneralPermissionBashString] or
|
|
|
+// [ConfigAgentGeneralPermissionBashMap].
|
|
|
+type ConfigAgentGeneralPermissionBashUnion interface {
|
|
|
+ implementsConfigAgentGeneralPermissionBashUnion()
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ apijson.RegisterUnion(
|
|
|
+ reflect.TypeOf((*ConfigAgentGeneralPermissionBashUnion)(nil)).Elem(),
|
|
|
+ "",
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.String,
|
|
|
+ Type: reflect.TypeOf(ConfigAgentGeneralPermissionBashString("")),
|
|
|
+ },
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.JSON,
|
|
|
+ Type: reflect.TypeOf(ConfigAgentGeneralPermissionBashMap{}),
|
|
|
+ },
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentGeneralPermissionBashString string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentGeneralPermissionBashStringAsk ConfigAgentGeneralPermissionBashString = "ask"
|
|
|
+ ConfigAgentGeneralPermissionBashStringAllow ConfigAgentGeneralPermissionBashString = "allow"
|
|
|
+ ConfigAgentGeneralPermissionBashStringDeny ConfigAgentGeneralPermissionBashString = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentGeneralPermissionBashString) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentGeneralPermissionBashStringAsk, ConfigAgentGeneralPermissionBashStringAllow, ConfigAgentGeneralPermissionBashStringDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+func (r ConfigAgentGeneralPermissionBashString) implementsConfigAgentGeneralPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigAgentGeneralPermissionBashMap map[string]ConfigAgentGeneralPermissionBashMapItem
|
|
|
+
|
|
|
+func (r ConfigAgentGeneralPermissionBashMap) implementsConfigAgentGeneralPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigAgentGeneralPermissionBashMapItem string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentGeneralPermissionBashMapAsk ConfigAgentGeneralPermissionBashMapItem = "ask"
|
|
|
+ ConfigAgentGeneralPermissionBashMapAllow ConfigAgentGeneralPermissionBashMapItem = "allow"
|
|
|
+ ConfigAgentGeneralPermissionBashMapDeny ConfigAgentGeneralPermissionBashMapItem = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentGeneralPermissionBashMapItem) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentGeneralPermissionBashMapAsk, ConfigAgentGeneralPermissionBashMapAllow, ConfigAgentGeneralPermissionBashMapDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentGeneralPermissionEdit string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentGeneralPermissionEditAsk ConfigAgentGeneralPermissionEdit = "ask"
|
|
|
+ ConfigAgentGeneralPermissionEditAllow ConfigAgentGeneralPermissionEdit = "allow"
|
|
|
+ ConfigAgentGeneralPermissionEditDeny ConfigAgentGeneralPermissionEdit = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentGeneralPermissionEdit) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentGeneralPermissionEditAsk, ConfigAgentGeneralPermissionEditAllow, ConfigAgentGeneralPermissionEditDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentGeneralPermissionWebfetch string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentGeneralPermissionWebfetchAsk ConfigAgentGeneralPermissionWebfetch = "ask"
|
|
|
+ ConfigAgentGeneralPermissionWebfetchAllow ConfigAgentGeneralPermissionWebfetch = "allow"
|
|
|
+ ConfigAgentGeneralPermissionWebfetchDeny ConfigAgentGeneralPermissionWebfetch = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentGeneralPermissionWebfetch) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentGeneralPermissionWebfetchAsk, ConfigAgentGeneralPermissionWebfetchAllow, ConfigAgentGeneralPermissionWebfetchDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
type ConfigAgentPlan struct {
|
|
|
// Description of when to use the agent
|
|
|
- Description string `json:"description"`
|
|
|
- Disable bool `json:"disable"`
|
|
|
- Mode ConfigAgentPlanMode `json:"mode"`
|
|
|
- Model string `json:"model"`
|
|
|
- Prompt string `json:"prompt"`
|
|
|
- Temperature float64 `json:"temperature"`
|
|
|
- Tools map[string]bool `json:"tools"`
|
|
|
- TopP float64 `json:"top_p"`
|
|
|
- JSON configAgentPlanJSON `json:"-"`
|
|
|
+ Description string `json:"description"`
|
|
|
+ Disable bool `json:"disable"`
|
|
|
+ Mode ConfigAgentPlanMode `json:"mode"`
|
|
|
+ Model string `json:"model"`
|
|
|
+ Permission ConfigAgentPlanPermission `json:"permission"`
|
|
|
+ Prompt string `json:"prompt"`
|
|
|
+ Temperature float64 `json:"temperature"`
|
|
|
+ Tools map[string]bool `json:"tools"`
|
|
|
+ TopP float64 `json:"top_p"`
|
|
|
+ ExtraFields map[string]interface{} `json:"-,extras"`
|
|
|
+ JSON configAgentPlanJSON `json:"-"`
|
|
|
}
|
|
|
|
|
|
// configAgentPlanJSON contains the JSON metadata for the struct [ConfigAgentPlan]
|
|
|
@@ -270,6 +510,7 @@ type configAgentPlanJSON struct {
|
|
|
Disable apijson.Field
|
|
|
Mode apijson.Field
|
|
|
Model apijson.Field
|
|
|
+ Permission apijson.Field
|
|
|
Prompt apijson.Field
|
|
|
Temperature apijson.Field
|
|
|
Tools apijson.Field
|
|
|
@@ -302,6 +543,122 @@ func (r ConfigAgentPlanMode) IsKnown() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+type ConfigAgentPlanPermission struct {
|
|
|
+ Bash ConfigAgentPlanPermissionBashUnion `json:"bash"`
|
|
|
+ Edit ConfigAgentPlanPermissionEdit `json:"edit"`
|
|
|
+ Webfetch ConfigAgentPlanPermissionWebfetch `json:"webfetch"`
|
|
|
+ JSON configAgentPlanPermissionJSON `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+// configAgentPlanPermissionJSON contains the JSON metadata for the struct
|
|
|
+// [ConfigAgentPlanPermission]
|
|
|
+type configAgentPlanPermissionJSON struct {
|
|
|
+ Bash apijson.Field
|
|
|
+ Edit apijson.Field
|
|
|
+ Webfetch apijson.Field
|
|
|
+ raw string
|
|
|
+ ExtraFields map[string]apijson.Field
|
|
|
+}
|
|
|
+
|
|
|
+func (r *ConfigAgentPlanPermission) UnmarshalJSON(data []byte) (err error) {
|
|
|
+ return apijson.UnmarshalRoot(data, r)
|
|
|
+}
|
|
|
+
|
|
|
+func (r configAgentPlanPermissionJSON) RawJSON() string {
|
|
|
+ return r.raw
|
|
|
+}
|
|
|
+
|
|
|
+// Union satisfied by [ConfigAgentPlanPermissionBashString] or
|
|
|
+// [ConfigAgentPlanPermissionBashMap].
|
|
|
+type ConfigAgentPlanPermissionBashUnion interface {
|
|
|
+ implementsConfigAgentPlanPermissionBashUnion()
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ apijson.RegisterUnion(
|
|
|
+ reflect.TypeOf((*ConfigAgentPlanPermissionBashUnion)(nil)).Elem(),
|
|
|
+ "",
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.String,
|
|
|
+ Type: reflect.TypeOf(ConfigAgentPlanPermissionBashString("")),
|
|
|
+ },
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.JSON,
|
|
|
+ Type: reflect.TypeOf(ConfigAgentPlanPermissionBashMap{}),
|
|
|
+ },
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentPlanPermissionBashString string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentPlanPermissionBashStringAsk ConfigAgentPlanPermissionBashString = "ask"
|
|
|
+ ConfigAgentPlanPermissionBashStringAllow ConfigAgentPlanPermissionBashString = "allow"
|
|
|
+ ConfigAgentPlanPermissionBashStringDeny ConfigAgentPlanPermissionBashString = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentPlanPermissionBashString) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentPlanPermissionBashStringAsk, ConfigAgentPlanPermissionBashStringAllow, ConfigAgentPlanPermissionBashStringDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+func (r ConfigAgentPlanPermissionBashString) implementsConfigAgentPlanPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigAgentPlanPermissionBashMap map[string]ConfigAgentPlanPermissionBashMapItem
|
|
|
+
|
|
|
+func (r ConfigAgentPlanPermissionBashMap) implementsConfigAgentPlanPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigAgentPlanPermissionBashMapItem string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentPlanPermissionBashMapAsk ConfigAgentPlanPermissionBashMapItem = "ask"
|
|
|
+ ConfigAgentPlanPermissionBashMapAllow ConfigAgentPlanPermissionBashMapItem = "allow"
|
|
|
+ ConfigAgentPlanPermissionBashMapDeny ConfigAgentPlanPermissionBashMapItem = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentPlanPermissionBashMapItem) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentPlanPermissionBashMapAsk, ConfigAgentPlanPermissionBashMapAllow, ConfigAgentPlanPermissionBashMapDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentPlanPermissionEdit string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentPlanPermissionEditAsk ConfigAgentPlanPermissionEdit = "ask"
|
|
|
+ ConfigAgentPlanPermissionEditAllow ConfigAgentPlanPermissionEdit = "allow"
|
|
|
+ ConfigAgentPlanPermissionEditDeny ConfigAgentPlanPermissionEdit = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentPlanPermissionEdit) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentPlanPermissionEditAsk, ConfigAgentPlanPermissionEditAllow, ConfigAgentPlanPermissionEditDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigAgentPlanPermissionWebfetch string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigAgentPlanPermissionWebfetchAsk ConfigAgentPlanPermissionWebfetch = "ask"
|
|
|
+ ConfigAgentPlanPermissionWebfetchAllow ConfigAgentPlanPermissionWebfetch = "allow"
|
|
|
+ ConfigAgentPlanPermissionWebfetchDeny ConfigAgentPlanPermissionWebfetch = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigAgentPlanPermissionWebfetch) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigAgentPlanPermissionWebfetchAsk, ConfigAgentPlanPermissionWebfetchAllow, ConfigAgentPlanPermissionWebfetchDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
type ConfigExperimental struct {
|
|
|
Hook ConfigExperimentalHook `json:"hook"`
|
|
|
JSON configExperimentalJSON `json:"-"`
|
|
|
@@ -681,15 +1038,17 @@ func (r configModeJSON) RawJSON() string {
|
|
|
|
|
|
type ConfigModeBuild struct {
|
|
|
// Description of when to use the agent
|
|
|
- Description string `json:"description"`
|
|
|
- Disable bool `json:"disable"`
|
|
|
- Mode ConfigModeBuildMode `json:"mode"`
|
|
|
- Model string `json:"model"`
|
|
|
- Prompt string `json:"prompt"`
|
|
|
- Temperature float64 `json:"temperature"`
|
|
|
- Tools map[string]bool `json:"tools"`
|
|
|
- TopP float64 `json:"top_p"`
|
|
|
- JSON configModeBuildJSON `json:"-"`
|
|
|
+ Description string `json:"description"`
|
|
|
+ Disable bool `json:"disable"`
|
|
|
+ Mode ConfigModeBuildMode `json:"mode"`
|
|
|
+ Model string `json:"model"`
|
|
|
+ Permission ConfigModeBuildPermission `json:"permission"`
|
|
|
+ Prompt string `json:"prompt"`
|
|
|
+ Temperature float64 `json:"temperature"`
|
|
|
+ Tools map[string]bool `json:"tools"`
|
|
|
+ TopP float64 `json:"top_p"`
|
|
|
+ ExtraFields map[string]interface{} `json:"-,extras"`
|
|
|
+ JSON configModeBuildJSON `json:"-"`
|
|
|
}
|
|
|
|
|
|
// configModeBuildJSON contains the JSON metadata for the struct [ConfigModeBuild]
|
|
|
@@ -698,6 +1057,7 @@ type configModeBuildJSON struct {
|
|
|
Disable apijson.Field
|
|
|
Mode apijson.Field
|
|
|
Model apijson.Field
|
|
|
+ Permission apijson.Field
|
|
|
Prompt apijson.Field
|
|
|
Temperature apijson.Field
|
|
|
Tools apijson.Field
|
|
|
@@ -730,17 +1090,135 @@ func (r ConfigModeBuildMode) IsKnown() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+type ConfigModeBuildPermission struct {
|
|
|
+ Bash ConfigModeBuildPermissionBashUnion `json:"bash"`
|
|
|
+ Edit ConfigModeBuildPermissionEdit `json:"edit"`
|
|
|
+ Webfetch ConfigModeBuildPermissionWebfetch `json:"webfetch"`
|
|
|
+ JSON configModeBuildPermissionJSON `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+// configModeBuildPermissionJSON contains the JSON metadata for the struct
|
|
|
+// [ConfigModeBuildPermission]
|
|
|
+type configModeBuildPermissionJSON struct {
|
|
|
+ Bash apijson.Field
|
|
|
+ Edit apijson.Field
|
|
|
+ Webfetch apijson.Field
|
|
|
+ raw string
|
|
|
+ ExtraFields map[string]apijson.Field
|
|
|
+}
|
|
|
+
|
|
|
+func (r *ConfigModeBuildPermission) UnmarshalJSON(data []byte) (err error) {
|
|
|
+ return apijson.UnmarshalRoot(data, r)
|
|
|
+}
|
|
|
+
|
|
|
+func (r configModeBuildPermissionJSON) RawJSON() string {
|
|
|
+ return r.raw
|
|
|
+}
|
|
|
+
|
|
|
+// Union satisfied by [ConfigModeBuildPermissionBashString] or
|
|
|
+// [ConfigModeBuildPermissionBashMap].
|
|
|
+type ConfigModeBuildPermissionBashUnion interface {
|
|
|
+ implementsConfigModeBuildPermissionBashUnion()
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ apijson.RegisterUnion(
|
|
|
+ reflect.TypeOf((*ConfigModeBuildPermissionBashUnion)(nil)).Elem(),
|
|
|
+ "",
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.String,
|
|
|
+ Type: reflect.TypeOf(ConfigModeBuildPermissionBashString("")),
|
|
|
+ },
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.JSON,
|
|
|
+ Type: reflect.TypeOf(ConfigModeBuildPermissionBashMap{}),
|
|
|
+ },
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigModeBuildPermissionBashString string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModeBuildPermissionBashStringAsk ConfigModeBuildPermissionBashString = "ask"
|
|
|
+ ConfigModeBuildPermissionBashStringAllow ConfigModeBuildPermissionBashString = "allow"
|
|
|
+ ConfigModeBuildPermissionBashStringDeny ConfigModeBuildPermissionBashString = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModeBuildPermissionBashString) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModeBuildPermissionBashStringAsk, ConfigModeBuildPermissionBashStringAllow, ConfigModeBuildPermissionBashStringDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+func (r ConfigModeBuildPermissionBashString) implementsConfigModeBuildPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigModeBuildPermissionBashMap map[string]ConfigModeBuildPermissionBashMapItem
|
|
|
+
|
|
|
+func (r ConfigModeBuildPermissionBashMap) implementsConfigModeBuildPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigModeBuildPermissionBashMapItem string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModeBuildPermissionBashMapAsk ConfigModeBuildPermissionBashMapItem = "ask"
|
|
|
+ ConfigModeBuildPermissionBashMapAllow ConfigModeBuildPermissionBashMapItem = "allow"
|
|
|
+ ConfigModeBuildPermissionBashMapDeny ConfigModeBuildPermissionBashMapItem = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModeBuildPermissionBashMapItem) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModeBuildPermissionBashMapAsk, ConfigModeBuildPermissionBashMapAllow, ConfigModeBuildPermissionBashMapDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigModeBuildPermissionEdit string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModeBuildPermissionEditAsk ConfigModeBuildPermissionEdit = "ask"
|
|
|
+ ConfigModeBuildPermissionEditAllow ConfigModeBuildPermissionEdit = "allow"
|
|
|
+ ConfigModeBuildPermissionEditDeny ConfigModeBuildPermissionEdit = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModeBuildPermissionEdit) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModeBuildPermissionEditAsk, ConfigModeBuildPermissionEditAllow, ConfigModeBuildPermissionEditDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigModeBuildPermissionWebfetch string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModeBuildPermissionWebfetchAsk ConfigModeBuildPermissionWebfetch = "ask"
|
|
|
+ ConfigModeBuildPermissionWebfetchAllow ConfigModeBuildPermissionWebfetch = "allow"
|
|
|
+ ConfigModeBuildPermissionWebfetchDeny ConfigModeBuildPermissionWebfetch = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModeBuildPermissionWebfetch) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModeBuildPermissionWebfetchAsk, ConfigModeBuildPermissionWebfetchAllow, ConfigModeBuildPermissionWebfetchDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
type ConfigModePlan struct {
|
|
|
// Description of when to use the agent
|
|
|
- Description string `json:"description"`
|
|
|
- Disable bool `json:"disable"`
|
|
|
- Mode ConfigModePlanMode `json:"mode"`
|
|
|
- Model string `json:"model"`
|
|
|
- Prompt string `json:"prompt"`
|
|
|
- Temperature float64 `json:"temperature"`
|
|
|
- Tools map[string]bool `json:"tools"`
|
|
|
- TopP float64 `json:"top_p"`
|
|
|
- JSON configModePlanJSON `json:"-"`
|
|
|
+ Description string `json:"description"`
|
|
|
+ Disable bool `json:"disable"`
|
|
|
+ Mode ConfigModePlanMode `json:"mode"`
|
|
|
+ Model string `json:"model"`
|
|
|
+ Permission ConfigModePlanPermission `json:"permission"`
|
|
|
+ Prompt string `json:"prompt"`
|
|
|
+ Temperature float64 `json:"temperature"`
|
|
|
+ Tools map[string]bool `json:"tools"`
|
|
|
+ TopP float64 `json:"top_p"`
|
|
|
+ ExtraFields map[string]interface{} `json:"-,extras"`
|
|
|
+ JSON configModePlanJSON `json:"-"`
|
|
|
}
|
|
|
|
|
|
// configModePlanJSON contains the JSON metadata for the struct [ConfigModePlan]
|
|
|
@@ -749,6 +1227,7 @@ type configModePlanJSON struct {
|
|
|
Disable apijson.Field
|
|
|
Mode apijson.Field
|
|
|
Model apijson.Field
|
|
|
+ Permission apijson.Field
|
|
|
Prompt apijson.Field
|
|
|
Temperature apijson.Field
|
|
|
Tools apijson.Field
|
|
|
@@ -781,6 +1260,122 @@ func (r ConfigModePlanMode) IsKnown() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+type ConfigModePlanPermission struct {
|
|
|
+ Bash ConfigModePlanPermissionBashUnion `json:"bash"`
|
|
|
+ Edit ConfigModePlanPermissionEdit `json:"edit"`
|
|
|
+ Webfetch ConfigModePlanPermissionWebfetch `json:"webfetch"`
|
|
|
+ JSON configModePlanPermissionJSON `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+// configModePlanPermissionJSON contains the JSON metadata for the struct
|
|
|
+// [ConfigModePlanPermission]
|
|
|
+type configModePlanPermissionJSON struct {
|
|
|
+ Bash apijson.Field
|
|
|
+ Edit apijson.Field
|
|
|
+ Webfetch apijson.Field
|
|
|
+ raw string
|
|
|
+ ExtraFields map[string]apijson.Field
|
|
|
+}
|
|
|
+
|
|
|
+func (r *ConfigModePlanPermission) UnmarshalJSON(data []byte) (err error) {
|
|
|
+ return apijson.UnmarshalRoot(data, r)
|
|
|
+}
|
|
|
+
|
|
|
+func (r configModePlanPermissionJSON) RawJSON() string {
|
|
|
+ return r.raw
|
|
|
+}
|
|
|
+
|
|
|
+// Union satisfied by [ConfigModePlanPermissionBashString] or
|
|
|
+// [ConfigModePlanPermissionBashMap].
|
|
|
+type ConfigModePlanPermissionBashUnion interface {
|
|
|
+ implementsConfigModePlanPermissionBashUnion()
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ apijson.RegisterUnion(
|
|
|
+ reflect.TypeOf((*ConfigModePlanPermissionBashUnion)(nil)).Elem(),
|
|
|
+ "",
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.String,
|
|
|
+ Type: reflect.TypeOf(ConfigModePlanPermissionBashString("")),
|
|
|
+ },
|
|
|
+ apijson.UnionVariant{
|
|
|
+ TypeFilter: gjson.JSON,
|
|
|
+ Type: reflect.TypeOf(ConfigModePlanPermissionBashMap{}),
|
|
|
+ },
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigModePlanPermissionBashString string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModePlanPermissionBashStringAsk ConfigModePlanPermissionBashString = "ask"
|
|
|
+ ConfigModePlanPermissionBashStringAllow ConfigModePlanPermissionBashString = "allow"
|
|
|
+ ConfigModePlanPermissionBashStringDeny ConfigModePlanPermissionBashString = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModePlanPermissionBashString) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModePlanPermissionBashStringAsk, ConfigModePlanPermissionBashStringAllow, ConfigModePlanPermissionBashStringDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+func (r ConfigModePlanPermissionBashString) implementsConfigModePlanPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigModePlanPermissionBashMap map[string]ConfigModePlanPermissionBashMapItem
|
|
|
+
|
|
|
+func (r ConfigModePlanPermissionBashMap) implementsConfigModePlanPermissionBashUnion() {}
|
|
|
+
|
|
|
+type ConfigModePlanPermissionBashMapItem string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModePlanPermissionBashMapAsk ConfigModePlanPermissionBashMapItem = "ask"
|
|
|
+ ConfigModePlanPermissionBashMapAllow ConfigModePlanPermissionBashMapItem = "allow"
|
|
|
+ ConfigModePlanPermissionBashMapDeny ConfigModePlanPermissionBashMapItem = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModePlanPermissionBashMapItem) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModePlanPermissionBashMapAsk, ConfigModePlanPermissionBashMapAllow, ConfigModePlanPermissionBashMapDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigModePlanPermissionEdit string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModePlanPermissionEditAsk ConfigModePlanPermissionEdit = "ask"
|
|
|
+ ConfigModePlanPermissionEditAllow ConfigModePlanPermissionEdit = "allow"
|
|
|
+ ConfigModePlanPermissionEditDeny ConfigModePlanPermissionEdit = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModePlanPermissionEdit) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModePlanPermissionEditAsk, ConfigModePlanPermissionEditAllow, ConfigModePlanPermissionEditDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+type ConfigModePlanPermissionWebfetch string
|
|
|
+
|
|
|
+const (
|
|
|
+ ConfigModePlanPermissionWebfetchAsk ConfigModePlanPermissionWebfetch = "ask"
|
|
|
+ ConfigModePlanPermissionWebfetchAllow ConfigModePlanPermissionWebfetch = "allow"
|
|
|
+ ConfigModePlanPermissionWebfetchDeny ConfigModePlanPermissionWebfetch = "deny"
|
|
|
+)
|
|
|
+
|
|
|
+func (r ConfigModePlanPermissionWebfetch) IsKnown() bool {
|
|
|
+ switch r {
|
|
|
+ case ConfigModePlanPermissionWebfetchAsk, ConfigModePlanPermissionWebfetchAllow, ConfigModePlanPermissionWebfetchDeny:
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
type ConfigPermission struct {
|
|
|
Bash ConfigPermissionBashUnion `json:"bash"`
|
|
|
Edit ConfigPermissionEdit `json:"edit"`
|
|
|
@@ -897,10 +1492,10 @@ func (r ConfigPermissionWebfetch) IsKnown() bool {
|
|
|
}
|
|
|
|
|
|
type ConfigProvider struct {
|
|
|
- Models map[string]ConfigProviderModel `json:"models,required"`
|
|
|
ID string `json:"id"`
|
|
|
API string `json:"api"`
|
|
|
Env []string `json:"env"`
|
|
|
+ Models map[string]ConfigProviderModel `json:"models"`
|
|
|
Name string `json:"name"`
|
|
|
Npm string `json:"npm"`
|
|
|
Options ConfigProviderOptions `json:"options"`
|
|
|
@@ -909,10 +1504,10 @@ type ConfigProvider struct {
|
|
|
|
|
|
// configProviderJSON contains the JSON metadata for the struct [ConfigProvider]
|
|
|
type configProviderJSON struct {
|
|
|
- Models apijson.Field
|
|
|
ID apijson.Field
|
|
|
API apijson.Field
|
|
|
Env apijson.Field
|
|
|
+ Models apijson.Field
|
|
|
Name apijson.Field
|
|
|
Npm apijson.Field
|
|
|
Options apijson.Field
|
|
|
@@ -1138,6 +1733,8 @@ type KeybindsConfig struct {
|
|
|
SwitchModeReverse string `json:"switch_mode_reverse,required"`
|
|
|
// List available themes
|
|
|
ThemeList string `json:"theme_list,required"`
|
|
|
+ // Toggle thinking blocks
|
|
|
+ ThinkingBlocks string `json:"thinking_blocks,required"`
|
|
|
// Toggle tool details
|
|
|
ToolDetails string `json:"tool_details,required"`
|
|
|
JSON keybindsConfigJSON `json:"-"`
|
|
|
@@ -1184,6 +1781,7 @@ type keybindsConfigJSON struct {
|
|
|
SwitchMode apijson.Field
|
|
|
SwitchModeReverse apijson.Field
|
|
|
ThemeList apijson.Field
|
|
|
+ ThinkingBlocks apijson.Field
|
|
|
ToolDetails apijson.Field
|
|
|
raw string
|
|
|
ExtraFields map[string]apijson.Field
|