mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
chore: format code
This commit is contained in:
parent
0dad18f1e5
commit
d8519195fb
2 changed files with 198 additions and 167 deletions
|
|
@ -447,6 +447,21 @@ export type EventMessagePartRemoved = {
|
|||
}
|
||||
}
|
||||
|
||||
export type PermissionRequest = {
|
||||
id: string
|
||||
sessionID: string
|
||||
type: string
|
||||
title: string
|
||||
description: string
|
||||
keys: Array<string>
|
||||
patterns?: Array<string>
|
||||
}
|
||||
|
||||
export type EventPermissionRequest = {
|
||||
type: "permission.request"
|
||||
properties: PermissionRequest
|
||||
}
|
||||
|
||||
export type Permission = {
|
||||
id: string
|
||||
type: string
|
||||
|
|
@ -745,6 +760,7 @@ export type Event =
|
|||
| EventMessageRemoved
|
||||
| EventMessagePartUpdated
|
||||
| EventMessagePartRemoved
|
||||
| EventPermissionRequest
|
||||
| EventPermissionUpdated
|
||||
| EventPermissionReplied
|
||||
| EventFileEdited
|
||||
|
|
@ -1124,6 +1140,31 @@ export type KeybindsConfig = {
|
|||
terminal_title_toggle?: string
|
||||
}
|
||||
|
||||
export type PermissionActionConfig = "ask" | "allow" | "deny"
|
||||
|
||||
export type PermissionObjectConfig = {
|
||||
[key: string]: PermissionActionConfig
|
||||
}
|
||||
|
||||
export type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig
|
||||
|
||||
export type PermissionConfig = {
|
||||
read?: PermissionRuleConfig
|
||||
edit?: PermissionRuleConfig
|
||||
glob?: PermissionRuleConfig
|
||||
grep?: PermissionRuleConfig
|
||||
list?: PermissionRuleConfig
|
||||
bash?: PermissionRuleConfig
|
||||
task?: PermissionRuleConfig
|
||||
external_directory?: PermissionRuleConfig
|
||||
todowrite?: PermissionActionConfig
|
||||
todoread?: PermissionActionConfig
|
||||
websearch?: PermissionActionConfig
|
||||
codesearch?: PermissionActionConfig
|
||||
doom_loop?: PermissionActionConfig
|
||||
[key: string]: PermissionRuleConfig | PermissionActionConfig | undefined
|
||||
}
|
||||
|
||||
export type AgentConfig = {
|
||||
model?: string
|
||||
temperature?: number
|
||||
|
|
@ -1146,19 +1187,7 @@ export type AgentConfig = {
|
|||
* Maximum number of agentic iterations before forcing text-only response
|
||||
*/
|
||||
maxSteps?: number
|
||||
permission?: {
|
||||
edit?: "ask" | "allow" | "deny"
|
||||
bash?:
|
||||
| "ask"
|
||||
| "allow"
|
||||
| "deny"
|
||||
| {
|
||||
[key: string]: "ask" | "allow" | "deny"
|
||||
}
|
||||
webfetch?: "ask" | "allow" | "deny"
|
||||
doom_loop?: "ask" | "allow" | "deny"
|
||||
external_directory?: "ask" | "allow" | "deny"
|
||||
}
|
||||
permission?: PermissionConfig
|
||||
[key: string]:
|
||||
| unknown
|
||||
| string
|
||||
|
|
@ -1172,19 +1201,7 @@ export type AgentConfig = {
|
|||
| "all"
|
||||
| string
|
||||
| number
|
||||
| {
|
||||
edit?: "ask" | "allow" | "deny"
|
||||
bash?:
|
||||
| "ask"
|
||||
| "allow"
|
||||
| "deny"
|
||||
| {
|
||||
[key: string]: "ask" | "allow" | "deny"
|
||||
}
|
||||
webfetch?: "ask" | "allow" | "deny"
|
||||
doom_loop?: "ask" | "allow" | "deny"
|
||||
external_directory?: "ask" | "allow" | "deny"
|
||||
}
|
||||
| PermissionConfig
|
||||
| undefined
|
||||
}
|
||||
|
||||
|
|
@ -1491,19 +1508,7 @@ export type Config = {
|
|||
*/
|
||||
instructions?: Array<string>
|
||||
layout?: LayoutConfig
|
||||
permission?: {
|
||||
edit?: "ask" | "allow" | "deny"
|
||||
bash?:
|
||||
| "ask"
|
||||
| "allow"
|
||||
| "deny"
|
||||
| {
|
||||
[key: string]: "ask" | "allow" | "deny"
|
||||
}
|
||||
webfetch?: "ask" | "allow" | "deny"
|
||||
doom_loop?: "ask" | "allow" | "deny"
|
||||
external_directory?: "ask" | "allow" | "deny"
|
||||
}
|
||||
permission?: PermissionConfig
|
||||
tools?: {
|
||||
[key: string]: boolean
|
||||
}
|
||||
|
|
@ -1765,6 +1770,14 @@ export type File = {
|
|||
status: "added" | "deleted" | "modified"
|
||||
}
|
||||
|
||||
export type PermissionRule = {
|
||||
[key: string]: PermissionActionConfig
|
||||
}
|
||||
|
||||
export type PermissionRuleset = {
|
||||
[key: string]: PermissionRule
|
||||
}
|
||||
|
||||
export type Agent = {
|
||||
name: string
|
||||
description?: string
|
||||
|
|
@ -1775,27 +1788,16 @@ export type Agent = {
|
|||
topP?: number
|
||||
temperature?: number
|
||||
color?: string
|
||||
permission: {
|
||||
edit: "ask" | "allow" | "deny"
|
||||
bash: {
|
||||
[key: string]: "ask" | "allow" | "deny"
|
||||
}
|
||||
webfetch?: "ask" | "allow" | "deny"
|
||||
doom_loop?: "ask" | "allow" | "deny"
|
||||
external_directory?: "ask" | "allow" | "deny"
|
||||
}
|
||||
permission: PermissionRuleset
|
||||
model?: {
|
||||
modelID: string
|
||||
providerID: string
|
||||
}
|
||||
prompt?: string
|
||||
tools: {
|
||||
[key: string]: boolean
|
||||
}
|
||||
options: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
maxSteps?: number
|
||||
steps?: number
|
||||
}
|
||||
|
||||
export type McpStatusConnected = {
|
||||
|
|
|
|||
|
|
@ -6235,6 +6235,54 @@
|
|||
},
|
||||
"required": ["type", "properties"]
|
||||
},
|
||||
"PermissionRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^per.*"
|
||||
},
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses.*"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"keys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"patterns": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["id", "sessionID", "type", "title", "description", "keys"]
|
||||
},
|
||||
"Event.permission.request": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "permission.request"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/components/schemas/PermissionRequest"
|
||||
}
|
||||
},
|
||||
"required": ["type", "properties"]
|
||||
},
|
||||
"Permission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -7054,6 +7102,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/Event.message.part.removed"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Event.permission.request"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Event.permission.updated"
|
||||
},
|
||||
|
|
@ -7597,6 +7648,76 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"PermissionActionConfig": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"PermissionObjectConfig": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
}
|
||||
},
|
||||
"PermissionRuleConfig": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionObjectConfig"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PermissionConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"read": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"edit": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"glob": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"grep": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"list": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"bash": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"task": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"external_directory": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"todowrite": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"todoread": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"websearch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"codesearch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"doom_loop": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
}
|
||||
},
|
||||
"AgentConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -7644,43 +7765,7 @@
|
|||
"maximum": 9007199254740991
|
||||
},
|
||||
"permission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"edit": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"bash": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"webfetch": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"doom_loop": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"external_directory": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/PermissionConfig"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
|
|
@ -8352,43 +8437,7 @@
|
|||
"$ref": "#/components/schemas/LayoutConfig"
|
||||
},
|
||||
"permission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"edit": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"bash": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"webfetch": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"doom_loop": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"external_directory": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/PermissionConfig"
|
||||
},
|
||||
"tools": {
|
||||
"type": "object",
|
||||
|
|
@ -9137,6 +9186,24 @@
|
|||
},
|
||||
"required": ["path", "added", "removed", "status"]
|
||||
},
|
||||
"PermissionRule": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
}
|
||||
},
|
||||
"PermissionRuleset": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionRule"
|
||||
}
|
||||
},
|
||||
"Agent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -9169,36 +9236,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"permission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"edit": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"bash": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
}
|
||||
},
|
||||
"webfetch": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"doom_loop": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"external_directory": {
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
}
|
||||
},
|
||||
"required": ["edit", "bash"]
|
||||
"$ref": "#/components/schemas/PermissionRuleset"
|
||||
},
|
||||
"model": {
|
||||
"type": "object",
|
||||
|
|
@ -9215,15 +9253,6 @@
|
|||
"prompt": {
|
||||
"type": "string"
|
||||
},
|
||||
"tools": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
|
|
@ -9231,13 +9260,13 @@
|
|||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"maxSteps": {
|
||||
"steps": {
|
||||
"type": "integer",
|
||||
"exclusiveMinimum": 0,
|
||||
"maximum": 9007199254740991
|
||||
}
|
||||
},
|
||||
"required": ["name", "mode", "permission", "tools", "options"]
|
||||
"required": ["name", "mode", "permission", "options"]
|
||||
},
|
||||
"MCPStatusConnected": {
|
||||
"type": "object",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue